|
| 1 | +# XTMax Device Drivers |
| 2 | + |
| 3 | +## BIOS Extension ROM for SD Card (BootROM) |
| 4 | + |
| 5 | +The XTMax maps a BIOS Extension ROM at address 0xCE000-0xCE7FF, plus a bank of registers at address 0xCE800-0xCEFFF. |
| 6 | + |
| 7 | +The BIOS Extension ROM presents the SD Card on the Teensy as a fixed disk drive that can be used for booting and/or for |
| 8 | +storage in MS-DOS and other operating systems using INT13h fixed disk services (note: OS/2 does not use INT13h fixed |
| 9 | +disk services and therefore cannot use the SD Card). |
| 10 | + |
| 11 | +The ROM can be relocated by changing the address `BOOTROM_ADDR` in the [`bootrom.h`](../Code/XTMax/bootrom.h) and |
| 12 | +re-deploying the Teensy sketch. The address **must** be a multiple of 2048 bytes (2KB) and must be within the range |
| 13 | +0xC8000-DF800 (this is the range that the BIOS searches). |
| 14 | + |
| 15 | +### Preparing an SD Card for use with MS-DOS |
| 16 | + |
| 17 | +The preferred method for preparing an SD Card for use is to use the machine with the XTMax. From an MS-DOS prompt, begin |
| 18 | +with re-writing the Master Boot Record (MBR) onto the SD Card. This is needed in order to make sure that the SD Card can |
| 19 | +be used for booting. Modern devices are shipped pre-formatted with an MBR that is not compatible with older x86 |
| 20 | +micro-processors. |
| 21 | + |
| 22 | +``` |
| 23 | +A:\> FDISK /MBR |
| 24 | +``` |
| 25 | + |
| 26 | +Next, partitions can be created on the SD Card with `FDISK`. |
| 27 | + |
| 28 | +``` |
| 29 | +A:\> FDISK |
| 30 | +``` |
| 31 | + |
| 32 | +If there is another fixed disk drive, be sure to select the correct drive from the `FDISK` menu. The existing partition |
| 33 | +on the SD Card must first be deleted, before creating a new Primary Partition. **This will destroy the entire content of |
| 34 | +the SD Card**. The new Primary Partition must be set as Active if the SD Card must be used for booting. |
| 35 | + |
| 36 | +The partition on the SD Card will now appear as a new logical drive, typically `C:` or `D:` depending on availability. |
| 37 | + |
| 38 | +Finally, the partition must be formatted. Use `FORMAT` and use the `/S` switch if the SD Card must be used for booting. |
| 39 | + |
| 40 | +Note: MS-DOS will typically limit a partition size to 2GB. However, it is possible to create 3 additional Extended |
| 41 | +Partitions to increase the usage of the SD Card. These partitions will appear as new logical drives, such as `E:`, `F:`, |
| 42 | +etc... depending on availability. |
| 43 | + |
| 44 | +## MS-DOS Driver for SD Card (XTSD) |
| 45 | + |
| 46 | +This driver is provided as a back-up option for machines without support for BIOS Extension ROMs. It is based on the |
| 47 | +[SDPP](https://github.com/nilseuropa/sdpp) driver originally written by Robert Armstrong and later improved by Dan |
| 48 | +Marks. |
| 49 | + |
| 50 | +**This driver is not necessary when the BIOS Extension ROM is loaded by the BIOS during boot.** |
| 51 | + |
| 52 | +The device driver can be found here: [`XTSD.SYS`](https://raw.githubusercontent.com/MicroCoreLabs/Projects/master/XTMax/Drivers/XTSD.SYS). |
| 53 | +Once downloaded, it must be placed on a drive accessible during boot and must be invoked from `CONFIG.SYS` as shown in |
| 54 | +the example below: |
| 55 | + |
| 56 | +``` |
| 57 | +DEVICE=A:\XTSD.SYS |
| 58 | +``` |
| 59 | + |
| 60 | +When loaded, the driver will create a new logical drive for the SD Card, typically `C:` or `D:` depending on |
| 61 | +availability. |
| 62 | + |
| 63 | +### Preparing an SD Card for use with MS-DOS |
| 64 | + |
| 65 | +The SD Card can be prepared from another machine. In this example, the SD Card is prepared from a Windows 10/11 machine. |
| 66 | + |
| 67 | +Use `DISKPART`. First, use `LIST DISK` to find the disk number of the SD Card then `SELECT DISK #` with the appropriate |
| 68 | +disk number. |
| 69 | + |
| 70 | +Next, use `CLEAN` to delete all partitions. **This will destroy the entire content of the SD Card**. |
| 71 | + |
| 72 | +Finally, create a new partition with `CREATE PART PRIMARY SIZE=#` by specifying the desired partition size in MB. |
| 73 | +Depending on the version of MS-DOS on the machine that will be using the SD Card, there are limit on the size (typically |
| 74 | +2048 ie 2GB). |
| 75 | + |
| 76 | +The partition must be formatted, for example with `FORMAT #: /FS:FAT /Q`. |
| 77 | + |
| 78 | +## EMS Driver for MS-DOS (XTEMM) |
| 79 | + |
| 80 | +This driver provides LIM 4.0 Expanded Memory (EMS) through the [PSRAM](https://www.pjrc.com/store/psram.html) on the |
| 81 | +Teensy. It is based on the LoTech [`LTEMM.EXE`](https://www.lo-tech.co.uk/wiki/LTEMM.EXE) driver and inspired by work by |
| 82 | +Alex Tsourikov and Michael Karcher. Note that while the driver is compliant with EMS 4.0, it does not support memory |
| 83 | +back-filling. |
| 84 | + |
| 85 | +The device driver can be found here: [`XTEMM.EXE`](https://raw.githubusercontent.com/MicroCoreLabs/Projects/master/XTMax/Drivers/XTEMM.EXE). |
| 86 | +Once downloaded, it must be placed on a drive accessible during boot and must be invoked from `CONFIG.SYS` as shown in |
| 87 | +the example below: |
| 88 | + |
| 89 | +``` |
| 90 | +DEVICE=A:\XTEMM.EXE /N |
| 91 | +``` |
| 92 | + |
| 93 | +The address of the memory window used by the EMS driver is 0xD0000-0xDFFFF by default and can be changed with the `/P` |
| 94 | +argument. For example, to use segment 0xE000 (mapping to 0xE0000-0xEFFFF), the syntax is as follows: |
| 95 | + |
| 96 | +``` |
| 97 | +DEVICE=A:\XTEMM.EXE /P:E000 /N |
| 98 | +``` |
| 99 | + |
| 100 | +## UMB Driver for MS-DOS (XTUMBS) |
| 101 | + |
| 102 | +This driver provides Upper Memory Blocks (UMBs) in unused regions of the Upper Memory Area (UMA). It is based on the |
| 103 | +`USE!UMBS` driver originally written by Marco van Zwetselaar and later rewritten by Krister Nordvall and published on |
| 104 | +the [VCFED forum](https://forum.vcfed.org/index.php?threads/loading-dos-high-on-a-xt.32320/). |
| 105 | + |
| 106 | +The device driver can be found here: [`XTUMBS.SYS`](https://raw.githubusercontent.com/MicroCoreLabs/Projects/master/XTMax/Drivers/XTUMBS.SYS). |
| 107 | +Once downloaded, it must be placed on a drive accessible during boot and must be invoked from `CONFIG.SYS` as shown in |
| 108 | +the example below: |
| 109 | + |
| 110 | +``` |
| 111 | +DEVICE=A:\XTUMBS.SYS D000-E000 |
| 112 | +``` |
| 113 | + |
| 114 | +In the example above, the memory region at 0xD0000-0xDFFFF will be used as an UMB. **Care must be taken to not conflict |
| 115 | +with other memory regions used by periperals or other drivers.** For example, the region at 0xD0000 may also be used |
| 116 | +by the EMS driver, and both drivers shall not be configured to conflict with each other. |
| 117 | + |
| 118 | +The XTMax can create UMBs at any address within the 0xA0000-0xEFFFF range. The only restriction is that the address and |
| 119 | +size of the UMB must be a multiple of 2048 bytes (2KB). |
| 120 | + |
| 121 | +The `XTUMBS` driver can accept several ranges for UMBs, as shown in the example below with two distinct ranges: |
| 122 | + |
| 123 | +``` |
| 124 | +DEVICE=A:\XTUMBS.SYS A000-B000 D000-E000 |
| 125 | +``` |
| 126 | + |
| 127 | +**Note that the XTMax only enables RAM for the UMBs upon loading the `XTUMBS` driver. Therefore, tools such as |
| 128 | +[`TEST!UMB.EXE](https://raw.githubusercontent.com/MicroCoreLabs/Projects/master/XTMax/Drivers/TEST!UMB.EXE) cannot be used to |
| 129 | +identify available UMBs.** Instead, the user must identify the unavailable ranges (such as video RAM or ROMs) with tools |
| 130 | +like CheckIt! and determine which ranges are safe to use as UMBs. |
0 commit comments