I'm trying to find the start of a second in assembler. For that I look at the RTC.
Now when I run my code it seems as if it looks at I/O port 0x00 instead of 0xb5. Does a IN A,(C) change the C-register as well?
dw start, endadr, start
; wait for counter to change; that'll be the start of a second
; select seconds low register
JP Z, startwait
Does a IN A,(C) change the C-register as well?
No, change only the accu
you clearly look at I/O port (C), which you gave the value 0xb5, why do you think you look at 0x00 ?
and why exactly do you look at port 0xb5 ? wouldnt a framecounter (using halts is you need) be easier / faster ?
for a FPS control (KONAMI way)
you needs, to call the game-play routine inside the INTERRUPT handler.
then you control the FPS in this way.
in this way, one gameplay sequence will be executed per VDP's frame (50/60 FPS)
if your gameplay routine takes between 1 > & <2 VDP frames for its execution. this routine will go for a (25FPS fixed)
so, every milisecond that you don't use in the execution of your routine, will be wasted by the HALT instruction.
make sure that in your code and the BIOS routines that you calls don't have "DI" or "EI" instructions.
Don't you have an account yet? Become an MSX-friend and register an account!
MSX ROM"YOKAI YASHIKI"YOUKAI CASIO BOXED ...
MSX KISEI Honkaku Shogi MSX2 Import Japan Video Gam ...
MSX SD GUNDAM Gachapon Senshi 2 CAPSULE SENKI Msx2/ ...
MSX GOLDEN GRAVE 1 Ohgon Haka Magical Zoo Cassette ...