commit 648f6ff0f4a02e2f4e1af7e0c9f850f26d8e128e
parent e4bd0fb8d773ecd3e028117952749c5a9d47a93c
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Sun, 29 Jan 2023 17:12:28 -0500
home update
Diffstat:
4 files changed, 20 insertions(+), 42 deletions(-)
diff --git a/fs/home/init.fs b/fs/home/init.fs
@@ -1,43 +1,39 @@
-\ Initialization for PC
: ARCH S" i386" ;
f<< /drv/pc/acpi.fs
-\ Serial communication
f<< /drv/pc/com.fs
f<< /sys/grid.fs
f<< /drv/pc/vga.fs
VgaGrid :new ' grid rebind
grid :self dup to console writeio to stdio writeio
+f<< /drv/pc/ps28042p.fs
+f<< /sys/kbd.fs
+f<< /sys/ps2.fs
+' 8042kbd@? ' (ps2@?) realias
+' ps2keyset1? ' key? realias
+'X' emit key value bootchoice
+bootchoice 'b' = [if] f<< /home/init3.fs \s [then]
+
f<< /drv/pc/pci.fs
-\ IDE boot drive
f<< /drv/pc/ata.fs
ATA0:0 ATADrive :reset drop ATA0:0 bootfs to Filesystem drv
f<< /drv/pc/pic.fs
pic$ idt$
-f<< /sys/kbd.fs
f<< /sys/mouse.fs
f<< /drv/pc/ps28042.fs
-f<< /sys/ps2.fs
8042ps2$
' 8042kbd@? ' (ps2@?) realias
-' ps2keyset1? ' key? realias
-'X' emit key 'a' = [if] f<< /home/init2.fs \s [then]
+bootchoice 'a' = [if] f<< /home/init2.fs \s [then]
f<< fs/fat.fs
-8042mouse$
-PS2Mouse :new ' mouse rebind
-640 480 4 mouse :configure
-
f<< /sys/loop.fs
f<< /drv/pc/a20.fs
a20$
f<< /sys/scratch.fs
-f<< /sys/screen.fs
-?f<< /sys/scratch.fs
f<< /lib/fmt.fs
f<< /lib/diag.fs
f<< /sys/rdln.fs
diff --git a/fs/home/init2.fs b/fs/home/init2.fs
@@ -1,34 +1,10 @@
." alternate!\n"
-f<< fs/fat2.fs
-
-8042mouse$
-PS2Mouse :new ' mouse rebind
-640 480 4 mouse :configure
+f<< fs/fat.fs
f<< /sys/loop.fs
-f<< /drv/pc/a20.fs
-a20$
-f<< /sys/scratch.fs
-f<< /sys/screen.fs
-f<< /drv/pc/vesa.fs
-VESA1Screen :new ' screen rebind
-
-?f<< /gr/cursor.fs
-screen :self Cursor :new structbind Cursor cursor
-0 value hidemousecursor
-: mousemove ( -- )
- mouseupdate screen :activated? if
- hidemousecursor not if mouse :x mouse :y cursor :move then
- else
- mouse :x 16 lshift mouse :y or grid :dbgnum1!
- mouse buttons grid :dbgnum2! then ;
-\ Common part of init.fs. Machine-independent
-\ As a user, you'll want to adapt this to your needs.
-?f<< /sys/scratch.fs
f<< /lib/fmt.fs
f<< /lib/diag.fs
-f<< /sys/rdln2.fs
+f<< /sys/rdln.fs
f<< /text/pager.fs
-\ we don't automatically call spager$ in init because of automated tests,
-: init S" Dusk OS\n" stype .free rdln$ stdio$ quit ;
+: init S" Dusk OS\n" stype .free rdln$ stdio$ spager$ quit ;
diff --git a/fs/home/init3.fs b/fs/home/init3.fs
@@ -0,0 +1,5 @@
+." bare!\n"
+f<< /lib/fmt.fs
+f<< /lib/diag.fs
+f<< /sys/rdln.fs
+: init S" Dusk OS\n" stype .free rdln$ stdio$ quit ;
diff --git a/fs/xcomp/i386/pc/build.fs b/fs/xcomp/i386/pc/build.fs
@@ -14,10 +14,11 @@ here org - value kernellen
org value kernel
: createFAT ( drv clustercnt -- fat )
- \ We need to reserve (56) enough sectors for MBR + pc.bin
to fatopts clustercnt ( drv )
16 to fatopts rootentsec
- 56 to fatopts rsvdsec
+ \ 59 sectors is the maximum that fits between $500 and $7c00. We're quite
+ \ tight on that front...
+ 59 to fatopts rsvdsec
1 to fatopts secperclus
\ By default, we generate a FAT for a hard disk.
$3f to fatopts secpertrk