TmEE co.(TM) wrote:In Sonic 3, the value in Hint reg correspondends to the line where water is... and 255 is when there's no water.
as far as I know, register #10 setups a counter which is only decremented on lines 0-224. The counter value is reloaed:
1/ at the start of a new frame
2/ when the counter expired (Hint becomes pending)
3/ on lines 225-261.
This way, programming register #10 with a value above 224 simply prevents Hint from being pending (whereas bit IE1 in register #0 enable/disable Hint from being processed to the CPU via IPL1 & IPL2, but Hint remains pending as long it has not been acknowledged by the CPU)
255 is the default value I suppose.
Anyway, without homebrew, it would be difficult to test interrupts timing since you can only enable/disable interrupt by software via IE0&IE1 bits in VDP registers (I don't know about the initial state but they are probably both disactivated)
but I think (maybe I'm wrong) that HSYNC and VSYNC signals are not managed by software, only by the VDP hardware: they respectively indicate that a new scanline and a new frame has been emited
what would be interesting (if your oscilloscope is precise enough) would be to count the exact number of 68000 (or Z80) cycles between two /HSYNC high-to-low transitions.
this would give the exact number of CPU cycles (maybe not an integer) running during one scanline
another interesting thing would be to count the number of /HSYNC high-to-low transitions between two /VSYNC high-to-low transition: this would give the exact number of scanlines in one frame. This is supposed to be 262 and 313 (for PAL megadrive) but maybe this is something more like 262.5 or 312.5 ?