-
Notifications
You must be signed in to change notification settings - Fork 7
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
CPU speed #21
Comments
I'm really glad you've had a look at this! The cpuCycles for() loop was originally two nested loops, an inner one for the DMA and and outer one for the CPU... to address this very timing concern you have spotted. But I too had difficulty getting it to work. The only way to make it work was to have a 1:1 CPU:DMA execution cycle. No idea why. My local code also has a chip address space lock out for the CPU, so the CPU has to wait if the DMA is using the memory cycle... again it doesn't work, so I've disabled it for now. If you look at main.c you will see just before the main loop, there are a few commented out functions, these are to run the CPU in a separate thread from the DMA. Again it doesn't work yet, I think the issues is something to do with timing synchronisation. |
This is actually quite an important issue. One of my hopes for Omega is that I can be used as a sort of “compatibility library”. As @mithrendal already alluded to, I want the CPU emulation and chipset emulation completely independent, so it can run as a “device driver” for operating systems running in non Amiga hardware... I spent a few hours on this last night, but didn’t make much progress. -edit- sorry for the random thread comments/closing/opening... Github is not very iPhone friendly 😄 |
I've noticed that the CPU is running way too fast. In the main loop, a single CPU instruction is called for each DMA cycle. This means that each CPU instruction has a mean execution time of 2 CPU cycles.
I've tried to make it a little more accurate by changing it to:
cpu_executes has been changed to return the number of performed CPU cycles (which is given back by the Musashi CPU). cpuClock and dmaClock are two long variables initialised with 0.
Unfortunately, the emulator does not work with this changed configuration.
It processes 106 frames and then aborts with
The text was updated successfully, but these errors were encountered: