More RC2040 settings

The INI file

The ini file sets the defaults for the Rc2040 and substitutes for switches and buttons on boards that have none.

It allows you to select the ROM, RAM settings, and CPM settings for the emulation.

Using SIO based software

Requires CPM Inc Transient Apps SIO2.img,CPMIDE.id, 24886009.BIN and rc2040.ini for SIO2 as below

Rom Details

ROM has basic at address 0x0000 (000) ROMsize 0x2000
ROM has basic at address 0x2000 (001) ROMsize 0x2000
CP/M / Basic via monitor at address 0x4000 (010) ROMsize 0x4000
Small Computer Monitor at 0xe000 (111) ROMsize 0x2000
More detail at [https://github.com/RC2014Z80/RC2014/tree/master/ROMs/Factory]

RC2040.INI for SIO2

Config with no switches and other emulation settings for SIO2

[IDE]
idefile = “CPM Inc Transient Apps ACIA.img”;
idefilei = “CPMIDE.id”;

[ROM]
a13 = 0; // Address switches 0=0x0000 100=0x8000 111=0xE000
a14 = 1;
a15 = 0; // ROM file as ROM source
romfile = “24886009.BIN”; // source for Rom Loading – see a13 a14 a15
romsize=0x4000; // Size of ROM

[CONSOLE]
port = 1; // Console port 0=UART or 1=USB

[EMULATION] // ACIA=0 SIO=1;
serialtype = 1; //SIO selected
inidesc=”SIO using 24886009.BIN”; //describe the ini

[SPEED] //vPico overclocking *1000 Mhz
overclock = 250; //overclock the PICO at 250 x 1000


Using ACIA Software

Config with no switches and other emulation settings for ACIA

Requires CPM Inc Transient Apps ACIA.img,CPMIDE.id, R0001009.BIN and rc2040.ini as below

Rom Details

Rom has basic at address 0x0000 (000)
CP/M via monitor at address 0x8000 (100)
Small Computer Monitor at 0xe000 (111)
More detail at [https://github.com/RC2014Z80/RC2014/tree/master/ROMs/Factory]

RC2040.INI for ACIA

Config with no switches and other emulation settings

[IDE] idefile = “CPM Inc Transient Apps ACIA.img”;
idefilei = “CPMIDE.id”;

[ROM]
a13 = 0; // Address switches 0=0x0000 100=0x8000 111=0xE000
a14 = 0;
a15 = 1;

// Size of ROM
romsize=0x4000;

#ROM file as ROM source romfile = “R0001009.BIN”; // source for Rom Loading – see a13 a14 a15

[CONSOLE] // Console port 0=UART or 1=USB
port = 1;

[EMULATION]
serialtype = 0; // ACIA=0 SIO=1; ACIA selected
inidesc=”ACIA using R0001009.BIN”; //describe the ini

[SPEED] //Pico overclocking *1000 Mhz
overclock = 250; //overclock the PICO at 250 x 1000

Other INI options.

[ROM]
jumpto = 0x2000; // non standard start vector (e.g not 0x0000);
ramonly = 1;// ram only (no rom, 64K load from romfile);

[PORT]
pioa=0; // set the IO address of the 8 bit port

[IDE]
ide=0; //Turn off IDE
iscf=1; //enable cf file as idefile, rather than the .img format

[EMULATION]
inidesc=”Broken INI file”; //ini file description to show at boot

[DEBUG]
trace = 0 // trace details in RC2040.c

CPM Manager / CPM Tools

You can edit the contents of the SD card .img file using CPM Manger and directly add or remove files in the CPM img.

CPM Manager is available here.

If you are using Linux (or windows), you can use the CPM tools to add or remove files. CPM tools are available here If you are using CPM tools, you will need a diskdef files. Disk defs for the RC2040 format(s) are available here DiskDefs

PIO PORT

8 bits of a simple IO post are brought out to the RP2040 GPIO as an input/output port. The port is configured on the fly, So if you execute an IN instruction, the port becomes an input port, (with pull ups). If you execute an OUT instruction the port becomes an output port. (The Original RC2014 port is arranged as 8 outputs and 8 inputs, but there were only 8 bits available. )

Switches and Buttons

Details are in the Circuit diagram . Switches and buttons are not required. But give you direct access to the ROM addresses (top 3 address lines) and the buttons allow for a z80 reset, Dump and other functions.

A complete kit of parts for the RC2040 is available here from Extreme Kits

The RC2040 – Get you Started

A work in progress

Programming the PI Pico

The easiest way to do this is to go to the latest release of the RC2040 Git hub and download the RC2040.uf2 Plug in your PICO and drop the uf2 file into the Pico

Making an SD card

Take an empty SD card (this process will destroy ALL the data on it)

Format the card with a FAT32 filesystem either using windows format or a SD card writing program.

From RC2040 Git hub download the source_files zip (or tar) and extract the SD Card Contents directory.

Copy the contents of the ‘SD Card Contents’ directory onto the newly formatted SD card. You will need to unzip “CPM Inc Transient Apps ACIA SIO2.ZIP”

Connecting an SD Card

Wire in the SD card to your Pico or RC2040 board

Connecting to the serial port

For communicating with the RC2040, there are two options. By default the RC2040 uses the USB interface. When the RC2040 starts this should appear as a serial port on you connected computer.

I use Terra term, but MiniTerm or putty should work ok too.
#TODO add MiniTerm and putty details

Open Tera Term and select the newly added serial port

The COM port will vary, but it is usually the last one in the list.

Speed 15200, 8Bits, No parity, 1 stop bit, No flow control.

If you are doing copy and paste via serial, you will also need to set the transmit delay of 1mS per character and 3ms per line to prevent serial overruns.

Click New open and hit enter…

Hopefully you should see

_______________________________________________________________________________

RC2040 more settings


A complete kit of parts for the RC2040 is available here from Extreme Kits

The RC2040

Continuing from Emulating a Z80 RC2014 with CPM and IDE drives via an SD card here..

RC2040

What is a Rc2040

The RC2040 is an emulated RC2014 (a build your self Z80 computer). But this one is entirely contained within a RP2040 (Raspberry Pi PI Pico) processor.

On the RC2040 you can Run any RC2014 Stock ROM image. including Basic and various Z80 monitors and CPM monitor. (except RomWBW there isn’t enough RAM)
RC2014 Rom Image details are here

Details on running the various RC2014 ROM based programs are here

Emulated ROM and RAM is a bit weird, because internally it’s all actually RAM, but the RC2040 allows a user definable area of RAM that is read only, or no ROM at all.

It also allows loading of RC2014 ROM images (rather than programming ROMS or EPROMs) directly from the attached SD card.

With CPM the RAM is more interesting, as CPM starts running from a ROM, but when it loads, the ROM is switched out so it can use the full 64K RAM. This is achieved in the RC2040 by simulating the RC2014 RAM/ROM card that allows an IO port to “swapout” or disable the ROM

Running the CPM monitor from the ROM, allows you to run any CPM-80 compatible program. There are hundreds out there and they include BASIC, Infocom Adventures (Zork, Hitchhikers) Wordstar, Startrek this list is endless.

CPM of course requires disk drives. These are emulated in file(s) on the SD card. The format is similar to the format used in the RC2014 CF card module (and with some simple changes, It will also work with the same CF images).

Instead of the CF format, the RC2040 uses a .img format, this makes it directly compatible with the CPM images from the RC2014 web site. But for CPM to work we also need a drive geometry structure which matches the .img, this is provided with an additional .id file.

The img format gives 128M of drive space, Split into drives from A-P

The img file system also makes it directly compatible with CPM Disk Manager which allows you to directly write into the CPM img file from your computer, which saves a lot of time when transferring software to your RC2040

The RC2014 uses its serial port to talk to the world. The RC2040 has the ability of using either its own USB embedded serial port, or a physical serial port similar to the RC2014’s this is selectable (see ini file settings )

The RC2040 also allows you to run with two different serial port configurations ACIA and SIO. Unfortunately you need a different ROM and CPM bios to work with each serial port type. Hence the selection in the Github SD card section. (again this is selectable via ini file settings.)

The CPM IDE images come with a few CPM programs to get you started. Anything ending in .COM will run directly from CPM. anything with a .BAS extension needs you to run basic first (c:MBASIC) then load the program (load “programname.BAS”) and then run.

More details on running CPM are here

Get You started. ( a work in progress..)


A complete kit of parts for the RC2040 is available here from Extreme Kits