Changeset 595 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers


Ignore:
Timestamp:
Jul 7, 2018, 9:53:24 AM (6 years ago)
Author:
Tomi Tilli
Message:
  • Int 19h reset handler now tries to boot from drive A before warm reset. This should help to get INT 10h hooked before launching booter games (meaning system reset without reseting interrupt vector table).
  • Win 95 hack temporarily removed (module not included by default). Very limited testing shows that CMOS hack seems to work with AMI bios but locks on Award BIOS.
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13hBiosInit.asm

    r566 r595  
    2121; Section containing code
    2222SECTION .text
    23 
    24 TEMPORARY_VECTOR_FOR_SYSTEM_INT13h      EQU     32h ; Unused by BIOS
    2523
    2624
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r593 r595  
    200200%endif
    201201    clc
    202     ;; fall through to Int19_JumpToBootSectorOrRomBoot
    203 
    204 ;--------------------------------------------------------------------
    205 ; Int19_JumpToBootSectorOrRomBoot
     202    ;; fall through to Int19h_JumpToBootSectorOrRomBoot
     203
     204;--------------------------------------------------------------------
     205; Int19h_JumpToBootSectorOrRomBoot
    206206;
    207207; Switches back to the POST stack, clears the DS and ES registers,
     
    213213;       CF:     Set for Boot Sector Boot
    214214;               Clear for ROM Boot
    215 ;       ES:BX:  (if CF set) Ptr to boot sector
     215;       ES:BX:  (if CF set) Ptr to boot sector (ES = zero)
    216216;
    217217;   Returns:
    218218;       Never returns
    219219;--------------------------------------------------------------------
    220 Int19_JumpToBootSectorOrRomBoot:
    221     mov     cx, es      ; Preserve MBR segment (can't push because of stack change)
    222     mov     ax, 0       ; NOTE: can't use XOR (LOAD_BDA_SEGMENT_TO) as it impacts CF
     220Int19h_JumpToBootSectorOrRomBoot:
     221    mov     ax, es      ; Preserve MBR segment (can't push because of stack change)
     222                        ; NOTE: can't use XOR (LOAD_BDA_SEGMENT_TO) as it impacts CF
    223223    SWITCH_BACK_TO_POST_STACK
    224224
    225225; clear segment registers before boot sector or rom call
    226226    mov     ds, ax
    227     mov     es, ax
    228227%ifdef USE_386
    229228    mov     fs, ax
     
    233232
    234233; jump to boot sector
    235     push    cx          ; sgment address for MBR
     234    push    ax          ; sgment address for MBR
    236235    push    bx          ; offset address for MBR
    237236    retf                ; NOTE: DL is set to the drive number
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/BootSector.asm

    r568 r595  
    3535BootSector_TryToLoadFromDriveDL_AndBoot:
    3636    call    DetectPrint_TryToBootFromDL
    37     call    LoadFirstSectorFromDriveDL
     37    call    BootSector_LoadFirstSectorFromDriveDL
    3838    jnc     SHORT .FirstSectorLoadedToESBX
    3939
     
    6060.AlwaysBootFromFloppyDriveForBooterGames:
    6161    stc     ; Boot Sector loaded successfully
    62     jmp     SHORT Int19_JumpToBootSectorOrRomBoot
     62    jmp     SHORT Int19h_JumpToBootSectorOrRomBoot
    6363
    6464.FirstHardDiskSectorNotBootable:
     
    7171
    7272;--------------------------------------------------------------------
    73 ; LoadFirstSectorFromDriveDL
     73; BootSector_LoadFirstSectorFromDriveDL
    7474;   Parameters:
    7575;       DL:     Drive to boot from (translated, 00h or 80h)
     
    8282;       AL, CX, DH, DI
    8383;--------------------------------------------------------------------
    84 LoadFirstSectorFromDriveDL:
     84BootSector_LoadFirstSectorFromDriveDL:
    8585    LOAD_BDA_SEGMENT_TO es, bx              ; ES:BX now points to...
    8686    mov     bx, BOOTVARS.rgbBootSect        ; ...boot sector location
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/Int19hReset.asm

    r526 r595  
    3232;--------------------------------------------------------------------
    3333Int19hReset_Handler:
     34    ; Try to boot from drive A.
     35    ; This is needed if INT 19h is used to launch booter games while
     36    ; preserving interrupt vector table (for example to hook interrupt 10h)
     37    xor     dx, dx      ; Drive 00h
     38    call    BootSector_LoadFirstSectorFromDriveDL
     39    jc      SHORT .Reboot
     40
     41    xor     ax, ax
     42    mov     ds, ax
     43%ifdef USE_386
     44    mov     fs, ax
     45    mov     gs, ax
     46%endif
     47    cmp     WORD [bx+510], 0AA55h   ; Valid boot sector?
     48    jne     SHORT .Reboot
     49    push    es                      ; Zero
     50    push    bx
     51    retf
     52
     53    ; Do warm reset since boot from floppy drive failed
     54.Reboot:
    3455    mov     ax, BOOT_FLAG_WARM              ; Skip memory tests
    3556    jmp     Reboot_ComputerWithBootFlagInAX
Note: See TracChangeset for help on using the changeset viewer.