Search found 8 matches
- Fri Jul 19, 2013 12:04 pm
- Forum: Video Display Processor
- Topic: HInt Counter timing
- Replies: 2
- Views: 4082
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...
- Fri Jul 19, 2013 11:32 am
- Forum: Video Display Processor
- Topic: HInt Counter timing
- Replies: 2
- Views: 4082
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...
- Thu Jul 18, 2013 2:08 pm
- Forum: Video Display Processor
- Topic: Palette color switching in HBlank
- Replies: 14
- Views: 22902
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...
- Thu Jul 18, 2013 1:55 am
- Forum: Video Display Processor
- Topic: Palette color switching in HBlank
- Replies: 14
- Views: 22902
- Wed Jul 17, 2013 10:27 pm
- Forum: Video Display Processor
- Topic: Palette color switching in HBlank
- Replies: 14
- Views: 22902
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...
- Wed Jul 17, 2013 4:38 pm
- Forum: Video Display Processor
- Topic: Palette color switching in HBlank
- Replies: 14
- Views: 22902
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...
- Wed Jul 17, 2013 1:40 pm
- Forum: Video Display Processor
- Topic: Palette color switching in HBlank
- Replies: 14
- Views: 22902
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...
- Tue Jul 16, 2013 9:46 pm
- Forum: Video Display Processor
- Topic: Palette color switching in HBlank
- Replies: 14
- Views: 22902
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...