I am making a simple seconds counter for the Genesis.. im using BASIC as I don't want to touch assembly (i get headaches, lol), and i have a problem.. while it works great for NTSC systems, which uses 60Hz, and that's equal to time, but when I run this code in 50Hz systems, the clock runs slower.... here's my code.. any suggestions?
Uhhh... maybe change that "sleep 60" to "sleep 50"?
Clearly it's using vblank as a timer. If you want your code to work with both PAL and NTSC, you need to check the byte at $A10001. If it has the $40 bit set, you are running on a PAL (50Hz) system.
8bitwizard wrote:Uhhh... maybe change that "sleep 60" to "sleep 50"?
Clearly it's using vblank as a timer. If you want your code to work with both PAL and NTSC, you need to check the byte at $A10001. If it has the $40 bit set, you are running on a PAL (50Hz) system.
yea, on my long 32 mile drive home, that light bulb in my head went off.. if it's going 10Hz slower, make the sleep shorter by 10... I thought I had to do some weird number..
thanks for that suggestion, i'll do that.. at the moment i have two versions..
All BAX sources I've seen seemed to use line labels. I thought that line numbers are better in the beginning, but later it became real pain in the @$$ when I improved my code or added additional features, I had to renumber everything... well, BAX is not QB so I haven't used it more, I prefer ASM.