Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about CPU.hx #1

Open
lucas-aragno opened this issue Oct 16, 2017 · 1 comment
Open

Question about CPU.hx #1

lucas-aragno opened this issue Oct 16, 2017 · 1 comment

Comments

@lucas-aragno
Copy link

Hey ! first that all nice project! I'm reading different emulator implementations trying to learn a little bit more about how they work in im learning a lot from this codebase. Although I have a small question that you might be able to help me with.

I don't fully understand the values on the cycTable on the CPU.hx implementation could you explain what those numbers mean?

Thanks in advance!

@vujadin
Copy link
Owner

vujadin commented Oct 17, 2017

Hi. Numbers in cycTable means nothing in current implementation. You can safely delete that table and the emu will work just fine. The idea was "probably" (have in mind that I'm not original author, I just ported it from JAVA) to make CPU 'cycle accurate' and cycTable holds number of cycles each CPU instruction takes to execute.

'...Many games would make changes mid-frame so that the PPU would do one thing for one part of the screen and something else for the other — often used for split scrolling or rendering a score bar. This required precise timing and knowing exactly how many CPU cycles each instruction used. Things like this make emulation hard...'

It ended up with simpler (and less accurate) but faster method sacrificing overall emulator accuracy/quality (graphics glitches can be seen in games like MikeTyson PunchOut, Dracula...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants