Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!APOLLO.COM!eichin From: eichin@APOLLO.COM (Mark Eichin) Newsgroups: comp.os.cpm Subject: Re: Z80 Emulator Message-ID: <9101252151.AA21009@xuucp.ch.apollo.hp.com> Date: 25 Jan 91 21:48:15 GMT References: Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 38 From Lindsay Haisley : >>based Z80 emulator out there which does a >>full<< emulation of the CP/M >>BIOS, including disk functions. I'm looking for an emulator with a monitor Nick Sayer's emulator (posted to alt.sources a while ago, and written in reasonably portable (at least among larger machines) C) *only* fakes the BIOS (there's a table of BIOS entry points that does RST 38H for each, which is detected by the emulator - the emulator looks at the address, and does the appropriate BIOS function.) The BDOS is loaded in from an external file, but is a normal Z80 (or 8080) BDOS. The problem with this design is that it is *SLOW*. There are a number of places where the BDOS copies sectors around - that loop is emulated instruction by instruction, which takes a long time. From Clarence Wilkerson : >> If you just want a RAW z80 emulation package that will >>potentially run any z80 operating system, I haven't seen Nick's emulator can certainly run anything with a BIOS; in fact, if you disable the BIOS hooks and provide routines that do "the right thing" with IN and OUT you can probably emulate *any* z80... once I've got the time, I do intend to emulate the Radio Shack Model 4 (since I run TurboDOS on it - though I may try to get TRSDOS/LDOS up just for laughs...) >>in C. Complete z80 implementations may be hard to find, >>because often people get tired of thinking about half parity >>flags and DAA, etc. Nick's emulation is *very* careful, particularly due to my banging on it as an alpha tester... I also double checked everything against the Zilog Z80 manual for clarification of what the flags do. Half carry is done "live" as are all the flags (there is an "F" register, and everything tweaks it as it goes...) There isn't really any support for the different IM 0..2 interrupt modes, but I suspect that doesn't matter much for most uses - and that code would tend to need customization based on the particular hardware being emulated anyhow. _Mark_