<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 01 Nov 1994 12:46:35 GMT
From   : David Alan Gilbert <gilbertd@...>
Subject: Another emulator

Hi,
Well I got bored 3 sunday's ago and decided to
get down to writing a beeb emulator.  As of last
night it happily runs OS 1.2, Basic, Wordwise and
Exmon.  There are quite a lot of hacks in there to
get it going and almost no hardware support.

Read character is intercepted and read with a C getchar,
I have a simple mode 0 emulator which intercepts screen memory
writes and uses plot commands to draw them on my Archimedes screen,
and also a simple mode 7 emulator which uses the Archimedes Mode 7 to
do the work.
There is a very simple model of the keyboard - which can't yet cause interrupts
(in actual fact there is nothing to cause interrupts yet - the
system VIA isn't finished).

I've fully emulated the whole 6502 instruction set - including BCD (although
that is not properly tested).
I'm quite suprised at how little hardware the OS needs to run.

Warning for people still hacking at the instruction set:
My last instruction level problem (that I fixed last night) was an 
error in my implementation of BRK, JSR, and RTS.
BRK should push the address of PC two instructions after the BRK.
JSR should push the address of the last byte of the JSR instruction
and RTS should add one to the recovered PC value.

This is not made clear in the Advanced User Guide, but is stated
in Birnbaum.

I'm hoping to get this thing running under X on Linux once my
PC arrives!


Dave (gilbertd@...)
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>