SchOS/boot/bios
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz 8b52782b75 boot: pick a resolution with R, instead of hardcoding 800x600
The VBE mode was the literal 0x143 in stage2.S, so 800x600 was the only
resolution the system could ever have. Real mode is the only place this
can be chosen: setting a mode is INT 10h, stage2main.c already runs in
protected mode, and the kernel has no modeset path -- so whatever is
picked here is what the framebuffer, the console and Schcom all get.

Press R at the prompt within two seconds for 800x600, 1024x768 or
1280x1024. It boots on its own otherwise: a loader that waits for a
keypress is a machine that does not come back up after a power cut.

The depth is checked before the mode is set, and that is not belt and
braces. 0x146 was in the table as 1600x1200x32 and this VBE returns
320x200x8 for it -- a mode the BIOS accepts, so an error return never
happens. It boots and then everything above renders garbage, because the
console, the fbdev ioctls and the compositor all assume 32bpp. Only
numbers verified to come back as the advertised size at 32bpp are listed
now, and anything else falls back to 800x600.

Verified by driving the monitor's sendkey: 1, 2 and 3 come up at
800x600, 1024x768 and 1280x1024 respectively, all reaching schinit, and
no key at all still gives 800x600. bootcheck 108 [ok], schcom-test
passes.

Typing an arbitrary size is the obvious next step and deliberately not
guessed at here: it wants enumerating the BIOS's own mode list
(INT 10h AX=4F00) and matching on width and height, which would replace
the magic numbers rather than add more of them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 04:47:27 +02:00
..
bootasm.S boot: separate BIOS from UEFI 2026-08-09 16:00:03 +02:00
cdboot.S boot: separate BIOS from UEFI 2026-08-09 16:00:03 +02:00
stage2.S boot: pick a resolution with R, instead of hardcoding 800x600 2026-08-10 04:47:27 +02:00
stage2main.c boot: separate BIOS from UEFI 2026-08-09 16:00:03 +02:00