Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for MACHINE_XT build #32

Merged
merged 2 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions bios.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ low_ram_ok:
and al,0FDh ; clear switch select bit - select SW5-SW8
%endif ; MACHINE_FE2010A
%ifdef MACHINE_XT
and al,0F7h ; clear switch select bit - select SW5-SW8
or al,08h ; set switch select bit - select SW5-SW8
%endif ; MACHINE_XT
out ppi_pb_reg,al
in al,ppi_pc_reg ; read switches SW5-SW8
Expand Down Expand Up @@ -1281,7 +1281,8 @@ config_table:
detect_rom_ext:
mov al,e_ext_start ; ROM extension scan start
out post_reg,al

in al,pic1_reg1 ; get IMR (option ROMs may trash it)
push ax ; save it
mov dx,0C800h
mov bx,0F800h
%ifdef AT_RTC_NVRAM or FLASH_NVRAM
Expand Down Expand Up @@ -1315,6 +1316,8 @@ detect_rom_ext:
jmp .ext_scan_loop

.ext_scan_done:
pop ax ; get previous IMR
out pic1_reg1,al ; restore it
mov al,e_ext_complete ; ROM extension scan complete
out post_reg,al

Expand Down
9 changes: 6 additions & 3 deletions video.inc
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,16 @@ int_10_fn00:
; assume CGA mode
mov cx,0B800h ; CGA video memory segment
mov dx,3D4h ; port for MC6845 CRTC address register
mov al,byte [equipment_list] ; get equipment - low byte
and al,equip_video ; get video adapter type
cmp al,equip_mono ; monochrome?
mov al,0
cmp bl,07h
jb .color ; jump if CGA/color mode
jne .color ; jump if CGA/color mode
; set MDA mode
mov bl,07h ; MDA can only be 7
mov ch,0B0h ; MDA video memory segment
mov dl,0B4h ; port for MC6845 CRTC address register
inc al
inc ax
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saves 1 byte :)


.color:
mov es,cx ; ES = video memory segment
Expand Down