In the new release of CP/M (release 1.01) I have fixed a bug to do with filesizes. This now means that SD.COM shows the correct file sizes! Phew! Finally. Well, correct rounded to the nearest 4K.
You can download SD.COM and SD.ASM here:
When you start CP/M the following 4 .bin files are loaded into memory:
Core – A bunch of core routines, for leds, disks etc
BIOS – A stub of a BIOS
BDOS – The main part of CP/M
CCP – The interface of CP/M.
The location that the files are loaded into is dictated by the cpm.cfg file. You see these values when CP/M starts:
The CORE.BIN file contains various functions for accessing the hardware, such as switching on LEDs etc.
The Disk, User and Rom LEDs are connected to the 16550 Modem Control Register port. The ports are shown in one of the Monitor screens:
16C550C UART Ports CH376S Module Ports ------------------- ------------------- TX / RX 8 Data Port 16 Interrupt Enable 9 Command Port 17 Interrup Status 10 Line Control 11 Modem Control 12 Line Status 13 Modem Status 14 Scratch 15
So, to turn on the Disk LED (for example) there is a piece of code already loaded up in the CORE that looks like this:
; turn disk LED on
in a, (uart_MCR)
out (uart_MCR), a
If you want to call any of the core functions from a .com file you can include the core_jump.asm file in your program. This is just a list of all the core routines, arranged as a jump-indirection table, just to make life easier. You’ll need to include port_numbers.asm and locations.asm too, which are just some EQUs. You can then toggle the disk light by calling CORE_disk_toggle.
The only games that I have played on CP/M that have been any good up until now have been text-based adventures. The other games, like Pacman, have all been a bit underwhelming. But now I have found 2048 and it is actually really good. It’s a sliding tile puzzle game where you have to combine numbers to get to 2048 (which I have not yet achieved). Once you get the hang of it, it is strangely addictive.
The controls are:
A = Left
D = Right
W = Up
S = Down
I think it could be improved with some animation, and maybe better use of colour. But it’s very good. Here it is:
I’ve just created a forum for everyone who has bought a Z80 Playground, or who is interested in getting one. The forum is here:
All comments, suggestions, bug reports etc are welcome!
You can register to use the forum here:
Here is the schematic for the latest version of the Z80 Playground. This is the version that I am selling on eBay.
I’ve improved the logic around the peripheral ports so it is simpler. I’ve added an /int button, and there are a few other minor improvements. I’m very happy with this version. It’s the best yet!