Collapse OS on the Z80-MBC2!06/25/2020 at 10:54 • 0 comments
Collapse OS is now supported on the Z80-MBC2:
UCSD Pascal for the Z80-MBC2!09/01/2019 at 15:45 • 3 comments
Thanks to Michel Bernard (a member of the Z80-MBC2 User Group on FB) who did the porting, now UCSD Pascal is running on the Z80-MBC2!
Michel Bernard originally used the trick to create a custom autoboot.bin file to be used with the "Autoboot" boot selection to load the OS.
Because this porting is so cool, I've done a new IOS version and a new SD image to support UCSD Pascal in the same way as the others previous OS, adding a new "Disk Set" selection:
To run UCSD Pascal you just need to update the new IOS and the new SD image (in the Files section) and select it from the usual "Select boot mode or system parameter" menu:
In the new SD image there are two volumes (disks) SYS1: and SYS2:
Here the execution of an example (SINE.CODE) already compiled on the SYS2: disk:
uCom is out!05/29/2019 at 09:20 • 0 comments
I've done a separate "project page" for uCom (RS232 add-on card for the Z80-MBC2) here.
The uCom board, as the uTerm VT100 board, has a "transparent" USB-serial adapter connector, so you can upload firmware to the Z80-MBC2 (using Arduino IDE) or load an Intel-Hex file (with iLoad) or use XMODEM to exchange files with a PC (running a terminal emulator that supports XMODEM file transfer) while the uCom is in use.
Both the "mixed" power supply scenarios (USB-serial adapter not powered from USB but Z80-MBC2 powered and vice-versa) are managed by the HW, so you don't need to worry about it.
uCorm can be mounted horizontally or vertically to the Z80-MBC2.
The 3D printed custom angled brackets .STL files are the same of the uTerm.
FuzixOS preview: Unix for Z80!...05/21/2019 at 17:14 • 3 comments
First test with FuzixOS on the Z80-MBC2 (many many thanks to Alan Cox...)!:
uTerm is out!05/14/2019 at 07:40 • 0 comments
I've done a separate "project page" for uTerm here.
uTerm can be mounted horizontally or vertically to the Z80-MBC2.
All the details including the 3D printed custom angled brackets .STL files are there.
uTerm is a VT100 terminal with VGA out and PS/2 keyboard with a power supply (for the Z80-MBC2 too). It has a "transparent" USB-TTL adapter connector, so you can upload firmware or load an Intel-Hex file (with iLoad) while the card is inserted. Both the "mixed" power supply scenarios (USB-TTL adapter not powered from USB but Z80-MBC2 powered and vice-versa) are managed. The video terminal is based on the ChibiTerm (https://hw-by-design.blogspot.com/2018/07/low-cost-vga-terminal-module-project.html).
uCom preview: a RS232 adapter for the Z80-MBC2...04/05/2019 at 17:00 • 0 comments
Currently working on a RS232 add-on card for the Z80-MBC2.
As the uTerm board, it has a power supply for the Z80-MBC2 and a "transparent" USB-TTL adapter connector, so you can upload firmware or load an Intel-Hex file (with iLoad) while the card is inserted. Both the "mixed" power supply scenarios (USB-TTL adapter not powered from USB but Z80-MBC2 powered and vice-versa) are managed.
New IOS for XMODEM support03/10/2019 at 10:54 • 6 commentsBecause some people requested to use the XMODEM protocol to exchange files through the serial port, I've added the support for this protocol into CP/M 2.2 and CP/M 3 (banked only).
XMODEM needs a full 8 bit binary data transfer, and this is not possible with the CON port (the CP/M port used for the console) with a "legacy" CP/M system installation because the CP/M Alteration Guide says to strip the eight parity bit when reading a byte from the console input.
More, because the Z80-MBC2 uses a virtual serial port without handshaking there is also a timing problem when dealing with the 128 bytes packets used by the XMODEM protocol.
So the support to the XMODEM protocol has requested changes in the IOS and in the CP/M BIOS, and also in the Arduino core to extend the serial input buffer.
Please note that with the new IOS the default speed of the serial port is now 115200 bps.
To have the XMODEM support active, before the update of the new IOS firmware and the new SD image (see in the Files section), you have to manually create a new "board variant" in the Arduino IDE and then change the default Rx input buffer size to 128 bytes in the "core" of this new variant.
If you aren't interested into the XMODEM support, you can simply update the IOS and the new SD image as usual without the need to create the new board variant. In this case the XMODEM will not work in the receive direction, but only in the send direction (from the Z80-MBC2 to a PC with a terminal emulator).
HOW MANUALLY CREATE A NEW BOARD VARIANT (LINUX)
In the following I'll assume an Arduino IDE 1.8.5 installation on a linux host and the MightyCore ver. 1.0.8. Anyway I've tried to make the procedure enough general to be used for other versions too.
The first thing is find the directory where the MightyCore is located.
If you have installed Arduino IDE 1.8.5 and then installed the MighyCore with the Board Manager with the usual .json "pointer", the MightyCore is located in the "~/.arduino15/packages/MightyCore" directory:
Now you must locate the "~/.arduino15/packages/MightyCore/hardware/avr/1.0.8/cores" directory (note that the "1.0.8" part of the directory name depends on the MightyCore version, and so can be a different number if you have a different version of the MighyCore):
Note 1: note the ".arduino15" name with the dot, you must enable the hidden files view to see it with a the linux GUI.
Note 2: the name of the folder here depends on the MightyCore version, and so can be a different name (as MCUdude_corefiles or whatever it is) if you have a different version of the MighyCore. In any case you must duplicate it and rename it as explained in the following.
In this directory there is an other "MightyCore" (or whatever it is) folder. You must duplicate it and rename it exactly as "MightyCore_Z80MBC2":
Now go into the new copied folder MightyCore_Z80MBC2:
Locate the file "HardwareSerial.h" and open it with an editor:
Go to line 43 (may be a little different number on other versions) and change the value 64 with 128 as shown in the following image:
then save the file.
In the following image there is the same file related to the version 2.0.1 of MightyCore and already edited (see line 53):
Now go back to the "~/.arduino15/packages/MightyCore/hardware/avr/1.0.8" directory:
Locate the file "boards.txt" and open it with an editor. This file is divided in various "sections". Each section is the description of a board variant. In the MightyCore each board variant is a different supported Atmega MCU. In the following image there is the starting of the Atmega32a section. Find it in the file (it starts at about line 440) :
and copy it in a new file "temp.txt" on your desktop folder for further editing:
Now you have to change every occurrence of the string "32." at the beginning of the lines with the string "32Z80MBC2." (mind the dot!). Do not use a "change all" approach, but check every change carefully.
At the end the temp.txt file should be like this one:
Now change the comment at line 2 as in the following image:
Now change the string "Atmega32" at the right of the variable "32Z80MBC2.name=" at about line 5 with the string "ATmega32 (Z80-MBC2)" as in the following image:
and change the string "MightyCore" (or whatever it is) at the right of the variable "32Z80MBC2.build.core=" at about line 17 with the string "MightyCore_Z80MBC2" as in the following image:
Save the file temp.txt, select all the content and copy it into boards.txt after the Atmega32a section (and before the Atmega16a section):
now save the file boards.txt. All done!
To check if you have done it right, open Arduino IDE. In the "Tools -> Board" menu now you should select the "Atmega32 (Z80-MBC2)" board variant:
Choosing this one the Rx buffer will be 128 bytes large, allowing the XMODEM support. Now you can compile the new IOS and upload it.
Note that the new IOS checks if this extended buffer is active, and in this case will print a status line during the boot phase:
In the drive A: of the CP/M 2.2 and 3 disk set of the new SD image, I've already copied the right XMODEM utility to use:
HOW MANUALLY CREATE A NEW BOARD VARIANT (WINDOWS)
The corresponding directory where MightyCore is installed is: C:\Users\<user_name>\AppData\Local\Arduino15\packages\MightyCore, where <user_name> is your user name under windows.
Given that, follow the guide for linux (is the same procedure).
uTerm preview: a VT100 terminal for the Z80-MBC2...12/28/2018 at 10:16 • 2 comments
Currently working on a VT100 terminal with VGA out and PS/2 keyboard with a power supply (for the Z80-MBC2 too). It has a "transparent" USB-TTL adapter connector, so you can upload firmware or load an Intel-Hex file (with iLoad) while the card is inserted. Both the "mixed" power supply scenarios (USB-TTL adapter not powered from USB but Z80-MBC2 powered and vice-versa) are managed. The video terminal is based on the ChibiTerm (https://hw-by-design.blogspot.com/2018/07/low-cost-vga-terminal-module-project.html).
Working on a new revision (A071218-R250119):
Waiting the new PCB, I'm playing with the current PCB "patched" to perform like the new one.
Here a session with Wordstar 4 configured to use all the 30 rows of uTerm:
In the photo you can see that also the serial-USB adapter is attached to the uTerm using the "transparent" port. This allows to use two keyboards and two monitors in the "same" time (one keyb and monitor attached directly to the uTerm, and another keyb and monitor of the terminal emulator on a PC connected with the serial-USB). This allows also to use XMODEM (e.g. between the Z80-MBC2 and a PC) or to flash the Atmega firmware with the uTerm connected.
Or you can use the monitor attached to the uTerm and the keyboard of the terminal emulator on a PC. This is exactly the "configuration" I used in the photo to make the test (as you can see, there isn't any keyb attached to the uTerm).
Here last version assembled horizontally with the Z80-MBC2:
Overclocking the Z80-MBC2...11/02/2018 at 09:51 • 4 comments
Because the Mighty Core gives the chance to choice a 20MHz bootloader, I've decided to try to "overclock" the Atmega32A using a 20MHz quartz:
You don't need others HW changes, just use a 20MHz quartz instead of a 16MHz one. The Z80 clock speed will be at 10MHz.
You have to select the "20MHz external" option in the "Toos" menu of Arduino IDE before flashing the 20MHz bootloader:
Remember that using a 20MHz quartz you are out of the Atmega32a specifications (the Atmega32a is rated at 16MHz max.), so you are in a "grey area" where things "may works"...