[Coco] Writing a CPU simulator for the 6809

Luis Antoniosi (CoCoDemus) retrocanada76 at gmail.com
Mon Aug 26 23:54:28 EDT 2013


Are you familiar with state machine concept ? And also O.O. ?

MESS is O.O., so it has a device base class and the mc6847 will be a
derived class from it. As the emulated SAM and each other component on a
real Coco. Each time the emulated SAM intercepts a write or read to the VDG
registers it triggers its states inside the emulated mc6847.

For the timings, for each scanline (1/60/192 seconds) a method is called on
mc6847 object that will update the current scanline and perform all
operations on it. Later on there is an update screen method where the
mc6847 object will dump all the changes on it in a bitmap image that is
later displayed on screen.

To get the precise scanline time ? you use native OS functions for it.



On Mon, Aug 26, 2013 at 11:13 PM, Tony Cappellini <cappy2112 at gmail.com>wrote:

> I recently saw a presentation where the presenter wrote an Apple 2
> simulator in Python. I thought this was pretty even though the actual demo
> was very minimal.
> His project claims that he is able to run many Apple Basic programs. I
> thought this would be a fun project to do for the 6809.
>
> Looking at the source code it's somewhat straightforward how he did this,
> but I am puzzled when it comes to executing the Basic ROM.
>
> I know VCC executes COCO ROMS, as do MAME, MESS, and other emulators.
>
> What I don't understand is-
> ROMS typically have to initialize the hardware. Interrupt vectors need to
> be setup (usually in RAM), memory tests are done, I/O chips need to be
> programmed, etc..
>
> Since the emulators are in software, none of this hardware exists.
> 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.
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>



-- 
Long live the CoCo



More information about the Coco mailing list