6502 Cycles / Run / etc. update, Timing of thread and internal IRQ #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I updated the MOS6520.pas according to the *.c source. In my oppinion the cycles fields are missing in the IRQ/NMI/Push/Pop and MemRead and Write functions. This is not added now.
I implemented a much better timing behaviour in the thread, running with both PAL and NTSC firmware.
I implemented also an internal method to execute the IRQ by using the cycles counter and the value from the VIA timer register. This is more precise than using an external timer and allows the VIA register change by the user program.
Take a look if the might fit into the project.
To validate the timing you may use the following basic line. In command mode enter
?TI$
than hit enter and start a stop watch. The VIC-20 will print something like "000022" which says that the system is up and running for 00h, 00m and 22s
Enter the command again and wait until you stopwatch shows that one minute is gone.
The display should show "000122", telling that one minute is gone.