Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 63 additions & 6 deletions src/GLABIOS.ASM
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,11 @@ SW1_FLP = 00b ; SW1 7/8 Max # of floppy drives (0-3)
ENDIF

;----------------------------------------------------------------------------;
; Configuration for Compaq XT (incomplete)
; Configuration for Compaq Portable (incomplete)
;
IF ARCH_TYPE EQ ARCH_CPQ
TURBO_TYPE = TURBO_NONE ; disable Turbo features
POST_TEST_FD = 0 ; Avoid FDD 0800 error
SW1_VID = 10b ; SW1 5/6 ON/OFF Video Type CGA 80
SW1_FLP = 1 ; SW1 7/8 Max # of floppy drives (0-3)
; 0-based: 0=1 drive, 1=2 drives, etc
Expand Down Expand Up @@ -7227,7 +7228,7 @@ INT_KB_IS_ALT_000:
INT_KB_NOT_ALT_000:
XCHG AX, BX ; restore AX
MOV DI, OFFSET INT_KB_ALT_SKIP
MOV CL, 10 ; L_INT_KB_ALT_SKIP
MOV CX, L_INT_KB_ALT_SKIP
XCHG AH, AL
REPNE SCASB ; is in table?
XCHG AH, AL
Expand Down Expand Up @@ -7308,7 +7309,10 @@ INT_KB_CTRL:
INT_KB_CTRL_ALT:
CMP AH, 53H ; is Ctrl-Alt-Del?
IF IS_TURBO
JNE INT_KB_CTRL_ALT_1 ; if not check for turbo hotkey
JNZ INT_KB_CTRL_ALT_1 ; if not check for turbo hotkey
ENDIF
IF ARCH_TYPE EQ ARCH_CPQ
JNZ INT_KB_CTRL_ALT_2 ; jump to compaq key commands
ELSE
JNE INT_KB_CTRL_NO_DONE ; put in buffer as-is and exit
ENDIF
Expand Down Expand Up @@ -7337,7 +7341,7 @@ INT_KB_CTRL_ALT_DEL:

IF IS_TURBO
;----------------------------------------------------------------------------;
; 10. Handle Ctrl-Alt but not Del (only Turbo hotkey)
; 10. Handle Ctrl-Alt but not Del
;
INT_KB_CTRL_ALT_1:

Expand Down Expand Up @@ -7378,6 +7382,29 @@ INT_KB_TOGGLE_TURBO PROC
INT_KB_TOGGLE_TURBO ENDP
ENDIF


IF ARCH_TYPE EQ ARCH_CPQ
INT_KB_CTRL_ALT_2:
;----------------------------------------------------------------------------;
; Ctrl-Alt-, CGA 80x25
;
CMP AH, 33H
JNZ INT_KB_CTRL_ALT_3
CALL CPQ_VID_CGA
JMP SHORT INT_KB_DONE_3

;----------------------------------------------------------------------------;
; Ctrl-Alt-. MDA 80x25
;
INT_KB_CTRL_ALT_3:
CMP AH, 34H
JNZ INT_KB_CTRL_NO_DONE
CALL CPQ_VID_MDA
JMP SHORT INT_KB_DONE_3

ENDIF


;----------------------------------------------------------------------------;
; 5. Is a flag key?
;----------------------------------------------------------------------------;
Expand Down Expand Up @@ -7550,8 +7577,10 @@ INT_KB_ALT_SKIP LABEL BYTE
DB 28H ; '
DB 29H ; `
DB 2BH ; \
IF ARCH_TYPE NE ARCH_CPQ
DB 33H ; ,
DB 34H ; .
ENDIF
DB 35H ; /
DB 37H ; * PrcSc
L_INT_KB_ALT_SKIP EQU $-INT_KB_ALT_SKIP
Expand Down Expand Up @@ -9119,7 +9148,8 @@ O_INT_1D_40 EQU INT_1D_40-INT_1D ; 40x25 mode data offset

; 80x25 CGA text
IF ARCH_TYPE EQ ARCH_CPQ
INT_1D_80 CRTC <71H,50H,5AH,0AH,19H,06H,19H,19H,02H,0DH,0BH,0CH>
INT_1D_80 CRTC <71H,50H,5AH,0AH,19H,06H,19H,19H,02H,0DH,0BH,0CH> ; MDA-like (default)
INT_1D_80_CGA CRTC <71H,50H,5AH,0AH,1FH,06H,19H,1CH,02H,07H,06H,07H> ; standard CGA
ELSE
INT_1D_80 CRTC <71H,50H,5AH,0AH,1FH,06H,19H,1CH,02H,07H,06H,07H>
ENDIF
Expand Down Expand Up @@ -9226,7 +9256,7 @@ INT_10_0_IS_CGA:
;----------------------------------------------------------------------------;
; Is CGA graphics (modes 4-6)
;
SHL SI, 1 ; SI = CGA GFX CRTD offset (20H)
MOV SI, O_INT_1D_GFX ; SI = CGA GFX CRTD offset
MOV AH, HIGH CGA_MEM_SZ ; CGA gfx page size = 4000H (16K)
XOR DI, DI ; DI = memory fill 0's
TEST BL, 0010B ; is 80 or 40 col text?
Expand Down Expand Up @@ -12200,6 +12230,33 @@ INT_10_4_GFX:
INT_10_4 ENDP
ENDIF ; /LIGHT_PEN EQ 1

IF ARCH_TYPE EQ ARCH_CPQ
;----------------------------------------------------------------------------;
; Compaq Portable video style switch (Ctrl-Alt-, / Ctrl-Alt-.)
;----------------------------------------------------------------------------;
; The Compaq Portable has a dual sync internal monitor paired with a Compaq
; VDU that can display MDA & CGA timings. In 80x25 mode it will default to
; MDA-like mode, but can be switched back and forth via keyboard commands.
; CRTC timings drive the VDU without any video mode change, screen clear, etc.
;----------------------------------------------------------------------------;
CPQ_VID_CGA:
MOV SI, OFFSET INT_1D_80_CGA ; standard CGA 80x25 timing
JMP SHORT CPQ_VID_SET
CPQ_VID_MDA:
MOV SI, OFFSET INT_1D_80 ; MDA-like 80x25 timing (boot default)
CPQ_VID_SET:
MOV DX, VID_PORT
XOR AX, AX
MOV CX, 12
CPQ_VID_LOOP:
MOV AH, CS:[SI]
OUT DX, AX
INC AX
INC SI
LOOP CPQ_VID_LOOP
RET
ENDIF

;
; 79 BYTES HERE / 0 BYTES HERE 5150
;
Expand Down