I am working on an GBA emulator and stuck at implementing CPU cycles.I just know the basic knowledge about it, each instruction of ARM and THUMB mode as each different set of cycles for each instructions.Currently I am simply saying every ARM instructions cost 4 cycles andTHUMB instructions cost 2 cycles. But how do you implement it like the CPU documentation says? Does instruction cycles vary depending on which section of the memory it's currently accessing to? http://nocash.emubase.de/gbatek.htm#cpuinstructioncycletimesAccording to the above specification, it says different memory areas havedifferent waitstates but I don't know what it exactly mean. Furthermore, what are Non-sequential cycle, Sequential cycle, Internal Cycle,  Coprocessor Cycle for? I saw in some GBA source code that they are using PC to figure out how many cycles each instruction takes to complete, but how are they doing it?
Working with CPU cycles in Gameboy Advance
game development;cpu;process