Could you put the port numbers in a config file so we could change them without having to recompile?
No I wouldn't have to rebuild anything. If program X used port Y then I'd change the config file to Y before running X. If Program Q used port Z, I'd change the config file to Z before running Q. If you hard code the port number in the firmware to Y for example, then I could run program X but I will have no way to run program Q. My method lets the user choose which port to use to match a particular program. Yours will only let the user run programs that match your pre-defined choice.
In your first post you said, "there have been various IMSAI boards with SIO's and the I/O ports overlap."Doesn't that mean that some software wouldn't work with some configurations?Tom L
AUX EQU 22H ;AUX DATA PORT
AUXS EQU 23H ;AUX STATUS PORT
AUXC EQU 28H ;CONTROL PORT FOR SIO BOARD
The port is added to the CP/M 2.2 BIOS with full IOBYTE support, initial
assign now is:
A>stat dev:
CON: is TTY:
RDR: is PTR:
PUN: is PTP:
LST: is LPT:
With stat con:=uc1: one can switch the console to the second serial port.
Also batch mode is supported, with stat con:=bat: input is from second serial
and output is to line printer.
On the PC emulation you can connect with minicom to the second serial port with:
minicom -D unix#/tmp/.z80pack/imsaisim.sio2
For a first test then try pip pun:=boot.hex or something like this.
Sweet! You can’t have too many serial ports!
(And by “you” I mean “Tom”)
#UART configurationUART0=115200,cs8 # ie. 115200, 8N1 - not required because this is defaultUART1=9600 cs7 cstopb parenb parodd # ie. 9600, 7O2
A> stat con:=uc1:
OK, the new firmware is released. Unfortunately I haven't had time to update the docs or publish a video on performing firmware updates yet.
Easy, isn't it.
Next question for Tom - - is Timesharing Basic something we can achieve on IMSAI????
Once you are flashed, rebooted, jumpered, configured and then mounted and booted the new cpm22.dsk disk imageyou can try:A> stat con:=uc1:and the CP/M console should now be directed to the serial terminal connected to RS232-2

OK, just to be sure: Should About in SYS: show that the new firmware was loaded? Mine now reads:
Build Version v1.2.1
but here's a strange thing - on the CONSOLE display if I click on SYS: it's now a blank screen.
navigate to http://imsai8080.local/system or http://192.168.x.x/system (whatever...)
I’d love to try Kermit.

Thanks Udo (and Mr Nibble). Looks like it's working :-)

Thanks, that's great. I'll add this comms.dsk disk image to the patch release.I have had success with kermit, both with get and send of files from/to a host/server.With CP/M xmodem I have been able to /R(eceive) files from (lrzsz) sx on an OSX host,but everything I try to /S(end) from CP/M xmodem results in checksum or CRC errors (both modes) on (lrzsz) rx on the OSX host!Any suggestions from your experience? Its been so long since I last used xmodem.
A>b:xmodem bios.asm /s
File open
Sending via RDR/PUN with checksums
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
OK
Sent 177 blocks

With CP/M xmodem I have been able to /R(eceive) files from (lrzsz) sx on an OSX host,but everything I try to /S(end) from CP/M xmodem results in checksum or CRC errors (both modes) on (lrzsz) rx on the OSX host!Any suggestions from your experience? Its been so long since I last used xmodem.
sio2_upper_case 0sio2_strip_parity 0sio2_drop_nulls 0
sio2_upper_case 0sio2_strip_parity 0sio2_drop_nulls 0
In the latest z80pack version on GitHub the configuration and comments
are corrected and are:
# SIO 1, Ports 2/3 connected to terminal
sio1_upper_case 0
sio1_strip_parity 1
sio1_drop_nulls 1
sio1_baud_rate 9600
# typical baud rate values are 110, 300, 1200, 2400, 4800, 9600,
# 19200, 38400, 57600, 115200 - 0 = unlimited baud rate
# SIO 2, Ports 34/35 connected to UNIX socket
# use 8bit here, so that serial file transfers work
sio2_upper_case 0
sio2_strip_parity 0
sio2_drop_nulls 0
sio2_baud_rate 0
# typical baud rate values are 110, 300, 1200, 2400, 4800, 9600,
# 19200, 38400, 57600, 115200 - 0 = unlimited baud rate
The v1.2.3 release is now available on GitHub
I can confirm that the second serial port with the v1.2.3 release now works withXMODEM for both /S(end) and /R(eceive). However, I cannot get the consoleport to work for XMODEM /S(end). It does work to /R(eceive) a file.
# SIO 1, Ports 2/3 connected to terminal
sio1_upper_case 0
sio1_strip_parity 1
Tony,
I think you are right about UART0/RS232-1/TTY:
I didn’t want to change the code paths effecting this device without more time to test.
It’s not as straight forward as UART1 that is initialised by my code and totally under my control.
UART0 is initialised by the bootloader, shared by the ESP32 console for logging, has stdin/stout/stderr mapped to it. There are some api calls I can test that should fix the line ending handling on this too, but I want to have time to test and make sure I don’t stuff up the console &/or the TTY: over UART0 device.
Another point you make is worth revisiting. The way the TTY: window auto connects when the desktop UI loads. When this happens it steals the connection from UART0. Maybe I should check if VIO is enabled (BIOS loaded) and not auto connect in this case. I’ll think about it, but if you have other suggestions let me know.
IMSAI8080esp updates are like busses.. you wait for a month and three come at once! :-). (Only kidding, very happy to see the continued support).
If you can recognize where these screenshots are from, you'll know that I must have gotten the second serial port connected to my fModem hack properly - it lets me connect over Telnet to internet sites (for example, a BBS or this one - towel.blinkenlights.nl).


One thing is clear - Kermit works, but it's not a proper terminal with VT52/100 emulation. Has anyone gotten a CP/M based terminal (QTerm, Bye etc) working on the IMSAI and can point me to a .dsk? That's the missing piece in getting "online" properly.
I see that the imsaisim code now includes access to the second serial port. This is good news for us. We may be getting it incorporated into the IMSAI 8080esp soon!Tom L
[snip]
One thing is clear - Kermit works, but it's not a proper terminal with VT52/100 emulation. Has anyone gotten a CP/M based terminal (QTerm, Bye etc) working on the IMSAI and can point me to a .dsk? That's the missing piece in getting "online" properly.
One thing is clear - Kermit works, but it's not a proper terminal with VT52/100 emulation. Has anyone gotten a CP/M based terminal (QTerm, Bye etc) working on the IMSAI and can point me to a .dsk? That's the missing piece in getting "online" properly.

Huh, in my mind it was exactly the other way round. The TTY view is perfect! Movie night!
One of the cursed features of CP/M was the plethora of different flavours ofterminals - for example see any Wordstar installation and the variety of choicesfor the console device.
OK, the new firmware is released. Unfortunately I haven't had time to update the docs or publish a video on performing firmware updates yet.So in summary, for the impatient or adventurous:
- Follow the GitHub link in the upper-right-hand corner on https://thehighnibble.com/
- Click through to releases and then the September 2019 release
- Download both FIRMWARE.zip and IMAGE.zip and unzip them
- You only need one file from each zip archive
- IMAGE.zip - you need only imsai/disks/cpm22.dsk
- This is a new copy of the CP/M 2.2 system disk from Z80PACK with a new BIOS that maps CP/M physical devices UC1:, PTR: & PTP: to UART1
- Copy this to your disk library LIB: then mount it in DSK:A:
- FIRMWARE.zip - you need only imsaisim_esp32.bin
- This is the firmware binary to be flashed to the ESP32
- Drag-and-drop this over the SYS: device icon on the DesktopUI to flash to the ESP32.
- Confirm the first dialog, and wait (10-15 seconds ?) until you see the second dialog confirming the upload was successful
- Reboot the ESP32
- You can now configure the parameters for both UART0 (RS232-1) and UART1 (RS232-2) via the boot.conf file, for example
#UART configurationUART0=115200,cs8 # ie. 115200, 8N1 - not required because this is defaultUART1=9600 cs7 cstopb parenb parodd # ie. 9600, 7O2
- parameters can be separated by spaces or commas
- parameters are case insensitive
- parameters follow the convention used by the screen program under unix/linux/gnu ie.:
- default is 115200,cs8 in other words 115200 8N1
- standard baud rates from 110 to 115200 e.g. 110, 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
- other may work, but you'll have to experiment
- cs7 - for 7 data bits
- cs8 - for 8 data bits
- cstopb - for 2 stop bits, default is 1
- parenb - for even parity, default is none
- parenb,parodd - for odd parity
- UART1 can only be used via RS232-2
- you need to jumper the following pins
- Comms:
- Tx2 .-. (horizontal)
- Rx2 .-. (horizontal)
- Patch:
- R2 - IO5 (vertical)
- T2 - IO22 (vertical)
Once you are flashed, rebooted, jumpered, configured and then mounted and booted the new cpm22.dsk disk imageyou can try:A> stat con:=uc1:and the CP/M console should now be directed to the serial terminal connected to RS232-2Easy, isn't it.
On Saturday, 24 August 2019 21:06:10 UTC+10, TheHighNibble wrote:Good news! Thanks to the
- work done by Udo in Z80PACK, especially making a new BIOS for the imsaisim machine
- availability of a new (dev) release of the esp-idf that addresses some UART timing issues
I have a working implementation of:
- the second physical serial port (RS232-2) working as an alternate console as UC1: under CP/M
- physical serial port (both RS232-1 & RS232-2) configuration via boot.conf
- tested a range of speeds from 110 to 115200 baud (higher or lower speeds don't appear to work)
- 7 and 8 bit data words (CS7, CS8)
- no parity, even parity and odd parity (-, PARENB, PARENB & PARODD)
- 1 and 2 stop bits (-, CSTOPB)
Because of the need toIt will be about a week before I will release the new firmware.
- test more generally against the new release of the esp-idf
- write some documentation and
- provide a tutorial on flashing new firmware
;
; CONSOLE STATUS, RETURN 0FFH IF CHARACTER READY, 00H IF NOT
;
CONST: CALL DISPATCH ;GO TO ONE OF THE PHYSICAL DEVICE ROUTINES
DB 1 ;USE BITS 1-0 OF IOBYTE
DW TTY1IS ;00 - TTY:
DW CRTIST ;01 - CRT:
DW TTY2IS ;10 - BAT:
; DW TTY2IS ;11 - UC1:
DW MODIST ;11 - UC1: