[Coco] Writing a CPU simulator for the 6809
Steve Bjork
6809er at srbsoftware.com
Wed Aug 28 14:52:31 EDT 2013
On 8/27/2013 5:50 AM, fodavis wrote:
> Now, here's the fun part. You can implement a timing accurate
> emulation without actually emulating in real time! As long as it
> doesn't need to interface accurately with external timing sensitive
> stuff like sound hardware, you can run slower than real time as long
> as all the relative timings are correct. The machine being emulated
> won't know the difference. If the hardware running the emulator is
> fast enough, the simulation will be able to run in real time, of course.
fodavis is hitting the main point about the speed and timing of the
emulator. Its not the overall speed nor the timing of the overall
clocks cycles, But how well the states of each hardware component syncs
to each other.
As long as you have the VDG, CPU, I/O firing their data at the right
time then emulation should work with most software. (Even programs that
use hardware tricks.) The key is to know what each bit of hardware is
doing on each master clock of the system.
You already got a good start with understanding the cycles of the CPU,
now its time to start dive into the VDG. Start with the 6846/SAM system
before diving into the GIME of the CoCo 3. Remeber, the SAM is memory
controller and $FF22 VDG mode control the information that feeds into
the VDG. Flipping the bits on the SAM and $FF22 is how us video game
programmers got our little special effect to work. As side note, the
VDG reads $FF22 mode control on every scan line. So, you can change the
video mode from time and time again on every screen. I'm sure you did
not think about what in your emulation of the VDG.
You going to know a lot hardware be the time you done with this project.
Steve
More information about the Coco
mailing list