Commit Graph

35 Commits

Author SHA1 Message Date
E. C. Masloch 8552d833bb boot: fix boot loader assembly listing files [fixes #97] 2024-02-18 14:20:56 -05:00
E. C. Masloch fc3032deb7 oemboot: use magic offsets macro 2024-02-18 14:20:56 -05:00
E. C. Masloch 9783ac97e0 boot32, boot32lb: mark magic offsets with macro 2024-02-18 14:20:56 -05:00
E. C. Masloch d9b0615ad5 magic: prepare for FAT32 use 2024-02-18 14:20:56 -05:00
E. C. Masloch 5a6d3a449f makefile: list magic.mac for boot 2024-02-18 14:20:56 -05:00
E. C. Masloch bcf3c1701a magic.mac: extract from boot.asm 2024-02-18 14:20:56 -05:00
E. C. Masloch 4ae6f22249 sys, boot: mark additional magic offsets 2024-02-18 14:20:56 -05:00
E. C. Masloch eb75bea6c1 boot: display new magic offset in hexadecimal 2024-02-18 14:20:56 -05:00
E. C. Masloch 4d30378bb6 boot: extract magicoffset macro 2024-02-18 14:20:56 -05:00
E. C. Masloch b5414153c6 boot: display new magic offset (but in decimal) 2024-02-18 14:20:56 -05:00
E. C. Masloch 0776645017 boot: move READBUF and READADDR_OFF/SEG to allow 8 KiB sector size 2024-02-18 14:20:56 -05:00
E. C. Masloch 5cbe1ffcf0 boot: fix and update memory layout map 2024-02-18 14:20:56 -05:00
E. C. Masloch ef10fa11e3 boot32, boot32lb: fix and update memory layout maps 2024-02-18 14:20:56 -05:00
E. C. Masloch 2aa51a1992 boot: move cluster list to 1FE0h:2200h (128 KiB file, up to /L 0x200)
1FE0h:2200h happens to be linear 22000h. Like the memory map
update to the FAT32 loaders for #127 this allows to load a
file of up to 128 KiB (rounded to cluster size) with an /L
parameter for SYS of up to 0x200.
2024-02-18 14:20:56 -05:00
E. C. Masloch 4682e23b57 boot: rename FATBUF to CLUSTLIST to better reflect use (oemboot pick) 2024-02-18 14:20:56 -05:00
E. C. Masloch 9ac407ae63 boot32, boot32lb: avoid big file overlap with FAT sector [fixes #127] 2024-02-18 14:20:56 -05:00
E. C. Masloch 42d3ae6aac boot32, boot32lb: fix EDR-DOS incompatibility [fixes #119] 2024-02-03 20:55:57 -05:00
E. C. Masloch 53d3fd556b boot32: display an error indicator instead of silently waiting 2024-02-03 20:55:57 -05:00
E. C. Masloch a189ceb650 boot32: comment out unused print function 2024-02-03 20:55:57 -05:00
E. C. Masloch 630735e14a boot32: save another byte, use loop instruction 2024-02-03 20:55:57 -05:00
E. C. Masloch 3415ad93c9 boot32: fix very old bug, init high byte of fat_secshift
It turned out that this loader was severely broken for many years,
at least since 2012 (the git repo's creation). This variable was
read as a word to set cx for a loop, but only the low byte had
been written. The high byte happened to be 0EEh so cn_loop would
always zero out the FAT sector to read.

This _happened_ to work if the first root directory cluster and
all the kernel file clusters were all referenced in the first
sector of the FAT. Otherwise it would blow up.
2024-02-03 20:55:57 -05:00
E. C. Masloch 52136b27d6 boot32: optimise read sector increment to prepare for DL patch 2024-02-03 20:55:57 -05:00
Kenneth J Davis 600192784b
add back building boot files with extra defines but use explicitly specified values instead of generic NASMFLAGS so flags used for other assembly files does not effect building 2023-12-18 17:25:15 -05:00
Kenneth J Davis f666ac9804
revert changes to boot/makefile; introduces additional command line flags that may break build on different platforms 2023-12-17 22:20:21 -05:00
Kenneth J Davis b79f0003ac
only create list file if requested, avoids error due to duplicated command line option for generating list file 2023-12-17 22:10:32 -05:00
Kenneth J Davis 5880d36ba9
add ability to adjust verboseness of messages during booting 2023-12-08 18:08:11 -05:00
C. Masloch 2efe4ab9f4 boot: enable loading from file systems with 256 sectors per cluster
This should be Enhanced DR-DOS compatible.

oemboot.asm contains an optimisation to save 2 bytes,
by using mov instead of a lea with bp evaluating to
a constant value. This was needed to fit the addition
for 256 spc support. It is otherwise unrelated.

The LBA detection patch offsets in SYS have also been
updated to match the changed boot.asm offsets.
2023-01-04 19:38:57 -05:00
C. Masloch 858934f152 boot, oemboot: fix to abort properly on file not found
Prior to this commit the first cluster specified from the last
compared directory entry would be used if the file is not found.
Fix the wrong (boot.asm) or missing (oemboot.asm) jump to the
error handler so that on file not found an error is displayed.

Reference: https://sourceforge.net/p/freedos/bugs/97/
"Bugs in FAT12/16 boot sector loaders if file not found"
This commit fixes the most crucial bug of this 2012-09-27 report.
2021-07-29 17:19:45 -04:00
C. Masloch f267341281 oemboot: optimise FAT12 entry loading (picked from lDOS boot)
This way of clearing the upper 4 bits of even FAT entries
saves a byte compared to the prior way. (The next commit
needs one more byte than was previously left over.)

Reference: https://hg.pushbx.org/ecm/ldosboot/file/410b870c0222/boot.asm#l1629
2021-07-29 17:19:45 -04:00
C. Masloch 4c2bda46b2 boot: put placeholder LBA_TEST_OFFSET if no ISFATx define 2021-07-29 17:19:45 -04:00
Kenneth J Davis 49d3c8d76b add safety check to FAT12/16 boot sector to warn about breaking sys, update new offset in sys.c for NOPing out use of BIOS boot drive during boot (fix error about boot sector unsupported format) 2021-05-11 21:39:29 -04:00
C. Masloch 92ae538f1d boot: allow instsect to match the filesystem ID string
Reference: https://hg.ulukai.org/ecm/instsect/file/33218c729b43/instsect.asm#l1257

lDOS's instsect recently started to default to checking
the filesystem ID string in order to validate that the
boot sector loader to write matches the detected FS.
Using the /S=filename option or building instsect to
include the FreeDOS kernel's loaders would require use
of the /SN switch without this commit.

In addition, boot.asm and oemboot.asm are made to check
that exactly one of the ISFAT12 and ISFAT16 defs is
defined so as to select the FS. Prior to this commit
using both or neither def would silently result in a
broken loader.
2020-11-28 12:11:16 -05:00
C. Masloch 977023f85c boot: fix Int10.0E expected not to alter al (SBC188)
Reference: https://www.bttr-software.de/forum/forum_entry.php?id=16934

The SBC188 video ROM-BIOS handling returns with al=0Ah (LF)
upon interrupt 10h function 0Eh calls that scroll the screen.
This made the FAT12 boot loader crash when booting FreeDOS
off a 1440 KiB diskette. While a fix is expected from their
side too, hardening the loader too is the right thing to do.

With the way this fix is implemented by this commit, it only
needs one additional byte for the loader. The error message
changes from "Error!." to just "Error!", other than
that the behaviour is the same.

The FAT32 loaders already used zero-terminated strings and
thus were not affected by the dependence.
2020-09-18 13:37:49 -04:00
Bart Oldeman d7a05ab6cd For GCC builds use GNU make instead of wmake throughout.
This eliminates all build-dependencies on Open Watcom.
2018-01-11 17:50:31 -05:00
KJD c431157156 FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00