CP/Mega upgrade [message #10367] |
Tue, 23 May 2023 11:52  |
rhkoolstar
Messages: 276 Registered: October 2015
|
Senior Member |
|
|
I kept working on the CP/Mega88 system. To recap; this is a CP/M system running an emulated i8080 in an ATMega88 with SD card storage and 128 kByte of banked memory.
I changed the i8080 to a Z80 emulation, with all undocumented and even some relevant Z180 opcodes.
The undocumented flags are not implemented, because my implementation does not allow for more than 6 flags and those flags don't do anything anyway.
The system passes all ZEXDOC tests. I also modified ZEXDOC to include most of the undocumented opcodes. (ZEXALL just tests the undocumented flags.)
Only the undocumented opcodes in the DD and FD group are left partially untested, most of these opcodes are repeats anyway.
Also the Z180 opcodes were not tested; my P112 does not like ZEXDOC as it is.
All DDCB, FDCB, CB and ED opcodes passed my tests. I used my Ampro miniboard (4MHz Z80) as a reference for this. (Modify ZEXDOC, generate new checksums on the Ampro, then run on CP/Mega with new checksums.)
Not surprisingly this no longer fits in an ATMega88, so I used an ATMega168 instead, where I still have about 2k of program memory free to use. It is now a CP/Mega168 I guess?
The Z80 emulator code is a bit chaotic, as I wanted to use rjmp and rcall instructions as much as possible to keep overhead limited. The order of the various parts is important to keep every jump within a 2k boundary.
The system is not blazingly fast, which is no surprise. It finishes ZEXDOC about 2.5 times slower than the Ampro littleboard. However the disk is faster so the apparent experience is somewhat like a 1.5-2 MHz system.
I added a C.B. Falconer dos+ image to the range of systems to boot from, as well as ZSDOS and ZPM3.
Up to now everything remains stable. I'm thinking about implementing a clock, but that might slow down the system even further.
[Updated on: Tue, 23 May 2023 11:54] Report message to a moderator
|
|
|
|
|