the cutting room mirror

Cyberboard Kid

This article has a talk page!
view on tcrf.net

This page details development materials of Cyberboard Kid.

Mode X Driver Code#

On September 14, 1995, Reality Interactive asked for feedback on compatibility problems with their nonstandard Mode X resolution of 288×224. Their post featured the following piece of source code:

;------------------------------------------------------------------------
set_scroll_mode_ proc near

pusha

mov ah, 00h
mov al, 13h
int 10h ; set mode 13h

mov dx, SEQ_ADDR
mov ax, 0604h
out dx, ax ; turn off chain-4

mov dx, MISC_OUT
mov al, 0E3h
out dx, al ; 480 scan lines at 25 Hz

mov dx, CRTC_ADDR
mov edi, offset crtc_data
mov cx, 16

set_crtc_reg:
mov ax, [edi] ; crtc index+value
out dx, ax
add edi, 2
loop set_crtc_reg

mov al, 07h
out dx, al
inc dx
in al, dx
or al, 10h
out dx, al ; turn on bit 9 of line compare

dec dx
mov al, 09h
out dx, al
inc dx
in al, dx
and al, 191
out dx, al ; max scan lines+line compare

mov dx, 3dah
in al, dx ; set to address mode

mov dx, 3c0h
mov al, 10h ; mode control+BIT 5 = 0
out dx, al

mov dx, 3c1h ; vga
in al, dx
or al, 00100000b ; SET PEL PANNING COMPATIBLITY
push ax ; save value

mov dx, 3dah
in al, dx ; back for write

mov dx, 3c0h
mov al, 10h ; BIT 5 TO 1
out dx, al ; BACK TO NORMAL

pop ax
out dx, al

mov dx, 3dah
in al, dx
mov dx, 3c0h
mov al, 20h
out dx, al

popa

ret

set_scroll_mode_ endp

;------------------------------------------------------------------------

(Source: Mode-x resolution instability)