Changeset 602 in xtideuniversalbios


Ignore:
Timestamp:
May 9, 2019, 8:11:46 PM (5 years ago)
Author:
krille_n_
Message:

Changes:

  • SerDrive: Fixed a bug that prevented use of 3.5" 720 KB floppy disk images.
  • Also added support for Microsoft DMF (Distribution Media Format) floppy disk images.
  • XTIDECFG / Library: Minor size optimizations. Added a new macro (SKIP1B) as part of that.
  • BIOS: A small size optimization (2 bytes) to MODULE_8BIT_IDE_ADVANCED that is enabled only when USE_NEC_V is defined.
Location:
trunk
Files:
13 edited

Legend:

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

    r596 r602  
    44%ifndef MACROS_INC
    55%define MACROS_INC
     6
     7
     8;--------------------------------------------------------------------
     9; Skips the immediately following 1 byte instruction by using it
     10; as an immediate value to a dummy instruction.
     11; Destroys the contents of %1.
     12;
     13; SKIP1B
     14;   Parameters:
     15;       %1:     Any 8 bit general purpose register or F for flags.
     16;   Returns:
     17;       Nothing
     18;   Corrupts registers:
     19;       %1
     20;--------------------------------------------------------------------
     21%macro SKIP1B 1.nolist
     22    %ifidni     %1, f
     23        db  03Ch                    ; Opcode byte for CMP AL, <immed>
     24        ;db 0A8h                    ; Alt. version TEST AL, <immed>
     25    %elifidni   %1, al
     26        db  0B0h                    ; Opcode byte for MOV AL, <immed>
     27    %elifidni   %1, ah
     28        db  0B4h                    ; Opcode byte for MOV AH, <immed>
     29    %elifidni   %1, bl
     30        db  0B3h                    ; Opcode byte for MOV BL, <immed>
     31    %elifidni   %1, bh
     32        db  0B7h                    ; Opcode byte for MOV BH, <immed>
     33    %elifidni   %1, cl
     34        db  0B1h                    ; Opcode byte for MOV CL, <immed>
     35    %elifidni   %1, ch
     36        db  0B5h                    ; Opcode byte for MOV CH, <immed>
     37    %elifidni   %1, dl
     38        db  0B2h                    ; Opcode byte for MOV DL, <immed>
     39    %elifidni   %1, dh
     40        db  0B6h                    ; Opcode byte for MOV DH, <immed>
     41    %else
     42        %error "Invalid parameter passed to SKIP1B"
     43    %endif
     44%endmacro
    645
    746;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Keyboard/Keyboard.asm

    r592 r602  
    4444    push    cx
    4545
    46     mov     cx, BUFFER_SIZE_FOR_WORD_INPUT
    47     call    Memory_ReserveCXbytesFromStackToDSSI
     46    mov     cl, BUFFER_SIZE_FOR_WORD_INPUT
     47    call    Memory_ReserveCLbytesFromStackToDSSI
    4848
    4949    call    Char_GetFilterFunctionToDXforNumericBaseInBX
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm

    r601 r602  
    612612    jz      SHORT ReturnWithoutHandlingKeystroke
    613613
    614     mov     cx, STRING_DIALOG_IO_size
    615     call    Memory_ReserveCXbytesFromStackToDSSI
     614    mov     cl, STRING_DIALOG_IO_size
     615    call    Memory_ReserveCLbytesFromStackToDSSI
    616616
    617617;;; InitializeStringDialogIoInDSSIforInputtingFileName
     
    682682
    683683    call    DisplayLoadingMessageInInformationArea
    684     mov     cx, DRIVE_DIALOG_IO_size
    685     call    Memory_ReserveCXbytesFromStackToDSSI
     684    mov     cl, DRIVE_DIALOG_IO_size
     685    call    Memory_ReserveCLbytesFromStackToDSSI
    686686    call    .DisplayDriveSelectionDialogWithIoInDSSI
    687687    call    .ChangeDriveToUserSelectionFromIoInDSSI
     
    741741    push    ss
    742742    pop     ds
    743     ePUSH_T ax, CURRENTDIR_CHARACTERS
     743    ePUSH_T ax, CURRENTDIR_CHARACTERS           ; The high byte is zero
    744744    mov     cx, FLG_FILEATTR_DIRECTORY
    745745    mov     dx, sp
  • trunk/Assembly_Library/Src/Util/Memory.asm

    r592 r602  
    122122
    123123;--------------------------------------------------------------------
     124; Memory_ReserveCLbytesFromStackToDSSI
    124125; Memory_ReserveCXbytesFromStackToDSSI
    125126;   Parameters
    126 ;       CX:     Number of bytes to reserve
     127;       CL/CX:  Number of bytes to reserve
    127128;   Returns:
    128129;       DS:SI:  Ptr to reserved buffer
     
    132133%ifndef EXCLUDE_FROM_XUB
    133134ALIGN JUMP_ALIGN
     135Memory_ReserveCLbytesFromStackToDSSI:
     136    xor     ch, ch
    134137Memory_ReserveCXbytesFromStackToDSSI:
    135138    pop     ax
  • trunk/Assembly_Library/Src/Util/Sort.asm

    r592 r602  
    3232;       ES:DI:  Ptr to second item to compare
    3333;   Returns:
    34 ;       FLAGS:  Signed comparition between first and second item
     34;       FLAGS:  Signed comparison between first and second item
    3535;   Corrupts registers:
    3636;       Nothing
     
    5656Sort_ItemsFromDSSIwithCountInDXsizeInCXandComparatorInBX:
    5757    push    es
    58     push    di
    59     mov     di, cx
    60     eSHL_IM cx, 1                       ; Reserve temp and pivot items
    61     add     cx, BYTE QSORT_PARAMS_size
    62     eENTER_STRUCT cx
    63     push    cx
     58    mov     ax, cx
     59    eSHL_IM ax, 1                       ; Reserve temp and pivot items
     60    add     ax, BYTE QSORT_PARAMS_size
     61    eENTER_STRUCT ax
     62    push    ax
    6463
    6564%ifdef CLD_NEEDED
    6665    cld
    6766%endif
    68     mov     cx, di                      ; Restore item size to CX
    6967    xor     ax, ax                      ; Zero starting index
    7068    dec     dx                          ; Count to index of last item
     
    7674    pop     ax
    7775    eLEAVE_STRUCT ax
    78     pop     di
    7976    pop     es
    8077    ret
  • trunk/Serial_Server/library/Image.cpp

    r592 r602  
    3030struct floppyInfo floppyInfos[] =
    3131{
     32//  { 0, 2969600 / 512, 6, 80, 2, 36 },         // 2.88MB 3.5" (alternate spelling with 2.9)
    3233    { 1, 2949120 / 512, 6, 80, 2, 36 },         // 2.88MB 3.5"
    33     { 0, 2867200 / 512, 6, 80, 2, 36 },         // 2.88MB 3.5" (alternate spelling with 2.8)
    34     { 0, 2969600 / 512, 6, 80, 2, 36 },         // 2.88MB 3.5" (alternate spelling with 2.9)
     34//  { 0, 2867200 / 512, 6, 80, 2, 36 },         // 2.88MB 3.5" (alternate spelling with 2.8)
     35    { 1, 1720320 / 512, 4, 80, 2, 21 },         // 1.44MB 3.5" Microsoft DMF (Distribution Media Format)
    3536    { 1, 1474560 / 512, 4, 80, 2, 18 },         // 1.44MB 3.5"
    36     { 0, 1433600 / 512, 4, 80, 2, 18 },         // 1.44MB 3.5" (alternate spelling with 1.4)
     37//  { 0, 1433600 / 512, 4, 80, 2, 18 },         // 1.44MB 3.5" (alternate spelling with 1.4)
    3738    { 1, 1228800 / 512, 2, 80, 2, 15 },         // 1.2MB 5.25"
    38     { 1, 737280 / 512, 3, 80, 1, 18 },          // 720KB 3.5"
     39    { 1, 737280 / 512, 3, 80, 2, 9 },           // 720KB 3.5"
    3940    { 1, 368640 / 512, 1, 40, 2, 9 },           // 360KB 5.25"
    4041    { 1, 327680 / 512, 0, 40, 2, 8 },           // 320KB 5.25"
  • trunk/Serial_Server/win32/Win32.cpp

    r592 r602  
    3737char *bannerStrings[] = {
    3838    "SerDrive - XTIDE Universal BIOS Serial Drive Server",
    39     "Copyright (C) 2012-2018 by XTIDE Universal BIOS Team",
     39    "Copyright (C) 2012-2019 by XTIDE Universal BIOS Team",
    4040    "Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY",
    4141    ROM_VERSION_STRING,
     
    9191    "Floppy images may also be used.  Image size must be exactly the same size",
    9292    "as a 2.88MB, 1.44MB, 1.2MB, 720KB, 360KB, 320KB, 180KB, or 160KB disk.",
     93    "Microsoft DMF (Distribution Media Format) images are also supported.",
    9394    "Floppy images must be the last disks discovered by the BIOS, and only",
    9495    "two floppy drives are supported by the BIOS at a time.",
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm

    r601 r602  
    253253
    254254%elifdef USE_186
     255%ifdef USE_NEC_V
     256    mov     dx, es
     257    xor     ax, ax
     258    eROL4   dl
     259    eROL4   dh
     260    add     si, dx
     261    adc     al, ah
     262    mov     es, ax
     263
     264%else
    255265    mov     ax, es
    256266    rol     ax, 4
     
    262272    mov     es, ax
    263273
     274%endif
    264275%else ; 808x
    265276    mov     al, 4
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Dialogs.asm

    r592 r602  
    2121SECTION .text
    2222
     23
     24;--------------------------------------------------------------------
     25; Dialogs_DisplayNotificationFromCSDX
     26; Dialogs_DisplayErrorFromCSDX
     27;   Parameters:
     28;       CS:DX:  Ptr to notification/error string to display
     29;       SS:BP:  Menu handle
     30;   Returns:
     31;       Nothing
     32;   Corrupts registers:
     33;       AX
     34;--------------------------------------------------------------------
     35ALIGN JUMP_ALIGN
     36Dialogs_DisplayNotificationFromCSDX:
     37    push    di
     38    mov     di, g_szNotificationDialog
     39    jmp     SHORT DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI
     40
     41ALIGN JUMP_ALIGN
     42Dialogs_DisplayErrorFromCSDX:
     43    push    di
     44    mov     di, g_szErrorDialog
     45    SKIP1B  al
     46    ; Fall to DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI
     47
    2348;--------------------------------------------------------------------
    2449; Dialogs_DisplayHelpFromCSDXwithTitleInCSDI
     
    3257;       AX
    3358;--------------------------------------------------------------------
    34 ALIGN JUMP_ALIGN
    3559Dialogs_DisplayHelpFromCSDXwithTitleInCSDI:
     60    push    di
     61
     62DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI:
    3663    push    ds
    3764    push    si
    38     push    di
    3965    push    cx
    4066
    41     mov     cx, DIALOG_INPUT_size
    42     call    Memory_ReserveCXbytesFromStackToDSSI
     67    mov     cl, DIALOG_INPUT_size
     68    call    Memory_ReserveCLbytesFromStackToDSSI
     69    call    InitializeDialogInputFromDSSI
    4370    mov     [si+DIALOG_INPUT.fszTitle], di
    44     jmp     SHORT DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI
    45 
    46 ;--------------------------------------------------------------------
    47 ; Dialogs_DisplayNotificationFromCSDX
    48 ; Dialogs_DisplayErrorFromCSDX
    49 ;   Parameters:
    50 ;       CS:DX:  Ptr to notification string to display
    51 ;       SS:BP:  Menu handle
    52 ;   Returns:
    53 ;       Nothing
    54 ;   Corrupts registers:
    55 ;       AX
    56 ;--------------------------------------------------------------------
    57 ALIGN JUMP_ALIGN
    58 Dialogs_DisplayNotificationFromCSDX:
    59     push    ds
    60     push    si
    61     push    di
    62     push    cx
    63 
    64     mov     cx, DIALOG_INPUT_size
    65     call    Memory_ReserveCXbytesFromStackToDSSI
    66     mov     WORD [si+DIALOG_INPUT.fszTitle], g_szNotificationDialog
    67     jmp     SHORT DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI
    68 
    69 ALIGN JUMP_ALIGN
    70 Dialogs_DisplayErrorFromCSDX:
    71     push    ds
    72     push    si
    73     push    di
    74     push    cx
    75 
    76     mov     cx, DIALOG_INPUT_size
    77     call    Memory_ReserveCXbytesFromStackToDSSI
    78     mov     WORD [si+DIALOG_INPUT.fszTitle], g_szErrorDialog
    79 ALIGN JUMP_ALIGN
    80 DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI:
    81     call    InitializeDialogInputFromDSSI
    8271    mov     [si+DIALOG_INPUT.fszItems], dx
    8372    CALL_MENU_LIBRARY DisplayMessageWithInputInDSSI
     
    8574    add     sp, BYTE DIALOG_INPUT_size
    8675    pop     cx
    87     pop     di
    8876    pop     si
    8977    pop     ds
     78
     79    pop     di
    9080    ret
    9181
     
    135125    push    ds
    136126
    137     mov     cx, DIALOG_INPUT_size
    138     call    Memory_ReserveCXbytesFromStackToDSSI
     127    mov     cl, DIALOG_INPUT_size
     128    call    Memory_ReserveCLbytesFromStackToDSSI
    139129    call    InitializeDialogInputFromDSSI
    140130    mov     [si+DIALOG_INPUT.fszTitle], bx
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm

    r592 r602  
    5050    call    Registers_CopyDSSItoESDI
    5151
    52     mov     cx, DIALOG_INPUT_size
    53     call    Memory_ReserveCXbytesFromStackToDSSI
     52    mov     cl, DIALOG_INPUT_size
     53    call    Memory_ReserveCLbytesFromStackToDSSI
    5454    call    InitializeDialogInputInDSSIfromMenuitemInESDI
    5555    mov     ax, [es:di+MENUITEM.itemValue+ITEM_VALUE.szMultichoice]
     
    8787
    8888    call    Registers_CopyDSSItoESDI
    89     mov     cx, WORD_DIALOG_IO_size
    90     call    Memory_ReserveCXbytesFromStackToDSSI
     89    mov     cl, WORD_DIALOG_IO_size
     90    call    Memory_ReserveCLbytesFromStackToDSSI
    9191    call    InitializeDialogInputInDSSIfromMenuitemInESDI
    9292    mov     [si+WORD_DIALOG_IO.bNumericBase], bl
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm

    r593 r602  
    221221
    222222    call    .PrepareBuffersForFlashing
    223     mov     cx, FLASHVARS_size + PROGRESS_DIALOG_IO_size
    224     call    Memory_ReserveCXbytesFromStackToDSSI
     223    mov     cl, FLASHVARS_size + PROGRESS_DIALOG_IO_size
     224    call    Memory_ReserveCLbytesFromStackToDSSI
    225225    call    .InitializeFlashvarsFromDSSI
    226226    mov     bx, si                          ; DS:BX now points to FLASHVARS
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MainMenu.asm

    r596 r602  
    249249LoadBiosFromFile:
    250250    call    Buffers_SaveChangesIfFileLoaded
    251     mov     cx, FILE_DIALOG_IO_size
    252     call    Memory_ReserveCXbytesFromStackToDSSI
     251    mov     cl, FILE_DIALOG_IO_size
     252    call    Memory_ReserveCLbytesFromStackToDSSI
    253253    call    Dialogs_DisplayFileDialogWithDialogIoInDSSI
    254254    cmp     BYTE [si+FILE_DIALOG_IO.bUserCancellation], TRUE
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

    r601 r602  
    293293g_szValueCfgDevice8b:                       db  "8-bit",NULL
    294294g_szValueCfgDeviceRev1:                     db  "XTIDE r1",NULL
    295 g_szValueCfgDeviceRev2:                     db  "XTIDE r2",NULL
     295g_szValueCfgDeviceRev2:
    296296g_szValueCfgDeviceRev2Olivetti:             db  "XTIDE r2",NULL
    297297g_szValueCfgDeviceXTCFPio8:                 db  "XTCF PIO",NULL
Note: See TracChangeset for help on using the changeset viewer.