Ignore:
Timestamp:
Feb 14, 2019, 7:38:08 PM (3 years ago)
Author:
krille_n_
Message:

Changes:

  • Building the BIOS now works again.
  • Added a new IDE device type/transfer mode for use only with XT-IDE rev 2+ (or Chuck(G)-modded rev 1) cards installed in any of the following machines: Olivetti M24, AT&T PC6300, Xerox 6060 and Logabax Persona 1600. This new transfer mode is slightly faster than the regular XT-IDE rev 1 device type and requires that the card is configured for High Speed mode (or, in case of the card being a rev 1 card, has the Chuck(G) mod done). The new device type is called "XTIDE rev 2 (Olivetti M24)" in XTIDECFG.
  • Made some minor improvements to the library code that handles 'Drive Not Ready' errors in XTIDECFG.
  • Optimizations.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm

    r567 r601  
    4343ALIGN JUMP_ALIGN
    4444SerialCommand_OutputWithParameters:
     45    mov     ah, SerialServer_Command_Read
     46    mov     al, [bp+IDEPACK.bCommand]
    4547
    46         mov     ah,SerialServer_Command_Read
    47 
    48         mov     al,[bp+IDEPACK.bCommand]
    49 
    50         cmp     al,20h          ; Read Sectors IDE command
    51         jz      .readOrWrite
    52         inc     ah              ; now SerialServer_Protocol_Write
    53         cmp     al,30h          ; Write Sectors IDE command
    54         jz      .readOrWrite
     48    cmp     al, 20h                         ; Read Sectors IDE command
     49    je      SHORT .readOrWrite
     50    inc     ah                              ; now SerialServer_Protocol_Write
     51    cmp     al, 30h                         ; Write Sectors IDE command
     52    je      SHORT .readOrWrite
    5553
    5654;  all other commands return success
    5755;  including function 0ech which should return drive information, this is handled with the identify functions
    5856;
    59         xor     ah,ah           ;  also clears carry
    60         ret
     57    xor     ah, ah                          ;  also clears carry
     58    ret
    6159
    6260.readOrWrite:
    63         mov     [bp+IDEPACK.bFeatures],ah       ; store protocol command
     61    mov     [bp+IDEPACK.bFeatures], ah      ; store protocol command
    6462%ifdef USE_AT
    65         mov     dh, [bp+IDEPACK.bSectorCount]
     63    mov     dh, [bp+IDEPACK.bSectorCount]
    6664%endif
    67         call    IdeTransfer_NormalizePointerInESSI
     65    call    IdeTransfer_NormalizePointerInESSI
    6866%ifdef USE_AT
    69         jnc     SHORT .PointerNormalizationWasSuccessful
    70         xor     cx, cx          ; Nothing transferred
    71         stc
    72         ret
     67    jnc     SHORT .PointerNormalizationWasSuccessful
     68    xor     cx, cx                          ; Nothing transferred
     69    stc
     70    ret
    7371.PointerNormalizationWasSuccessful:
    7472%endif
    7573
    76         mov     dx, [di+DPT_SERIAL.wSerialPortAndBaud]
    77 
     74    mov     dx, [di+DPT_SERIAL.wSerialPortAndBaud]
    7875; fall through to SerialCommand_FallThroughToSerialServer_SendReceive
    7976
    8077ALIGN JUMP_ALIGN
    8178SerialCommand_FallThroughToSerialServer_SendReceive:
    82 
    8379; fall through to SerialServer_SendReceive
    84 
    8580%include "SerialServer.asm"
    8681
     
    9388ALIGN JUMP_ALIGN
    9489SerialCommand_ReturnError:
    95         stc
    96         ret
     90    stc
     91    ret
    9792
    9893;--------------------------------------------------------------------
     
    155150;     master scan.
    156151;
    157         mov     dx,[cs:bp+IDEVARS.wSerialPortAndBaud]
    158         xor     ax,ax
     152    mov     dx, [cs:bp+IDEVARS.wSerialPortAndBaud]
     153    xor     ax, ax
    159154
    160         push    si
    161         call    FindDPT_ToDSDIforSerialDevice
    162         pop     si
     155    push    si
     156    call    FindDPT_ToDSDIforSerialDevice
     157    pop     si
    163158%ifdef MODULE_SERIAL_FLOPPY
    164         jnc     .founddpt
     159    jnc     SHORT .founddpt
    165160;
    166161; If not found above with FindDPT_ToDSDIforSerialDevice, DI will point to the DPT after the last hard disk DPT
    167162; So, if there was a previously found floppy disk, DI will point to that DPT and we use that value for the slave.
    168163;
    169         cmp     byte [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], 0
    170         jz      .notfounddpt
     164    cmp     BYTE [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], 0
     165    je      SHORT .notfounddpt
    171166.founddpt:
    172167%else
    173         jc      .notfounddpt
     168    jc      SHORT .notfounddpt
    174169%endif
    175         mov     ax, [di+DPT_SERIAL.wSerialPortAndBaud]
     170    mov     ax, [di+DPT_SERIAL.wSerialPortAndBaud]
    176171.notfounddpt:
     172    test    bh, FLG_DRVNHEAD_DRV
     173    jz      SHORT .master
    177174
    178         test    bh, FLG_DRVNHEAD_DRV
    179         jz      .master
    180 
    181         test    ax,ax           ; Take care of the case that is different between master and slave.
    182         jz      SerialCommand_ReturnError
     175    test    ax, ax                          ; Take care of the case that is different between master and slave.
     176    jz      SHORT SerialCommand_ReturnError
    183177
    184178; fall-through
    185179.master:
    186         test    dx,dx
    187         jnz     .identifyDeviceInDX
     180    test    dx, dx
     181    jnz     SHORT .identifyDeviceInDX
    188182
    189         xchg    dx, ax          ;  move ax to dx (move previously found serial drive to dx, could be zero)
     183    xchg    dx, ax                          ;  move ax to dx (move previously found serial drive to dx, could be zero)
    190184
    191185.identifyDeviceInDX:
    192 
    193186; fall through to SerialCommand_FallThroughToSerialServerScan_ScanForServer
    194187
    195188ALIGN JUMP_ALIGN
    196189SerialCommand_FallThroughToSerialServerScan_ScanForServer:
    197 
    198190; fall through to SerialServerScan_ScanForServer
    199 
    200191%include "SerialServerScan.asm"
    201192
     
    206197%endif
    207198
    208 
Note: See TracChangeset for help on using the changeset viewer.