[381] | 1 | #summary How to build XTIDE Universal BIOS.
|
---|
[388] | 2 | *Table of Contents*
|
---|
| 3 | <wiki:toc max_depth="3" />
|
---|
| 4 | ----
|
---|
[381] | 5 | = Introduction =
|
---|
| 6 |
|
---|
| 7 | This is a small tutorial on how to build XTIDE Universal BIOS on Windows.
|
---|
| 8 |
|
---|
| 9 |
|
---|
| 10 | = Programs needed =
|
---|
| 11 |
|
---|
[387] | 12 | * [http://tortoisesvn.tigris.org/ TortoiseSVN] (or any SVN client)
|
---|
[383] | 13 | * [http://tdm-gcc.tdragon.net/ MinGW] (only mingw32-make.exe is needed)
|
---|
| 14 | * [http://www.nasm.us/ NASM]
|
---|
| 15 | * [http://upx.sourceforge.net/ UPX] (optional)
|
---|
| 16 | * [http://strawberryperl.com/ Strawperry Perl] (optional)
|
---|
[381] | 17 |
|
---|
| 18 |
|
---|
[388] | 19 | ----
|
---|
[384] | 20 | = Install Tortoise SVN =
|
---|
[381] | 21 |
|
---|
[384] | 22 | TortoiseSVN is a subversion client that is very easy to use since it integrates nicely to Windows. It is used to download XTIDE Universal BIOS sources. Anyone can download sources from coogle.code repository but you must be a project member to commit changes back to the repository.
|
---|
| 23 |
|
---|
[382] | 24 | First [http://tortoisesvn.net/downloads.html download and install TortoiseSVN]. You can use the default settings that the installer suggests. Next you need to create folder where you want to download the sources. We name the folder _XTIDE Universal BIOS sources_ in this example.
|
---|
[381] | 25 |
|
---|
[384] | 26 | == Downloading sources ==
|
---|
[381] | 27 |
|
---|
| 28 | Once the directory is created, open it and click right mouse button. You will find _SVN Checkout..._ from the menu.
|
---|
[385] | 29 | http://kotisivu.lumonetti.fi/ttilli/XTIDE/pictures/TortoiseMenu.png
|
---|
[381] | 30 |
|
---|
| 31 | URL for the repository is http://xtideuniversalbios.googlecode.com/svn/trunk/. There is no need to alter other settings so just click OK. You have now downloaded all sources from XTIDE Universal BIOS project.
|
---|
[385] | 32 | http://kotisivu.lumonetti.fi/ttilli/XTIDE/pictures/SvnCheckout.png
|
---|
[381] | 33 |
|
---|
[385] | 34 |
|
---|
[384] | 35 | == Updating sources ==
|
---|
[381] | 36 |
|
---|
| 37 | If you have already done all above and want to get latest sources, go to the source folder you have created. Click right mouse button and select _SVN Update_. Using TortoiseSVN is really this easy!
|
---|
| 38 |
|
---|
| 39 |
|
---|
| 40 |
|
---|
[384] | 41 | = Install MinGW =
|
---|
[381] | 42 |
|
---|
[384] | 43 | MinGW is a free C/C++ compiler suite for Windows. We only need make utility from it but installing the whole MinGW is easier since it will add path to the environment variables automatically. Download the bundle installer ([http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.6.1.exe/download tdm-gcc-4.6.1.exe] when writing this) and install it with default settings. It will install the MinGW to C:\MinGW32. Keep this in mind since you'll want to install NASM to C:\MinGW32\bin so there will be no need to change environment path.
|
---|
[381] | 44 |
|
---|
| 45 |
|
---|
[384] | 46 |
|
---|
| 47 | = Install NASM =
|
---|
| 48 |
|
---|
[382] | 49 | NASM is the assembler that is used to compile the sources. NASM v2.10 stable is what we are using when writing this. Download the [http://www.nasm.us/pub/nasm/releasebuilds/2.10/win32/nasm-2.10-win32.zip nasm-2.10-win32.zip] and extract nasm.exe to C:\MinGW32\bin (if you installed MinGW to C:\MinGW32\).
|
---|
[381] | 50 |
|
---|
| 51 |
|
---|
| 52 |
|
---|
[384] | 53 | = Install UPX (optional) =
|
---|
[381] | 54 |
|
---|
[384] | 55 | UPX is used to compress XTIDE Universal BIOS configurator. It is needed only for release build. The only advantage is that it makes the executable size smaller.
|
---|
[381] | 56 |
|
---|
| 57 |
|
---|
[384] | 58 |
|
---|
| 59 | = Install Strawberry Perl (optional) =
|
---|
| 60 |
|
---|
[381] | 61 | Strawberry Perl is required to execute optional scripts when building XTIDE Universal BIOS. Scripts include string compression (not needed unless you modify the sources) and checksum calculation. Just run the Strawberry Perl installer with default settings.
|
---|
| 62 |
|
---|
| 63 |
|
---|
[388] | 64 | ----
|
---|
[381] | 65 | = Building XTIDE Universal BIOS =
|
---|
| 66 |
|
---|
[384] | 67 | Open command line window and go to the folder where you downloaded the sources with TortoiseSVN. Then go to the _XTIDE_Universal_BIOS_ folder. Write _mingw32-make all_ and everything should be build.
|
---|
[381] | 68 |
|
---|
| 69 | You might want to write _mingw32-make checksum_ if you installed Stawberry Perl. It will calculate checksum bytes to the binaries (You can use XTIDECFG.COM for that if you don't want to install Stawberry Perl).
|
---|
| 70 |
|
---|
[384] | 71 | You will find the binaries in _build\_ folder.
|
---|
[381] | 72 |
|
---|
| 73 |
|
---|
| 74 | == Including and excluding optional modules ==
|
---|
| 75 |
|
---|
[387] | 76 | There are few optional modules (most of them are included in official release builds). Reason for modules is simple: it is not possible to get all features to fit in 8k ROM. Official builds are designed so that they include the features most users prefer.
|
---|
[381] | 77 |
|
---|
[387] | 78 | It is easy to include and exclude modules but it must be done by editing makefile. Makefile specifies how the binaries are build when you execute _mingw32-make_.
|
---|
[381] | 79 |
|
---|
[387] | 80 | Open makefile with Windows Notepad (or [http://notepad-plus-plus.org/ Notepad++]). You will now see all the modules and short description about them. When writing this, the makefile looks like below:
|
---|
| 81 | {{{
|
---|
| 82 | ##################################################################################################
|
---|
| 83 | # Makefile to build XTIDE Universal BIOS. #
|
---|
| 84 | # #
|
---|
| 85 | # Valid makefile targets are: #
|
---|
| 86 | # all Removes existing files and builds binary files in \Build #
|
---|
| 87 | # small Builds 8 kiB binaries only (without checksum) #
|
---|
| 88 | # large Builds 15 kiB binaries only (without checksum) #
|
---|
| 89 | # clean Removes all files from \Build #
|
---|
| 90 | # checksum* Builds all and then generates checksum byte to all binary files #
|
---|
| 91 | # strings* Compress src\Strings.asm to src\StringsCompressed.asm #
|
---|
| 92 | # #
|
---|
| 93 | # * at the end of target name means that Perl is required for the job. #
|
---|
| 94 | # Build directory must be created manually if it does not exist. #
|
---|
| 95 | # #
|
---|
| 96 | # #
|
---|
| 97 | # Following modules can be included or excluded: #
|
---|
| 98 | # MODULE_ADVANCED_ATA Native support for some VLB IDE controllers #
|
---|
| 99 | # MODULE_BOOT_MENU Boot Menu for selection of drive to boot from #
|
---|
| 100 | # MODULE_EBIOS Enhanced functions for accessing drives over 8.4 GB #
|
---|
| 101 | # MODULE_JRIDE Support for JR-IDE/ISA #
|
---|
| 102 | # MODULE_SERIAL Virtual hard disks using serial port #
|
---|
| 103 | # MODULE_SERIAL_FLOPPY Virtual floppy drives using serial port (requires MODULE_SERIAL) #
|
---|
| 104 | # MODULE_STRINGS_COMPRESSED Use compressed strings to save space #
|
---|
| 105 | # #
|
---|
| 106 | # Not modules but these affect the assembly: #
|
---|
| 107 | # ELIMINATE_CGA_SNOW Prevents CGA snowing at the cost of a few bytes #
|
---|
| 108 | # USE_186 Use instructions supported by 80188/80186 and V20/V30 and later #
|
---|
| 109 | # USE_286 Use instructions supported by 286 and later #
|
---|
| 110 | # USE_386 Use instructions supported by 386 and later #
|
---|
| 111 | # USE_AT Use features supported on AT and later systems (not available on XT) #
|
---|
| 112 | # #
|
---|
| 113 | ##################################################################################################
|
---|
| 114 | }}}
|
---|
[381] | 115 |
|
---|
[387] | 116 | I'm sure there will be more modules in the future so always read up to date makefile for all available modules.
|
---|
| 117 |
|
---|
| 118 | Scroll down the makefile to find Assembler preprocessor defines and other variables:
|
---|
| 119 | {{{
|
---|
| 120 | #################################################################
|
---|
| 121 | # Assembler preprocessor defines. #
|
---|
| 122 | #################################################################
|
---|
| 123 | DEFINES_COMMON = MODULE_BOOT_MENU MODULE_EBIOS MODULE_STRINGS_COMPRESSED
|
---|
| 124 |
|
---|
| 125 | DEFINES_XT = ELIMINATE_CGA_SNOW MODULE_SERIAL MODULE_SERIAL_FLOPPY
|
---|
| 126 | DEFINES_XTPLUS = ELIMINATE_CGA_SNOW USE_186 MODULE_SERIAL MODULE_SERIAL_FLOPPY
|
---|
| 127 | DEFINES_AT = USE_286 USE_AT MODULE_SERIAL MODULE_SERIAL_FLOPPY
|
---|
| 128 |
|
---|
| 129 | DEFINES_XT_LARGE = $(DEFINES_XT) MODULE_JRIDE MODULE_ADVANCED_ATA
|
---|
| 130 | DEFINES_XTPLUS_LARGE = $(DEFINES_XTPLUS) MODULE_JRIDE MODULE_ADVANCED_ATA
|
---|
| 131 | DEFINES_AT_LARGE = $(DEFINES_AT) MODULE_JRIDE MODULE_ADVANCED_ATA
|
---|
| 132 |
|
---|
| 133 | DEFINES_JRIDE_8K = ELIMINATE_CGA_SNOW MODULE_JRIDE
|
---|
| 134 | DEFINES_386_8K = USE_386 USE_AT MODULE_ADVANCED_ATA
|
---|
| 135 |
|
---|
| 136 |
|
---|
| 137 | ###################
|
---|
| 138 | # Other variables #
|
---|
| 139 | ###################
|
---|
| 140 |
|
---|
| 141 | # Target size of the ROM, used in main.asm for number of 512B blocks and by checksum Perl script below
|
---|
| 142 | ROMSIZE = 8192
|
---|
| 143 | ROMSIZE_LARGE = 15360
|
---|
| 144 | }}}
|
---|
| 145 |
|
---|
| 146 | These are the only parts in the makefile that you need to edit. The defines tell what modules are included in what builds.
|
---|
| 147 |
|
---|
| 148 | DEFINES_COMMON define the modules that are included in all builds.
|
---|
| 149 |
|
---|
| 150 | DEFINES_XT, DEFINES_XTPLUS and DEFINES_AT define what modules are included in the 8k XT/XT+ and AT builds in addition to the ones in DEFINES_COMMON.
|
---|
| 151 |
|
---|
| 152 | DEFINES_XT_LARGE, DEFINES_XTPLUS_LARGE and DEFINES_AT_LARGE are for large builds (15k by default).
|
---|
| 153 |
|
---|
| 154 | Finally there are DEFINES_JRIDE_8K (8k JR-IDE/ISA build) and DEFINES_386_8K (AT build for 386+ with VLB controller support).
|
---|
| 155 |
|
---|
| 156 | If you want to make your own 8k AT build, modify DEFINES_COMMON and DEFINES_AT to include the modules you want. Then rebuild with _mingw32-make all_ or _mingw32-make checksum_.
|
---|
| 157 |
|
---|
| 158 | One more thing you might want to change is the size of large build. It is 15k by default (15360 bytes). If you want 16k binary, set ROMSIZE_LARGE to 16384. For 32k build set it to 32768.
|
---|
| 159 |
|
---|
| 160 |
|
---|
[388] | 161 | ----
|
---|
[381] | 162 | = Building Configurator (XTIDECFG.COM) =
|
---|
| 163 |
|
---|
| 164 | You should always use up to date configurator but note that configurator usually lags behind XTIDE Universal BIOS when new features are concerned.
|
---|
| 165 |
|
---|
[384] | 166 | Go to _XTIDE_Universal_BIOS_Configurator_v2_ folder and write _mingw32-make all_ to build the XTIDECFG.COM. You should write _mingw32-make release_ if you installed UPX.
|
---|
[381] | 167 |
|
---|
[384] | 168 | Again you will find the binaries in _build\_ folder.
|
---|