Changeset 601 in xtideuniversalbios for trunk


Ignore:
Timestamp:
Feb 14, 2019, 7:38:08 PM (6 years ago)
Author:
Krister Nordvall
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.
Location:
trunk
Files:
1 deleted
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/BiosFunctions.inc

    r596 r601  
    55
    66; BIOS interrupts
    7 BIOS_VIDEO_INTERRUPT_10h        EQU     10h
    8 BIOS_EQUIPMENT_INTERRUPT_11h    EQU     11h
    9 BIOS_DISK_INTERRUPT_13h         EQU     13h
    10 BIOS_SYSTEM_INTERRUPT_15h       EQU     15h
    11 BIOS_KEYBOARD_INTERRUPT_16h     EQU     16h
    12 BIOS_BOOT_FAILURE_INTERRUPT_18h EQU     18h
    13 BIOS_BOOT_LOADER_INTERRUPT_19h  EQU     19h
    14 BIOS_TIME_PCI_PNP_1Ah           EQU     1Ah
    15 BIOS_DISKETTE_INTERRUPT_40h     EQU     40h
    16 HD0_DPT_POINTER_41h             EQU     41h
    17 HD1_DPT_POINTER_46h             EQU     46h
     7BIOS_VIDEO_INTERRUPT_10h                EQU     10h
     8BIOS_EQUIPMENT_INTERRUPT_11h            EQU     11h
     9BIOS_DISK_INTERRUPT_13h                 EQU     13h
     10BIOS_SYSTEM_INTERRUPT_15h               EQU     15h
     11BIOS_KEYBOARD_INTERRUPT_16h             EQU     16h
     12BIOS_BOOT_FAILURE_INTERRUPT_18h         EQU     18h
     13BIOS_BOOT_LOADER_INTERRUPT_19h          EQU     19h
     14BIOS_TIME_PCI_PNP_INTERRUPT_1Ah         EQU     1Ah
     15BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch    EQU     1Ch
     16BIOS_DISKETTE_INTERRUPT_40h             EQU     40h
     17HD0_DPT_POINTER_41h                     EQU     41h
     18HD1_DPT_POINTER_46h                     EQU     46h
    1819
    1920; Hardware interrupts
    20 HARDWARE_IRQ_0_INTERRUPT_08h    EQU     08h     ; System timer
    21 HARDWARE_IRQ_1_INTERRUPT_09h    EQU     09h     ; Keyboard
    22 HARDWARE_IRQ_2_INTERRUPT_0Ah    EQU     0Ah
    23 HARDWARE_IRQ_3_INTERRUPT_0Bh    EQU     0Bh
    24 HARDWARE_IRQ_4_INTERRUPT_0Ch    EQU     0Ch
    25 HARDWARE_IRQ_5_INTERRUPT_0Dh    EQU     0Dh
    26 HARDWARE_IRQ_6_INTERRUPT_0Eh    EQU     0Eh
    27 HARDWARE_IRQ_7_INTERRUPT_0Fh    EQU     0Fh
    28 HARDWARE_IRQ_8_INTERRUPT_70h    EQU     70h
    29 HARDWARE_IRQ_9_INTERRUPT_71h    EQU     71h
    30 HARDWARE_IRQ_10_INTERRUPT_72h   EQU     72h
    31 HARDWARE_IRQ_11_INTERRUPT_73h   EQU     73h
    32 HARDWARE_IRQ_12_INTERRUPT_74h   EQU     74h
    33 HARDWARE_IRQ_13_INTERRUPT_75h   EQU     75h
    34 HARDWARE_IRQ_14_INTERRUPT_76h   EQU     76h
    35 HARDWARE_IRQ_15_INTERRUPT_77h   EQU     77h
    36 
     21HARDWARE_IRQ_0_INTERRUPT_08h            EQU     08h     ; System timer
     22HARDWARE_IRQ_1_INTERRUPT_09h            EQU     09h     ; Keyboard
     23HARDWARE_IRQ_2_INTERRUPT_0Ah            EQU     0Ah
     24HARDWARE_IRQ_3_INTERRUPT_0Bh            EQU     0Bh
     25HARDWARE_IRQ_4_INTERRUPT_0Ch            EQU     0Ch
     26HARDWARE_IRQ_5_INTERRUPT_0Dh            EQU     0Dh
     27HARDWARE_IRQ_6_INTERRUPT_0Eh            EQU     0Eh
     28HARDWARE_IRQ_7_INTERRUPT_0Fh            EQU     0Fh
     29HARDWARE_IRQ_8_INTERRUPT_70h            EQU     70h
     30HARDWARE_IRQ_9_INTERRUPT_71h            EQU     71h
     31HARDWARE_IRQ_10_INTERRUPT_72h           EQU     72h
     32HARDWARE_IRQ_11_INTERRUPT_73h           EQU     73h
     33HARDWARE_IRQ_12_INTERRUPT_74h           EQU     74h
     34HARDWARE_IRQ_13_INTERRUPT_75h           EQU     75h
     35HARDWARE_IRQ_14_INTERRUPT_76h           EQU     76h
     36HARDWARE_IRQ_15_INTERRUPT_77h           EQU     77h
    3737
    3838; BIOS video functions
    39 SET_VIDEO_MODE                  EQU     00h
    40 SET_TEXT_MODE_CURSOR_SHAPE      EQU     01h
    41 SET_CURSOR_POSITION             EQU     02h
    42 GET_CURSOR_POSITION_AND_SIZE    EQU     03h
    43 SELECT_ACTIVE_DISPLAY_PAGE      EQU     05h
    44 TELETYPE_OUTPUT                 EQU     0Eh
     39SET_VIDEO_MODE                          EQU     00h
     40SET_TEXT_MODE_CURSOR_SHAPE              EQU     01h
     41SET_CURSOR_POSITION                     EQU     02h
     42GET_CURSOR_POSITION_AND_SIZE            EQU     03h
     43SELECT_ACTIVE_DISPLAY_PAGE              EQU     05h
     44TELETYPE_OUTPUT                         EQU     0Eh
    4545
    4646; BIOS disk functions
    47 READ_SECTORS_INTO_MEMORY        EQU     02h
    48 GET_DRIVE_PARAMETERS            EQU     08h
    49 RESET_HARD_DISK                 EQU     0Dh
    50 GET_DISK_TYPE                   EQU     15h
    51 LOTECH_XTCF_FEATURES            EQU     1Eh
    52 GET_DRIVE_INFORMATION           EQU     25h
    53 CHECK_EXTENSIONS_PRESENT        EQU     41h
    54 GET_EXTENDED_DRIVE_INFORMATION  EQU     48h
     47READ_SECTORS_INTO_MEMORY                EQU     02h
     48GET_DRIVE_PARAMETERS                    EQU     08h
     49RESET_HARD_DISK                         EQU     0Dh
     50GET_DISK_TYPE                           EQU     15h
     51LOTECH_XTCF_FEATURES                    EQU     1Eh
     52GET_DRIVE_INFORMATION                   EQU     25h
     53CHECK_EXTENSIONS_PRESENT                EQU     41h
     54GET_EXTENDED_DRIVE_INFORMATION          EQU     48h
    5555
    5656; BIOS system functions
    57 OS_HOOK_DEVICE_BUSY             EQU     90h
    58 OS_HOOK_DEVICE_POST             EQU     91h
     57OS_HOOK_DEVICE_BUSY                     EQU     90h
     58OS_HOOK_DEVICE_POST                     EQU     91h
    5959
    6060; BIOS keyboard functions
    61 GET_KEYSTROKE                   EQU     00h
    62 CHECK_FOR_KEYSTROKE             EQU     01h
     61GET_KEYSTROKE                           EQU     00h
     62CHECK_FOR_KEYSTROKE                     EQU     01h
    6363
    6464; BIOS system functions
    65 EVENT_WAIT                      EQU     86h
     65EVENT_WAIT                              EQU     86h
    6666
    67 ; BIOS PCI 2.0+ functions
    68 PCI_INSTALLATION_CHECK          EQU     0B101h
    69 
     67; BIOS PCI 2.0c+ functions
     68PCI_INSTALLATION_CHECK                  EQU     0B101h
    7069
    7170%endif ; BIOS_FUNCTIONS_INC
  • trunk/Assembly_Library/Inc/DosFunctions.inc

    r592 r601  
    3636; DOS errors
    3737ERR_DOS_FUNCTION_NUMBER_INVALID                     EQU     01h
     38ERR_DOS_PATH_NOT_FOUND                              EQU     03h
    3839ERR_DOS_INVALID_DRIVE                               EQU     0Fh
     40ERR_DOS_NO_MORE_FILES                               EQU     12h
    3941ERR_DOS_DRIVE_NOT_READY                             EQU     15h
    4042
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm

    r596 r601  
    746746    mov     ax, FIND_FIRST_MATCHING_FILE<<8
    747747    int     DOS_INTERRUPT_21h
     748    ; Returns ERR_DOS_NO_MORE_FILES only when the root directory is the current directory (at least under Windows XP).
     749    cmp     al, ERR_DOS_PATH_NOT_FOUND
    748750    pop     ax
    749751    pop     ds
     
    752754
    753755    xchg    ah, [cs:bLastCriticalError]         ; Zero bLastCriticalError and fetch error code to AH
     756    je      SHORT .DriveIsNotReady              ; A removable drive with no media (or possibly a drive that has not been formatted?)
    754757    cmp     ah, ERR_DOS_DRIVE_NOT_READY
    755758    jne     SHORT .DriveIsReady
    756 
     759.DriveIsNotReady:
    757760    mov     bx, g_szDlgDriveNotReady
    758761    call    Dialogs_DisplayYesNoResponseDialogWithTitleStringInBX
  • trunk/Assembly_Library/Src/Menu/MenuAttributes.asm

    r592 r601  
    6868    cmp     al, 7
    6969    je      SHORT .LoadMonoAttribute
    70     test    al, 1                       ; Even modes (0 and 2) are B/W
    71     jnz     SHORT .LoadColorAttribute
     70    shr     al, 1                       ; Even modes (0 and 2) are B/W
     71    jc      SHORT .LoadColorAttribute
    7272
    7373.LoadBlackAndWhiteAttribute:
  • trunk/Assembly_Library/Src/Serial/SerialServer.asm

    r592 r601  
    3838;--------------------------------------------------------------------
    3939SerialServer_SendReceive:
    40 
    41         push    si
    42         push    di
    43         push    bp
     40    push    si
     41    push    di
     42    push    bp
    4443
    4544;
     
    4847;       Baud in CH until UART initialization is complete
    4948;
    50         mov     ch,dh
    51         xor     dh,dh
    52         eSHL_IM dx, 2           ; shift from one byte to two
    53 
    54         mov     al,[bp+SerialServer_Command.bSectorCount]
    55         mov     ah,[bp+SerialServer_Command.bCommand]
     49    mov     ch, dh
     50    xor     dh, dh
     51    eSHL_IM dx, 2                       ; shift from one byte to two
     52
     53    mov     al, [bp+SerialServer_Command.bSectorCount]
     54    mov     ah, [bp+SerialServer_Command.bCommand]
    5655
    5756;
    5857; Command byte and sector count live at the top of the stack, pop/push are used to access
    5958;
    60         push    ax              ; save sector count for return value
    61         push    ax              ; working copy on the top of the stack
    62 
    63 %ifndef EXCLUDE_FROM_XUB        ; DF already cleared in Int13h.asm
     59    push    ax                          ; save sector count for return value
     60    push    ax                          ; working copy on the top of the stack
     61
     62%ifndef EXCLUDE_FROM_XUB                ; DF already cleared in Int13h.asm
    6463%ifdef CLD_NEEDED
    65         cld
     64    cld
    6665%endif
    6766%endif
     
    7473; decided to reprogram the UART
    7574;
    76         mov     bl,dl           ; setup BL with proper values for read/write loops (BH comes later)
    77 
    78         mov     al,83h
    79         add     dl, Serial_UART_lineControl ; Clears CF
    80         out     dx,al
    81 
    82         mov     al,ch
    83         mov     dl,bl           ; divisor low
    84         out     dx,al
     75    mov     bl, dl                      ; setup BL with proper values for read/write loops (BH comes later)
     76    mov     al, 83h
     77    add     dl, Serial_UART_lineControl ; Clears CF
     78    out     dx, al
     79
     80    mov     al, ch
     81    mov     dl, bl                      ; divisor low
     82    out     dx, al
    8583
    8684%ifdef USE_UNDOC_INTEL
    87         salc    ; Clear AL using CF
     85    salc                                ; Clear AL using CF
    8886%else
    89         xor     al, al
    90 %endif
    91         inc     dx              ; divisor high
    92         push    dx
    93         out     dx,al
    94 
    95         mov     al,047h
    96         inc     dx              ; fifo
    97         out     dx,al
    98 
    99         mov     al,03h
    100         inc     dx              ; linecontrol
    101         out     dx,al
    102 
    103         mov     al,0bh
    104         inc     dx              ; modemcontrol
    105         out     dx,al
    106 
    107         inc     dx              ; linestatus (no output now, just setting up BH for later use)
    108         mov     bh,dl
    109 
    110         pop     dx              ; base, interrupts disabled
     87    xor     al, al
     88%endif
     89    inc     dx                          ; divisor high
     90    push    dx
     91    out     dx, al
     92
     93    mov     al, 47h
     94    inc     dx                          ; fifo
     95    out     dx, al
     96
     97    mov     al, 03h
     98    inc     dx                          ; linecontrol
     99    out     dx, al
     100
     101    mov     al, 0Bh
     102    inc     dx                          ; modemcontrol
     103    out     dx, al
     104
     105    inc     dx                          ; linestatus (no output now, just setting up BH for later use)
     106    mov     bh, dl
     107
     108    pop     dx                          ; base, interrupts disabled
    111109%ifdef USE_UNDOC_INTEL
    112         salc    ; Clear AL using CF
     110    salc                                ; Clear AL using CF
    113111%else
    114         xor     al, al
    115 %endif
    116         out     dx,al
     112    xor     al, al
     113%endif
     114    out     dx, al
    117115
    118116;----------------------------------------------------------------------
     
    122120; Sends first six bytes of IDEREGS_AND_INTPACK as the command
    123121;
    124         push    es              ; save off real buffer location
    125         push    si
    126 
    127         mov     si,bp           ; point to IDEREGS for command dispatch;
    128         push    ss
    129         pop     es
    130 
    131         mov     di,0ffffh       ; initialize checksum for write
    132         mov     bp,di
    133 
    134         mov     cx,4            ; writing 3 words (plus 1)
    135 
    136         cli                     ; interrupts off...
    137 
    138         call    SerialServer_WriteProtocol.entry
    139 
    140         pop     di              ; restore real buffer location (note change from SI to DI)
    141                                 ; Buffer is primarily referenced through ES:DI throughout, since
    142                                 ; we need to store (read sector) faster than we read (write sector)
    143         pop     es
    144 
    145         pop     ax              ; load command byte (done before call to .nextSector on subsequent iterations)
    146         push    ax
     122    push    es                          ; save off real buffer location
     123    push    si
     124
     125    mov     si, bp                      ; point to IDEREGS for command dispatch;
     126    push    ss
     127    pop     es
     128
     129    mov     di, 0FFFFh                  ; initialize checksum for write
     130    mov     bp, di
     131
     132    mov     cx, 4                       ; writing 3 words (plus 1)
     133
     134    cli                                 ; interrupts off...
     135
     136    call    SerialServer_WriteProtocol.entry
     137
     138    pop     di                          ; restore real buffer location (note change from SI to DI)
     139                                        ; Buffer is primarily referenced through ES:DI throughout, since
     140                                        ; we need to store (read sector) faster than we read (write sector)
     141    pop     es
     142
     143    pop     ax                          ; load command byte (done before call to .nextSector on subsequent iterations)
     144    push    ax
    147145
    148146%ifndef SERIALSERVER_NO_ZERO_SECTOR_COUNTS
    149         test    al,al           ; if no sectors to be transferred, wait for the ACK checksum on the command
    150         jz      .zeroSectors
     147    test    al, al                      ; if no sectors to be transferred, wait for the ACK checksum on the command
     148    jz      SHORT .zeroSectors
    151149%endif
    152150
     
    155153;
    156154.nextSector:
    157         mov     si,0ffffh       ; initialize checksum for read or write
    158         mov     bp,si
    159 
    160         mov     cx,0101h        ; writing 256 words (plus 1)
    161 
    162         sahf                    ; command byte, are we doing a write?
    163         jnc     .readEntry
    164 
    165         xchg    si,di           ; swap pointer and checksum, will be re-swap'ed in WriteProtocol
    166         call    SerialServer_WriteProtocol.entry
     155    mov     si, 0FFFFh                  ; initialize checksum for read or write
     156    mov     bp, si
     157
     158    mov     cx, 0101h                   ; writing 256 words (plus 1)
     159
     160    sahf                                ; command byte, are we doing a write?
     161    jnc     SHORT .readEntry
     162
     163    xchg    si, di                      ; swap pointer and checksum, will be re-swap'ed in WriteProtocol
     164    call    SerialServer_WriteProtocol.entry
    167165
    168166.zeroSectors:
    169         inc     cx              ; CX = 1 now (0 out of WriteProtocol)
    170         jmp     .readEntry
     167    inc     cx                          ; CX = 1 now (0 out of WriteProtocol)
     168    jmp     SHORT .readEntry
    171169
    172170;----------------------------------------------------------------------
     
    177175;
    178176.readTimeout:
    179         push    ax              ; not only does this push preserve AX (which we need), but it also
    180                                 ; means the stack has the same number of bytes on it as when we are
    181                                 ; sending a packet, important for error cleanup and exit
    182         mov     ah,1
    183         call    SerialServer_WaitAndPoll_Read
    184         pop     ax
    185         test    dl,1
    186         jz      .readByte1Ready
    187         jmp     .readByte2Ready
     177    push    ax                          ; not only does this push preserve AX (which we need), but it also
     178                                        ; means the stack has the same number of bytes on it as when we are
     179                                        ; sending a packet, important for error cleanup and exit
     180    mov     ah, 1
     181    call    SerialServer_WaitAndPoll_Read
     182    pop     ax
     183    test    dl, 1
     184    jz      SHORT .readByte1Ready
     185    jmp     SHORT .readByte2Ready
    188186
    189187;----------------------------------------------------------------------------
     
    197195;
    198196.readLoop:
    199         stosw                   ; store word in caller's data buffer
    200 
    201         add     bp, ax          ; update Fletcher's checksum
    202         adc     bp, 0
    203         add     si, bp
    204         adc     si, 0
     197    stosw                               ; store word in caller's data buffer
     198
     199    add     bp, ax                      ; update Fletcher's checksum
     200    adc     bp, 0
     201    add     si, bp
     202    adc     si, 0
    205203
    206204.readEntry:
    207         mov     dl,bh
    208         in      al,dx
    209         shr     al,1            ; data ready (byte 1)?
    210         mov     dl,bl           ; get ready to read data
    211         jnc     .readTimeout    ; nope not ready, update timeouts
     205    mov     dl, bh
     206    in      al, dx
     207    shr     al, 1                       ; data ready (byte 1)?
     208    mov     dl, bl                      ; get ready to read data
     209    jnc     SHORT .readTimeout          ; nope not ready, update timeouts
    212210
    213211;
     
    216214;
    217215.readByte1Ready:
    218         in      al, dx          ; read data byte 1
    219 
    220         mov     ah, al          ; store byte in ah for now
     216    in      al, dx                      ; read data byte 1
     217    mov     ah, al                      ; store byte in ah for now
    221218
    222219;
     
    227224; .read_byte2_ready)
    228225;
    229         mov     dl,bh
    230 
    231         in      al,dx
    232         shr     al,1            ; data ready (byte 2)?
    233         jnc     .readTimeout
     226    mov     dl, bh
     227
     228    in      al, dx
     229    shr     al, 1                       ; data ready (byte 2)?
     230    jnc     SHORT .readTimeout
    234231.readByte2Ready:
    235         mov     dl,bl
    236         in      al, dx          ; read data byte 2
    237 
    238         xchg    al, ah          ; ah was holding byte 1, reverse byte order
    239 
    240         loop    .readLoop
    241 
    242         sti                     ; interrupts back on ASAP, between packets
     232    mov     dl, bl
     233    in      al, dx                      ; read data byte 2
     234    xchg    al, ah                      ; ah was holding byte 1, reverse byte order
     235    loop    .readLoop
     236    sti                                 ; interrupts back on ASAP, between packets
    243237
    244238;
    245239; Compare checksums
    246240;
    247         xchg    ax,bp
    248         xor     ah,al
    249         mov     cx,si
    250         xor     cl,ch
    251         mov     al,cl
    252         cmp     ax,bp
    253         jnz     SerialServer_OutputWithParameters_Error
    254 
    255         pop     ax              ; sector count and command byte
    256         dec     al              ; decrement sector count
    257         push    ax              ; save
    258         jz      SerialServer_OutputWithParameters_ReturnCodeInAL
    259 
    260         cli                     ; interrupts back off for ACK byte to host
    261                                 ; (host could start sending data immediately)
    262         out     dx,al           ; ACK with next sector number
    263 
    264         jmp     short .nextSector
     241    xchg    ax, bp
     242    xor     ah, al
     243    mov     cx, si
     244    xor     cl, ch
     245    mov     al, cl
     246    cmp     ax, bp
     247    jne     SHORT SerialServer_OutputWithParameters_Error
     248
     249    pop     ax                          ; sector count and command byte
     250    dec     al                          ; decrement sector count
     251    push    ax                          ; save
     252    jz      SHORT SerialServer_OutputWithParameters_ReturnCodeInAL
     253
     254    cli                                 ; interrupts back off for ACK byte to host
     255                                        ; (host could start sending data immediately)
     256    out     dx, al                      ; ACK with next sector number
     257    jmp     SHORT .nextSector
    265258
    266259;---------------------------------------------------------------------------
     
    274267ALIGN JUMP_ALIGN
    275268SerialServer_OutputWithParameters_ErrorAndPop4Words:
    276         add     sp,8
     269    add     sp, 8
    277270;;; fall-through
    278271
     
    287280; taken care of this, but I have seen cases where this is not true.
    288281;
    289         xor     cx,cx           ; timeout this clearing routine, in case the UART isn't there
     282    xor     cx, cx                      ; timeout this clearing routine, in case the UART isn't there
    290283.clearBuffer:
    291         mov     dl,bh
    292         in      al,dx
    293         mov     dl,bl
    294         test    al,08fh
    295         jz      .clearBufferComplete
    296         test    al,1
    297         in      al,dx
    298         loopnz  .clearBuffer    ; note ZF from test above
     284    mov     dl, bh
     285    in      al, dx
     286    mov     dl, bl
     287    test    al, 8Fh
     288    jz      SHORT .clearBufferComplete
     289    test    al, 1
     290    in      al, dx
     291    loopnz  .clearBuffer                ; note ZF from test above
    299292
    300293.clearBufferComplete:
    301         mov     al, 1           ; error return code
     294    mov     al, 1                       ; error return code
    302295
    303296ALIGN JUMP_ALIGN
    304297SerialServer_OutputWithParameters_ReturnCodeInAL:
    305298%if 0
    306         sti                     ; all paths here will already have interrupts turned back on
    307 %endif
    308         mov     ah, al          ; for success, AL will already be zero
    309 
    310         pop     bx              ; recover "ax" (command and count) from stack
    311         pop     cx              ; recover saved sector count
    312         xor     ch, ch
    313         sub     cl, bl          ; subtract off the number of sectors that remained
    314 
    315         pop     bp
    316         pop     di
    317         pop     si
    318 
    319         sahf                    ; error return code to CF
    320 
    321         ret
     299    sti                                 ; all paths here will already have interrupts turned back on
     300%endif
     301    mov     ah, al                      ; for success, AL will already be zero
     302
     303    pop     bx                          ; recover "ax" (command and count) from stack
     304    pop     cx                          ; recover saved sector count
     305    xor     ch, ch
     306    sub     cl, bl                      ; subtract off the number of sectors that remained
     307
     308    pop     bp
     309    pop     di
     310    pop     si
     311
     312    sahf                                ; error return code to CF
     313    ret
     314
    322315
    323316;--------------------------------------------------------------------
     
    345338SerialServer_WriteProtocol:
    346339.writeLoop:
    347         es lodsw                ; fetch next word
    348 
    349         out     dx,al           ; output first byte
    350 
    351         add     bp,ax           ; update checksum
    352         adc     bp,0
    353         add     di,bp
    354         adc     di,0
    355 
    356         mov     dl,bh           ; transmit buffer empty?
    357         in      al,dx
    358         test    al,20h
    359         jz      .writeTimeout2  ; nope, use our polling routine
     340    es lodsw                            ; fetch next word
     341
     342    out     dx, al                      ; output first byte
     343
     344    add     bp, ax                      ; update checksum
     345    adc     bp, 0
     346    add     di, bp
     347    adc     di, 0
     348
     349    mov     dl, bh                      ; transmit buffer empty?
     350    in      al, dx
     351    test    al, 20h
     352    jz      SHORT .writeTimeout2        ; nope, use our polling routine
    360353
    361354.writeByte2Ready:
    362         mov     dl,bl
    363         mov     al,ah           ; output second byte
    364         out     dx,al
     355    mov     dl, bl
     356    mov     al, ah                      ; output second byte
     357    out     dx, al
    365358
    366359.entry:
    367         mov     dl,bh           ; transmit buffer empty?
    368         in      al,dx
    369         test    al,20h
    370         mov     dl,bl
    371         jz      .writeTimeout1  ; nope, use our polling routine
     360    mov     dl, bh                      ; transmit buffer empty?
     361    in      al, dx
     362    test    al, 20h
     363    mov     dl, bl
     364    jz      SHORT .writeTimeout1        ; nope, use our polling routine
    372365
    373366.writeByte1Ready:
    374         loop    .writeLoop
    375 
    376         mov     ax,di           ; fold Fletcher's checksum and output
    377         xor     al,ah
    378         out     dx,al           ; byte 1
    379 
    380         call    SerialServer_WaitAndPoll_Write
    381 
    382         mov     ax,bp
    383         xor     al,ah
    384         out     dx,al           ; byte 2
    385 
    386         xchg    si,di           ; preserve checksum word in si, move pointer back to di
    387 
    388         ret
     367    loop    .writeLoop
     368
     369    mov     ax, di                      ; fold Fletcher's checksum and output
     370    xor     al, ah
     371    out     dx, al                      ; byte 1
     372
     373    call    SerialServer_WaitAndPoll_Write
     374
     375    mov     ax, bp
     376    xor     al, ah
     377    out     dx, al                      ; byte 2
     378
     379    xchg    si, di                      ; preserve checksum word in si, move pointer back to di
     380    ret
    389381
    390382.writeTimeout2:
    391         mov     dl,ah           ; need to preserve AH, but don't need DL (will be reset upon return)
    392         call    SerialServer_WaitAndPoll_Write
    393         mov     ah,dl
    394         jmp     .writeByte2Ready
     383    mov     dl, ah                      ; need to preserve AH, but don't need DL (will be reset upon return)
     384    call    SerialServer_WaitAndPoll_Write
     385    mov     ah, dl
     386    jmp     SHORT .writeByte2Ready
    395387
    396388.writeTimeout1:
    397         ePUSH_T ax, .writeByte1Ready    ; return address for ret at end of SC_writeTimeout2
     389    ePUSH_T ax, .writeByte1Ready        ; return address for ret at end of SC_writeTimeout2
    398390;;; fall-through
    399391
     
    418410ALIGN JUMP_ALIGN
    419411SerialServer_WaitAndPoll_Write:
    420         mov     ah,20h
     412    mov     ah, 20h
    421413;;; fall-through
    422414
    423415ALIGN JUMP_ALIGN
    424416SerialServer_WaitAndPoll_Read:
    425         push    cx
    426         push    dx
     417    push    cx
     418    push    dx
    427419
    428420;
    429421; We first poll in a tight loop, interrupts off, for the next character to come in/be sent
    430422;
    431         xor     cx,cx
     423    xor     cx, cx
    432424.readTimeoutLoop:
    433         mov     dl,bh
    434         in      al,dx
    435         test    al,ah
    436         jnz     .readTimeoutComplete
    437         loop    .readTimeoutLoop
     425    mov     dl, bh
     426    in      al, dx
     427    test    al, ah
     428    jnz     SHORT .readTimeoutComplete
     429    loop    .readTimeoutLoop
    438430
    439431;
     
    441433; and wait for a given number of timer ticks to pass.
    442434;
    443         sti
     435    sti
    444436%ifndef SERIALSERVER_TIMER_LOCATION
    445         mov     cl,SerialServer_WaitAndPoll_SoftDelayTicks
    446         call    Timer_InitializeTimeoutWithTicksInCL
     437    mov     cl, SerialServer_WaitAndPoll_SoftDelayTicks
     438    call    Timer_InitializeTimeoutWithTicksInCL
    447439%else
    448         push    ax
    449         push    bx
    450         mov     ax,SerialServer_WaitAndPoll_SoftDelayTicks
    451         mov     bx,SERIALSERVER_TIMER_LOCATION
    452         call    TimerTicks_InitializeTimeoutFromAX
    453         pop     bx
    454         pop     ax
     440    push    ax
     441    push    bx
     442    mov     ax, SerialServer_WaitAndPoll_SoftDelayTicks
     443    mov     bx, SERIALSERVER_TIMER_LOCATION
     444    call    TimerTicks_InitializeTimeoutFromAX
     445    pop     bx
     446    pop     ax
    455447%endif
    456448
    457449.WaitAndPoll:
    458450%ifndef SERIALSERVER_TIMER_LOCATION
    459         call    Timer_SetCFifTimeout
     451    call    Timer_SetCFifTimeout
    460452%else
    461         push    ax
    462         push    bx
    463         mov     bx,SERIALSERVER_TIMER_LOCATION
    464         call    TimerTicks_GetTimeoutTicksLeftToAXfromDSBX
    465         pop     bx
    466         pop     ax
    467 %endif
    468         jc      SerialServer_OutputWithParameters_ErrorAndPop4Words
    469         in      al,dx
    470         test    al,ah
    471         jz      .WaitAndPoll
    472         cli
     453    push    ax
     454    push    bx
     455    mov     bx, SERIALSERVER_TIMER_LOCATION
     456    call    TimerTicks_GetTimeoutTicksLeftToAXfromDSBX
     457    pop     bx
     458    pop     ax
     459%endif
     460    jc      SerialServer_OutputWithParameters_ErrorAndPop4Words
     461    in      al, dx
     462    test    al, ah
     463    jz      SHORT .WaitAndPoll
     464    cli
    473465
    474466.readTimeoutComplete:
    475         pop     dx
    476         pop     cx
    477         ret
    478 
    479 
     467    pop     dx
     468    pop     cx
     469    ret
     470
  • trunk/Assembly_Library/Src/Serial/SerialServerScan.asm

    r589 r601  
    11; Project name  :   Assembly Library
    22; Description   :   Serial Server Support, Scan for Server
     3
    34;
    45; This functionality is broken out from SerialServer as it may only be needed during
     
    4344;--------------------------------------------------------------------
    4445SerialServerScan_ScanForServer:
    45         mov     cx, 1           ; one sector, not scanning (default)
     46    mov     cx, 1           ; one sector, not scanning (default)
    4647
    47         test    dx, dx
    48         jnz     SHORT SerialServerScan_CheckForServer_PortAndBaudInDX
     48    test    dx, dx
     49    jnz     SHORT SerialServerScan_CheckForServer_PortAndBaudInDX
    4950
    50         mov     di, .scanPortAddresses-1
    51         mov     ch, 1           ;  tell server that we are scanning
     51    mov     di, .scanPortAddresses-1
     52    mov     ch, 1           ;  tell server that we are scanning
    5253
    5354.nextPort:
    54         inc     di              ; load next port address
    55         mov     dh, 40h         ; Clear DH and make sure CF is set if error
    56         mov     dl, [cs:di]
    57         eSHL_IM dx, 2           ; shift from one byte to two
    58         jz      SHORT .error
     55    inc     di              ; load next port address
     56    mov     dh, 40h         ; Clear DH and make sure CF is set if error
     57    mov     dl, [cs:di]
     58    eSHL_IM dx, 2           ; shift from one byte to two
     59    jz      SHORT .error
    5960
    6061;
    6162; Test for COM port presence, write to and read from registers
    6263;
    63         push    dx
    64         add     dl, Serial_UART_lineControl
    65         mov     al, 9Ah
    66         out     dx, al
    67         in      al, dx
    68         pop     dx
    69         cmp     al, 9Ah
    70         jne     SHORT .nextPort
     64    push    dx
     65    add     dl, Serial_UART_lineControl
     66    mov     al, 9Ah
     67    out     dx, al
     68    in      al, dx
     69    pop     dx
     70    cmp     al, 9Ah
     71    jne     SHORT .nextPort
    7172
    72         mov     al, 0Ch
    73         out     dx, al
    74         in      al, dx
    75         cmp     al, 0Ch
    76         jne     SHORT .nextPort
     73    mov     al, 0Ch
     74    out     dx, al
     75    in      al, dx
     76    cmp     al, 0Ch
     77    jne     SHORT .nextPort
    7778
    7879;
     
    8889; Note: hardware baud multipliers (2x, 4x, 8x) will impact the final baud rate and are not known at this level
    8990;
    90         mov     dh, 30h * 2     ; multiply by 2 since we are about to divide by 2
    91         mov     dl, [cs:di]     ; restore single byte port address for scan
     91    mov     dh, 30h * 2     ; multiply by 2 since we are about to divide by 2
     92    mov     dl, [cs:di]     ; restore single byte port address for scan
    9293
    9394.nextBaud:
    94         shr     dh, 1
    95         jz      SHORT .nextPort
    96         cmp     dh, 6           ; skip from 6 to 4, to move from the top of the 9600 baud range
    97         jne     SHORT .testBaud ; to the bottom of the 115200 baud range
    98         mov     dh, 4
     95    shr     dh, 1
     96    jz      SHORT .nextPort
     97    cmp     dh, 6           ; skip from 6 to 4, to move from the top of the 9600 baud range
     98    jne     SHORT .testBaud ; to the bottom of the 115200 baud range
     99    mov     dh, 4
    99100
    100101.testBaud:
    101         call    SerialServerScan_CheckForServer_PortAndBaudInDX
    102         jc      SHORT .nextBaud
     102    call    SerialServerScan_CheckForServer_PortAndBaudInDX
     103    jc      SHORT .nextBaud
    103104
    104105.error:
    105         ret
     106    ret
    106107
    107 .scanPortAddresses: db  SERIAL_COM7_IOADDRESS >> 2
    108                     db  SERIAL_COM6_IOADDRESS >> 2
    109                     db  SERIAL_COM5_IOADDRESS >> 2
    110                     db  SERIAL_COM4_IOADDRESS >> 2
    111                     db  SERIAL_COM3_IOADDRESS >> 2
    112                     db  SERIAL_COM2_IOADDRESS >> 2
    113                     db  SERIAL_COM1_IOADDRESS >> 2
    114                     db  0
     108.scanPortAddresses:
     109    db  SERIAL_COM7_IOADDRESS >> 2
     110    db  SERIAL_COM6_IOADDRESS >> 2
     111    db  SERIAL_COM5_IOADDRESS >> 2
     112    db  SERIAL_COM4_IOADDRESS >> 2
     113    db  SERIAL_COM3_IOADDRESS >> 2
     114    db  SERIAL_COM2_IOADDRESS >> 2
     115    db  SERIAL_COM1_IOADDRESS >> 2
     116    db  0
    115117
    116118
     
    133135;--------------------------------------------------------------------
    134136SerialServerScan_CheckForServer_PortAndBaudInDX:
    135         push    bp              ; setup fake SerialServer_Command
    136         push    dx              ; send port baud and rate, returned in inquire packet
    137                                 ; (and possibly returned in the drive identification string)
    138         push    cx              ; send number of sectors, and if it is on a scan or not
    139         mov     bl, SerialServer_Command_Inquire        ; protocol command onto stack with bh
    140         push    bx
     137    push    bp              ; setup fake SerialServer_Command
     138    push    dx              ; send port baud and rate, returned in inquire packet
     139                            ; (and possibly returned in the drive identification string)
     140    push    cx              ; send number of sectors, and if it is on a scan or not
     141    mov     bl, SerialServer_Command_Inquire        ; protocol command onto stack with bh
     142    push    bx
    141143
    142         mov     bp, sp
    143         call    SerialServer_SendReceive
     144    mov     bp, sp
     145    call    SerialServer_SendReceive
    144146
    145         pop     bx
    146         pop     cx
    147         pop     dx
    148         pop     bp
     147    pop     bx
     148    pop     cx
     149    pop     dx
     150    pop     bp
    149151
    150         ret
     152    ret
    151153
  • trunk/Assembly_Library/Src/Util/CMOS.asm

    r593 r601  
    131131GetSumOfBytes10hto2DhtoCX:
    132132    xor     cx, cx          ; Sum
    133     mov     dx, 10h         ; First index
     133    mov     dl, 10h         ; First index
     134    xor     ah, ah
    134135
    135136.AddNextByte:
    136137    call    CMOS_ReadFromIndexInDLtoAL
    137     xor     ah, ah
    138138    add     cx, ax
    139139    inc     dx
    140140    cmp     dl, 2Dh         ; Last index
    141     jbe     .AddNextByte
     141    jbe     SHORT .AddNextByte
    142142    ret
  • trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc

    r600 r601  
    4040
    4141struc HOTKEYVARS
    42     .fpPrevTimerHandler resb    4       ; Previous 1Ch timer hander
     42    .fpPrevTimerHandler resb    4       ; Previous 1Ch timer handler
    4343    .wTimeWhenDisplayed resb    2       ; System time (ticks) when Hotkey bar was first displayed
    4444    .wFddAndHddLetters:
     
    7979
    8080; MAX_HARD_DISK_NAME_LENGTH must be defined ahead of the DRVDETECTINFO structure to avoid problems with NASM
    81 MAX_HARD_DISK_NAME_LENGTH   EQU     30      ; Bytes reserved for drive name
     81MAX_HARD_DISK_NAME_LENGTH   EQU     30  ; Bytes reserved for drive name
    8282
    8383struc DRVDETECTINFO
  • trunk/XTIDE_Universal_BIOS/Inc/HotkeyBar.inc

    r599 r601  
    2323MIN_TIME_TO_DISPLAY_HOTKEY_BAR          EQU (4000/55)   ; 4000 ms
    2424
    25 ESC_SCANCODE                            EQU 1   ; ESC key       
     25ESC_SCANCODE                            EQU 1   ; ESC key
    2626FIRST_FUNCTION_KEY_SCANCODE             EQU 3Bh ; F1 key
    2727
  • trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc

    r589 r601  
    3131;       ES:DI:  Ptr to destination buffer
    3232;   Returns:
    33 ;       ES:DI:  Incremented/decremented for next word
     33;       DI:     Incremented/Decremented for next word
    3434;   Corrupts registers:
    3535;       AL, FLAGS
     
    6161;       DS:SI:  Ptr to source buffer
    6262;   Returns:
    63 ;       SI:     Incremented/decremented for next word
     63;       SI:     Incremented/Decremented for next word
    6464;   Corrupts registers:
    6565;       AX, FLAGS
     
    9292;       DS:SI:  Ptr to source buffer
    9393;   Returns:
    94 ;       SI:     Incremented/decremented for next word
     94;       SI:     Incremented/Decremented for next word
    9595;   Corrupts registers:
    9696;       AX, FLAGS
     
    115115
    116116
     117;--------------------------------------------------------------------
     118; Emulates INSW for modified XTIDE for use on Olivetti M24 and derivatives.
     119;
     120; XTIDE_MOD_OLIVETTI_INSW
     121;   Parameters:
     122;       DX:     XTIDE Data Low Register address
     123;       ES:DI:  Ptr to destination buffer
     124;   Returns:
     125;       DI:     Incremented/Decremented for next word
     126;   Corrupts registers:
     127;       AL, FLAGS
     128;--------------------------------------------------------------------
     129%macro XTIDE_MOD_OLIVETTI_INSW 0
     130%ifdef USE_186  ; INS instruction available
     131    insb                        ; Load low byte from port DX to [ES:DI]
     132    inc     dx                  ; IDE Data Reg to XTIDE Data High Reg
     133    insb                        ; Load high byte from port DX to [ES:DI]
     134    dec     dx                  ; Restore to IDE Data Register
     135%else   ; If 8088/8086
     136    in      al, dx              ; Load low byte from port
     137    inc     dx                  ; IDE Data Reg to XTIDE Data High Reg
     138    stosb                       ; Store byte to [ES:DI]
     139    in      al, dx              ; Load high byte from port
     140    dec     dx                  ; Restore to IDE Data Register
     141    stosb                       ; Store byte to [ES:DI]
     142%endif
     143%endmacro
     144
     145
    117146%endif ; IDE_8BIT_INC
  • trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc

    r593 r601  
    111111; IDE Devices are grouped so device numbers cannot be changed without modifying code elsewhere!
    112112COUNT_OF_STANDARD_IDE_DEVICES           EQU 2   ; 16- and 32-bit controllers
    113 COUNT_OF_8BIT_IDE_DEVICES               EQU 9
     113COUNT_OF_8BIT_IDE_DEVICES               EQU 10
    114114COUNT_OF_ALL_IDE_DEVICES                EQU (COUNT_OF_8BIT_IDE_DEVICES + COUNT_OF_STANDARD_IDE_DEVICES)
    115115; Standard port mapped I/O
     
    119119DEVICE_8BIT_XTIDE_REV1                  EQU ((COUNT_OF_STANDARD_IDE_DEVICES+1)<<1)
    120120; Address lines A0 and A3 are swapped
    121 DEVICE_8BIT_XTIDE_REV2                  EQU ((COUNT_OF_STANDARD_IDE_DEVICES+2)<<1)  ; Or rev 1 with swapped A0 and A3
     121DEVICE_8BIT_XTIDE_REV2                  EQU ((COUNT_OF_STANDARD_IDE_DEVICES+2)<<1)  ; Or rev 1 with swapped A0 and A3...
     122DEVICE_8BIT_XTIDE_REV2_OLIVETTI         EQU ((COUNT_OF_STANDARD_IDE_DEVICES+3)<<1)  ; ...in Olivetti M24 and derivatives
    122123; IDE Register offsets are SHL 1
    123 DEVICE_8BIT_XTCF_PIO8                   EQU ((COUNT_OF_STANDARD_IDE_DEVICES+3)<<1)  ; XT-CF using 8-bit PIO mode
    124 DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD  EQU ((COUNT_OF_STANDARD_IDE_DEVICES+4)<<1)  ; XT-CF using 8-bit PIO mode, but with 16-bit instructions
    125 DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD EQU ((COUNT_OF_STANDARD_IDE_DEVICES+5)<<1)  ; Lo-tech 8-bit IDE Adapter
    126 DEVICE_8BIT_XTCF_DMA                    EQU ((COUNT_OF_STANDARD_IDE_DEVICES+6)<<1)  ; XT-CFv3 using DMA
     124DEVICE_8BIT_XTCF_PIO8                   EQU ((COUNT_OF_STANDARD_IDE_DEVICES+4)<<1)  ; XT-CF using 8-bit PIO mode
     125DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD  EQU ((COUNT_OF_STANDARD_IDE_DEVICES+5)<<1)  ; XT-CF using 8-bit PIO mode, but with 16-bit instructions
     126DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD EQU ((COUNT_OF_STANDARD_IDE_DEVICES+6)<<1)  ; Lo-tech 8-bit IDE Adapter
     127DEVICE_8BIT_XTCF_DMA                    EQU ((COUNT_OF_STANDARD_IDE_DEVICES+7)<<1)  ; XT-CFv3 using DMA
    127128; Memory Mapped I/O
    128 DEVICE_8BIT_JRIDE_ISA                   EQU ((COUNT_OF_STANDARD_IDE_DEVICES+7)<<1)  ; JR-IDE/ISA (Memory Mapped I/O)
    129 DEVICE_8BIT_ADP50L                      EQU ((COUNT_OF_STANDARD_IDE_DEVICES+8)<<1)  ; SVC ADP50L (Memory Mapped I/O)
     129DEVICE_8BIT_JRIDE_ISA                   EQU ((COUNT_OF_STANDARD_IDE_DEVICES+8)<<1)  ; JR-IDE/ISA (Memory Mapped I/O)
     130DEVICE_8BIT_ADP50L                      EQU ((COUNT_OF_STANDARD_IDE_DEVICES+9)<<1)  ; SVC ADP50L (Memory Mapped I/O)
    130131; Virtual devices
    131132DEVICE_SERIAL_PORT                      EQU (COUNT_OF_ALL_IDE_DEVICES<<1)
  • trunk/XTIDE_Universal_BIOS/Inc/Version.inc

    r592 r601  
    2020
    2121; Flash signature revisions:
     22; XTIDE207  Added device type DEVICE_8BIT_XTIDE_REV2_OLIVETTI
    2223; XTIDE206  Added support for Color Themes
    2324; XTIDE205  Added DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD after other XT-CF
     
    4950%define TITLE_STRING            TITLE_STRING_START, TITLE_STRING_END
    5051%define ROM_VERSION_STRING      "v2.0.0",BETA,"3+ (",__DATE__,")",NULL
    51 %define FLASH_SIGNATURE         "XTIDE206"  ; Do not terminate with NULL
     52%define FLASH_SIGNATURE         "XTIDE207"  ; Do not terminate with NULL
    5253
    5354
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm

    r558 r601  
    5959
    6060%ifdef MODULE_8BIT_IDE_ADVANCED
    61     je      SHORT .ReverseA0andA3fromRegisterIndexInDX
     61    cmp     al, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
     62    jbe     SHORT .ReverseA0andA3fromRegisterIndexInDX
    6263
    6364    eSHL_IM dx, 1   ; ADP50L and XT-CF
     
    99100IdeIO_OutputALtoIdeControlBlockRegisterInDL:
    100101    xor     dh, dh  ; IDE Register index now in DX
    101 
    102102    mov     bl, [di+DPT_ATA.bDevice]
    103103    cmp     bl, DEVICE_8BIT_XTIDE_REV2
     
    105105
    106106%ifdef MODULE_8BIT_IDE_ADVANCED
    107     je      SHORT .ReverseA0andA3fromRegisterIndexInDX
     107    cmp     bl, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
     108    jbe     SHORT .ReverseA0andA3fromRegisterIndexInDX
    108109
    109110    ; At this point remaining controllers (JRIDE, XTCF and ADP50L) all have a control
     
    154155IdeIO_OutputALtoIdeRegisterInDL:
    155156    xor     dh, dh  ; IDE Register index now in DX
    156 
    157157    mov     bl, [di+DPT_ATA.bDevice]
    158158    cmp     bl, DEVICE_8BIT_XTIDE_REV2
     
    160160
    161161%ifdef MODULE_8BIT_IDE_ADVANCED
    162     je      SHORT .ReverseA0andA3fromRegisterIndexInDX
     162    cmp     bl, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
     163    jbe     SHORT .ReverseA0andA3fromRegisterIndexInDX
    163164
    164165    cmp     bl, DEVICE_8BIT_JRIDE_ISA
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdePioBlock.asm

    r589 r601  
    5555
    5656;--------------------------------------------------------------------
     57; IdePioBlock_ReadFromXtideRev2_Olivetti
     58;   Parameters:
     59;       CX:     Block size in 512 byte sectors
     60;       DX:     IDE Data port address
     61;       ES:DI:  Normalized ptr to buffer to receive data
     62;   Returns:
     63;       Nothing
     64;   Corrupts registers:
     65;       AX, CX
     66;--------------------------------------------------------------------
     67ALIGN JUMP_ALIGN
     68IdePioBlock_ReadFromXtideRev2_Olivetti:
     69    UNROLL_SECTORS_IN_CX_TO_OWORDS
     70ALIGN JUMP_ALIGN
     71.InswLoop:
     72    %rep 8  ; WORDs
     73        XTIDE_MOD_OLIVETTI_INSW
     74    %endrep
     75    loop    .InswLoop
     76    ret
     77
     78
     79;--------------------------------------------------------------------
    5780; 8-bit PIO from a single data port.
    5881;
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm

    r589 r601  
    328328ALIGN WORD_ALIGN
    329329g_rgfnPioRead:
    330         dw      IdePioBlock_ReadFrom16bitDataPort   ; 0, DEVICE_16BIT_ATA
     330        dw      IdePioBlock_ReadFrom16bitDataPort       ; 0, DEVICE_16BIT_ATA
    331331%ifdef MODULE_ADVANCED_ATA
    332         dw      IdePioBlock_ReadFrom32bitDataPort   ; 1, DEVICE_32BIT_ATA
     332        dw      IdePioBlock_ReadFrom32bitDataPort       ; 1, DEVICE_32BIT_ATA
    333333%elifdef MODULE_8BIT_IDE
    334334        dw      NULL
    335335%endif ; MODULE_ADVANCED_ATA
    336336%ifdef MODULE_8BIT_IDE
    337         dw      IdePioBlock_ReadFrom8bitDataPort    ; 2, DEVICE_8BIT_ATA
    338         dw      IdePioBlock_ReadFromXtideRev1       ; 3, DEVICE_8BIT_XTIDE_REV1
    339         dw      IdePioBlock_ReadFrom16bitDataPort   ; 4, DEVICE_8BIT_XTIDE_REV2
     337        dw      IdePioBlock_ReadFrom8bitDataPort        ; 2, DEVICE_8BIT_ATA
     338        dw      IdePioBlock_ReadFromXtideRev1           ; 3, DEVICE_8BIT_XTIDE_REV1
     339        dw      IdePioBlock_ReadFrom16bitDataPort       ; 4, DEVICE_8BIT_XTIDE_REV2
     340        dw      IdePioBlock_ReadFromXtideRev2_Olivetti  ; 5, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
    340341%ifdef MODULE_8BIT_IDE_ADVANCED
    341         dw      IdePioBlock_ReadFrom8bitDataPort    ; 5, DEVICE_8BIT_XTCF_PIO8
    342         dw      IdePioBlock_ReadFrom16bitDataPort   ; 6, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
    343         dw      IdePioBlock_ReadFrom16bitDataPort   ; 7, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD
    344         dw      IdeDmaBlock_ReadFromXTCF            ; 8, DEVICE_8BIT_XTCF_DMA
     342        dw      IdePioBlock_ReadFrom8bitDataPort        ; 6, DEVICE_8BIT_XTCF_PIO8
     343        dw      IdePioBlock_ReadFrom16bitDataPort       ; 7, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
     344        dw      IdePioBlock_ReadFrom16bitDataPort       ; 8, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD
     345        dw      IdeDmaBlock_ReadFromXTCF                ; 9, DEVICE_8BIT_XTCF_DMA
    345346%endif ; MODULE_8BIT_IDE_ADVANCED
    346347%endif ; MODULE_8BIT_IDE
     
    348349
    349350g_rgfnPioWrite:
    350         dw      IdePioBlock_WriteTo16bitDataPort    ; 0, DEVICE_16BIT_ATA
     351        dw      IdePioBlock_WriteTo16bitDataPort        ; 0, DEVICE_16BIT_ATA
    351352%ifdef MODULE_ADVANCED_ATA
    352         dw      IdePioBlock_WriteTo32bitDataPort    ; 1, DEVICE_32BIT_ATA
     353        dw      IdePioBlock_WriteTo32bitDataPort        ; 1, DEVICE_32BIT_ATA
    353354%elifdef MODULE_8BIT_IDE
    354355        dw      NULL
    355356%endif ; MODULE_ADVANCED_ATA
    356357%ifdef MODULE_8BIT_IDE
    357         dw      IdePioBlock_WriteTo8bitDataPort     ; 2, DEVICE_8BIT_ATA
    358         dw      IdePioBlock_WriteToXtideRev1        ; 3, DEVICE_8BIT_XTIDE_REV1
    359         dw      IdePioBlock_WriteToXtideRev2        ; 4, DEVICE_8BIT_XTIDE_REV2
     358        dw      IdePioBlock_WriteTo8bitDataPort         ; 2, DEVICE_8BIT_ATA
     359        dw      IdePioBlock_WriteToXtideRev1            ; 3, DEVICE_8BIT_XTIDE_REV1
     360        dw      IdePioBlock_WriteToXtideRev2            ; 4, DEVICE_8BIT_XTIDE_REV2
     361        dw      IdePioBlock_WriteToXtideRev2            ; 5, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
    360362%ifdef MODULE_8BIT_IDE_ADVANCED
    361         dw      IdePioBlock_WriteTo8bitDataPort     ; 5, DEVICE_8BIT_XTCF_PIO8
    362         dw      IdePioBlock_WriteTo16bitDataPort    ; 6, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
    363         dw      IdePioBlock_WriteTo16bitDataPort    ; 7, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD
    364         dw      IdeDmaBlock_WriteToXTCF             ; 8, DEVICE_8BIT_XTCF_DMA
     363        dw      IdePioBlock_WriteTo8bitDataPort         ; 6, DEVICE_8BIT_XTCF_PIO8
     364        dw      IdePioBlock_WriteTo16bitDataPort        ; 7, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
     365        dw      IdePioBlock_WriteTo16bitDataPort        ; 8, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD
     366        dw      IdeDmaBlock_WriteToXTCF                 ; 9, DEVICE_8BIT_XTCF_DMA
    365367%endif ; MODULE_8BIT_IDE_ADVANCED
    366368%endif ; MODULE_8BIT_IDE
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm

    r592 r601  
    100100    jc      SHORT ReturnWithMemoryIOtransferErrorInAH
    101101
    102     mov     cx, [bp+MEMPIOVARS.wSectorsInBlock] ; Clears CH
    103     cmp     [bp+MEMPIOVARS.bSectorsLeft], cl
     102    mov     dx, [bp+MEMPIOVARS.wSectorsInBlock] ; Clears DH
     103    cmp     [bp+MEMPIOVARS.bSectorsLeft], dl
    104104    jbe     SHORT .ReadLastBlockFromDrive
    105105
     
    119119    ; transferred, there will be a wait for next block but DRQ is never
    120120    ; set since all is transferred! Then we get timeout error.
    121     mov     cx, [bp+MEMPIOVARS.wSectorsInBlock]
    122     sub     [bp+MEMPIOVARS.bSectorsLeft], cl
    123     add     [bp+MEMPIOVARS.bSectorsDone], cl
    124     cmp     [bp+MEMPIOVARS.bSectorsLeft], cl
     121    mov     dx, [bp+MEMPIOVARS.wSectorsInBlock]
     122    sub     [bp+MEMPIOVARS.bSectorsLeft], dl
     123    add     [bp+MEMPIOVARS.bSectorsDone], dl
     124    cmp     [bp+MEMPIOVARS.bSectorsLeft], dl
    125125    ja      SHORT .ReadNextBlockFromDrive
    126126
    127127ALIGN JUMP_ALIGN
    128128.ReadLastBlockFromDrive:
    129     mov     cl, [bp+MEMPIOVARS.bSectorsLeft]
    130     push    cx
     129    mov     dl, [bp+MEMPIOVARS.bSectorsLeft]
     130    push    dx
    131131    call    ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
    132132
     
    181181    jc      SHORT ReturnWithMemoryIOtransferErrorInAH
    182182
    183     mov     cx, [bp+MEMPIOVARS.wSectorsInBlock]
    184     cmp     [bp+MEMPIOVARS.bSectorsLeft], cl
     183    mov     dx, [bp+MEMPIOVARS.wSectorsInBlock]
     184    cmp     [bp+MEMPIOVARS.bSectorsLeft], dl
    185185    jbe     SHORT .WriteLastBlockToDrive
    186186
     
    192192
    193193    ; Increment number of successfully written WORDs
    194     mov     cx, [bp+MEMPIOVARS.wSectorsInBlock]
    195     sub     [bp+MEMPIOVARS.bSectorsLeft], cl
    196     add     [bp+MEMPIOVARS.bSectorsDone], cl
    197     cmp     [bp+MEMPIOVARS.bSectorsLeft], cl
     194    mov     dx, [bp+MEMPIOVARS.wSectorsInBlock]
     195    sub     [bp+MEMPIOVARS.bSectorsLeft], dl
     196    add     [bp+MEMPIOVARS.bSectorsDone], dl
     197    cmp     [bp+MEMPIOVARS.bSectorsLeft], dl
    198198    ja      SHORT .WriteNextBlockToDrive
    199199
    200200ALIGN JUMP_ALIGN
    201201.WriteLastBlockToDrive:
    202     mov     cl, [bp+MEMPIOVARS.bSectorsLeft]
    203     push    cx
     202    mov     dl, [bp+MEMPIOVARS.bSectorsLeft]
     203    push    dx
    204204    ePUSH_T bx, CheckErrorsAfterTransferringLastMemoryMappedBlock
    205205    ; Fall to WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
     
    208208; WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
    209209;   Parameters:
    210 ;       CX:     Number of sectors in block
     210;       DX:     Number of sectors in block
    211211;       DS:SI:  Normalized ptr to source buffer
    212212;       ES:DI:  Ptr to Sector Access Window
     
    220220WriteSingleBlockFromDSSIToSectorAccessWindowInESDI:
    221221    mov     bx, di
    222     mov     dx, cx
    223222    xor     cx, cx
    224223ALIGN JUMP_ALIGN
     
    235234; ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
    236235;   Parameters:
    237 ;       CX      Number of sectors in full block or sectors in last partial block
    238 ;       ES:DI:  Normalized ptr to buffer to receive data (destination)
    239 ;       DS:SI:  Ptr to Sector Access Window (source)
     236;       DX:     Number of sectors in block
     237;       ES:DI:  Normalized ptr to destination buffer
     238;       DS:SI:  Ptr to Sector Access Window
    240239;   Returns:
    241240;       CX, DX: Zero
     
    247246ReadSingleBlockFromSectorAccessWindowInDSSItoESDI:
    248247    mov     bx, si
    249     mov     dx, cx
    250248    xor     cx, cx
    251249ALIGN JUMP_ALIGN
  • 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 
  • trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm

    r567 r601  
    3333;--------------------------------------------------------------------
    3434SerialDPT_Finalize:
    35         mov     ax, [es:si+SerialServer_ATA_wPortAndBaud]
    36         mov     [di+DPT_SERIAL.wSerialPortAndBaud], ax
     35    mov     ax, [es:si+SerialServer_ATA_wPortAndBaud]
     36    mov     [di+DPT_SERIAL.wSerialPortAndBaud], ax
    3737
    3838;
     
    4141; if the floppy support is disabled.
    4242;
    43         mov     al, [es:si+SerialServer_ATA_wDriveFlags]
    44         eSHL_IM al, 1
    45         mov     byte [di+DPT.bFlagsHigh], al
    46 
    47         ret
     43    mov     al, [es:si+SerialServer_ATA_wDriveFlags]
     44    eSHL_IM al, 1
     45    mov     BYTE [di+DPT.bFlagsHigh], al
     46    ret
    4847
    4948%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r599 r601  
    106106    cli
    107107    mov     ax, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler]
    108     mov     [es:SYSTEM_TIMER_TICK*4], ax
     108    mov     [es:BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch*4], ax
    109109    mov     ax, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler+2]
    110     mov     [es:SYSTEM_TIMER_TICK*4+2], ax
     110    mov     [es:BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch*4+2], ax
    111111    sti
    112112%endif
     
    214214; Switches back to the POST stack, clears the DS and ES registers,
    215215; and either jumps to the MBR (Master Boot Record) that was just read,
    216 ; or calls the ROM's boot routine on interrupt 18.
     216; or calls the ROM's boot routine on interrupt 18h.
    217217;
    218218;   Parameters:
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/AdvAtaInit.asm

    r596 r601  
    3636;--------------------------------------------------------------------
    3737AdvAtaInit_DetectControllerForIdeBaseInBX:
    38     ; Detect if system has PCI bus. If it does, we can skip VLB detection. This is
     38    ; Detect if system has PCI bus. If it does, we can skip VLB detection. This is a
    3939    ; good thing since detecting Vision QD6580 is dangerous since Intel PIIX4 south bridge
    4040    ; mirrors Interrupt Controller registers from Axh to Bxh. This can lead to faulty
     
    4545    push    bx
    4646    push    di
    47     xor     edi, edi        ; Some BIOSes require this to be set to zero
    48     mov     ax, PCI_INSTALLATION_CHECK
    49     int     BIOS_TIME_PCI_PNP_1Ah
     47;   xor     edi, edi        ; Some BIOSes require this to be set to zero
     48    ; *FIXME* The above instruction is commented away since RBIL says that this
     49    ; only applies to software looking for the protected-mode entry point.
     50    mov     ax, PCI_INSTALLATION_CHECK  ; May corrupt EAX, EBX, ECX, EDX, EDI
     51    int     BIOS_TIME_PCI_PNP_INTERRUPT_1Ah
    5052    pop     di
    5153    pop     bx
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r599 r601  
    9898; Here we might want to replace BIOS configured drives with the ones we detected.
    9999; Primary reason is to support dynamic overlay feature in the future. Second reason
    100 ; is a hack to get Windows 95 load proper IDE drivers.
     100; is a hack to get Windows 95 to load its built-in protected mode IDE driver.
    101101;
    102102; The Windows hack has two parts. First part is to try to alter CMOS address 12h as that
     
    109109
    110110%ifdef USE_AT   ; FLG_ROMVARS_IGNORE_MOTHERBOARD_DRIVES is for AT builds only
    111 
    112     %ifdef MODULE_WIN95_CMOS_HACK
    113         mov     dl, HARD_DISK_TYPES
    114         call    CMOS_ReadFromIndexInDLtoAL
    115         test    al, 0F0h
    116         jnz     SHORT .ClearBdaDriveCount       ; CMOS byte 12h is ready for Windows 95
    117         call    CMOS_Verify10hTo2Dh             ; Can we modify CMOS?
    118         jnz     SHORT .ClearBdaDriveCount       ; Unsupported BIOS, use plan B
    119 
    120         ; Now we can alter CMOS location 12h. Award BIOS locks if we set drive 0 type to Fh
    121         ; (but accept changes to drive type 1). Windows 95 requires that the drive 0 type is
    122         ; non zero and ignores drive 1 type. So if we only set drive 1, then Award BIOS
    123         ; won't give problems but Windows 95 stays in MS-DOS compatibility mode.
    124         ;
    125         ; For Award BIOSes we could set the Drive 0 type to 1 and then clear the BDA drive count.
    126         ; So essentially we could automatically do what user needs to do manually to get Windows 95
    127         ; working on Award BIOSes. However, I think that should be left to do manually since
    128         ; there may be SCSI drives on the system or FLG_ROMVARS_IGNORE_MOTHERBOARD_DRIVES could
    129         ; be intentionally cleared and forcing the dummy drive might cause only trouble.
    130 
    131         ; Try to detect Award BIOS (Seems to work on a tested 128k BIOS so hopefully
    132         ; there will be no need to scan E000h segment)
    133         mov     cx, 65536 - 4
    134         mov     eax, 'Awar'     ; Four characters should be enough
    135         mov     di, 0F000h      ; Scan 64k starting from segment F000h
    136         mov     fs, di          ; No need to preserve FS since we set it to zero soon when we boot
    137         xor     di, di
    138     .ScanNextCharacters:
    139         cmp     [fs:di], eax
    140         je      SHORT .ClearBdaDriveCount   ; Award detected, cannot modify CMOS
    141         inc     di              ; Increment offset by one character (not four)
    142         loop    .ScanNextCharacters
    143 
    144         ; Now it should be safe to write
    145         mov     dl, HARD_DISK_TYPES
    146         mov     al, 0F0h    ; Drive 0 type 16...47 (supposed to be defined elsewhere in the CMOS)
    147         call    CMOS_WriteALtoIndexInDL
    148         call    CMOS_StoreNewChecksumFor10hto2Dh
     111%ifdef MODULE_WIN95_CMOS_HACK
     112    mov     dl, HARD_DISK_TYPES
     113    call    CMOS_ReadFromIndexInDLtoAL
     114    test    al, 0F0h
     115    jnz     SHORT .ClearBdaDriveCount       ; CMOS byte 12h is ready for Windows 95
     116    call    CMOS_Verify10hTo2Dh             ; Can we modify CMOS?
     117    jnz     SHORT .ClearBdaDriveCount       ; Unsupported BIOS, use plan B
     118
     119    ; Now we can alter CMOS location 12h. Award BIOS locks if we set drive 0 type to Fh
     120    ; (but accept changes to drive type 1). Windows 95 requires that the drive 0 type is
     121    ; non zero and ignores drive 1 type. So if we only set drive 1, then Award BIOS
     122    ; won't give problems but Windows 95 stays in MS-DOS compatibility mode.
     123    ;
     124    ; For Award BIOSes we could set the Drive 0 type to 1 and then clear the BDA drive count.
     125    ; So essentially we could automatically do what user needs to do manually to get Windows 95
     126    ; working on Award BIOSes. However, I think that should be left to do manually since
     127    ; there may be SCSI drives on the system or FLG_ROMVARS_IGNORE_MOTHERBOARD_DRIVES could
     128    ; be intentionally cleared and forcing the dummy drive might cause only trouble.
     129
     130    ; Try to detect Award BIOS (Seems to work on a tested 128k BIOS so hopefully
     131    ; there will be no need to scan E000h segment)
     132    mov     cx, 65536 - 4
     133    mov     eax, 'Awar'                     ; Four characters should be enough
     134    mov     di, 0F000h                      ; Scan 64k starting from segment F000h
     135    mov     fs, di                          ; No need to preserve FS since we set it to zero soon when we boot
     136    xor     di, di
     137.ScanNextCharacters:
     138    cmp     [fs:di], eax
     139    je      SHORT .ClearBdaDriveCount       ; Award detected, cannot modify CMOS
     140    inc     di                              ; Increment offset by one character (not four)
     141    loop    .ScanNextCharacters
     142
     143    ; Now it should be safe to write
     144    mov     dl, HARD_DISK_TYPES
     145    mov     al, 0F0h                        ; Drive 0 type 16...47 (supposed to be defined elsewhere in the CMOS)
     146    call    CMOS_WriteALtoIndexInDL
     147    call    CMOS_StoreNewChecksumFor10hto2Dh
    149148.ClearBdaDriveCount:
    150     %endif  ; MODULE_WIN95_CMOS_HACK
     149%endif ; MODULE_WIN95_CMOS_HACK
    151150
    152151    test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_IGNORE_MOTHERBOARD_DRIVES
    153152    jz      SHORT .ContinueInitialization
    154     mov     BYTE [es:BDA.bHDCount], 0   ; Set hard disk count to zero
     153    mov     BYTE [es:BDA.bHDCount], 0       ; Set hard disk count to zero
    155154.ContinueInitialization:
    156 %endif
    157 
    158     mov     cx, [RAMVARS.wDrvCntAndFlopCnt]     ; Our count of hard disks
     155%endif ; USE_AT
     156
     157    mov     cx, [RAMVARS.wDrvCntAndFlopCnt] ; Our count of hard disks
    159158    mov     al, [es:BDA.bHDCount]
    160     add     [es:BDA.bHDCount], cl       ; Add our drives to the system count
    161     or      al, 80h                     ; Or in hard disk flag
    162     mov     [RAMVARS.bFirstDrv], al     ; Store first drive number
     159    add     [es:BDA.bHDCount], cl           ; Add our drives to the system count
     160    or      al, 80h                         ; Or in hard disk flag
     161    mov     [RAMVARS.bFirstDrv], al         ; Store first drive number
    163162
    164163.AddFloppies:
     
    170169    dec     ch
    171170    mov     al, ch
    172     js      .NoFloppies                     ; if no drives are present, we store 0ffh
     171    js      SHORT .NoFloppies               ; If no drives are present, we store 0FFh
    173172
    174173    call    FloppyDrive_GetCountFromBIOS_or_BDA
     
    242241;--------------------------------------------------------------------
    243242.ReadAtaInfoFromHardDisk:
    244     mov     si, BOOTVARS.rgbAtaInfo     ; ES:SI now points to ATA info location
     243    mov     si, BOOTVARS.rgbAtaInfo         ; ES:SI now points to ATA info location
    245244    push    es
    246245    push    si
     
    255254    ; Fall to .ReadAtapiInfoFromDrive
    256255
    257 .ReadAtapiInfoFromDrive:                ; Not yet implemented
    258     ;call   ReadAtapiInfoFromDrive      ; Assume CD-ROM
     256.ReadAtapiInfoFromDrive:                    ; Not yet implemented
     257    ;call   ReadAtapiInfoFromDrive          ; Assume CD-ROM
    259258    ;jnc    SHORT _CreateBiosTablesForCDROM
    260259
  • trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm

    r592 r601  
    44;
    55; Included by BootMenuPrint.asm, this routine is to be inserted into
    6 ; BootMenuPrint_HardDiskRefreshInformation.
     6; BootMenuPrint_RefreshInformation.
    77;
    88
     
    2626SECTION .text
    2727
    28 ;;; fall-into from BootMenuPrint_HardDiskRefreshInformation.
     28;;; fall-into from BootMenuPrint_RefreshInformation.
    2929
    3030;--------------------------------------------------------------------
     
    3232; Cursor is set to configuration header string position.
    3333;
    34 ; BootMenuPrintCfg_ForOurDrive
     34; .BootMenuPrintCfg_ForOurDrive
    3535;   Parameters:
    3636;       DS:DI:      Pointer to DPT
     
    3838;       Nothing
    3939;   Corrupts registers:
    40 ;       AX, BX, CX, DX
     40;       AX, BX, DX
    4141;--------------------------------------------------------------------
    4242.BootMenuPrintCfg_ForOurDrive:
    43     eMOVZX  ax, [di+DPT.bIdevarsOffset]
    44     xchg    bx, ax                      ; CS:BX now points to IDEVARS
    4543    ; Fall to .PushAddressingMode
    4644
     
    4947;   Parameters:
    5048;       DS:DI:  Ptr to DPT
    51 ;       CS:BX:  Ptr to IDEVARS
    5249;   Returns:
    5350;       Nothing (falls to next push below)
    5451;   Corrupts registers:
    55 ;       AX, CX, DX
     52;       AX, BX, DX
    5653;--------------------------------------------------------------------
    5754.PushAddressingMode:
     
    6663    imul    ax, g_szAddressingModes_Displacement << (8-TRANSLATEMODE_FIELD_POSITION)
    6764%else
    68     mov     cx, g_szAddressingModes_Displacement << (8-TRANSLATEMODE_FIELD_POSITION)
    69     mul     cx
     65    mov     bx, g_szAddressingModes_Displacement << (8-TRANSLATEMODE_FIELD_POSITION)
     66    mul     bx
    7067%endif
    7168    xchg    al, ah      ; AL = always zero after above multiplication
     
    7875;   Parameters:
    7976;       DS:DI:  Ptr to DPT
    80 ;       CS:BX:  Ptr to IDEVARS
    8177;   Returns:
    8278;       Nothing (falls to next push below)
     
    9793;   Parameters:
    9894;       DS:DI:  Ptr to DPT
    99 ;       CS:BX:  Ptr to IDEVARS
    10095;   Returns:
    10196;       Nothing (falls to next push below)
    10297;   Corrupts registers:
    103 ;       AX
     98;       AX, BX
    10499;--------------------------------------------------------------------
    105100.PushDeviceType:
     101    call    AccessDPT_GetIdevarsToCSBX
    106102%ifndef MODULE_SERIAL
    107103    mov     al, g_szDeviceTypeValues_Displacement
     
    155151;       Nothing (falls to next push below)
    156152;   Corrupts registers:
    157 ;       AX, BX, DX, ES
     153;       AL
    158154;--------------------------------------------------------------------
    159155.PushResetStatus:
     
    161157    push    ax
    162158
    163 ;;; fall-out to BootMenuPrint_HardDiskRefreshInformation.
     159;;; fall-out to BootMenuPrint_RefreshInformation.
  • trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm

    r600 r601  
    3333;       Nothing
    3434;   Corrupts registers:
    35 ;       AX, CX, DX, SI, DI
    36 ;--------------------------------------------------------------------
     35;       Nothing
     36;--------------------------------------------------------------------
     37ALIGN JUMP_ALIGN
    3738HotkeyBar_TimerTickHandler:
    3839    push    es
     
    5657    ; Call previous handler
    5758    pushf
    58     call far [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler]
     59    call    FAR [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler]
    5960
    6061    ; Update Hotkeybar (process key input and draw) every fourth tick
     
    9899    mov     BYTE [RAMVARS.bTimeoutTicksLeft], 0
    99100.ContinueDrawing:
    100    
    101101    ; Fall to HotkeyBar_DrawToTopOfScreen
    102102
     
    141141
    142142    ; Clear CH if floppy drive is selected for boot
     143%if 0 ; Not needed until more flags added
     144    mov     ch, FLG_HOTKEY_HD_FIRST
     145    and     ch, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags]
     146%else
    143147    mov     ch, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags]
    144     ;and        ch, FLG_HOTKEY_HD_FIRST; Not needed until more flags added
     148%endif
    145149    call    FormatDriveHotkeyString
    146150
     
    428432
    429433    ; Store system 1Ch Timer Tick handler and install our hotkeybar handler
    430     mov     ax, [SYSTEM_TIMER_TICK*4]
     434    mov     ax, [BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch*4]
    431435    mov     [BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler], ax
    432     mov     ax, [SYSTEM_TIMER_TICK*4+2]
     436    mov     ax, [BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch*4+2]
    433437    mov     [BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler+2], ax
    434     mov     al, SYSTEM_TIMER_TICK
     438    mov     al, BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch
    435439    mov     si, HotkeyBar_TimerTickHandler
    436440    call    Interrupts_InstallHandlerToVectorInALFromCSSI
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r589 r601  
    135135
    136136g_szDeviceTypeValues:
    137 g_szDeviceTypeValues_16bit:         db  " 16",NULL
     137g_szDeviceTypeValues_16bit:             db  " 16",NULL
    138138%ifdef MODULE_ADVANCED_ATA OR MODULE_8BIT_IDE OR MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
    139 g_szDeviceTypeValues_32bit:         db  " 32",NULL
     139g_szDeviceTypeValues_32bit:             db  " 32",NULL
    140140%ifdef MODULE_8BIT_IDE OR MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
    141 g_szDeviceTypeValues_8bit:          db  "  8",NULL
    142 g_szDeviceTypeValues_XTIDEr1:       db  "D8 ",NULL  ; Dual 8-bit
    143 g_szDeviceTypeValues_XTIDEr2:       db  "X8 ",NULL  ; A0<->A3 swapped 8-bit
     141g_szDeviceTypeValues_8bit:              db  "  8",NULL
     142g_szDeviceTypeValues_XTIDEr1:           db  "D8 ",NULL  ; Dual 8-bit
     143g_szDeviceTypeValues_XTIDEr2:           db  "X8 ",NULL  ; A0<->A3 swapped 8-bit
     144g_szDeviceTypeValues_XTIDEr2_Olivetti:  db  "X8O",NULL  ; Same as above but in Olivetti M24 and derivatives
    144145%ifdef MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
    145 g_szDeviceTypeValues_XTCFpio8:      db  "T8 ",NULL  ; True 8-bit
    146 g_szDeviceTypeValues_XTCFpio8BIU:   db  "T8B",NULL
    147 g_szDeviceTypeValues_XTCFpio16BIU:  db  "16B",NULL
    148 g_szDeviceTypeValues_XTCFdma:       db  "8MA",NULL  ; DMA 8-bit
    149 g_szDeviceTypeValues_JrIde:         db  "M8 ",NULL  ; Memory Mapped 8-bit
    150 g_szDeviceTypeValues_ADP50L:        db  "M8 ",NULL  ; Memory Mapped 8-bit
     146g_szDeviceTypeValues_XTCFpio8:          db  "T8 ",NULL  ; True 8-bit
     147g_szDeviceTypeValues_XTCFpio8BIU:       db  "T8B",NULL
     148g_szDeviceTypeValues_XTCFpio16BIU:      db  "16B",NULL
     149g_szDeviceTypeValues_XTCFdma:           db  "8MA",NULL  ; DMA 8-bit
     150g_szDeviceTypeValues_JrIde:             db  "M8 ",NULL  ; Memory Mapped 8-bit
     151g_szDeviceTypeValues_ADP50L:            db  "M8 ",NULL  ; Memory Mapped 8-bit
    151152%ifdef MODULE_SERIAL
    152 g_szDeviceTypeValues_Serial:        db  "SER",NULL
     153g_szDeviceTypeValues_Serial:            db  "SER",NULL
    153154%endif ; MODULE_SERIAL
    154155%endif ; MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
     
    183184        %error "g_szDeviceTypeValues Displacement Incorrect 5"
    184185    %endif
     186    %if g_szDeviceTypeValues_XTIDEr2_Olivetti <> g_szDeviceTypeValues_XTIDEr2 + g_szDeviceTypeValues_Displacement
     187        %error "g_szDeviceTypeValues Displacement Incorrect 6"
     188    %endif
    185189
    186190    %ifdef MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
    187191
    188     %if g_szDeviceTypeValues_XTCFpio8 <> g_szDeviceTypeValues_XTIDEr2 + g_szDeviceTypeValues_Displacement
    189         %error "g_szDeviceTypeValues Displacement Incorrect 6"
     192    %if g_szDeviceTypeValues_XTCFpio8 <> g_szDeviceTypeValues_XTIDEr2_Olivetti + g_szDeviceTypeValues_Displacement
     193        %error "g_szDeviceTypeValues Displacement Incorrect 7"
    190194    %endif
    191195    %if g_szDeviceTypeValues_XTCFpio8BIU <> g_szDeviceTypeValues_XTCFpio8 + g_szDeviceTypeValues_Displacement
    192         %error "g_szDeviceTypeValues Displacement Incorrect 7"
     196        %error "g_szDeviceTypeValues Displacement Incorrect 8"
    193197    %endif
    194198    %if g_szDeviceTypeValues_XTCFpio16BIU <> g_szDeviceTypeValues_XTCFpio8BIU + g_szDeviceTypeValues_Displacement
    195         %error "g_szDeviceTypeValues Displacement Incorrect 8"
     199        %error "g_szDeviceTypeValues Displacement Incorrect 9"
    196200    %endif
    197201    %if g_szDeviceTypeValues_XTCFdma <> g_szDeviceTypeValues_XTCFpio16BIU + g_szDeviceTypeValues_Displacement
    198         %error "g_szDeviceTypeValues Displacement Incorrect 9"
     202        %error "g_szDeviceTypeValues Displacement Incorrect 10"
    199203    %endif
    200204    %if g_szDeviceTypeValues_JrIde <> g_szDeviceTypeValues_XTCFdma + g_szDeviceTypeValues_Displacement
    201         %error "g_szDeviceTypeValues Displacement Incorrect 10"
     205        %error "g_szDeviceTypeValues Displacement Incorrect 11"
    202206    %endif
    203207    %if g_szDeviceTypeValues_ADP50L <> g_szDeviceTypeValues_JrIde + g_szDeviceTypeValues_Displacement
    204         %error "g_szDeviceTypeValues Displacement Incorrect 11"
     208        %error "g_szDeviceTypeValues Displacement Incorrect 12"
    205209    %endif
    206210
     
    208212
    209213    %if g_szDeviceTypeValues_Serial <> g_szDeviceTypeValues_ADP50L + g_szDeviceTypeValues_Displacement
    210         %error "g_szDeviceTypeValues Displacement Incorrect 12"
     214        %error "g_szDeviceTypeValues Displacement Incorrect 13"
    211215    %endif
    212216
  • trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm

    r589 r601  
    253253
    254254g_szDeviceTypeValues:
    255 g_szDeviceTypeValues_16bit:         ; db    " 16",NULL
    256                                     ; db     20h,  31h,  36h,  00h    ; uncompressed
    257                                       db     20h,  2bh,  0fh          ; compressed
     255g_szDeviceTypeValues_16bit:             ; db    " 16",NULL
     256                                        ; db     20h,  31h,  36h,  00h    ; uncompressed
     257                                          db     20h,  2bh,  0fh          ; compressed
    258258
    259259%ifdef MODULE_ADVANCED_ATA OR MODULE_8BIT_IDE OR MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
    260 g_szDeviceTypeValues_32bit:         ; db    " 32",NULL
    261                                     ; db     20h,  33h,  32h,  00h    ; uncompressed
    262                                       db     20h,  2dh,  0ch          ; compressed
     260g_szDeviceTypeValues_32bit:             ; db    " 32",NULL
     261                                        ; db     20h,  33h,  32h,  00h    ; uncompressed
     262                                          db     20h,  2dh,  0ch          ; compressed
    263263
    264264%ifdef MODULE_8BIT_IDE OR MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
    265 g_szDeviceTypeValues_8bit:          ; db    "  8",NULL
    266                                     ; db     20h,  20h,  38h,  00h    ; uncompressed
    267                                       db     20h,  20h,  10h          ; compressed
    268 
    269 g_szDeviceTypeValues_XTIDEr1:       ; db    "D8 ",NULL  ; Dual 8-bit
    270                                     ; db     44h,  38h,  20h,  00h    ; uncompressed
    271                                       db     4ah,  30h,  00h          ; compressed
    272 
    273 g_szDeviceTypeValues_XTIDEr2:       ; db    "X8 ",NULL  ; A0<->A3 swapped 8-bit
    274                                     ; db     58h,  38h,  20h,  00h    ; uncompressed
    275                                       db     5eh,  30h,  00h          ; compressed
     265g_szDeviceTypeValues_8bit:              ; db    "  8",NULL
     266                                        ; db     20h,  20h,  38h,  00h    ; uncompressed
     267                                          db     20h,  20h,  10h          ; compressed
     268
     269g_szDeviceTypeValues_XTIDEr1:           ; db    "D8 ",NULL  ; Dual 8-bit
     270                                        ; db     44h,  38h,  20h,  00h    ; uncompressed
     271                                          db     4ah,  30h,  00h          ; compressed
     272
     273g_szDeviceTypeValues_XTIDEr2:           ; db    "X8 ",NULL  ; A0<->A3 swapped 8-bit
     274                                        ; db     58h,  38h,  20h,  00h    ; uncompressed
     275                                          db     5eh,  30h,  00h          ; compressed
     276
     277g_szDeviceTypeValues_XTIDEr2_Olivetti:  ; db    "X8O",NULL  ; Same as above but in Olivetti M24 and derivatives
     278                                        ; db     58h,  38h,  4fh,  00h    ; uncompressed
     279                                          db     5eh,  30h,  95h          ; compressed
    276280
    277281%ifdef MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
    278 g_szDeviceTypeValues_XTCFpio8:      ; db    "T8 ",NULL  ; True 8-bit
    279                                     ; db     54h,  38h,  20h,  00h    ; uncompressed
    280                                       db     5ah,  30h,  00h          ; compressed
    281 
    282 g_szDeviceTypeValues_XTCFpio8BIU:   ; db    "T8B",NULL
    283                                     ; db     54h,  38h,  42h,  00h    ; uncompressed
    284                                       db     5ah,  30h,  88h          ; compressed
    285 
    286 g_szDeviceTypeValues_XTCFpio16BIU:  ; db    "16B",NULL
    287                                     ; db     31h,  36h,  42h,  00h    ; uncompressed
    288                                       db     2bh,  2fh,  88h          ; compressed
    289 
    290 g_szDeviceTypeValues_XTCFdma:       ; db    "8MA",NULL  ; DMA 8-bit
    291                                     ; db     38h,  4dh,  41h,  00h    ; uncompressed
    292                                       db     30h,  53h,  87h          ; compressed
    293 
    294 g_szDeviceTypeValues_JrIde:         ; db    "M8 ",NULL  ; Memory Mapped 8-bit
    295                                     ; db     4dh,  38h,  20h,  00h    ; uncompressed
    296                                       db     53h,  30h,  00h          ; compressed
    297 
    298 g_szDeviceTypeValues_ADP50L:        ; db    "M8 ",NULL  ; Memory Mapped 8-bit
    299                                     ; db     4dh,  38h,  20h,  00h    ; uncompressed
    300                                       db     53h,  30h,  00h          ; compressed
     282g_szDeviceTypeValues_XTCFpio8:          ; db    "T8 ",NULL  ; True 8-bit
     283                                        ; db     54h,  38h,  20h,  00h    ; uncompressed
     284                                          db     5ah,  30h,  00h          ; compressed
     285
     286g_szDeviceTypeValues_XTCFpio8BIU:       ; db    "T8B",NULL
     287                                        ; db     54h,  38h,  42h,  00h    ; uncompressed
     288                                          db     5ah,  30h,  88h          ; compressed
     289
     290g_szDeviceTypeValues_XTCFpio16BIU:      ; db    "16B",NULL
     291                                        ; db     31h,  36h,  42h,  00h    ; uncompressed
     292                                          db     2bh,  2fh,  88h          ; compressed
     293
     294g_szDeviceTypeValues_XTCFdma:           ; db    "8MA",NULL  ; DMA 8-bit
     295                                        ; db     38h,  4dh,  41h,  00h    ; uncompressed
     296                                          db     30h,  53h,  87h          ; compressed
     297
     298g_szDeviceTypeValues_JrIde:             ; db    "M8 ",NULL  ; Memory Mapped 8-bit
     299                                        ; db     4dh,  38h,  20h,  00h    ; uncompressed
     300                                          db     53h,  30h,  00h          ; compressed
     301
     302g_szDeviceTypeValues_ADP50L:            ; db    "M8 ",NULL  ; Memory Mapped 8-bit
     303                                        ; db     4dh,  38h,  20h,  00h    ; uncompressed
     304                                          db     53h,  30h,  00h          ; compressed
    301305
    302306%ifdef MODULE_SERIAL
    303 g_szDeviceTypeValues_Serial:        ; db    "SER",NULL
    304                                     ; db     53h,  45h,  52h,  00h    ; uncompressed
    305                                       db     59h,  4bh,  98h          ; compressed
     307g_szDeviceTypeValues_Serial:            ; db    "SER",NULL
     308                                        ; db     53h,  45h,  52h,  00h    ; uncompressed
     309                                          db     59h,  4bh,  98h          ; compressed
    306310
    307311%endif ; MODULE_SERIAL
     
    337341%error "g_szDeviceTypeValues Displacement Incorrect 5"
    338342%endif
     343%if g_szDeviceTypeValues_XTIDEr2_Olivetti <> g_szDeviceTypeValues_XTIDEr2 + g_szDeviceTypeValues_Displacement
     344%error "g_szDeviceTypeValues Displacement Incorrect 6"
     345%endif
    339346
    340347%ifdef MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
    341348
    342 %if g_szDeviceTypeValues_XTCFpio8 <> g_szDeviceTypeValues_XTIDEr2 + g_szDeviceTypeValues_Displacement
    343 %error "g_szDeviceTypeValues Displacement Incorrect 6"
     349%if g_szDeviceTypeValues_XTCFpio8 <> g_szDeviceTypeValues_XTIDEr2_Olivetti + g_szDeviceTypeValues_Displacement
     350%error "g_szDeviceTypeValues Displacement Incorrect 7"
    344351%endif
    345352%if g_szDeviceTypeValues_XTCFpio8BIU <> g_szDeviceTypeValues_XTCFpio8 + g_szDeviceTypeValues_Displacement
    346 %error "g_szDeviceTypeValues Displacement Incorrect 7"
     353%error "g_szDeviceTypeValues Displacement Incorrect 8"
    347354%endif
    348355%if g_szDeviceTypeValues_XTCFpio16BIU <> g_szDeviceTypeValues_XTCFpio8BIU + g_szDeviceTypeValues_Displacement
    349 %error "g_szDeviceTypeValues Displacement Incorrect 8"
     356%error "g_szDeviceTypeValues Displacement Incorrect 9"
    350357%endif
    351358%if g_szDeviceTypeValues_XTCFdma <> g_szDeviceTypeValues_XTCFpio16BIU + g_szDeviceTypeValues_Displacement
    352 %error "g_szDeviceTypeValues Displacement Incorrect 9"
     359%error "g_szDeviceTypeValues Displacement Incorrect 10"
    353360%endif
    354361%if g_szDeviceTypeValues_JrIde <> g_szDeviceTypeValues_XTCFdma + g_szDeviceTypeValues_Displacement
    355 %error "g_szDeviceTypeValues Displacement Incorrect 10"
     362%error "g_szDeviceTypeValues Displacement Incorrect 11"
    356363%endif
    357364%if g_szDeviceTypeValues_ADP50L <> g_szDeviceTypeValues_JrIde + g_szDeviceTypeValues_Displacement
    358 %error "g_szDeviceTypeValues Displacement Incorrect 11"
     365%error "g_szDeviceTypeValues Displacement Incorrect 12"
    359366%endif
    360367
     
    362369
    363370%if g_szDeviceTypeValues_Serial <> g_szDeviceTypeValues_ADP50L + g_szDeviceTypeValues_Displacement
    364 %error "g_szDeviceTypeValues Displacement Incorrect 12"
     371%error "g_szDeviceTypeValues Displacement Incorrect 13"
    365372%endif
    366373
     
    594601
    595602;; translated usage stats
    596 ;; 34:3
     603;; 54:2
     604;; 172:2
     605;; 171:2
     606;; 47:2
     607;; 53:2
     608;; 175:1
     609;; 56:9
     610;; 45:2
     611;; 50:2
     612;; 200:1
     613;; 33:1
     614;; 51:3
    597615;; 179:8
    598616;; 46:3
     617;; 48:2
     618;; 34:3
     619;; 49:2
     620;; 181:1
    599621;; 44:1
    600 ;; 200:1
    601 ;; 48:2
    602 ;; 175:1
    603 ;; 171:2
    604 ;; 51:3
    605 ;; 50:2
    606 ;; 33:1
    607 ;; 53:2
    608 ;; 45:2
    609 ;; 47:2
    610 ;; 172:2
    611 ;; 56:8
    612622;; 32:34
    613 ;; 181:1
    614 ;; 54:2
    615 ;; 49:2
    616623;; total translated: 20
    617624
    618625;; format usage stats
    619 ;; 5-x:1
     626;; 5-u:2
     627;; z:2
     628;; nl:12
     629;; x:5
     630;; A:4
    620631;; 2-u:1
    621632;; s:14
    622 ;; nl:12
    623 ;; A:4
    624 ;; 5-u:2
    625 ;; x:5
    626633;; 2-I:1
    627 ;; z:2
     634;; 5-x:1
    628635;; u:6
    629636;; c:13
     
    652659;; 77,M:7
    653660;; 78,N:2
    654 ;; 79,O:2
     661;; 79,O:3
    655662;; 80,P:1
    656663;; 81,Q:1
     
    661668;; 86,V:
    662669;; 87,W:
    663 ;; 88,X:1
     670;; 88,X:2
    664671;; 89,Y:
    665672;; 90,Z:
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm

    r592 r601  
    193193    dw  DEVICE_8BIT_XTIDE_REV1
    194194    dw  DEVICE_8BIT_XTIDE_REV2
     195    dw  DEVICE_8BIT_XTIDE_REV2_OLIVETTI
    195196    dw  DEVICE_8BIT_XTCF_PIO8
    196197    dw  DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
     
    206207    dw  g_szValueCfgDeviceRev1
    207208    dw  g_szValueCfgDeviceRev2
     209    dw  g_szValueCfgDeviceRev2Olivetti
    208210    dw  g_szValueCfgDeviceXTCFPio8
    209211    dw  g_szValueCfgDeviceXTCFPio8WithBIUOffload
     
    631633    ; We know MODULE_8BIT_IDE is included
    632634    lahf    ; Save the PF
    633     cmp     al, DEVICE_8BIT_XTIDE_REV2
     635    cmp     al, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
    634636    jbe     SHORT .ChangingToXTIDEorXTCF
    635637    sahf    ; Restore the PF
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

    r597 r601  
    9292g_szNfoMainFlash:       db  "Flash loaded BIOS image to EEPROM.",NULL
    9393g_szNfoMainSave:        db  "Save BIOS changes back to original file from which it was loaded.",NULL
    94 g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2018 by XTIDE Universal BIOS Team."
     94g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2019 by XTIDE Universal BIOS Team."
    9595                        db  " Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL
    9696g_szNfoMainHomePage:    db  "Visit http://xtideuniversalbios.org (home page) and http://vcfed.org/forum (support)",NULL
    9797
    9898g_szHelpMainLicense:    db  "XTIDE Universal BIOS and XTIDECFG Configuration program are Copyright 2009-2010 by Tomi Tilli,"
    99                         db  " 2011-2018 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
     99                        db  " 2011-2019 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
    100100                        db  " This is free software, and you are welcome to redistribute it under certain conditions."
    101101                        db  " See the LICENSE.TXT file that was included with this distribution,"
     
    280280                            db  "XTIDE rev 1",LF
    281281                            db  "XTIDE rev 2 or modded rev 1",LF
     282                            db  "XTIDE rev 2 (Olivetti M24)",LF
    282283                            db  "XT-CF PIO8",LF
    283284                            db  "XT-CF PIO8 (BIU offload)",LF
     
    293294g_szValueCfgDeviceRev1:                     db  "XTIDE r1",NULL
    294295g_szValueCfgDeviceRev2:                     db  "XTIDE r2",NULL
     296g_szValueCfgDeviceRev2Olivetti:             db  "XTIDE r2",NULL
    295297g_szValueCfgDeviceXTCFPio8:                 db  "XTCF PIO",NULL
    296298g_szValueCfgDeviceXTCFPio8WithBIUOffload:   db  "BIU 8",NULL
     
    381383
    382384g_szHelpDrvBlockMode:   db  "Block Mode will speed up transfers since multiple sectors can be transferred before waiting next data request."
    383                         db  " Normally Block Mode should always be kept enabled but there is at"
    384                         db  " least one drive with buggy Block Mode implementation.",NULL
     385                        db  " Normally Block Mode should always be kept enabled but there is at least one"
     386                        db  " drive with buggy Block Mode implementation (Quantum ProDrive LPS 340A).",NULL
    385387
    386388g_szHelpDrvWriteCache:  db  "Modern Hard Drives have a large amount of internal write cache."
     
    420422
    421423; Strings for boot settings menu
    422 g_szItemBootTimeout:    db  "Selection timeout",NULL
    423 g_szItemBootDrive:      db  "Default boot drive",NULL
    424 g_szItemBootDispMode:   db  "Display Mode",NULL
    425 g_szItemColorTheme:     db  "Color Theme",NULL
    426 g_szItemBootFloppyDrvs: db  "Number of Floppy Drives",NULL
    427 g_szItemSerialDetect:   db  "Scan for Serial Drives",NULL
    428 g_szItemClearBdaDriveCount: db  "Remove other hard drives",NULL
    429 
    430 g_szDlgBootTimeout:     db  "Enter Boot Menu selection timeout in BIOS timer ticks (2...1092).",NULL
    431 g_szDlgBootDrive:       db  "Enter default drive number (0xh for Floppy Drives, 8xh for Hard Disks).",NULL
    432 g_szDlgBootDispMode:    db  "Select display mode.",NULL
    433 g_szDlgColorTheme:      db  "Select color theme.",NULL
    434 g_szDlgBootFloppyDrvs:  db  "Select number of Floppy Drives in system.",NULL
    435 g_szDlgSerialDetect:    db  "Scan for serial drives?",NULL
    436 g_szDlgClearBdaDriveCount:  db  "Remove existing INT 13h hard drives during drive detection?",NULL
    437 
    438 g_szNfoBootTimeout:     db  "Menu item selection timeout in BIOS timer ticks. 1 tick = 54.9 ms.",NULL
    439 g_szNfoBootDrive:       db  "Default boot drive.",NULL
    440 g_szNfoDispMode:        db  "Display mode to set when booting.",NULL
    441 g_szNfoColorTheme:      db  "Color theme used by the boot menu and the hotkey bar.",NULL
    442 g_szNfoBootFloppyDrvs:  db  "Number of Floppy Drives in system.",NULL
    443 g_szNfoSerialDetect:    db  "Scans all standard COM ports for serial drives."
    444                         db  " This can also be invoked by holding down ALT at the end of normal drive detection.",NULL
    445 g_szNfoClearBdaDriveCount:  db  "Can be used to remove duplicate hard drives.",NULL
    446 
    447 g_szHelpBootTimeout:    db  "Boot Menu selection timeout in BIOS timer ticks (1 second = 18.2 ticks)."
    448                         db  " When timer goes to zero, currently selected drive will be booted automatically."
    449                         db  " Timeout can be disabled by setting this to 0.",NULL
    450 g_szHelpBootDrive:      db  "Drive to be set selected by default when Boot Menu is displayed.",NULL
    451 g_szHelpColorTheme:     db  "Pick a theme from a list of several pre-defined themes to customize the colors used by the boot menu and, if"
    452                         db  " available, the hotkey bar. Selecting a theme or loading a BIOS, or its settings, from file or from ROM will"
    453                         db  " make XTIDECFG apply the theme to itself for easy preview. The ability to preview themes requires that"
    454                         db  " XTIDECFG is running in a display mode that can display colors. In other words, you may configure the"
    455                         db  " BIOS on a machine with a monochrome graphics adapter and not be able to preview the theme but the BIOS will"
    456                         db  " still use the selected theme when installed in a machine with a color graphics adapter.",NULL
    457 g_szHelpBootFloppyDrvs: db  "Detecting the correct number of floppy drives might fail when using a floppy controller with its own BIOS."
    458                         db  " A minimum number of floppy drives can be specified to force non-detected drives to appear on boot menu.",NULL
    459 g_szHelpSerialDetect:   db  "Set to Yes, at the end of normal drive detection, COM ports 1-7 (in reverse order) will be scanned for a connection"
    460                         db  " to a serial drive server. This option provides flexibility with the COM port and baud rate to be used,"
    461                         db  " it need not be configured ahead of time, but at the expense of a slower boot process."
    462                         db  " Even when this option is set to No, this functionality can still be invoked by holding down the ALT key at the end"
    463                         db  " of normal drive detection. Note that if any serial drives are detected during the normal drive detection,"
    464                         db  " no scan will take place (to avoid finding the same drive twice).",NULL
    465 g_szHelpClearBdaDriveCount: db  "Set to NO for normal operation. Set to YES to get Windows 95 drivers to work when "
    466                             db  "MODULE_WIN95_CMOS_HACK is not included (dummy drive needs to be defined in system BIOS setup).",NULL
     424g_szItemBootTimeout:        db  "Selection timeout",NULL
     425g_szItemBootDrive:          db  "Default boot drive",NULL
     426g_szItemBootDispMode:       db  "Display Mode",NULL
     427g_szItemColorTheme:         db  "Color Theme",NULL
     428g_szItemBootFloppyDrvs:     db  "Number of Floppy Drives",NULL
     429g_szItemSerialDetect:       db  "Scan for Serial Drives",NULL
     430g_szItemClearBdaDriveCount: db  "Remove other hard drives",NULL
     431
     432g_szDlgBootTimeout:         db  "Enter Boot Menu selection timeout in BIOS timer ticks (2...1092).",NULL
     433g_szDlgBootDrive:           db  "Enter default drive number (0xh for Floppy Drives, 8xh for Hard Disks).",NULL
     434g_szDlgBootDispMode:        db  "Select display mode.",NULL
     435g_szDlgColorTheme:          db  "Select color theme.",NULL
     436g_szDlgBootFloppyDrvs:      db  "Select number of Floppy Drives in system.",NULL
     437g_szDlgSerialDetect:        db  "Scan for serial drives?",NULL
     438g_szDlgClearBdaDriveCount:  db  "Remove existing INT 13h hard drives during drive detection?",NULL
     439
     440g_szNfoBootTimeout:         db  "Menu item selection timeout in BIOS timer ticks. 1 tick = 54.9 ms.",NULL
     441g_szNfoBootDrive:           db  "Default boot drive.",NULL
     442g_szNfoDispMode:            db  "Display mode to set when booting.",NULL
     443g_szNfoColorTheme:          db  "Color theme used by the boot menu and the hotkey bar.",NULL
     444g_szNfoBootFloppyDrvs:      db  "Number of Floppy Drives in system.",NULL
     445g_szNfoSerialDetect:        db  "Scans all standard COM ports for serial drives."
     446                            db  " This can also be invoked by holding down ALT at the end of normal drive detection.",NULL
     447g_szNfoClearBdaDriveCount:  db  "Can be used to remove duplicate hard drives.",NULL
     448
     449g_szHelpBootTimeout:        db  "Boot Menu selection timeout in BIOS timer ticks (1 second = 18.2 ticks)."
     450                            db  " When timer goes to zero, currently selected drive will be booted automatically."
     451                            db  " Timeout can be disabled by setting this to 0.",NULL
     452g_szHelpBootDrive:          db  "Drive to be set selected by default when Boot Menu is displayed.",NULL
     453g_szHelpColorTheme:         db  "Pick a theme from a list of several pre-defined themes to customize the colors used by the boot menu and, if"
     454                            db  " available, the hotkey bar. Selecting a theme or loading a BIOS, or its settings, from file or from ROM will"
     455                            db  " make XTIDECFG apply the theme to itself for easy preview. The ability to preview themes requires that"
     456                            db  " XTIDECFG is running in a display mode that can display colors. In other words, you may configure the"
     457                            db  " BIOS on a machine with a monochrome graphics adapter and not be able to preview the theme but the BIOS will"
     458                            db  " still use the selected theme when installed in a machine with a color graphics adapter.",NULL
     459g_szHelpBootFloppyDrvs:     db  "Detecting the correct number of floppy drives might fail when using a floppy controller with its own BIOS."
     460                            db  " A minimum number of floppy drives can be specified to force non-detected drives to appear on boot menu.",NULL
     461g_szHelpSerialDetect:       db  "Set to Yes, at the end of normal drive detection, COM ports 1-7 (in reverse order) will be scanned for a connection"
     462                            db  " to a serial drive server. This option provides flexibility with the COM port and baud rate to be used,"
     463                            db  " it need not be configured ahead of time, but at the expense of a slower boot process."
     464                            db  " Even when this option is set to No, this functionality can still be invoked by holding down the ALT key at the end"
     465                            db  " of normal drive detection. Note that if any serial drives are detected during the normal drive detection,"
     466                            db  " no scan will take place (to avoid finding the same drive twice).",NULL
     467g_szHelpClearBdaDriveCount: db  "Set to NO for normal operation. Set to YES to get Windows 95 drivers to work when"
     468                            db  " MODULE_WIN95_CMOS_HACK is not included (dummy drive needs to be defined in system BIOS setup).",NULL
    467469
    468470g_szMultichoiceBootDispMode:    db  "Default",LF
Note: See TracChangeset for help on using the changeset viewer.