home *** CD-ROM | disk | FTP | other *** search
- From: darcy@druid.uucp (D'Arcy J.M. Cain)
- Newsgroups: alt.sources
- Subject: Re: Z80emulator
- Message-ID: <1990Nov15.163900.8326@druid.uucp>
- Date: 15 Nov 90 16:39:00 GMT
-
- In article <274059c8.5f66@uop.uop.edu> nsayer@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@druid) |
- D'Arcy Cain Consulting | I support gun control.
- West Hill, Ontario, Canada | Let's start with the government!
- + 416 281 6094 |
-