Browse Source

Misc. Cleanup

- Add debugging to XModem, but bracketed with conditional compilation and turned off.
- Update S100 T35 config name from t35 to t35_std to conform with naming of the standard config files.
- Refresh Ch375 Native USB generated files to match current versions generated.
- Move SCON driver include in HBIOS from Multi-function section to Character device section.
- Added ToDo comments to SCSI driver.
- Added VT-100 TERM.DEF file to the Games disk image.
- Commented out debug output in SIMH config file.
pull/654/head
Wayne Warthen 1 week ago
parent
commit
7c6f1f50b8
No known key found for this signature in database GPG Key ID: 8B34ED29C07EEB0A
  1. 106
      Source/Apps/XM/xmdm125.asm
  2. 6
      Source/Doc/Hardware.md
  3. 2
      Source/HBIOS/Build.cmd
  4. 2
      Source/HBIOS/Build.sh
  5. 3
      Source/HBIOS/Config/SZ180_std.asm
  6. 0
      Source/HBIOS/Config/SZ80_t35_std.asm
  7. 2
      Source/HBIOS/ch376-native/keyboard.s
  8. 2
      Source/HBIOS/ch376-native/scsi-drv.s
  9. 2
      Source/HBIOS/ch376-native/ufi-drv.s
  10. 19
      Source/HBIOS/hbios.asm
  11. 2
      Source/HBIOS/scsi.asm
  12. BIN
      Source/Images/d_games/u0/TERM.DEF
  13. 2
      Tools/simh/Sim.cfg

106
Source/Apps/XM/xmdm125.asm

@ -50,6 +50,10 @@ VYEAR EQU 86
NO EQU 0
YES EQU NOT NO
;
; Add debugging code?
;
DEBUG EQU NO
;
; Define ASCII characters used
;
BS EQU 08H ; Backspace character
@ -2258,7 +2262,14 @@ RCVRPT: IF CONFUN ; Check for function key?
CALL RECV ; Get any character received
JC RCVSTOT ; Timeout
;
RCVRPTB:CPI SOH ; 'SOH' for a 128-byte block?
RCVRPTB:
IF DEBUG
CALL ILPRT
DB CR,LF,0
CALL PRTHEXBYTE
ENDIF
CPI SOH ; 'SOH' for a 128-byte block?
JZ RCVSOH ; Yes
CPI STX ; A 1024-byte block?
JZ RCVSTX ;
@ -2343,7 +2354,13 @@ DELFILE:LXI D,FCB ; Point to file
;
;RCVSTOT:JMP RCVSERR ; Bump error count, etc.
; [WBW] Bypass line flush if error is timeout
RCVSTOT:JMP RCVSER1 ; Bump error count, etc.
RCVSTOT:
IF DEBUG
CALL ILPRT
DB 'Timeout',CR,LF,0
ENDIF
JMP RCVSER1 ; Bump error count, etc.
;
; Got SOH or STX - get block number, block number complemented
;
@ -2360,10 +2377,16 @@ RCVHDR: SHLD BLKSIZ ; Store block size for later
MVI A,1 ; Need something to store at FRSTIM
STA FRSTIM ; Indicate first 'SOH' received
CALL RECV ; Get record
IF DEBUG
CALL PRTHEXBYTE
ENDIF
JC RCVSTOT ; Got timeout
MOV D,A ; D=block number
MVI B,1 ; Timeout = 1 sec
CALL RECV ; Get complimented record number
IF DEBUG
CALL PRTHEXBYTE
ENDIF
JC RCVSTOT ; Timeout
CMA ; Calculate the complement
CMP D ; Good record number?
@ -2383,6 +2406,9 @@ RCVDATA:MOV A,D ; Get record number
;
RCVCHR: MVI B,1 ; 1 sec timeout
CALL RECV ; Get the character
IF DEBUG
CALL PRTHEXBYTE
ENDIF
JC RCVSTOT ; Timeout
MOV M,A ; Store the character
INX H ; Point to next character
@ -2421,15 +2447,30 @@ CHKSNUM:LDA RCVRNO ; Get received
; record, else send a NAK requesting the record be sent again.
;
RCVCRC: MVI E,2 ; Number of bytes to receive
IF DEBUG
CALL ILPRT
DB CR,LF,0
ENDIF
;
RCVCRC2:MVI B,1 ; 1 sececond timeout
CALL RECV ; Get crc byte
IF DEBUG
CALL PRTHEXBYTE
ENDIF
JC RCVSTOT ; Timeout
DCR E ; Decrement the number of bytes
JNZ RCVCRC2 ; Get both bytes
IF DEBUG
CALL ILPRT
DB CR,LF,0
ENDIF
CALL CHKCRC ; Check received CRC against calc'd CRC
ORA A ; Is CRC okay?
JZ CHKSNUM ; Yes, go check record numbers
IF DEBUG
CALL ILPRT
DB 'CRC Err',CR,LF,0
ENDIF
JMP RCVSERR ; Go check error limit and send NAK
;
; Previous record repeated, due to the last ACK being garbaged. ACK it
@ -4267,6 +4308,51 @@ DKIND: LDAX D ; Get the character from the string
DKIND1: LDA KIND ; Get the kind of file back
RET ; Finished
ENDIF
;
IF DEBUG
;
; PRINT THE HEX BYTE VALUE IN A
;
PRTHEXBYTE:
PUSH PSW
PUSH D
CALL HEXASCII
MOV A,D
CALL CTYPE
MOV A,E
CALL CTYPE
POP D
POP PSW
RET
;
; CONVERT BINARY VALUE IN A TO ASCII HEX CHARACTERS IN DE
;
HEXASCII:
MOV D,A
CALL HEXCONV
MOV E,A
MOV A,D
RLC
RLC
RLC
RLC
CALL HEXCONV
MOV D,A
RET
;
; CONVERT LOW NIBBLE OF A TO ASCII HEX
;
HEXCONV:
ANI 0FH ;LOW NIBBLE ONLY
ADI 90H
DAA
ACI 40H
DAA
RET
;
ENDIF
;
;.....
;
;-----------------------------------------------------------------------
@ -4499,15 +4585,19 @@ NIBBL: ANI 0FH ; Isolate digit
; Inline print of message, terminates with a 0
;
ILPRT: XTHL ; Save HL, get HL=message
PUSH PSW ; Save accum/flags
;
ILPLP: MOV A,M ; Get the character
ILPLP:
MOV A,M ; Get the character
INX H ; To next character
ORA A ; End of message?
JZ ILPRET ; Yes, return
CALL CTYPE ; Type the message
JMP ILPLP ; Loop
;
ILPRET: XTHL ; Restore HL
ILPRET:
POP PSW ; Restore accum/flags
XTHL ; Restore HL
RET ; Past message
;
; Exit printing message following call
@ -4582,6 +4672,14 @@ MOVE: MOV A,M ; Get a character
;
CHKCRC: PUSH H ; Check 'CRC' bytes of received message
LHLD CRCVAL
IF DEBUG
MOV A,H
CALL PRTHEXBYTE
MOV A,L
CALL PRTHEXBYTE
ENDIF
MOV A,H
ORA L
POP H

6
Source/Doc/Hardware.md

@ -122,7 +122,7 @@ Others
| [NABU w/ RomWBW Option Board]^5^ | NABU | NABU_std.rom | 115200 |
| [S100 Computers Z180 SBC]^4^ | S100 | SZ180_std.rom | 57600 |
| [S100 Computers Z80 CPU]^4^ | S100 | SZ80_std.rom | 19200 |
| [S100 Computers T35 FPGA Z80 SBC]^4^ | S100 | SZ80_t35.rom | 9600 |
| [S100 Computers T35 FPGA Z80 SBC]^4^ | S100 | SZ80_t35_std.rom | 9600 |
| [UNA Hardware BIOS]^1^ | - | UNA_std.rom | - |
| [Z80-Retro SBC]^3^ | - | Z80RETRO_std.rom | 38400 |
| [Z180 Mark IV SBC]^1^ | ECB | MK4_std.rom | 38400 |
@ -478,7 +478,7 @@ A T35 FPGA Z80 based S100 SBC
* Creator: John Monahan
* Website: [S100 Computers FPGA Z80 SBC](http://www.s100computers.com/My%20System%20Pages/FPGA%20Z80%20SBC/FPGA%20Z80%20SBC.htm)
#### ROM Image File: SZ80_t35.rom
#### ROM Image File: SZ80_t35_std.rom
| | |
|-------------------|---------------|
@ -528,7 +528,7 @@ A T35 FPGA Z80 based S100 SBC
See website for dip switch settings.
- RomWBW is loaded by the S100 monitor from either CF Card or SD Card.
The CF/SD Card should be imaged using SZ80_t35_hd1k_combo.img which
The CF/SD Card should be imaged using SZ80_t35_std_hd1k_combo.img which
includes RomWBW.
`\clearpage`{=latex}

2
Source/HBIOS/Build.cmd

@ -272,7 +272,7 @@ call Build EPITX std || exit /b
:: call Build MON std || exit /b
call Build NABU std || exit /b
call Build SZ80 std || exit /b
call Build SZ80 t35 || exit /b
call Build SZ80 t35_std || exit /b
call Build UNA std || exit /b
call Build MSX std || exit /b

2
Source/HBIOS/Build.sh

@ -56,7 +56,7 @@ if [ "${ROM_PLATFORM}" == "dist" ] ; then
# ROM_PLATFORM="MON"; ROM_CONFIG="std"; bash Build.sh
ROM_PLATFORM="NABU"; ROM_CONFIG="std"; bash Build.sh
ROM_PLATFORM="SZ80"; ROM_CONFIG="std"; bash Build.sh
ROM_PLATFORM="SZ80"; ROM_CONFIG="t35"; bash Build.sh
ROM_PLATFORM="SZ80"; ROM_CONFIG="t35_std"; bash Build.sh
ROM_PLATFORM="MSX"; ROM_CONFIG="std"; bash Build.sh
ROM_PLATFORM="UNA"; ROM_CONFIG="std"; bash Build.sh
exit

3
Source/HBIOS/Config/SZ180_std.asm

@ -57,6 +57,9 @@ Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2
Z180_MEMWAIT .SET 1 ; Z180: MEMORY WAIT STATES (0-3)
Z180_IOWAIT .SET 3 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3)
;
FPLED_ENABLE .SET TRUE ; FP: ENABLES FRONT PANEL LEDS
FPLED_IO .SET $05 ; FP: PORT ADDRESS FOR FP LEDS
;
INTRTCENABLE .SET TRUE ; ENABLE PERIODIC INTERRUPT CLOCK DRIVER (INTRTC.ASM)
MMRTCENABLE .SET TRUE ; MMRTC: ENABLE NS MM58167B RTC DRIVER (MMRTC.ASM)
DS12RTCENABLE .SET TRUE ; DS12RTC: ENABLE DS1288X RTC DRIVER (DS12RTC.ASM)

0
Source/HBIOS/Config/SZ80_t35.asm → Source/HBIOS/Config/SZ80_t35_std.asm

2
Source/HBIOS/ch376-native/keyboard.s

@ -5,7 +5,7 @@
#IF (!CHNATIVEEZ80)
#include "ch376-native/keyboard/class_hid_keyboard.c.s"
#ENDIF
#include "ch376-native/keyboard/kyb-init.c.s"
#IF (!CHNATIVEEZ80)
#include "ch376-native/keyboard/kyb_driver.c.s"
#ENDIF
#include "ch376-native/keyboard/kyb-init.c.s"

2
Source/HBIOS/ch376-native/scsi-drv.s

@ -2,7 +2,7 @@
#IF (!CHNATIVEEZ80)
#include "ch376-native/scsi-drv/class_scsi.c.s"
#ENDIF
#include "ch376-native/scsi-drv/scsi-init.c.s"
#IF (!CHNATIVEEZ80)
#include "ch376-native/scsi-drv/scsi_driver.c.s"
#ENDIF
#include "ch376-native/scsi-drv/scsi-init.c.s"

2
Source/HBIOS/ch376-native/ufi-drv.s

@ -2,10 +2,10 @@
#IF (!CHNATIVEEZ80)
#include "ch376-native/ufi-drv/class_ufi.c.s"
#ENDIF
#include "ch376-native/ufi-drv/ufi-init.c.s"
#IF (!CHNATIVEEZ80)
#include "ch376-native/ufi-drv/ufi_driver.c.s"
#ENDIF
#include "ch376-native/ufi-drv/ufi-init.c.s"
#IF (!CHNATIVEEZ80)
#include "ch376-native/ufi-drv/usb_cbi.c.s"
#ENDIF

19
Source/HBIOS/hbios.asm

@ -8915,7 +8915,7 @@ HB_MODSTART .EQU $
; - PCF
; - DMA
; - NABU
; - EZ80SYSTMP
; - EZ80TMR
;
#IF (CPUFAM == CPU_EZ80)
#INCLUDE "ez80cpu.asm"
@ -9019,6 +9019,7 @@ HB_MODSTART .EQU $
; - ACIA
; - SSER
; - DLPSER
; - SCON
; - UF
;
#IF (ASCIENABLE)
@ -9065,6 +9066,10 @@ HB_MODSTART .EQU $
#INCLUDE "dlpser.asm"
#ENDIF
;
#IF (SCONENABLE)
#INCLUDE "scon.asm"
#ENDIF
;
#IF (UFENABLE)
#INCLUDE "uf.asm"
#ENDIF
@ -9330,15 +9335,9 @@ HB_MODSTART .EQU $
; MULTI-FUNCTION MODULES
;--------------------------------------------------------------------------------------------------
;
; - SCON
; - PRP
; - PPP
; - ESP
;
;
#IF (SCONENABLE)
#INCLUDE "scon.asm"
#ENDIF
; - PRP (PRPCON, PRPSD)
; - PPP (PPPCON, PPPSD)
; - ESP (ESPCON, ESPSER)
;
#IF (PRPENABLE)
#INCLUDE "prp.asm"

2
Source/HBIOS/scsi.asm

@ -7,6 +7,8 @@
; DERIVED FROM CODE PROVIDED BY JAY COTTON.
;
; TODO:
; - IMPLEMENT BUS SCANNING FOR DEVICES AT STARTUP
; - USE TEST UNIT READY TO WAIT FOR SPINUP?
;
; NOTES:
;

BIN
Source/Images/d_games/u0/TERM.DEF

Binary file not shown.

2
Tools/simh/Sim.cfg

@ -3,7 +3,7 @@ set cpu z80
set cpu noaltairrom
set n8vem enabled
;set n8vem enabled debug=verbose
set debug debug.log
;set debug debug.log
; Console
; set console telnet=23

Loading…
Cancel
Save