Z80emulator

D'Arcy J.M. Cain darcy at druid.uucp
Fri Nov 16 03:39:00 AEST 1990


In article <274059c8.5f66 at uop.uop.edu> nsayer at uop.edu (Nick Sayer) writes:
> [...]
>No, you need to make a CPM file with the CPM bdos, CCP and bios. I
>can't distribute those. Digital Research's lawyer can beat up my lawyer. :-)
>
While my CP/M emulator isn't completely finished I am going to post it for
people to play with if they wish.  If anyone wants to hack on it feel free
to send back the fixes and I will include them.  I have taken what I think
is an interesting direction is this version to emulate the CP/M stuff.  I
do all the prompting and some specific commands such as SAVE, DIR etc myself
which gives me a lot of speed for those commands.  For the BIOS and BDOS I
don't have any Z80 code.  Instead I define the BDOS as starting at 0xfec0
and the BIOS at 0xff00.  The decoder treats any instruction above 0xfec0 as
if it was a RET.  The code that calls the decoder checks for that address
and emulates the BDOS or BIOS call at that point.  The neat thing is that
since the code is completely ignored you can have a TPA of 64K less the
256 bytes in page zero as long as the space above 0xfec0 is only used for
data or stack.  In fact the default stack at startup is 0xfff0.

Of course it is slow even though I decode *every* instruction through a
massive switch statement.  I have a few speedup ideas which depend on using
the capabilities of the host processor but this would change from CPU to
CPU.

There is a compile time option to make a debugging version which is even
slower but is really useful for debugging the emulator as well as ordinary
CP/M programs.  This isn't complete but is working to some extent.

Anyway watch alt.sources.  I'll post it shortly.

-- 
D'Arcy J.M. Cain (darcy at druid)     |
D'Arcy Cain Consulting             |   I support gun control.
West Hill, Ontario, Canada         |   Let's start with the government!
+ 416 281 6094                     |



More information about the Alt.sources mailing list