|
I've started a space invaders emulator as well now.
I decided that rather than using a huge switch statement this time I would create an array of function pointers instead. Working perfectly so far.
I'm still fuzzy about interrupts, cycles, and IO.
cycles - would just putting in a variable that is set after after every execution and then decrements as the program loops (with no other executions) be sufficient?
interrupts - so I can just have a counter that decrements once per cycle and when it reaches zero I immediately generate the interrupt (so execute a RST opcode based on the interrupt) correct? If thats right then I'm just wondering where I can find info on what interrupts I need, vblank and end of vblank are mentioned on emutalk. is that all?
IO - anyone have any good sources of information for this, I'm just confused.
oh and the ram mirror. That's just an area in memory that mirrors the ram right? So if I write to the ram I have to write to the mirror and vice versa? Do I even need it or can I just have any writes to the mirror go to ram instead?
|