<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 30 Aug 1994 12:12:38 EST
From   : Stephen Quan <quan@...>
Subject: Re: Emulator Fundamentals

> Hi,
> 
> Is there a general structure to software emulators? For example, in 
> James Fidell's BBC B emulator, the first thing that is done is to 
> load the OS ROM. What happens after that? If someone could explain
> generally how it all works, I would appreciate it very much.
> 
> Thanks.
> 
> Raymond.

Well, as far writing the emulator goes, the first thing was get
a working 6502.  I started with a very limited set of structions
that were emulated, and have it bomb out on the first RTS command.

When the 6502 is done, you can load in the OS rom at $C000-$FFFF,
and load in a memory image of $000-$DFF and set your PC to the
word address stored in $FFFC, and you things will work.

You can also trace where OSRDCH and OSWRCH entry points are, and
replace it with a hack so that it calls your version of OSRDCH
and OSWRCH.  If all works, you should find the system boots up
but reports that there is no language (ie. BASIC).  But you'll
be able to do simple * commands.
-- 
Stephen Quan (quan@...                 ), SysAdmin, Analyst/Programmer.
Centre for Spatial Information Studies, University of Tasmania, Hobart.
GPO BOX 252C, Australia, 7001.  Local Tel: (002) 202898 Fax: (002) 240282
International Callers use +6102 instead of (002).
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>