Search found 8 matches

by mitchConnor
Fri Jul 19, 2013 12:04 pm
Forum: Video Display Processor
Topic: HInt Counter timing
Replies: 2
Views: 2137

Ok, that's almost what I thought. Good to have confirmation though, thanks. So with the following modifications it works: 1. Gradient_setNextColor() looks one ahead for the skip value. (because for clarity I want to keep my LUT format the same) 2. The skip value of the first entry gets halved becaus...
by mitchConnor
Fri Jul 19, 2013 11:32 am
Forum: Video Display Processor
Topic: HInt Counter timing
Replies: 2
Views: 2137

HInt Counter timing

Here I am again. Didn't think I would run into the next issue so quickly... I have now extended my color switching solution to use a lookup table that has two entries, one for color and one for the next line skip value (HInt counter). I'll just show you some code, it's simple: typedef struct Gradien...
by mitchConnor
Thu Jul 18, 2013 2:08 pm
Forum: Video Display Processor
Topic: Palette color switching in HBlank
Replies: 12
Views: 4945

Okay, I finally got it working now :) I hope future generations will also benefit from this thread ;) Btw, here my "final" code: void handleHBlank() { asm("move.l #0xc0000000, 0xc00004.l"); while((*((volatile u16*)GFX_CTRL_PORT) & 4) == 0); asm("move.w gradientTestColor2, 0xc00000.l"); gradientTestC...
by mitchConnor
Thu Jul 18, 2013 1:55 am
Forum: Video Display Processor
Topic: Palette color switching in HBlank
Replies: 12
Views: 4945

Yes, I do :) I'm still a bit confused about this topic and still haven't got it running properly. (And I understand your issue. I was wondering the same)
by mitchConnor
Wed Jul 17, 2013 10:27 pm
Forum: Video Display Processor
Topic: Palette color switching in HBlank
Replies: 12
Views: 4945

Hm, ok, just to make sure I understand it correctly: Actually I should "waste" a whole scanline by setting the color for the scanline that comes after the one which is after the end of the line at which the interrupt happens? :) Or to put it differently: If I set the interrupt counter to 7, the inte...
by mitchConnor
Wed Jul 17, 2013 4:38 pm
Forum: Video Display Processor
Topic: Palette color switching in HBlank
Replies: 12
Views: 4945

Thanks again. Most of it works now. But I have an interesting issue left: As long as the screen is static or I scroll only vertically, it's fine, but when I scroll horizontally, it flickers again, but only at the first color switch. My only guess is that my vblank routine might take too long, but th...
by mitchConnor
Wed Jul 17, 2013 1:40 pm
Forum: Video Display Processor
Topic: Palette color switching in HBlank
Replies: 12
Views: 4945

Thanks for your reply. I'm not really an assembler expert, but I got it working. I did it by looking at the code in MESS debugger and copying the needed fragments to sega.s. So after this, when I press F7 (jump to next interrupt) in MESS, it's only these lines: move.l #$c0000000, $c00004.l move.w $f...
by mitchConnor
Tue Jul 16, 2013 9:46 pm
Forum: Video Display Processor
Topic: Palette color switching in HBlank
Replies: 12
Views: 4945

Palette color switching in HBlank

Hi guys. First of all, I'm new here. But I have read quite a lot of posts already and lots of other Genesis info. I'm currently starting to port an existing iPhone retro game to the Genesis. It's not very far yet, just some level scrolling code and a couple music prototypes using Echo and sgdk. Noth...