[Coco] Writing a CPU simulator for the 6809

fodavis fodavis at hotmail.com
Tue Aug 27 08:50:38 EDT 2013




Sent via the Samsung Galaxy S™III, an AT&T 4G LTE smartphoneWilliam Astle <lost at l-w.ca> wrote:
On 2013-08-26 21:13, Tony Cappellini wrote:
> I don't understand how one would attempt to write software to simulate a
> hires graphics screen, while maintaining the timings that the VDG normally
> handles.

You do it exactly the same way you do the CPU. You do, of course, need
to apply the appropriate code to actually display the result of the VDG,
which is potentially difficult. However, if you are not interested in
precise timing but rather just having non-timing critical stuff working,
then it becomes a lot easier. I once lashed up a very basic "emulation"
of the VDG which only converted the assigned video memory to a window. I
think it took me a few hours to do that in C using SDL. It was not
timing accurate but it was enough to display what the rest of the
emulation was doing.

The PIAs and other stuff is no different. For a simple emulation, you
look at what behaviour is presented to the program and make that happen.
Accurate emulation is much harder.

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.

--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco



More information about the Coco mailing list