From bloom-picayune.mit.edu!snorkelwacker.mit.edu!spool.mu.edu!mips!quack!mrapple Wed Oct 30 01:20:16 EST 1991 Article: 6080 of comp.os.cpm Path: bloom-picayune.mit.edu!snorkelwacker.mit.edu!spool.mu.edu!mips!quack!mrapple From: mrapple@quack.sac.ca.us (Nick Sayer) Newsgroups: comp.os.cpm Subject: Re: Sayer's UP/M program Message-ID: Date: 26 Oct 91 19:38:49 GMT Article-I.D.: quack.k8yiY1G References: <9110240109.AA07410@hopf.math.purdue.edu> Organization: The Duck Pond public unix, Stockton, CA Lines: 40 wilker@HOPF.MATH.PURDUE.EDU (Clarence Wilkerson) writes: >I'm trying to get this running. It compiles fine, but I must not have the >files from CP/M set up properly. Examination of the code in upm.c didn't >show any initialization of the fake Z80 memory, setting of jump tables or >similar activity. Does anyone have this running enough to give me a few >hints? Woah. Brings back memories. That thing was such a performance pig I just chucked it. Took 2 minutes to do a 'DIR' on an empty disk on a Sun 3/160. The emulator itself is just that - an emulator. If I remember right, upm loaded in a .HEX file, relocated it to the top of memory (after figuring out how much to leave for BIOS and buffers), and jumped to $8000. The relocator assumed the code was loaded in at 0, with all the jumps set to run at location 0. The relocation bitmap started at $4000, and a length byte was at $FFFF, which was the number of pages in the relocated chunk. The bitmap was one bit per byte of relocated code. If the bit was 1, then an offset was applied to the byte as it was copied into place, otherwise the byte was copied verbatim. The BIOS jump table was 76 C9 00 76 C9 00.... That is, a bunch of HALTs, then RETs. The idea was that a HALT caused the emulator to return to the C program that called it, which then examined (PC%64)/3 to see which BIOS call it was. It then performed the desired BIOS function (in C), incremented PC, and jumped back into the emulator. The rest of CP/M (BDOS, CCP) was Z-80. That way, someone could have made ZCPR for it if they wanted. I couldn't distribute BDOS/CCP since they're still subject to Digital Research's copyright. Which is a shame, since DR no longer distributes CP/M. IMHO if they're not going to sell it, they ought to give it to someone who will, or make it PD. But that's another story. -- Nick Sayer | "Don't try this at home, kids. This should mrapple@quack.sac.ca.us | only be done by trained, professional idiots." N6QQQ @ K3MC | +1 408 249 9630 (modem) | -- Plucky Duck From bloom-picayune.mit.edu!snorkelwacker.mit.edu!apple!mips!quack!mrapple Wed Oct 30 01:22:49 EST 1991 Article: 6083 of comp.os.cpm Path: bloom-picayune.mit.edu!snorkelwacker.mit.edu!apple!mips!quack!mrapple From: mrapple@quack.sac.ca.us (Nick Sayer) Newsgroups: comp.os.cpm Subject: Re: Sayer's UP/M program Message-ID: Date: 27 Oct 91 05:25:44 GMT References: <9110240109.AA07410@hopf.math.purdue.edu> <23583@mentor.cc.purdue.edu> Organization: The Duck Pond public unix, Stockton, CA Lines: 25 wilker@gauss.math.purdue.edu (Clarence Wilkerson) writes: >That about summarizes what I got from the documentation. >I've been trying to use it with a CCP and BDOS from >DOSPLUS off of SIMTEL20. There doesn't seem to be any >pure 8080 code replacement CCP and BDOS replacements, >especially the BDOS. That's why upm is a Z-80 interpreter. > The ZCPR can be hacked into 8080 >at the cost of leaving out some features and there are >several Z80 code BDOS replacements in SIMTEL20 's CP/M >archives. No need to do that. The emulator handles Z-80. Now the emulator wasn't fully debugged, so there aren't any guarantees. I don't even have the source anymore. -- Nick Sayer | "It walks down stairs, alone or in pairs, mrapple@quack.sac.ca.us | It rolls over your neighbor's dog, N6QQQ | It's great for a snack, and fits on your back, +1 408 249 9630 (modem) | It's Log! Log! Log!" (from Blam-o) From bloom-picayune.mit.edu!snorkelwacker.mit.edu!stanford.edu!rutgers!ub!galileo.cc.rochester.edu!rochester!cornell!batcomputer!theory.TC.Cornell.EDU!gould Wed Oct 30 01:23:49 EST 1991 Article: 6085 of comp.os.cpm Path: bloom-picayune.mit.edu!snorkelwacker.mit.edu!stanford.edu!rutgers!ub!galileo.cc.rochester.edu!rochester!cornell!batcomputer!theory.TC.Cornell.EDU!gould From: gould@theory.TC.Cornell.EDU (EWD) Newsgroups: comp.os.cpm Subject: Re: Sayer's UP/M program Summary: Bravo Message-ID: <1991Oct27.131127.4838@tc.cornell.edu> Date: 27 Oct 91 13:11:27 GMT References: <23583@mentor.cc.purdue.edu> Sender: news@tc.cornell.edu Organization: Cornell Theory Center Lines: 39 Nntp-Posting-Host: theory.tc.cornell.edu In article mrapple@quack.sac.ca.us (Nick Sayer) writes: >No need to do that. The emulator handles Z-80. >Now the emulator wasn't fully debugged, so there >aren't any guarantees. I don't even have the source >anymore. > Had a lot of fun with that upm, hacking for it's own sake. As I reall there were amazingly few errors, like xoring swapped with an and in one of the series, and some incorrect flag states, I forget. On some of the fast machines it will give respectable performance, especially for disk intensive tasks. The only way I was able to debug it properly while hacking for all the speed I could find was to set up test programs on a real Z80 CPM machine, dump the console output back to unix, then run the same program on the emulator, and use diff to munch the megabytes. That sure zeroed in on some obscure errors in a hurry. In the end though, all I really wanted was to bring unix tools to the CPM code, compile, and debug cycle. To that end all it took was some utilities to switch the conin/conout from the real console to the serial port and back, a simple file transfer utility, and then a rudimentary scripting utility on the unix side. It's a lot of fun to type "make" and dog that little puppie. Meanwhile, in another window, you can work on the next step. It's like revenge for all those hours spent plinking a little and waiting for the stinker to be ready for me, "Mush! Mush! Spin that floppy, compile that code! No rest for you! Now mush, mush!" C976, Eliot Eliot W. Dudley edudley@rodan.acs.syr.edu RD 1, Box 66 Cato, New York 13033 315 626 2878