Changeset 417 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS


Ignore:
Timestamp:
May 5, 2012, 4:01:03 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • AT builds now relocate INT 13h stack to top of stolen conventional memory.
  • Some small fixes here and there.
Location:
trunk/XTIDE_Universal_BIOS
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc

    r414 r417  
    3030; at the top of interrupt vectors.
    3131struc RAMVARS
     32%ifdef RELOCATE_INT13H_STACK
     33    .fpInt13hEntryStack resb    4
     34    .dwStackChangeDSDI:
     35    .wStackChangeDI     resb    2
     36    .wStackChangeDS     resb    2
     37    .wNewStackOffset    resb    2
     38%endif
    3239    .fpOldI13h          resb    4   ; Far pointer to old INT 13h handler
    3340    .wSignature         resb    2   ; Sign for finding stolen 1 kiB
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm

    r414 r417  
    113113    mov     di, si                              ; DS:DI now points DPT
    114114CheckErrorsAfterTransferringLastBlock:
    115     mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
     115    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_BSY)
    116116    call    IdeWait_PollStatusFlagInBLwithTimeoutInBH
    117117
     
    304304;       Nothing
    305305;   Corrupts registers:
    306 ;       AX, CX
     306;       AX, BX, CX, DX
    307307;--------------------------------------------------------------------
    308308%ifdef MODULE_8BIT_IDE
     
    311311WriteBlockToXtideRev1:
    312312    push    ds
    313     push    bx
    314313    UNROLL_SECTORS_IN_CX_TO_QWORDS
    315314    mov     bl, 8       ; Bit mask for toggling data low/high reg
     
    323322    XTIDE_OUTSW
    324323    loop    .OutswLoop
    325     pop     bx
    326324    pop     ds
    327325    ret
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm

    r414 r417  
    115115CheckErrorsAfterTransferringLastMemoryMappedBlock:
    116116    lds     di, [bp+MEMPIOVARS.fpDPT]           ; DPT now in DS:DI
    117     mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
     117    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_BSY)
    118118    call    IdeWait_PollStatusFlagInBLwithTimeoutInBH
    119119
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm

    r414 r417  
    2323;--------------------------------------------------------------------
    2424; Int 13h software interrupt handler.
     25; This handler changes stack to top of stolen conventional memory
     26; and then calls the actual INT 13h handler (Int13h_DiskFunctionsHandler).
     27;
     28; Int13h_DiskFunctionsHandlerWithStackChange
     29;   Parameters:
     30;       AH:     Bios function
     31;       DL:     Drive number
     32;       Other:  Depends on function
     33;   Returns:
     34;       Depends on function
     35;--------------------------------------------------------------------
     36%ifdef RELOCATE_INT13H_STACK
     37ALIGN JUMP_ALIGN
     38Int13h_DiskFunctionsHandlerWithStackChange:
     39    push    ds
     40    push    di
     41    call    RamVars_GetSegmentToDS
     42
     43    ; Store entry registers to RAMVARS
     44    mov     [RAMVARS.fpInt13hEntryStack], sp
     45    mov     [RAMVARS.fpInt13hEntryStack+2], ss
     46    pop     WORD [RAMVARS.wStackChangeDI]
     47    pop     WORD [RAMVARS.wStackChangeDS]
     48
     49    ; Load new stack and restore DS and DI
     50    mov     di, ds      ; We do not want to overwrite DS and DI in stack
     51    mov     ss, di
     52    mov     sp, [RAMVARS.wNewStackOffset]
     53    lds     di, [RAMVARS.dwStackChangeDSDI]
     54
     55    ; Call INT 13h
     56    pushf
     57    push    cs
     58    call    Int13h_DiskFunctionsHandler
     59
     60    ; Restore stack (we must not corrupt FLAGS!)
     61    cli
     62%ifdef USE_386
     63    lss     sp, [ss:RAMVARS.fpInt13hEntryStack]
     64%else
     65    mov     sp, [ss:RAMVARS.fpInt13hEntryStack]
     66    mov     ss, [ss:RAMVARS.fpInt13hEntryStack+2]
     67%endif
     68    pop     di          ; DI before stack change
     69    pop     ds          ; DS before stack change
     70    retf    2           ; Skip FLAGS from stack
     71%endif ; RELOCATE_INT13H_STACK
     72
     73
     74;--------------------------------------------------------------------
     75; Int 13h software interrupt handler.
    2576; Jumps to specific function defined in AH.
    2677;
     
    4091    cld                                 ; String instructions to increment pointers
    4192    CREATE_FRAME_INTPACK_TO_SSBP    EXTRA_BYTES_FOR_INTPACK
    42 
    4393    call    RamVars_GetSegmentToDS
    4494
     
    4797    mov     [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv], dl
    4898%endif
    49 
    5099    call    FindDPT_ForDriveNumberInDL  ; DS:DI points to our DPT, or NULL if not our drive
    51100    jc      SHORT .NotOurDrive          ; DPT not found so this is not one of our drives
     
    56105    shl     bx, 1
    57106    cmp     ah, 25h                     ; Possible EBIOS function?
    58 %ifdef MODULE_EBIOS
     107%ifndef MODULE_EBIOS
     108    ja      SHORT UnsupportedFunction
     109    jmp     [cs:bx+g_rgw13hFuncJump]    ; Jump to BIOS function
     110
     111%else ; If using MODULE_EBIOS
    59112    ja      SHORT .JumpToEbiosFunction
    60 %else
    61     ja      SHORT Int13h_UnsupportedFunction
    62 %endif
    63113    jmp     [cs:bx+g_rgw13hFuncJump]    ; Jump to BIOS function
    64114
    65 %ifdef MODULE_EBIOS
    66     ; Jump to correct EBIOS function
    67115ALIGN JUMP_ALIGN
    68116.JumpToEbiosFunction:
    69117    test    BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
    70     jz      SHORT Int13h_UnsupportedFunction    ; No eINT 13h for CHS drives
     118    jz      SHORT UnsupportedFunction   ; No eINT 13h for CHS drives
    71119    sub     bl, 41h<<1                  ; BX = Offset to eINT 13h jump table
    72     jb      SHORT Int13h_UnsupportedFunction
     120    jb      SHORT UnsupportedFunction
    73121    cmp     ah, 48h
    74     ja      SHORT Int13h_UnsupportedFunction
     122    ja      SHORT UnsupportedFunction
    75123    jmp     [cs:bx+g_rgwEbiosFunctionJumpTable]
    76 %endif
     124%endif  ; MODULE_EBIOS
     125
    77126
    78127ALIGN JUMP_ALIGN
     
    91140    ; Fall to Int13h_DirectCallToAnotherBios
    92141
    93 ;--------------------------------------------------------------------
    94 ; Int13h_UnsupportedFunction
     142
     143;--------------------------------------------------------------------
     144; UnsupportedFunction
    95145; Int13h_DirectCallToAnotherBios
    96146;   Parameters:
     
    106156;--------------------------------------------------------------------
    107157ALIGN JUMP_ALIGN
    108 Int13h_UnsupportedFunction:
     158UnsupportedFunction:
    109159Int13h_DirectCallToAnotherBios:
    110160    call    ExchangeCurrentInt13hHandlerWithOldInt13hHandler
     
    156206%endif
    157207
     208
    158209%ifdef MODULE_SERIAL_FLOPPY
    159210;--------------------------------------------------------------------
     
    166217Int13h_ReturnSuccessForFloppy:
    167218    test    dl, dl
    168     js      short Int13h_UnsupportedFunction
     219    js      SHORT UnsupportedFunction
    169220    xor     ah, ah
    170     jmp     short Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    171 %endif
     221    jmp     SHORT Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
     222%endif
     223
    172224
    173225;--------------------------------------------------------------------
     
    185237    ; Fall to Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    186238
     239
    187240;--------------------------------------------------------------------
    188241; Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
     
    190243;   Parameters:
    191244;       AH:     BIOS Error code
     245;       DS:     RAMVARS segment
    192246;       SS:BP:  Ptr to IDEPACK
    193247;   Returns:
     
    206260
    207261Int13h_ReturnFromHandlerWithoutStoringErrorCode:
    208     or      WORD [bp+IDEPACK.intpack+INTPACK.flags], FLG_FLAGS_IF   ; Return with interrupts enabled
    209     mov     sp, bp                                  ; Now we can exit anytime
     262    ; Always return with interrupts enabled since there are programs that rely
     263    ; on INT 13h to enable interrupts.
     264    or      BYTE [bp+IDEPACK.intpack+INTPACK.flags+1], (FLG_FLAGS_IF>>8)
     265    mov     sp, bp  ; This makes possible to exit anytime, no matter what is on stack
    210266    RESTORE_FRAME_INTPACK_FROM_SSBP     EXTRA_BYTES_FOR_INTPACK
    211267
     
    280336    LOAD_BDA_SEGMENT_TO ds, di
    281337    mov     [bx], ah
     338    ; Fall to Int13h_SetErrorCodeToIntpackInSSBPfromAH
     339
    282340%else
    283341Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH:
     
    285343    LOAD_BDA_SEGMENT_TO ds, di
    286344    mov     [BDA.bHDLastSt], ah
     345    ; Fall to Int13h_SetErrorCodeToIntpackInSSBPfromAH
    287346%endif
    288347
     
    302361ALIGN WORD_ALIGN
    303362g_rgw13hFuncJump:
    304     dw  AH0h_HandlerForDiskControllerReset              ; 00h, Disk Controller Reset (All)
    305     dw  AH1h_HandlerForReadDiskStatus                   ; 01h, Read Disk Status (All)
    306     dw  AH2h_HandlerForReadDiskSectors                  ; 02h, Read Disk Sectors (All)
    307     dw  AH3h_HandlerForWriteDiskSectors                 ; 03h, Write Disk Sectors (All)
    308     dw  AH4h_HandlerForVerifyDiskSectors                ; 04h, Verify Disk Sectors (All)
     363    dw  AH0h_HandlerForDiskControllerReset          ; 00h, Disk Controller Reset (All)
     364    dw  AH1h_HandlerForReadDiskStatus               ; 01h, Read Disk Status (All)
     365    dw  AH2h_HandlerForReadDiskSectors              ; 02h, Read Disk Sectors (All)
     366    dw  AH3h_HandlerForWriteDiskSectors             ; 03h, Write Disk Sectors (All)
     367    dw  AH4h_HandlerForVerifyDiskSectors            ; 04h, Verify Disk Sectors (All)
    309368%ifdef MODULE_SERIAL_FLOPPY
    310     dw  Int13h_ReturnSuccessForFloppy                   ; 05h, Format Disk Track (XT, AT, EISA)
    311 %else
    312     dw  Int13h_UnsupportedFunction                      ; 05h, Format Disk Track (XT, AT, EISA)
    313 %endif
    314     dw  Int13h_UnsupportedFunction                      ; 06h, Format Disk Track with Bad Sectors (XT)
    315     dw  Int13h_UnsupportedFunction                      ; 07h, Format Multiple Cylinders (XT)
    316     dw  AH8h_HandlerForReadDiskDriveParameters          ; 08h, Read Disk Drive Parameters (All)
    317     dw  AH9h_HandlerForInitializeDriveParameters        ; 09h, Initialize Drive Parameters (All)
    318     dw  Int13h_UnsupportedFunction                      ; 0Ah, Read Disk Sectors with ECC (XT, AT, EISA)
    319     dw  Int13h_UnsupportedFunction                      ; 0Bh, Write Disk Sectors with ECC (XT, AT, EISA)
    320     dw  AHCh_HandlerForSeek                             ; 0Ch, Seek (All)
    321     dw  AHDh_HandlerForResetHardDisk                    ; 0Dh, Alternate Disk Reset (All)
    322     dw  Int13h_UnsupportedFunction                      ; 0Eh, Read Sector Buffer (XT, PS/1), ESDI Undocumented Diagnostic (PS/2)
    323     dw  Int13h_UnsupportedFunction                      ; 0Fh, Write Sector Buffer (XT, PS/1), ESDI Undocumented Diagnostic (PS/2)
    324     dw  AH10h_HandlerForCheckDriveReady                 ; 10h, Check Drive Ready (All)
    325     dw  AH11h_HandlerForRecalibrate                     ; 11h, Recalibrate (All)
    326     dw  Int13h_UnsupportedFunction                      ; 12h, Controller RAM Diagnostic (XT)
    327     dw  Int13h_UnsupportedFunction                      ; 13h, Drive Diagnostic (XT)
    328     dw  Int13h_UnsupportedFunction                      ; 14h, Controller Internal Diagnostic (All)
    329     dw  AH15h_HandlerForReadDiskDriveSize               ; 15h, Read Disk Drive Size (AT+)
    330     dw  Int13h_UnsupportedFunction                      ; 16h,
    331     dw  Int13h_UnsupportedFunction                      ; 17h,
    332     dw  Int13h_UnsupportedFunction                      ; 18h,
    333     dw  Int13h_UnsupportedFunction                      ; 19h, Park Heads (PS/2)
    334     dw  Int13h_UnsupportedFunction                      ; 1Ah, Format ESDI Drive (PS/2)
    335     dw  Int13h_UnsupportedFunction                      ; 1Bh, Get ESDI Manufacturing Header (PS/2)
    336     dw  Int13h_UnsupportedFunction                      ; 1Ch, ESDI Special Functions (PS/2)
    337     dw  Int13h_UnsupportedFunction                      ; 1Dh,
    338     dw  Int13h_UnsupportedFunction                      ; 1Eh,
    339     dw  Int13h_UnsupportedFunction                      ; 1Fh,
    340     dw  Int13h_UnsupportedFunction                      ; 20h,
    341     dw  Int13h_UnsupportedFunction                      ; 21h, Read Disk Sectors, Multiple Blocks (PS/1)
    342     dw  Int13h_UnsupportedFunction                      ; 22h, Write Disk Sectors, Multiple Blocks (PS/1)
    343     dw  AH23h_HandlerForSetControllerFeatures           ; 23h, Set Controller Features Register (PS/1)
    344     dw  AH24h_HandlerForSetMultipleBlocks               ; 24h, Set Multiple Blocks (PS/1)
    345     dw  AH25h_HandlerForGetDriveInformation             ; 25h, Get Drive Information (PS/1)
     369    dw  Int13h_ReturnSuccessForFloppy               ; 05h, Format Disk Track (XT, AT, EISA)
     370%else
     371    dw  UnsupportedFunction                         ; 05h, Format Disk Track (XT, AT, EISA)
     372%endif
     373    dw  UnsupportedFunction                         ; 06h, Format Disk Track with Bad Sectors (XT)
     374    dw  UnsupportedFunction                         ; 07h, Format Multiple Cylinders (XT)
     375    dw  AH8h_HandlerForReadDiskDriveParameters      ; 08h, Read Disk Drive Parameters (All)
     376    dw  AH9h_HandlerForInitializeDriveParameters    ; 09h, Initialize Drive Parameters (All)
     377    dw  UnsupportedFunction                         ; 0Ah, Read Disk Sectors with ECC (XT, AT, EISA)
     378    dw  UnsupportedFunction                         ; 0Bh, Write Disk Sectors with ECC (XT, AT, EISA)
     379    dw  AHCh_HandlerForSeek                         ; 0Ch, Seek (All)
     380    dw  AHDh_HandlerForResetHardDisk                ; 0Dh, Alternate Disk Reset (All)
     381    dw  UnsupportedFunction                         ; 0Eh, Read Sector Buffer (XT, PS/1), ESDI Undocumented Diagnostic (PS/2)
     382    dw  UnsupportedFunction                         ; 0Fh, Write Sector Buffer (XT, PS/1), ESDI Undocumented Diagnostic (PS/2)
     383    dw  AH10h_HandlerForCheckDriveReady             ; 10h, Check Drive Ready (All)
     384    dw  AH11h_HandlerForRecalibrate                 ; 11h, Recalibrate (All)
     385    dw  UnsupportedFunction                         ; 12h, Controller RAM Diagnostic (XT)
     386    dw  UnsupportedFunction                         ; 13h, Drive Diagnostic (XT)
     387    dw  UnsupportedFunction                         ; 14h, Controller Internal Diagnostic (All)
     388    dw  AH15h_HandlerForReadDiskDriveSize           ; 15h, Read Disk Drive Size (AT+)
     389    dw  UnsupportedFunction                         ; 16h,
     390    dw  UnsupportedFunction                         ; 17h,
     391    dw  UnsupportedFunction                         ; 18h,
     392    dw  UnsupportedFunction                         ; 19h, Park Heads (PS/2)
     393    dw  UnsupportedFunction                         ; 1Ah, Format ESDI Drive (PS/2)
     394    dw  UnsupportedFunction                         ; 1Bh, Get ESDI Manufacturing Header (PS/2)
     395    dw  UnsupportedFunction                         ; 1Ch, ESDI Special Functions (PS/2)
     396    dw  UnsupportedFunction                         ; 1Dh,
     397    dw  UnsupportedFunction                         ; 1Eh,
     398    dw  UnsupportedFunction                         ; 1Fh,
     399    dw  UnsupportedFunction                         ; 20h,
     400    dw  UnsupportedFunction                         ; 21h, Read Disk Sectors, Multiple Blocks (PS/1)
     401    dw  UnsupportedFunction                         ; 22h, Write Disk Sectors, Multiple Blocks (PS/1)
     402    dw  AH23h_HandlerForSetControllerFeatures       ; 23h, Set Controller Features Register (PS/1)
     403    dw  AH24h_HandlerForSetMultipleBlocks           ; 24h, Set Multiple Blocks (PS/1)
     404    dw  AH25h_HandlerForGetDriveInformation         ; 25h, Get Drive Information (PS/1)
    346405
    347406%ifdef MODULE_EBIOS
    348407g_rgwEbiosFunctionJumpTable:
    349     dw  AH41h_HandlerForCheckIfExtensionsPresent        ; 41h, Check if Extensions Present (EBIOS)*
    350     dw  AH42h_HandlerForExtendedReadSectors             ; 42h, Extended Read Sectors (EBIOS)*
    351     dw  AH43h_HandlerForExtendedWriteSectors            ; 43h, Extended Write Sectors (EBIOS)*
    352     dw  AH44h_HandlerForExtendedVerifySectors           ; 44h, Extended Verify Sectors (EBIOS)*
    353     dw  Int13h_UnsupportedFunction                      ; 45h, Lock and Unlock Drive (EBIOS)***
    354     dw  Int13h_UnsupportedFunction                      ; 46h, Eject Media Request (EBIOS)***
    355     dw  AH47h_HandlerForExtendedSeek                    ; 47h, Extended Seek (EBIOS)*
    356     dw  AH48h_HandlerForGetExtendedDriveParameters      ; 48h, Get Extended Drive Parameters (EBIOS)*
    357 ;   dw  Int13h_UnsupportedFunction                      ; 49h, Get Extended Disk Change Status (EBIOS)***
    358 ;   dw  Int13h_UnsupportedFunction                      ; 4Ah, Initiate Disk Emulation (Bootable CD-ROM)
    359 ;   dw  Int13h_UnsupportedFunction                      ; 4Bh, Terminate Disk Emulation (Bootable CD-ROM)
    360 ;   dw  Int13h_UnsupportedFunction                      ; 4Ch, Initiate Disk Emulation and Boot (Bootable CD-ROM)
    361 ;   dw  Int13h_UnsupportedFunction                      ; 4Dh, Return Boot Catalog (Bootable CD-ROM)
    362 ;   dw  Int13h_UnsupportedFunction                      ; 4Eh, Set Hardware Configuration (EBIOS)**
     408    dw  AH41h_HandlerForCheckIfExtensionsPresent    ; 41h, Check if Extensions Present (EBIOS)*
     409    dw  AH42h_HandlerForExtendedReadSectors         ; 42h, Extended Read Sectors (EBIOS)*
     410    dw  AH43h_HandlerForExtendedWriteSectors        ; 43h, Extended Write Sectors (EBIOS)*
     411    dw  AH44h_HandlerForExtendedVerifySectors       ; 44h, Extended Verify Sectors (EBIOS)*
     412    dw  UnsupportedFunction                         ; 45h, Lock and Unlock Drive (EBIOS)***
     413    dw  UnsupportedFunction                         ; 46h, Eject Media Request (EBIOS)***
     414    dw  AH47h_HandlerForExtendedSeek                ; 47h, Extended Seek (EBIOS)*
     415    dw  AH48h_HandlerForGetExtendedDriveParameters  ; 48h, Get Extended Drive Parameters (EBIOS)*
     416;   dw  UnsupportedFunction                         ; 49h, Get Extended Disk Change Status (EBIOS)***
     417;   dw  UnsupportedFunction                         ; 4Ah, Initiate Disk Emulation (Bootable CD-ROM)
     418;   dw  UnsupportedFunction                         ; 4Bh, Terminate Disk Emulation (Bootable CD-ROM)
     419;   dw  UnsupportedFunction                         ; 4Ch, Initiate Disk Emulation and Boot (Bootable CD-ROM)
     420;   dw  UnsupportedFunction                         ; 4Dh, Return Boot Catalog (Bootable CD-ROM)
     421;   dw  UnsupportedFunction                         ; 4Eh, Set Hardware Configuration (EBIOS)**
    363422;
    364423;   * = Enhanced Drive Access Support (minimum required EBIOS functions)
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm

    r376 r417  
    4747    jmp     Int13h_ReturnFromHandlerWithoutStoringErrorCode
    4848.EbiosNotSupported:
    49     jmp     Int13h_UnsupportedFunction
     49    jmp     Int13h_DirectCallToAnotherBios
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r414 r417  
    126126    call    HotkeyBar_GetPrimaryBootDriveNumberToDL
    127127%else
    128     call    GetPrimaryBootDriveToDLwhenNotUsingModuleHotkeys
     128    xor     dl, dl          ; Try to boot from Floppy Drive A
    129129%endif  ; MODULE_HOTKEYS
    130130
     
    137137    call    HotkeyBar_GetSecondaryBootDriveNumberToDL
    138138%else
    139     call    GetPrimaryBootDriveToDLwhenNotUsingModuleHotkeys
    140     xor     dl, 80h
     139    mov     dl, 80h         ; Try to boot from Hard Drive C
    141140%endif
    142141    call    TryToBootFromPrimaryOrSecondaryBootDevice
     
    213212    jmp     BootSector_TryToLoadFromDriveDL
    214213%endif
    215 
    216 
    217 ;--------------------------------------------------------------------
    218 ; GetPrimaryBootDriveToDLwhenNotUsingModuleHotkeys
    219 ;   Parameters
    220 ;       Nothing
    221 ;   Returns:
    222 ;       DL:     Drive to boot from (00h or 80h)
    223 ;   Corrupts registers:
    224 ;       Nothing
    225 ;--------------------------------------------------------------------
    226 %ifndef MODULE_HOTKEYS
    227 GetPrimaryBootDriveToDLwhenNotUsingModuleHotkeys:
    228     mov     dl, [cs:ROMVARS.bBootDrv]
    229     and     dl, 80h     ; Only 00h and 80h allowed when not using MODULE_HOTKEYS
    230     ret
    231 %endif
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r398 r417  
    6161
    6262    mov     al, BIOS_DISK_INTERRUPT_13h         ; INT 13h interrupt vector offset
    63     mov     si, Int13h_DiskFunctionsHandler     ; Interrupt handler offset
     63    mov     si, Int13h_DiskFunctionsHandler
     64%ifdef RELOCATE_INT13H_STACK
     65    test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
     66    eCMOVNZ si, Int13h_DiskFunctionsHandlerWithStackChange
     67%endif
    6468    call    Interrupts_InstallHandlerToVectorInALFromCSSI
    6569
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r415 r417  
    121121
    122122g_szBusTypeValues:
     123g_szBusTypeValues_8JrIde:       db      "M8 ",NULL
     124g_szBusTypeValues_8Fast:        db      "F8 ",NULL
     125g_szBusTypeValues_8Reversed:    db      "X8 ",NULL
    123126g_szBusTypeValues_8Dual:        db      "D8 ",NULL
    124 g_szBusTypeValues_8Reversed:    db      "X8 ",NULL
    125 g_szBusTypeValues_8Single:      db      "S8 ",NULL
    126127g_szBusTypeValues_16:           db      " 16",NULL
    127128g_szBusTypeValues_32:           db      " 32",NULL
    128129g_szBusTypeValues_Serial:       db      "SER",NULL
    129 g_szBusTypeValues_8MemMapped:   db      "M8 ",NULL
    130 g_szBusTypeValues_Displacement equ (g_szBusTypeValues_8Reversed - g_szBusTypeValues)
     130
     131g_szBusTypeValues_Displacement equ (g_szBusTypeValues_8Fast - g_szBusTypeValues)
    131132;
    132133; Ensure that bus type strings are correctly spaced in memory
    133134;
    134135%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    135     %if g_szBusTypeValues_8Dual <> g_szBusTypeValues
     136    %if g_szBusTypeValues_8JrIde <> g_szBusTypeValues
    136137        %error "g_szBusTypeValues Displacement Incorrect 1"
    137138    %endif
    138     %if g_szBusTypeValues_8Reversed <> g_szBusTypeValues + g_szBusTypeValues_Displacement
     139    %if g_szBusTypeValues_8Fast <> g_szBusTypeValues + g_szBusTypeValues_Displacement
    139140        %error "g_szBusTypeValues Displacement Incorrect 2"
    140141    %endif
    141     %if g_szBusTypeValues_8Single <> g_szBusTypeValues_8Reversed + g_szBusTypeValues_Displacement
     142    %if g_szBusTypeValues_8Reversed <> g_szBusTypeValues_8Fast + g_szBusTypeValues_Displacement
    142143        %error "g_szBusTypeValues Displacement Incorrect 3"
    143144    %endif
    144     %if g_szBusTypeValues_16 <> g_szBusTypeValues_8Single + g_szBusTypeValues_Displacement
     145    %if g_szBusTypeValues_8Dual <> g_szBusTypeValues_8Reversed + g_szBusTypeValues_Displacement
    145146        %error "g_szBusTypeValues Displacement Incorrect 4"
    146147    %endif
     148    %if g_szBusTypeValues_16 <> g_szBusTypeValues_8Dual + g_szBusTypeValues_Displacement
     149        %error "g_szBusTypeValues Displacement Incorrect 5"
     150    %endif
    147151    %if g_szBusTypeValues_32 <> g_szBusTypeValues_16 + g_szBusTypeValues_Displacement
    148         %error "g_szBusTypeValues Displacement Incorrect 5"
     152        %error "g_szBusTypeValues Displacement Incorrect 6"
    149153    %endif
    150154    %if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement
    151         %error "g_szBusTypeValues Displacement Incorrect 6"
    152     %endif
    153     %if g_szBusTypeValues_8MemMapped <> g_szBusTypeValues_Serial + g_szBusTypeValues_Displacement
    154155        %error "g_szBusTypeValues Displacement Incorrect 7"
    155156    %endif
  • trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm

    r415 r417  
    221221
    222222g_szBusTypeValues:
     223g_szBusTypeValues_8JrIde:       ; db        "M8 ",NULL
     224                                ; db         4dh,  38h,  20h,  00h    ; uncompressed
     225                                  db         53h,  31h,  00h          ; compressed
     226
     227g_szBusTypeValues_8Fast:        ; db        "F8 ",NULL
     228                                ; db         46h,  38h,  20h,  00h    ; uncompressed
     229                                  db         4ch,  31h,  00h          ; compressed
     230
     231g_szBusTypeValues_8Reversed:    ; db        "X8 ",NULL
     232                                ; db         58h,  38h,  20h,  00h    ; uncompressed
     233                                  db         5eh,  31h,  00h          ; compressed
     234
    223235g_szBusTypeValues_8Dual:        ; db        "D8 ",NULL
    224236                                ; db         44h,  38h,  20h,  00h    ; uncompressed
    225237                                  db         4ah,  31h,  00h          ; compressed
    226238
    227 g_szBusTypeValues_8Reversed:    ; db        "X8 ",NULL
    228                                 ; db         58h,  38h,  20h,  00h    ; uncompressed
    229                                   db         5eh,  31h,  00h          ; compressed
    230 
    231 g_szBusTypeValues_8Single:      ; db        "S8 ",NULL
    232                                 ; db         53h,  38h,  20h,  00h    ; uncompressed
    233                                   db         59h,  31h,  00h          ; compressed
    234 
    235239g_szBusTypeValues_16:           ; db        " 16",NULL
    236240                                ; db         20h,  31h,  36h,  00h    ; uncompressed
     
    245249                                  db         59h,  4bh,  98h          ; compressed
    246250
    247 g_szBusTypeValues_8MemMapped:   ; db        "M8 ",NULL
    248                                 ; db         4dh,  38h,  20h,  00h    ; uncompressed
    249                                   db         53h,  31h,  00h          ; compressed
    250 
    251 g_szBusTypeValues_Displacement equ (g_szBusTypeValues_8Reversed - g_szBusTypeValues)
     251
     252g_szBusTypeValues_Displacement equ (g_szBusTypeValues_8Fast - g_szBusTypeValues)
    252253;
    253254; Ensure that bus type strings are correctly spaced in memory
    254255;
    255256%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    256 %if g_szBusTypeValues_8Dual <> g_szBusTypeValues
     257%if g_szBusTypeValues_8JrIde <> g_szBusTypeValues
    257258%error "g_szBusTypeValues Displacement Incorrect 1"
    258259%endif
    259 %if g_szBusTypeValues_8Reversed <> g_szBusTypeValues + g_szBusTypeValues_Displacement
     260%if g_szBusTypeValues_8Fast <> g_szBusTypeValues + g_szBusTypeValues_Displacement
    260261%error "g_szBusTypeValues Displacement Incorrect 2"
    261262%endif
    262 %if g_szBusTypeValues_8Single <> g_szBusTypeValues_8Reversed + g_szBusTypeValues_Displacement
     263%if g_szBusTypeValues_8Reversed <> g_szBusTypeValues_8Fast + g_szBusTypeValues_Displacement
    263264%error "g_szBusTypeValues Displacement Incorrect 3"
    264265%endif
    265 %if g_szBusTypeValues_16 <> g_szBusTypeValues_8Single + g_szBusTypeValues_Displacement
     266%if g_szBusTypeValues_8Dual <> g_szBusTypeValues_8Reversed + g_szBusTypeValues_Displacement
    266267%error "g_szBusTypeValues Displacement Incorrect 4"
    267268%endif
     269%if g_szBusTypeValues_16 <> g_szBusTypeValues_8Dual + g_szBusTypeValues_Displacement
     270%error "g_szBusTypeValues Displacement Incorrect 5"
     271%endif
    268272%if g_szBusTypeValues_32 <> g_szBusTypeValues_16 + g_szBusTypeValues_Displacement
    269 %error "g_szBusTypeValues Displacement Incorrect 5"
     273%error "g_szBusTypeValues Displacement Incorrect 6"
    270274%endif
    271275%if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement
    272 %error "g_szBusTypeValues Displacement Incorrect 6"
    273 %endif
    274 %if g_szBusTypeValues_8MemMapped <> g_szBusTypeValues_Serial + g_szBusTypeValues_Displacement
    275276%error "g_szBusTypeValues Displacement Incorrect 7"
    276277%endif
     
    526527;; 68,D:10
    527528;; 69,E:2
    528 ;; 70,F:3
     529;; 70,F:4
    529530;; 71,G:2
    530531;; 72,H:4
     
    539540;; 81,Q:1
    540541;; 82,R:5
    541 ;; 83,S:6
     542;; 83,S:5
    542543;; 84,T:
    543544;; 85,U:2
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r400 r417  
    7676    call    Memory_ZeroESDIwithSizeInCX
    7777    mov     WORD [RAMVARS.wSignature], RAMVARS_SIGNATURE
     78    ; Fall to .InitializeInt13hStackChangeVariables
     79
     80;--------------------------------------------------------------------
     81; .InitializeInt13hStackChangeVariables
     82;   Parameters:
     83;       DS:     RAMVARS segment
     84;   Returns:
     85;       Nothing
     86;   Corrupts registers:
     87;       AX
     88;--------------------------------------------------------------------
     89%ifdef RELOCATE_INT13H_STACK
     90.InitializeInt13hStackChangeVariables:
     91    eMOVZX  ax, BYTE [cs:ROMVARS.bStealSize]
     92    eSHL_IM ax, 10          ; kiB to Bytes = Top of stack offset
     93    mov     [RAMVARS.wNewStackOffset], ax
     94%endif
    7895    ; Fall to .InitializeDriveTranslationAndReturn
    7996
  • trunk/XTIDE_Universal_BIOS/makefile

    r415 r417  
    2929# Not modules but these affect the assembly:                                                     #
    3030# ELIMINATE_CGA_SNOW        Prevents CGA snowing at the cost of a few bytes                      #
     31# RELOCATE_INT13H_STACK     Relocates INT 13h stack to top of stolen conventional memory         #
    3132# USE_186                   Use instructions supported by 80188/80186 and V20/V30 and later      #
    3233# USE_286                   Use instructions supported by 286 and later                          #
     
    9899DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_8BIT_IDE MODULE_JRIDE MODULE_SERIAL MODULE_SERIAL_FLOPPY
    99100DEFINES_XTPLUS = $(DEFINES_COMMON) $(DEFINES_XT) USE_186
    100 DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
     101DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 RELOCATE_INT13H_STACK MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
    101102
    102103DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE)
Note: See TracChangeset for help on using the changeset viewer.