Skip to content

Commit

Permalink
Merge pull request #464 from b1ackmai1er/master
Browse files Browse the repository at this point in the history
Documentation updates
  • Loading branch information
wwarthen authored Dec 8, 2024
2 parents f9ed565 + 59a7b6c commit 49ff4e4
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 70 deletions.
71 changes: 55 additions & 16 deletions Source/Doc/SystemGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2383,6 +2383,11 @@ Cold Start (0x02):
: Perform a system cold start (like a power on). All devices are
reinitialized.

User Restart (0x03):

: Perform a video terminal reset. Terminal emulation and visual display
systems are reset.

The Status (A) is a standard HBIOS result code.

### Function 0xF1 -- System Version (SYSVER)
Expand Down Expand Up @@ -3335,28 +3340,62 @@ placeholder

### Diagnostic LEDs

Progress through the boot and initialization process can be difficult to monitor
due to the lack of console or video output. Access to these output devices does
not become available until late the in the boot process. If these output devices
are also involved with the issue trying to be resolved then trouble shooting is
even more difficult.
Progress through the boot and initialization process can be difficult to
monitor due to the lack of console or video output. Access to these output
devices does not become available until late the in the boot process. If
these output devices are also involved with the issue trying to be resolved
then trouble shooting is even more difficult.

ROMWBW can be configured to display boot progress with the assistance of
additional hardware. This can take the form of a front panel LED display or
LED breakout debugging board connected to an 8-bit output port. Or it can
utilize existing platform status LEDS.

As the boot code executes, the LED output display is updated to indicate the execution progress.

Platforms that have these capabilities built in have them enabled by default.

#### Front Panel display

A LED front panel or breakout board needs to be connected the computers data,
reset and port select lines.

To enable this option the following settings can be made in the platforms custom
configuration file.

```
FPLED_ENABLE .SET TRUE ; ENABLE FRONT PANEL
```

Custom hardware can be configured with :

```
FPLED_IO .SET $nn ; USE PORT ADDRESS nn
FPLED_INV .SET FALSE ; INVERTED LED BITS
```

#### Platform Status LEDS

ROMWBW can be configured to display boot progress with the assistance of additional
hardware. This take the form of an LED breakout debugging board connected to an
8-bit output port. As the boot code executes, the LED output display is updated.
These status LEDs use preexisting status LEDs on each platform.

To use a LED breakout board, it must be connected the computers data, reset and port
select lines.
Enable using:

To enable the DIAG option the following settings must be made in the systems .ini
configuration file, where 0xnn is the port address.
```
LEDENABLE .SET TRUE ; ENABLES STATUS LED
```

Customize using:

```
LEDMODE .SET LEDMODE_STD ; LEDMODE_[STD|SC|RTC|NABU]
LEDPORT .SET $nn ; STATUS LED PORT ADDRESS
```

DIAGENABLE .SET TRUE
DIAGPORT .SET 0xnn
The following table shows the ROMWBW process steps in relation to the panel
display.

The following table shows the ROMWBW process steps in relation to the LED display.

| **LED** | **RomWBW Processes** |
| **PANEL** | **RomWBW Processes** |
|------------|------------------------------------------------|
| `........` | Initial boot |
| | Jump to start address |
Expand Down
84 changes: 32 additions & 52 deletions Source/HBIOS/ps2iface.inc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
;__________________________________________________________________________________________________
; HARDWARE INTERFACE FOR POLLED AND INTERRUPT DRIVEN PS2 KEYBOARD.
;
; IN POLLED MODE THE KEYBOARD DEVICE IS IDENTIFIED BY THE TABLE POINTED TO BY IY
; IN INTERRUPT MODE THE KEYBOARD DEVICE IS UNKNOWN SO PREDEFINED PORT VALUES ARE USED.
; IN POLLED MODE THE CONTROLLER PORT VALUES ARE KNOWN BY THE CALLING DRIVER.
; IN INTERRUPT MODE THE DEVICES PORTS ARE UNKNOWN SO PREDEFINED PORT VALUES ARE USED.
;
; REQUIRES AN APPROPRIATE INTERRUPT JUMPER TO BE SET.
; CURRENTLY CONFIGURED FOR INT #2 ON DUODYNE WITH I/O MULTI BOARD.
Expand All @@ -15,12 +15,12 @@
;__________________________________________________________________________________________________
;
;
KBDQSIZ .EQU 16 ; MUST BE POWER OF TWO, <=128
KBDQSIZ .EQU 32 ; MUST BE POWER OF TWO, <=128
KBDQGETX .DB 0 ; QUEUE INDEX
KBDQPUTX .DB 0 ; QUEUE INDEX
.DB $55 ; GUARD BYTE FOR DEBUGGING
KBDQ .FILL KBDQSIZ,0 ; CIRCULAR KEYBOARD BUFFER
.DB $AA ; GUARD BYTE FOR DEBUGGING
; .DB $55 ; GUARD BYTE FOR DEBUGGING ; NOTE THAT SCAN CODES ARE BEING
KBDQ .FILL KBDQSIZ,0 ; CIRCULAR KEYBOARD BUFFER ; BUFFERED. ONE KEY PRESS CAN
; .DB $AA ; GUARD BYTE FOR DEBUGGING ; GENERATE SEVERAL SCAN CODES

;__________________________________________________________________________________________________
; RESET THE QUEUE TO EMPTY
Expand All @@ -39,48 +39,26 @@ KBDQ .FILL KBDQSIZ,0 ; CIRCULAR KEYBOARD BUFFER
KBD_INT:
; CALL KBDQDBG
LD IY,(KBD_IDAT) ; POINT TO INSTANCE DATA
LD C,(IY+KBD_ST) ; READ CONTROLLER STATUS
EZ80_IO
IN A,(C)
AND 1
RET Z
LD C,(IY+KBD_DAT) ; GET THE RESPONSE
EZ80_IO
IN A,(C)
; CALL KBDQPUSH ; SAVE KEYBOARD SCAN CODE
; RET
;
;__________________________________________________________________________________________________
; ADD A BYTE TO THE KEYBOARD QUEUE
;__________________________________________________________________________________________________
CALL KBD_IST_P ; READ CONTROLLER STATUS
RET Z ; EXIT IF NOTHINGTO READ
LD C,(IY+KBD_DAT)
EZ80_IO ; IF SOMETHING PENDING
IN A,(C) ; READ THE BYTE IN
LD B,A ; AND SAVE IT
;
KBDQPUSH: ; ADD A SCAN CODE TO THE QUEUE
PUSH AF
CALL KBDQFULL
JR Z,KBDQISF ; EXIT IF THE QUEUE IS FULL
CALL KBDQLEN ; CHECK IF
SUB KBDQSIZ ; QUEUE IS FULL
RET Z ; EXIT IF THE QUEUE IS FULL
;
LD HL,KBDQPUTX
LD A,(HL) ; CREATE QUEUE INDEX
AND KBDQSIZ-1
INC (HL) ; UPDATE INDEX
LD HL,KBDQPUTX ; CREATE QUEUE INDEX
CALL KBD_Q_IDX ; POINTER IN HL
;
LD HL,KBDQ ; INDEX INTO THE QUEUE
LD B,0
LD C,A
ADD HL,BC
POP AF
LD (HL),A ; SAVE THE CHARACTER IN THE QUEUE
; CALL KBDQDBG
;
RET
;
KBDQISF:POP AF
RET

KBDQFULL: ; RETURN Z IF QUEUE IS FULL
CALL KBDQLEN ; RETURN NZ IF STILL SPACE IN QUEUE
SUB KBDQSIZ
RET
#ENDIF
;
;__________________________________________________________________________________________________
Expand All @@ -104,25 +82,27 @@ KBDQPOP:
CALL KBDQLEN
RET Z ; EXIT IF THE QUEUE IS EMPTY
;
LD HL,KBDQGETX
LD HL,KBDQGETX ; CREATE QUEUE INDEX
CALL KBD_Q_IDX ; POINTER IN HL
;
LD A,(HL) ; GET THE CHARACTER FROM THE QUEUE
; LD (HL),B ; DEBUG - CLEAN QUEUE
;
RET

KBD_Q_IDX:
LD A,(HL) ; CREATE QUEUE INDEX
AND KBDQSIZ-1
INC (HL) ; UPDATE INDEX
;
LD HL,KBDQ ; INDEX INTO THE QUEUE
LD B,0
LD C,A
ADD HL,BC
LD A,(HL) ; GET THE CHARACTER FROM THE QUEUE
; LD (HL),B ; DEBUG - CLEAN QUEUE
;
LD A,B ; NOTE THE QUEUE GET
LD B,0 ; AND PUT INDEXES
ADD HL,BC ; NEVER DECREASE
RET
;
#ENDIF
;
; RETURN A BYTE TO FROM KEYBOARD QUEUE
; NOTE THE QUEUE INDEX'S NEVER DECREASE IN SIZE.
;
#IF ((INTMODE == 2) & KBDINTS))
KBD_IN .EQU KBD_IN_Q
#ELSE
Expand Down Expand Up @@ -204,9 +184,9 @@ KBDQDBG:
PUSH BC
PUSH AF

CALL NEWLINE ; PRINT QUEUE CONTENTS WITH PRE AND POST GUARD BYTES
LD B,KBDQSIZ+2
LD HL,KBDQ-1
CALL NEWLINE ; PRINT QUEUE CONTENTS
LD B,KBDQSIZ ; +2 PRE AND POST GUARD BYTES
LD HL,KBDQ ; -1 PRE AND POST GUARD BYTES
KBDQPRT:
LD A,(HL)
CALL PRTHEXBYTE
Expand Down
2 changes: 1 addition & 1 deletion Source/HBIOS/sio.asm
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ SIO_INITPRT:
XOR A ; SIGNAL SUCCESS
RET ; RETURN
;
; THE SIO IS A LITTLE PRICKLY ABOUT THE ORDER IN WHICH REGSITERS ARE
; THE SIO IS A LITTLE PRICKLY ABOUT THE ORDER IN WHICH REGISTERS ARE
; WRITTEN DURING CONFIGURATION. THE TABLE BELOW IS USED TO SETUP
; THE REGISTER VALUES AND THEN THE ENTIRE TABLE CAN BE SPIT OUT.
;
Expand Down
2 changes: 1 addition & 1 deletion Source/HBIOS/tms.asm
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ TMS_XY2IDX:
RET ; RETURN
;
;----------------------------------------------------------------------
; WRITE VALUE IN A TO CURRENT VDU BUFFER POSTION, ADVANCE CURSOR
; WRITE VALUE IN A TO CURRENT VDU BUFFER POSITION, ADVANCE CURSOR
;----------------------------------------------------------------------
;
TMS_PUTCHAR:
Expand Down

0 comments on commit 49ff4e4

Please sign in to comment.