nesdev.com
http://forums.nesdev.com/

How important is cycle accuracy for the CPU ?
http://forums.nesdev.com/viewtopic.php?f=3&t=14359
Page 2 of 2

Author:  amhndu [ Sun Jun 05, 2016 9:12 pm ]
Post subject:  Re: How important is cycle accuracy for the CPU ?

Quote:
So in other words, are you saying your project is type "a" (early stage) in this taxonomy?


Yes, that sounds about right.

Author:  zzo38 [ Mon Jun 06, 2016 9:48 am ]
Post subject:  Re: How important is cycle accuracy for the CPU ?

amhndu wrote:
If I understand you correctly, only the PPU, APU and mapper registers need to touched in the proper cycle, the CPU registers. the ROM and the SRAM read-writes are malleable ?
Yes, if the ROM/SRAM do not have side-effects (possibly with some mappers (even if none such currently exists) can have relevant timing-sensitive side-effects). But since the CPU accesses using one address space and PPU with other address space, it should treat the CPU's address space uniformly and always do the read/writes with the correct timing, and same with the PPU's address space. The A, X, Y, flags, stack pointer, and program counter in the CPU, and the internal calculations it uses, are not externally visible though, so it doesn't matter exactly when the registers are updated and when the calculations are performed, as long as it causes the correct sequence of read/writes, for example to add in the page-crossing penalty if applicable, and so on. For example, a read-modify-write on zero-page must result in the following sequence of operations: Read opcode, read next byte, read from effective address, write the old value to that address, write the new value to that address. During which step you calculate the new value and which step you set the flags is irrelevant, as long as they are done before the next instruction is executed.

Quote:
I should say that I'm not really aiming for perfect emulation and 100% game coverage.
That is OK, but then it isn't quite correct. I am saying that if I was making the emulator, I would want to aim for correctness. (Note that omitting some mappers does not make it incorrect, so a correct emulation does not necessarily do 100% game coverage anyways.)

Author:  Dwedit [ Mon Jun 06, 2016 11:01 am ]
Post subject:  Re: How important is cycle accuracy for the CPU ?

I recommend implementing mappers 0 (NROM/no mapper),1 (MMC1), 2 (UxROM), 3 (CNROM), and 7 (AxROM) first, since they are simple, easy, and widely used. It's nice to try to get Megaman working before Super Mario Bros :)

Author:  amhndu [ Mon Jun 06, 2016 8:38 pm ]
Post subject:  Re: How important is cycle accuracy for the CPU ?

Thank you very much, guys!

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/