right now i am using a function for cpu reads, cpu writes, ppu reads, ppu writes; and in these functions i have a debug fucntion (commented out when not needed) and a switch statement for the memory or register. this works when i need to debug but i am now looking at optimizing.
i wanted to put the known memory accesses directly in the cpu or ppu. for example, in the cpu, zero page is always cpu memory. also the ppu has memory accesses that do not need a function.
if i code the memory accesses directly in the cpu or ppu, i would loose the debug unless i put alot of debug calls with them. this isnt too bad for development using #ifdef DEBUG_CPU or something, but i would like to have a debugger for run time. i know some emulators have it like nintendulator (ran it once on my brothers computer since i dont have winblows).
what methods would work for adding a runtime debugger while not loosing efficicency ? i was thinking of 2 cpu cores, with debug and with out, and 2 ppu cores with debug and without, but that would make alot more code and not sure that is a good way to go.
thanks
matt
i wanted to put the known memory accesses directly in the cpu or ppu. for example, in the cpu, zero page is always cpu memory. also the ppu has memory accesses that do not need a function.
if i code the memory accesses directly in the cpu or ppu, i would loose the debug unless i put alot of debug calls with them. this isnt too bad for development using #ifdef DEBUG_CPU or something, but i would like to have a debugger for run time. i know some emulators have it like nintendulator (ran it once on my brothers computer since i dont have winblows).
what methods would work for adding a runtime debugger while not loosing efficicency ? i was thinking of 2 cpu cores, with debug and with out, and 2 ppu cores with debug and without, but that would make alot more code and not sure that is a good way to go.
thanks
matt