Changeset 618 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/makefile


Ignore:
Timestamp:
Aug 31, 2021, 2:17:47 PM (3 years ago)
Author:
Krister Nordvall
Message:

Changes:

  • Updated the BIOS makefile. Added the NO_ATAID_CORRECTION define back to the Tiny build as I've realized that the correction code should not be needed for builds without MODULE_EBIOS. Also added a new makefile target 'custom' to make it easier for people to make custom builds.
  • Fixed a bug where calling INT 13h/AH=15h for drives not handled by XUB (floppy drives for example) would return an error due to the fact that any non-zero return value in AH from the other BIOS would cause the CF to be set in Int13h_SetErrorCodeToIntpackInSSBPfromAH. The return path is now via Int13h_ReturnFromHandlerWithoutStoringErrorCode which means that no status/error code will be returned in the BDA but that should not be a problem as the other BIOS should do that anyway. This change also fixed another potential problem where return values in DL from the other BIOS were assumed to be drive numbers when MODULE_SERIAL_FLOPPY is included in the build.
  • Minor optimizations and fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/makefile

    r614 r618  
    33#                                                                                                  #
    44# Valid makefile targets are:                                                                      #
    5 # all       Removes existing files and builds binary files in \Build                               #
    6 # small     Builds 8 kiB binaries only (without checksum)                                          #
    7 # large     Builds 12 kiB binaries only (without checksum)                                         #
     5# all       Removes existing files and builds binary files in \Build (without checksums)           #
     6# small     Builds only binaries smaller than or equal to 8 kiB (without checksums)                #
     7# large     Builds only binaries larger than 8 kiB (without checksums)                             #
     8# custom    Builds custom binary without checksum (change DEFINES_CUSTOM / BIOS_SIZE_CUSTOM first) #
    89# clean     Removes all files from \Build                                                          #
    9 # checksum* Builds all and then generates checksum byte to all binary files                        #
     10# checksum* Same as 'all' but also applies checksums to the binaries                               #
    1011# strings*  Compress src\Strings.asm to src\StringsCompressed.asm                                  #
    1112# unused*   Checks if there are any unused functions that can be removed to save space             #
     
    3738# RELOCATE_INT13H_STACK **    Relocates INT 13h stack to beginning of stolen conventional memory   #
    3839# NO_ATAID_VALIDATION ***     Excludes code that tries to ensure proper communication with drives  #
    39 # NO_ATAID_CORRECTION         Excludes code that corrects illegal CHS values from some CF cards    #
     40# NO_ATAID_CORRECTION         Excludes code that corrects illegal CHS values from some CF cards    #
    4041# USE_186                     Use instructions supported by 80188/80186 and V20/V30 and later      #
    4142# USE_286                     Use instructions supported by 286 and later (defines USE_UNDOC_INTEL)#
     
    104105
    105106
    106 #################################################################
    107 # Assembler preprocessor defines.                              #
    108 #################################################################
     107##################################
     108# Assembler preprocessor defines #
     109##################################
    109110DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_8BIT_IDE MODULE_EBIOS MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_POWER_MANAGEMENT NO_ATAID_VALIDATION CLD_NEEDED
    110111DEFINES_COMMON_LARGE = MODULE_BOOT_MENU MODULE_8BIT_IDE_ADVANCED MODULE_COMPATIBLE_TABLES
     
    113114DEFINES_XTPLUS = $(DEFINES_XT) USE_186
    114115DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_IRQ MODULE_COMPATIBLE_TABLES
     116DEFINES_386 = $(DEFINES_AT) USE_386 MODULE_ADVANCED_ATA MODULE_WIN9X_CMOS_HACK
    115117
    116118DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE)
    117119DEFINES_XTPLUS_LARGE = $(DEFINES_XTPLUS) $(DEFINES_COMMON_LARGE)
    118120DEFINES_AT_LARGE = $(DEFINES_AT) $(DEFINES_COMMON_LARGE)
    119 
    120 DEFINES_XT_TINY = MODULE_STRINGS_COMPRESSED MODULE_8BIT_IDE NO_ATAID_VALIDATION CLD_NEEDED
    121 DEFINES_386 = $(DEFINES_AT) USE_386 MODULE_ADVANCED_ATA MODULE_WIN9X_CMOS_HACK
    122121DEFINES_386_LARGE = $(DEFINES_386) $(DEFINES_COMMON_LARGE)
     122
     123DEFINES_XT_TINY = MODULE_STRINGS_COMPRESSED MODULE_8BIT_IDE NO_ATAID_VALIDATION NO_ATAID_CORRECTION CLD_NEEDED
     124
     125DEFINES_CUSTOM = ?
    123126
    124127
     
    132135BIOS_SIZE_SMALL = 8192
    133136BIOS_SIZE_LARGE = 10240
     137BIOS_SIZE_CUSTOM = ?
    134138
    135139# Add -D in front of every preprocessor define declaration
     
    143147DEFS_386 = $(DEFINES_386:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL)
    144148DEFS_386_LARGE = $(DEFINES_386_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE)
     149DEFS_CUSTOM = $(DEFINES_CUSTOM:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_CUSTOM)
    145150
    146151# Add -I in front of all header directories
     
    149154# Path + target file to be built
    150155TARGET = $(BUILD_DIR)/$(PROG)
     156
    151157
    152158#########################
     
    223229    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_386_LARGE) -l"$(TARGET)_386l.lst" -o"$(TARGET)_386l.bin"
    224230    @echo * Large 386 version "$(TARGET)_386l.bin" built.
     231
     232custom:
     233    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_CUSTOM) -l"$(TARGET)_custom.lst" -o"$(TARGET)_custom.bin"
     234    @echo * Custom version "$(TARGET)_custom.bin" built.
    225235
    226236strings: src\Strings.asm
Note: See TracChangeset for help on using the changeset viewer.