Skip to content

ecm boot overlap#135

Merged
PerditionC merged 20 commits into
FDOS:masterfrom
ecm-pushbx:ecm-boot-overlap
Feb 18, 2024
Merged

ecm boot overlap#135
PerditionC merged 20 commits into
FDOS:masterfrom
ecm-pushbx:ecm-boot-overlap

Conversation

@ecm-pushbx
Copy link
Copy Markdown
Contributor

Several boot loader improvements:

1FE0h:2200h happens to be linear 22000h. Like the memory map
update to the FAT32 loaders for FDOS#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.
Created using this scriptlet:

sed -i -re 's/\(\(int \*\)newboot\)\[([0-9A-Fa-fxX]+)\/sizeof\(int\)\]/\*\(int \*\)\(\&newboot\[\1\]\)/g' sys/sys.c
@ecm-pushbx
Copy link
Copy Markdown
Contributor Author

Not yet included:

  • SYS should warn if /L is < 0x60 or > 0x200
  • SYS could detect kernel file (already present if /BOOTONLY or to be copied else) and cluster size and warn if load might fail
  • One of the FAT32 loaders doesn't contain a license header
  • The FAT12/FAT16 read buffer address can be accessed with +imm8 addressing now, drop the "word" to optimise this (some magic offsets will change)
  • Loaders should set up stack before relocating (magic offsets of the load segment will change)
  • Fix comments referring to 640 KiB as a kernel file size limit, this is wrong because we unconditionally relocate to 1FE0h:7C00h (27A00h) so the 640 KiB limit is not relevant
  • SYS could detect magic bytes by scanning for them rather than hardcoding magic offsets

@PerditionC PerditionC merged commit 8552d83 into FDOS:master Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants