powerpc-ofw-boot/loader/load.fth

30 lines
929 B
Forth
Raw Normal View History

2021-09-30 02:19:50 +00:00
." powerpc-ofw-boot : Booting through OpenFirmware..." cr
\ storing 0xBE for beige, 0x5A for mac99
2021-09-30 14:59:48 +00:00
\ cannot use superior, inferior, different symbols (bootinfo.txt)
: sup - dup abs = ;
: inf dup sup 1 + ;
: diff = if 0 else -1 then ;
: fba frame-buffer-adr ;
: beige-vram 80000000 ; : mac99-vram 81000000 ;
2021-10-10 18:34:51 +00:00
: hardware-error ." Hardware not supported." ;
2021-09-30 14:59:48 +00:00
2022-01-01 02:46:13 +00:00
fba beige-vram = if ." Beige hardware detected" cr 0BE beige-vram c! then
fba mac99-vram = if ." mac99 hardware detected" cr 05A mac99-vram c! then
2022-01-01 03:21:12 +00:00
2022-01-01 02:46:13 +00:00
fba beige-vram = if screen-width 4 beige-vram + l! then
fba beige-vram = if screen-height 8 beige-vram + l! then
2021-09-30 14:59:48 +00:00
2022-01-01 02:46:13 +00:00
fba mac99-vram = if screen-width 4 mac99-vram + l! then
fba mac99-vram = if screen-height 8 mac99-vram + l! then
variable run
-1 run !
fba beige-vram diff fba mac99-vram diff and if hardware-error cr 0 run ! then
2021-09-30 14:59:48 +00:00
run @ 0 = if 1 0 do 0 +loop then
2022-01-01 13:20:19 +00:00
." Running Game of Life: " cr
2021-09-30 02:19:50 +00:00
boot hd:,\boot\kernel.elf
2022-01-01 02:46:13 +00:00