RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » ANN: Z280 CPU and Z280RC system Emulator
ANN: Z280 CPU and Z280RC system Emulator [message #9136] Sat, 18 September 2021 13:07 Go to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
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 Plasmo's 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. Future emulation of the CPU280 board is also planned, which will make it easier to e.g. test ROM variants without wearing out EPROMs and sockets.

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 and run stably: 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!
Re: ANN: Z280 CPU and Z280RC system Emulator [message #9138 is a reply to message #9136] Sun, 19 September 2021 12:50 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
Just starting to have a play with it - it's an impressive piece of work to emulate such a complex device.
Re: ANN: Z280 CPU and Z280RC system Emulator [message #9141 is a reply to message #9138] Mon, 20 September 2021 16:51 Go to previous messageGo to next message
agn453 is currently offline  agn453
Messages: 68
Registered: June 2018
Location: Newcastle, NSW, Australia
Member
An update for users of Bill Shen's Z280RC board.

The Covid-19 lockdown in my region of the world has motivated me to do some updates to the Z280RC CP/M software BIOS.

Since I've been running into "No room" errors from lack of directory entries, I've decided to re-organise the CompactFlash disk layout to support additional directory entries (from 512 to 2048) for both the CP/M 2.2 and CP/M 3 systems. The disk is still in a raw format (without a MBR partition scheme), but now each of the CP/M drive partitions are 8MB each and use the available space.

The previous disk layout had one track that was not used. Now the A: drive uses tracks 1-63 with track 0 for the ZZmon boot loaders etc), Drives B: to D: use tracks 0-63.

NOTE: This new layout is incompatible with the old Z280RC CompactFlash card layout. To get it going, I suggest using a new card (128MB or greater if you wish to try RSX280 and UZI280 operating systems too).

The details and a down-loadable CP/M image that you can write to a new CompactFlash card are on my GitHub at

https://github.com/agn453/Z280RC

Tony


--
Tony Nicholson

[Updated on: Mon, 20 September 2021 17:07]

Report message to a moderator

Re: ANN: Z280 CPU and Z280RC system Emulator [message #9793 is a reply to message #9141] Sun, 27 February 2022 18:35 Go to previous messageGo to next message
lowen is currently offline  lowen
Messages: 226
Registered: August 2016
Location: Western NC USA
Senior Member
Hector, Tony, and Michal,

Wow, great work indeed. I have been following the development for a while, but just had not had time to play with it at all.

I got a bit of time tonight.

I'm running Debian Linux 11, for the baseline. The z280emu, freshly updated from github, built quickly with no errors.

Rather than go through the build process myself for the CF image, I decided I wanted to use Tony's prebuilt image. Something about not reinventing wheels, etc.

The z280emu IDE emulation layer (credited to none other than Alan Cox; hi etchedpixels!) seems to need some header information. Trying to use the raw image just gave a nice error:
lowen@lowen-7740:~/cpm/z280rc$ z280rc
z280emu v1.0 Z280RC
Serial port 0 listening on 10280
Serial port 0 connected
No ROM found.
ide: IDE0: 0: bad magic
instrs:0, time:0

Is the IDE header, all 1K of it, documented anywhere other than the code itself?

So, I used the z280emu bundled 'makedisk' utility to create a blank CF, truncated it to 1K, then appended Tony's image to it. Not knowing what all the header does, it was worth a try at least....

Terminal 1:
lowen@lowen-7740:~/cpm/z280rc$ z280rc
z280emu v1.0 Z280RC
Serial port 0 listening on 10280
Serial port 0 connected

Terminal 2:
lowen@lowen-7740:~/cpm/z280rc$ stty raw -echo; nc 127.0.0.1 10280

TinyZZ Monitor for Z280RC v2.3 18-Sep-2021


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

Z280RC CP/M 3 Loader LDR 20210919
With Cache DMACont. 
CF A: 

CPMLDR3 - CP/M V3.0 Loader
Copyright (C) 1982, Digital Research

 RESBIOS3 SPR  F900  0700
 BNKBIOS3 SPR  C100  1F00
 RESBDOS3 SPR  F300  0600
 BNKBDOS3 SPR  9300  2E00
 
 60K TPA

%RAMDISK label missing. Initialise (Y/N) ? Y - Done.

%QUADSER I/O board not detected

Z280RC Banked BIOS BIG  20210919
With Cache MMUMOVE DMACont. QuadSer CSVAlloc
Drives CF A-D: Ram M:

C>; C:PROFILE.SUB - Configure CP/M environment
C>;
C>; Copy XMODEM default configuration to RAMdisk
C>a:pip m:=a:xmz280rc.cfg[vwrg0]

C>a:set m:xmz280rc.cfg [sys ro]

M:XMZ280RC.CFG  set to system (SYS), Read Only (RO)     

C>; Search path is current drive, RAMdisk, drive C then drive A
C>a:setdef * m: c: a: [order=(com,sub) display page uk temporary=m]

Drive Search Path:
1st Drive            - Default
2nd Drive            - M:
3rd Drive            - C:
4th Drive            - A:

Search Order         - COM, SUB
Temporary Drive      - M:
Console Page Mode    - On
Program Name Display - On
Date format used     - UK

C>; Use TTY3 at 115200 bps for Kermit (using the AUX: device)
C>;a:device aux:=tty3[115200]
C>; Console is both UART and TTY2 at 19200 bps
C>;a:device con:=uart,tty2[19200,xon]
C>a:date
A:DATE     COM
Sun 27/02/2022 21:09:34
C>


Well, it booted. That's cool.

EDIT: The code in ide.c, ide.h, and makedisk.c is actually pretty clear. So the first 512-byte sector gets a signature,
1DED15C0
(IDE Disc 0....)

We skip to the second sector, and I see some flags, a serial number, and then a strange-looking string....
0A100.10CAEMR AORDNUEN R0v1.
AH! byte-swapped.... "A001.001 ACME ROADRUNNER v0.1" ... and then there are the CHS values, among other things. The code is clear in ide.c, function ide_make_drive (it's the last function in ide.c, so it's easy to find).


--
Bughlt: Sckmud
Shut her down Scotty, she's sucking mud again!

[Updated on: Sun, 27 February 2022 20:55]

Report message to a moderator

Re: ANN: Z280 CPU and Z280RC system Emulator [message #9802 is a reply to message #9793] Wed, 02 March 2022 11:38 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
There is a header in block 0 and the ATA IDENTIFY in block 1 straight from the standard. It's a shade confusing because ATA is 256 words not 512 bytes although people tend to think of it that way.

[Updated on: Wed, 02 March 2022 11:38]

Report message to a moderator

Re: ANN: Z280 CPU and Z280RC system Emulator [message #9804 is a reply to message #9802] Thu, 03 March 2022 04:45 Go to previous message
lowen is currently offline  lowen
Messages: 226
Registered: August 2016
Location: Western NC USA
Senior Member
Ah, now THAT makes sense to do it that way. Thanks!

--
Bughlt: Sckmud
Shut her down Scotty, she's sucking mud again!
Previous Topic: Breakout clone for my 6502 / TMS9918A build
Next Topic: KiCAD footprint Molex drive power connector?


Current Time: Sat Mar 15 20:46:18 PDT 2025

Total time taken to generate the page: 0.00655 seconds