>C=Y RM=80 LM=0 TM=3 BM=63 J=NLNW TEAM - Z80H/HD64180 by Dave Huffman KA0DNB1345 Williams st.Des Moines, Iowa 50317>C=NHDLNWMOD/TXT  Have you ever wanted another serial port or more memory. Well I have and after several bull sessions about the Ultiment upgrade for the Lnw I decided to try one. I selected the Hitachi HD64B180R0P processor. (The Z800 is still a dream Oh I think they are now calling it the Z280)  The first attractive item is the 20% or better increase in cpu speed with the same opcodes. Yes the HD64180 is Totaly compatable with the "Documented" instructions provided by Zilog. Howerer the HD64180 will Trap to Address 0 when a illegal instruction is attemped. All of the software I have will run fine except for ZEUS. I don't use it but a friend thinks is great. So inorder to run any programs that use the illegal instructions I had to write an Emulator. The HD64180 expanded instruction set and registers made that task easy. The emulator resides at 3500H and must patch the ROM image so I created a patched image and appended the emulator code to it so it would load at 3500H when I swaped in the New rom image. But of course I had to create a program to determine what type of processor I was running. The program is called SYS/CMD.  Here is a quick description of the HD64180. - Operating frequency to 6 MHZ ( 8 & 10 soon ) - On-Chip Memory Management Unit Supports 512K Bytes Memory & 64,000 Bytes I/O address space - Two Channel, Direct Memory Access Unit (DMAC) with Memory - Memory & Memory - I/O & Memory - Memory maped I/O - Wait input and On-chip Wait state generator for slow memory and I/O devices. - Programmable Dynamic Ram Refresh addressing and timming. - Two Channel, Full Duplex Asynchronous Serial Communication Interface (ACIA) with Programmable Baud Rate Generator and Modem Control Hand-shake Signals. - Clocked Serial I/O port (CSI/O) with High Speed Operation (200k Bits/Second at 4 Mhz & 300k at 6.144 Mhz) - Two Channel 16-bit Programmable Reload Timer (PRT) for counting timming and Waveform output generation. - Versatile Interupt Controller Manages Four External and Eight Internal Interupt sources. - Dual Buss Interface Compatable with all Standard Memory and Peripheral LSI. - On-Chip Clock generator.Enhanced Standard 8-bit Software Architecture. - Seven New Instructions including Multiply. - On-chip I/O address Relocation for board level Compatability with existing system and software. - Sleep mode and Stop mode for low power operation.   Now you don't have to use all of the features. You can hook up 40 wires, a clock source ( 2 Times the desired clock ) and it will boot and run fine.   The chip was designed to be compatable as possible so when it does boot it will appear very slow. This is because the Refresh generator and wait state generator is defaulted to the shortest refresh time interval and the longest wait state interval.   I started by just hooking up the bare minimums. And progressed form there. These circuit mods are for a full implementation of the MMU,ACIA,DMA Ect. The Only drawback I can see is the times 2 clock input requirement. This means that we cannot use the 3 clock speeds that exist in the Lnw. And to use the internal ACIA'S the clock must be 2 times 3.072 or 4.608 or 6.144. Now I am not going to run at anything slower that 6.144 so that means I needed 12.288 Mhz Xtal or source. At 6.144 Mhz, Trs-dos (Heaven forbid I said Trs-Dos) will not boot. With Newdos/80 BJ option must be at least = 3. So the obvious way to implement the HD64180 on the Lnw was to have both processors married together. This would still allow the booting of Disks that need slower speeds like Games. I would Like to see anyone play Galaxy Guard at 6.144 on HD64180 and get any points. ( The HD64180 at 6.144 preforms like the Z80 at over 8 mhz)  Two do this mod will would require 4 Tri-state buffers ( DPU3 74LS244 ) for the lines that are not Tri-stated on the Z80 and HD64180. Then connect all address/Data/Control lines in parallel and connect them to the Z80 Socket on the CPM Adapter board. The switching from one processor to the other is done by the BUSREQ lines. The HD64180 will run when its BUSREQ line is High and so will the Z80. Now when one BUSREQ is high and the other is low only one processor will run. The transition form one processor to the other must also be accompaned with a RESET so that processor will restart at 0000H. That's the reason for the diodes/Large Caps. We need a long enough Reset time for the old processor to leave the buss and the new one to be stable for a restart at 0000H.   The Mods on the CPM board are for the MMU usage. We need to stop the address decoding when A16 or A17 on the HD64180 is active. This means that when you have 256k or 512k on the main board, You can only bank in from 4000H and up because if A16 or A17 is active then the Address decoding on the cpm board is inactive giving full ram. ( NO I/O or Write Protect )   I have 256K (MB81256-10) 100ns Rams installed on the main board. The first 64K is accesable by both the Z80 & HD64180 but only the HD64180 can use the rest of the Memory.   With 256K you have 6 extra 32K banks + the 32K in the Expansion board. Here are two examples of what can be done with the extra memory.  1. We could create 4 completely seperate copyies of the operating system. I have written a program for the HD64180 & 256K Ram (For NewDos 80 Ver. 2.0 only) that sets up 4 copies of NewDos/80 in Partation 0-3. To access any other partation I press the f1 key and select the one I want. As I type I have slot 0 configured as a floppy NewDos, Slot 1 as a floppy NewDos with the Edtams loaded and a source code resident, Slot 2 as a Corvus/NewDos 80 with a word processor (This one) and Slot 3 as a Corvus/NewDos 80 with a Basic program loaded. The Corvus/Newdos is Ver. 2.0 with the Hard disk drivers added. This Version I like much better than 2.5 because I don't loose Hi memory, all of the drivers reside in SYS0/SYS. 2. We could create a RamDisk (A Real one that look just like a floppy). Lets see 256k-64k/256 = 768 sectors or 42 Track system disk. I have written a Ramdisk driver for NewDos/80 that resides at 3000H (Again I don't loose Hi memory) and uses the fifth pdrive slot (Rel # 4) for the ramdisk parameters. Once installed I can use a regular format command to format it as if it were a blank diskette. So this means I could have 5 Drives online at one time.   I will make all three of these programs available free of charge WITH the source Code if you send a mailer with a diskette and postage to me.   I spent a lot of hours creating the Mod and have had good luck. If you built your computer or are very comptent with electronics and know how  address select circuits work then this mod will be easy. If not don't do it. I spent a lot of hours getting the rest of the main board up to speed. This involved tracing down slow chips. The most critical timming is in the Ras/Cas/Mux circuits. I found them to be VERY cranky if its not prefect. While I have not converted my Lnw 80 Model 2 yet I think the mod will be the same.Ok the mod looks like this.   First the parts list is Fig. 61. You MUST have preformed the 6.67 Mhz mod. If not do it first. You do not have to install the 20 Mhz crystal but the Computer MUST be able to execute at that speed correctly, or you must add wait states via the programmable Wait state generator on the HD64180.   In making the 6.67 mod you had to drill 1 or 2 holes in the frame. Put another one in for the Duel processor switch.2. Cut a piece of perfboard (.100" on center) according to the layout fig 1.mount a 40 Pin adapter socket 3 holes over from the top left corner & 4 holes down. I made my adapters but I think Samtec p/n APA-640-G-D will work ok.3. Mount all sockets DPU1-6 according to the layout in fig. 1.4. Fig 2 is a list of the Parallel connections for the HD64180, Z80H & the Adapter socket. Make those connections. I used Wire Wrap wire and then soldered them. Make sure that the WW Sockets are short enough to fit *** Important *** .5. Fig. 3 is the connections for the 74S244 Buffer Make all connections EXCEPT DPU3-8 to U32-15, Leave about 4" hang free.6. Fig 4 is the connections for the Reset circuit. Make all connections EXCEPT DPU4-5, Leave about 4" hang free.7. Take a Break, drink a Pepsi.   Then remove the Main board from the case. This will make the Conversion easier.8. Fig. 5 is the mods to the CPM adapter board. So remove it and keep track of the wires you must unhook.    First pigyback (U31P) a 74LS32 on top of U31 on the CPM adapter board (Solder only 7 & 14). Bend up the pins we are going to use. U30 should be in the board but is not used at least until now. If you have the prints from Ed Linsley then we need to correct a couple of Items. U28-12 is really connected to U30-8. U23-8 is really connected to U30-9. U4 pins 8&9 are reversed and so is the symbol. Also U29 Pins 9&10 Are reversed.  What we are going to do is disable the Address select circuitry If A16 or A17 on the HD64180 is active. Now if you are using any interface cards such at a Corvus interface then we need to also keep it from decoding if A16 or A17 is active.9. Cut the pin at U13-14 and connect U13-15 to U30-6   Cut the pin at U17-6 and lift it up then connect it to U31P-4   Connect U31P-6 to U17-910. Cut A15 on the main board at the Expansion connector and connect one end of a wire to the expansion connector & leave free for now.11. Make the rest of the connections on the CPM adapter board in Fig. 5    a. Cut Trace U27-8 & U28-9    b. Cut Trace U28-8 U31-2    c. Connect U27-8 to U30-2               U30-1 to U31-2               U30-3 to U31P-3,5 & U30-5               U30-4 to U22-12,10               U18-2 to U22-9               U22-8 is the place we will connect the Free wire from the expansion connector A1512. Add the 2 resistors to U113-5&6 (Main Board) to ground.     Cut trace at U46-5 (Main board) going to the feed through (U18-5)    Cut Trace at U46-3 (main board) going to the Feed through (CLK)    Cut Trace at U18-5 (Main board) going to the Feed through (Mux)        Do this on back side of the board. This feed through will be called the MUX feed through. Connect a wire to it and make long enough to reach around the board to the CPM board when it in place.13. Make connections to one end of the wires that leave the CPM board (U31P-1&2)14. On the Main board Cut the trace between U32-7 & U29-115. On the Main board Cut the Trace Between U32-5 & R716. Place the Cpm Board (And All the Wires you took Off) on the Main Board.17. Connect the Wire we left Free from A15 on the Expansion board to U22-818. Connect Two wires to U31P-1&2 leave free.19. Ok pull the Z80cpu from the CPM ADP board.20. We should have 3 Wires to hook up before plug in the HD64180 Adapter board.    Make as short a connection as possible.    U32-15 (Clock) to DPU3-8    DPU3-12&3 to R7    DPU4-5 to C136 (Reset Circuit)21. Plug in the HD64180 Adapter board. Put in the Chips.22. Mount the DPDT Switch in the Frame so UP is the HD64180 & Down is the Z80H.23. At this point we should be able to boot the Z80 or HD64180 without the expansion interface. The HD64180 will appear to run Very slow. Don't worry the Wait states & Refresh need setup.24. If all went well then we can add the 256K rams. But run the system for several hours first.25. To add the rams remove the 4164's. Bend up pin 1 of each 41256 and place in in the ram sockests. Connect a wire (Solid WW Wire) to U113-7 and measure over to U96-1 then strip off the rest of the insolation. Lay down the bare wire across the 8 ram chips and solder the wire to the Bent up pins (1).   Now run two WW wires from U113-5&6 to DPU1-29&30.   You now have 256K Ram.26. To add the serial ports run the cables out the back and connect up the 12 Volts + & -. Good Luck....                                                       