Changeset 152 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization


Ignore:
Timestamp:
May 1, 2011, 10:42:58 AM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • XTIDE mod should now be supported (untested).
  • Interrupt Service Routine no longer requires variable from RAMVARS.
  • Some small improvements.
Location:
trunk/XTIDE_Universal_BIOS/Src/Initialization
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm

    r124 r152  
    1919;--------------------------------------------------------------------
    2020FloppyDrive_IsInt40hInstalled:
    21     cmp     WORD [es:INTV_FLOPPY_FUNC*4+2], 0C000h  ; Any ROM segment?
     21    cmp     WORD [es:BIOS_DISKETTE_INTERRUPT_40h*4+2], 0C000h   ; Any ROM segment?
    2222%ifdef USE_AT   ; No need to verify on XT systems.
    2323    jb      SHORT .Int40hHandlerIsNotInstalled
     
    4545
    4646    call    .LoadInt40hVerifyParameters
    47     int     INTV_DISK_FUNC
     47    int     BIOS_DISK_INTERRUPT_13h
    4848    jc      SHORT .Int40hIsInstalled    ; Maybe there are not any floppy drives at all
    4949    push    es
     
    5151
    5252    call    .LoadInt40hVerifyParameters
    53     int     INTV_FLOPPY_FUNC
     53    int     BIOS_DISKETTE_INTERRUPT_40h
    5454
    5555    pop     dx
     
    113113    mov     ah, 08h         ; Get Drive Parameters
    114114    xor     bx, bx          ; FLOPPY_TYPE_525_OR_35_DD when function not supported
    115     int     INTV_FLOPPY_FUNC
     115    int     BIOS_DISKETTE_INTERRUPT_40h
    116116    ret
    117117
     
    167167    mov     ah, 08h                 ; Get Drive Parameters
    168168    cwd                             ; Floppy Drive 00h
    169     int     INTV_FLOPPY_FUNC
     169    int     BIOS_DISKETTE_INTERRUPT_40h
    170170    mov     cl, dl                  ; Number of Floppy Drives to CL
    171171
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm

    r150 r152  
    8989.StoreDptPointersToIntVectors:
    9090    mov     dl, 80h
     91    call    RamVars_IsDriveHandledByThisBIOS
     92    jnc     SHORT .FindForDrive81h  ; Store nothing if not our drive
    9193    call    FindDPT_ForDriveNumber  ; DPT to DS:DI
    92     jnc     SHORT .FindForDrive81h  ; Store nothing if not our drive
    93     mov     [es:INTV_HD0DPT*4], di
    94     mov     [es:INTV_HD0DPT*4+2], ds
     94    mov     [es:HD0_DPT_POINTER_41h*4], di
     95    mov     [es:HD0_DPT_POINTER_41h*4+2], ds
    9596.FindForDrive81h:
    9697    inc     dx
     98    call    RamVars_IsDriveHandledByThisBIOS
     99    jnc     SHORT .ResetDetectedDrives
    97100    call    FindDPT_ForDriveNumber
    98     jnc     SHORT .ResetDetectedDrives
    99     mov     [es:INTV_HD1DPT*4], di
    100     mov     [es:INTV_HD1DPT*4+2], ds
     101    mov     [es:HD1_DPT_POINTER_46h*4], di
     102    mov     [es:HD1_DPT_POINTER_46h*4+2], ds
    101103    ; Fall to .ResetDetectedDrives
    102104
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r150 r152  
    2929;--------------------------------------------------------------------
    3030.InitializeInt13hAnd40h:
    31     mov     ax, [es:INTV_DISK_FUNC*4]           ; Load old INT 13h offset
    32     mov     dx, [es:INTV_DISK_FUNC*4+2]         ; Load old INT 13h segment
     31    mov     ax, [es:BIOS_DISK_INTERRUPT_13h*4]  ; Load old INT 13h offset
     32    mov     dx, [es:BIOS_DISK_INTERRUPT_13h*4+2]; Load old INT 13h segment
    3333    mov     [RAMVARS.fpOldI13h], ax             ; Store old INT 13h offset
    3434    mov     [RAMVARS.fpOldI13h+2], dx           ; Store old INT 13h segment
    35     mov     bx, INTV_DISK_FUNC                  ; INT 13h interrupt vector offset
     35    mov     bx, BIOS_DISK_INTERRUPT_13h         ; INT 13h interrupt vector offset
    3636    mov     si, Int13h_DiskFunctionsHandler     ; Interrupt handler offset
    3737    call    Interrupts_InstallHandlerToVectorInBXFromCSSI
     
    4242    call    FloppyDrive_IsInt40hInstalled
    4343    jc      SHORT .InitializeInt19h
    44     mov     [es:INTV_FLOPPY_FUNC*4], ax     ; Store old INT 13h offset
    45     mov     [es:INTV_FLOPPY_FUNC*4+2], dx   ; Store old INT 13h segment
     44    mov     [es:BIOS_DISKETTE_INTERRUPT_40h*4], ax      ; Store old INT 13h offset
     45    mov     [es:BIOS_DISKETTE_INTERRUPT_40h*4+2], dx    ; Store old INT 13h segment
    4646    ; Fall to .InitializeInt19h
    4747
     
    5757;--------------------------------------------------------------------
    5858.InitializeInt19h:
    59     mov     bx, INTV_BOOTSTRAP
     59    mov     bx, BIOS_BOOT_LOADER_INTERRUPT_19h
    6060    mov     si, Int19hMenu_BootLoader
    6161    call    Interrupts_InstallHandlerToVectorInBXFromCSSI
     
    110110;--------------------------------------------------------------------
    111111.InstallHighIrqHandler:
    112     add     bx, BYTE INTV_IRQ8 - 8          ; Interrupt vector number
     112    add     bx, BYTE HARDWARE_IRQ_8_INTERRUPT_70h - 8   ; Interrupt vector number
    113113    mov     si, IdeIrq_InterruptServiceRoutineForIrqs8to15
    114114    jmp     SHORT Interrupts_InstallHandlerToVectorInBXFromCSSI
     
    125125;--------------------------------------------------------------------
    126126.InstallLowIrqHandler:
    127     add     bx, BYTE INTV_IRQ0              ; Interrupt vector number
     127    add     bx, BYTE HARDWARE_IRQ_0_INTERRUPT_08h       ; Interrupt vector number
    128128    mov     si, IdeIrq_InterruptServiceRoutineForIrqs2to7
    129129    ; Fall to Interrupts_InstallHandlerToVectorInBXFromCSSI
     
    177177.UnmaskHighIrqController:
    178178    sub     al, 8               ; Slave interrupt number
    179     mov     dx, PORT_8259SL_IMR ; Load Slave Mask Register address
     179    mov     dx, SLAVE_8259_IMR
    180180    call    .ClearBitFrom8259MaskRegister
    181181    mov     al, 2               ; Master IRQ 2 to allow slave IRQs
     
    192192;--------------------------------------------------------------------
    193193.UnmaskLowIrqController:
    194     mov     dx, PORT_8259MA_IMR ; Load Mask Register address
     194    mov     dx, MASTER_8259_IMR
    195195    ; Fall to .ClearBitFrom8259MaskRegister
    196196
Note: See TracChangeset for help on using the changeset viewer.