RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » CP/Mega upgrade
CP/Mega upgrade [message #10367] Tue, 23 May 2023 11:52 Go to next message
rhkoolstar is currently offline  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

Re: CP/Mega upgrade [message #10368 is a reply to message #10367] Fri, 26 May 2023 22:55 Go to previous messageGo to next message
edzard is currently offline  edzard
Messages: 64
Registered: August 2019
Member
Hallo Rienk,

Impressive! Is there a github/Website where we can follow this project of yours?


Groet,

Edzard
Re: CP/Mega upgrade [message #10369 is a reply to message #10368] Sat, 27 May 2023 00:30 Go to previous message
rhkoolstar is currently offline  rhkoolstar
Messages: 276
Registered: October 2015
Senior Member
Oops, I see I forgot to spill the beans.... My bad Razz

The project is in my builderpages Here: https://www.retrobrewcomputers.org/doku.php?id=builderpages: rhkoolstar:start
Documentation is still flaky. Let me know if I forgot something or if something is unclear.

Have fun.
Rienk
Previous Topic: Z80 Multi Board Computer
Next Topic: Yet Another 6809 SBC


Current Time: Wed Mar 19 01:08:22 PDT 2025

Total time taken to generate the page: 0.00728 seconds