mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 22:43:15 -06:00
Reset Video Hardware on OS Reset
- When an OS performs a reset operation, the HBIOS hook has been extended to automatically reset the video hardware of the CRT device (if it exists). - This should go a long way toward fixing corrupt video after an application is run that reprograms the video hardware. - An OS reset may or may not be performed when an application exits depending on the behavior of the application. So, if an application exits without initiating a reset, then the video will not be reset. Most applications that muck with the video chip directly will perform the reset at exit, so this is not normally an issue. - If the OS encounters an error (such as drive not ready when doing a DIR), the error message may be erased by this new behavior depending on the specific scenario.
This commit is contained in:
@@ -31,6 +31,8 @@ TERM_PREINIT:
|
||||
XOR A ; SIGNAL SUCCESS
|
||||
RET ; DONE
|
||||
;
|
||||
#IF (TERMENABLE)
|
||||
;
|
||||
;======================================================================
|
||||
; TERMINAL DRIVER - ATTACH
|
||||
;======================================================================
|
||||
@@ -47,8 +49,6 @@ TERM_PREINIT:
|
||||
; DE: VDA DRIVER'S DISPATCH ADDRESS
|
||||
; HL: VDA DRIVER'S INSTANCE DATA
|
||||
;
|
||||
#IF (TERMENABLE)
|
||||
;
|
||||
TERM_ATTACH:
|
||||
;
|
||||
LD A,(TERM_DEVCNT) ; GET NEXT DEVICE NUMBER TO USE
|
||||
@@ -83,6 +83,34 @@ TERM_ATTACH:
|
||||
RET ; RETURN
|
||||
;
|
||||
;======================================================================
|
||||
; TERMINAL DRIVER - RESET
|
||||
;======================================================================
|
||||
;
|
||||
; RESET THE FULL EMULATION STACK INCLUDING THE UNDERLYING VDA.
|
||||
; THIS IS USED TO RECOVER FROM APPLICATIONS THAT REPROGRAM THE
|
||||
; VIDEO CHIP.
|
||||
;
|
||||
TERM_RESET:
|
||||
; ABORT IF NOTHING ATTACHED
|
||||
LD A,(TERM_DEVCNT)
|
||||
OR A
|
||||
JR NZ,TERM_RESET1
|
||||
OR $FF
|
||||
RET
|
||||
;
|
||||
TERM_RESET1:
|
||||
; CALL EMULATOR INITDEV FUNCTION
|
||||
#IF (VDAEMU == EMUTYP_TTY)
|
||||
CALL TTY_INITDEV
|
||||
#ENDIF
|
||||
#IF (VDAEMU == EMUTYP_ANSI)
|
||||
CALL ANSI_INITDEV
|
||||
#ENDIF
|
||||
;
|
||||
XOR A
|
||||
RET
|
||||
;
|
||||
;======================================================================
|
||||
; TERMINAL DRIVER PRIVATE DATA
|
||||
;======================================================================
|
||||
;
|
||||
@@ -95,4 +123,10 @@ TERM_DEVCNT .DB 0 ; TERMINAL DEVICE COUNT
|
||||
#INCLUDE "tty.asm"
|
||||
#INCLUDE "ansi.asm"
|
||||
;
|
||||
#ELSE
|
||||
;
|
||||
TERM_RESET:
|
||||
XOR A
|
||||
RET
|
||||
;
|
||||
#ENDIF
|
||||
Reference in New Issue
Block a user