ANN: Z280 CPU and Z280RC system Emulator

220 views
Skip to first unread message

Hector Peraza

unread,
Sep 18, 2021, 3:57:46 PM9/18/21
to
Hello all,

Michal Tomek just released the beta version of the first and only Z280 emulator I'm aware of.

The emulator also simulates the hardware of a Z280RC machine, meaning it can be used as a development tool to test applications, OS ports, etc. before uploading the code to the target system.

The CPU core, MMU, DMA, timers, interrupts, traps, serial port and IDE interface are emulated accurately enough so that all four operating system ports available for the Z280RC are supported: CP/M 2.2, CP/M 3.0, RSX280 and UZI280.

The emulator can be downloaded from https://github.com/mtdev79/z280emu

Builds under Windows with MinGW and under Linux.

Enjoy!


Andrew Brehm

unread,
Oct 6, 2021, 4:34:47 PM10/6/21
to
Cool! Will try to try.

I always wondered if there is a z180 or z280 emulator around, wanted to see what can be done with those CPUs.



Shawn Sijnstra

unread,
Oct 9, 2021, 5:59:38 AM10/9/21
to
Looks very interesting! I'll be keeping an eye on this one as it develops.

Hector Peraza

unread,
Dec 24, 2021, 5:29:46 AM12/24/21
to
An update was released a couple of days ago, supporting emulation of Plasmo's quad-serial board.

The emulator can be downloaded as before from https://github.com/mtdev79/z280emu

Merry Christmas!

Peter Ljungberg

unread,
Dec 24, 2021, 5:48:47 PM12/24/21
to
I'm getting bad magic when trying to boot disk images, tried both CP/M 3 and RSX280 and following the instructions.

^P

Hector Peraza

unread,
Dec 25, 2021, 6:01:24 AM12/25/21
to
On Friday, December 24, 2021 at 11:48:47 PM UTC+1, peter.lju...@gmail.com wrote:
> I'm getting bad magic when trying to boot disk images, tried both CP/M 3 and RSX280 and following the instructions.
>
> ^P

Are you running the emulator under Linux or Windows? Did the 'makedisk' command succeeded?

You can also try the emulator-ready, full CF image from https://github.com/hperaza/RSX280/raw/master/DiskImages/cf128m-full.img.gz
Just download it with wget and rename it to cf00.dsk

I also just noticed that the z280rc.c file compiles with errors, the following patch fixes them:

--- z280rc.c~ 2021-12-23 19:10:22.000000000 +0100
+++ z280rc.c 2021-12-25 11:56:18.599227768 +0100
@@ -275,14 +275,14 @@

void do_timers() {
if (!--ins8250_clock) {
- ins8250_device_timer(quadser->m_chan0);
+ ins8250_device_timer(quadser->channel[0]);
if (enable_quadser > 1)
{
- ins8250_device_timer(quadser->m_chan1);
+ ins8250_device_timer(quadser->channel[1]);
if (enable_quadser == 4)
{
- ins8250_device_timer(quadser->m_chan2);
- ins8250_device_timer(quadser->m_chan3);
+ ins8250_device_timer(quadser->channel[2]);
+ ins8250_device_timer(quadser->channel[3]);
}
}
ins8250_clock = INS8250_DIVISOR;

I wrote Michal Tomek about the issue; he should be fixing the version on Github soon.

Peter Ljungberg

unread,
Dec 25, 2021, 7:22:33 AM12/25/21
to
I tried on macOS (Monterey) and Linux Ubuntu (20.04) and had the same problem on both, the compiler errors and then I tried an older version (1.0) and got the "bad magic" when trying to start with disk images created, tried several times.

z280-master % cp cf128m-full.img cf00.dsk
z280emu-master % ./z280rc -d
z280emu v1.0 Z280RC
Serial port 0 listening on 10280
Serial port 0 connected
ide: IDE0: 0: bad magic
ide: IDE0: 0: not present
ide: IDE0: 0: not present

^P

Peter Ljungberg

unread,
Dec 25, 2021, 7:39:03 AM12/25/21
to
Following up:

Patched, compiled and trying the cf128m-full.img

z280emu-master-3 % ./z280rc -d
z280emu v1.0 Z280RC
Serial port 0 listening on 10280
Serial port 0 connected
No ROM found.
void z280uart_device_reset(struct z280uart_device *)
void z280uart_device_update_serial(struct z280uart_device *) "Z280UART" setting data frame 1+8O1
- Source clk rate = ext CTIN1 (1843200)
- BRG rate 115200
cpu_reset_z280
8250 [QUADSER.0] reset
8250 [QUADSER.0] set baud rate DL=0001, prescaler=4.000, baud=115200
8250 [QUADSER.1] reset
8250 [QUADSER.1] set baud rate DL=0001, prescaler=4.000, baud=115200
8250 [QUADSER.2] reset
8250 [QUADSER.2] set baud rate DL=0001, prescaler=4.000, baud=115200
8250 [QUADSER.3] reset
8250 [QUADSER.3] set baud rate DL=0001, prescaler=4.000, baud=115200
instrs:0, time:0

^P

Hector Peraza

unread,
Dec 25, 2021, 7:45:03 AM12/25/21
to
That's strange, it looks like the disk image is corrupted. Are you sure the image is in the same directory you are executing the emulator from? From what you typed above it looks like you copied the image to a directory named 'z280-master', yet you are executing the emulator from 'z280emu-master'.

The 'bad magic' error happens only if the disk image does not start with the 8-char '1DED15C0' signature. You can use the 'od' command to check the image header, e.g.:

$ od -a -N 16 cf00.dsk
0000000 1 D E D 1 5 C 0 nul nul nul nul nul nul nul nul
0000020

Hector Peraza

unread,
Dec 25, 2021, 7:50:04 AM12/25/21
to
On Saturday, December 25, 2021 at 1:39:03 PM UTC+1, peter.lju...@gmail.com wrote:
> Following up:
>
> Patched, compiled and trying the cf128m-full.img
>
> z280emu-master-3 % ./z280rc -d
> z280emu v1.0 Z280RC
> Serial port 0 listening on 10280
> Serial port 0 connected
> No ROM found.
> void z280uart_device_reset(struct z280uart_device *)
> void z280uart_device_update_serial(struct z280uart_device *) "Z280UART" setting data frame 1+8O1
> - Source clk rate = ext CTIN1 (1843200)
> - BRG rate 115200
> cpu_reset_z280
> 8250 [QUADSER.0] reset
> 8250 [QUADSER.0] set baud rate DL=0001, prescaler=4.000, baud=115200
> 8250 [QUADSER.1] reset
> 8250 [QUADSER.1] set baud rate DL=0001, prescaler=4.000, baud=115200
> 8250 [QUADSER.2] reset
> 8250 [QUADSER.2] set baud rate DL=0001, prescaler=4.000, baud=115200
> 8250 [QUADSER.3] reset
> 8250 [QUADSER.3] set baud rate DL=0001, prescaler=4.000, baud=115200
> instrs:0, time:0
>
> ^P

"No ROM found" means you are missing the 'cfmonldr.bin' file.

Peter Ljungberg

unread,
Dec 25, 2021, 8:21:50 AM12/25/21
to
Yeah, got it working:

TinyZZ Monitor v2.1 12-Mar-2021

>S
?

>Help
G <addr> CR
R <track> <sector>
D <start addr> <end addr>
Z CR
F CR
T CR
E <addr>
X <options> CR
B <options> CR
C <options> CR

>Boot
1 - User Apps
2 - CP/M 2.2
3 - CP/M 3
4 - RSX280
5 - UZI280
Select: 4 Press Return to confirm:

Z280RC 2048K RSX280 V6.26

>RED DU4:=LB:
>
>RED DU4:=SY:
>MOU DU4:
>@SY0:[SYSTEM]STARTUP.CMD
>* Please enter Time and Date (HR:MN DD-MMM-YYYY) [S]:

Hector Peraza

unread,
Dec 25, 2021, 8:23:25 AM12/25/21
to
:-)
Reply all
Reply to author
Forward
0 new messages