Commit Graph

380 Commits

Author SHA1 Message Date
Ain
da41f6b0e2 Rework early startup and fix bss memory reservation 2020-04-23 21:49:10 +02:00
Ain
4804bf28ea Place variables into area after binary 2020-04-23 21:36:20 +02:00
Ain
3619a20703 Implement some console i/o 2020-04-23 21:35:28 +02:00
Ain
035b69db10 fat.bs: Implement correctly for FAT12 2020-04-22 21:45:40 +02:00
Ain
34ef468aa9 fat.bs: Smaller BPB size when not FAT32 2020-04-22 21:45:06 +02:00
Ain
63e85af62f Fix building of hdd image 2020-04-22 21:44:43 +02:00
Ain
abc7b563cd Revamp MBR
New features:
- ES:DI (potential PnP structure) is preserved
- FAT detection now works by checking for BPB values
- Uses booterr procedure
2020-04-21 23:27:00 +02:00
Ain
bbfcd42f61 Set up interrupt table at startup directly (less code), not calling setint 2020-04-21 20:22:42 +02:00
Ain
94829aed1e qemu-hdd: Use hdd image with full partition table 2020-04-21 20:22:32 +02:00
Ain
22c1d45e59 Start document on EGA video 2020-04-20 21:41:42 +02:00
Ain
13e32675a1 Ship documentation on bios data area 2020-04-20 21:24:29 +02:00
Ain
f8788720f5 Implement int 28h: Idle callout 2020-04-20 19:21:02 +02:00
Ain
40065266f3 Implement int 29h: Fast console output 2020-04-20 19:20:43 +02:00
Ain
c5088789f9 Proof kernel against being invoked via 0x7C0:0 2020-04-19 15:14:10 +02:00
Ain
97f26c1f89 Remove stack switching, implement some syscalls 2020-04-19 00:35:31 +02:00
Ain
c1c012c5fc Make getint and setint reuse cs segment 2020-04-18 23:44:16 +02:00
Ain
4a92c4bc1e Drop MCBs as mean to manage memory 2020-04-18 22:59:46 +02:00
Ain
f7d3d5c62f Fix addressing mistake when splitting MCB 2020-04-17 23:59:57 +02:00
Ain
6d38a313c7 Implement MCB splitting 2020-04-17 23:33:42 +02:00
Ain
6c165f40c0 Create basic MCB at boot 2020-04-17 01:24:23 +02:00
Ain
70a675442a Reorder disk access and fix missing si setting 2020-04-16 23:04:06 +02:00
Ain
27e4dec580 Implement loading BPB from media 2020-04-15 23:51:07 +02:00
Ain
23ddd6b41a Implement some PoC of reading from disk 2020-04-15 00:17:58 +02:00
Ain
6b49a20865 Implement syscall subfunction jump table 2020-04-13 18:03:54 +02:00
39ef1f9a3e Implement some syscall handling 2020-04-13 13:53:21 +00:00
6ba3e0c071 Implement stack switching for dos syscall entry point 2020-04-10 15:00:26 +00:00
f46871502c Pave way for supporting FAT16 and FAT12 2020-04-06 19:20:15 +00:00
e34accfcff Improve support for auto-selecting LBA addressing 2020-04-04 21:05:44 +00:00
1c6268798c Fix rom builds 2020-04-04 21:04:36 +00:00
3b438074ef Reorder fat32 bootsector to reduce number of calls/rets 2020-04-04 16:03:02 +00:00
1e99086fc6 Add CHS+LBA dual support for boot sector 2020-04-04 14:29:33 +00:00
dc5e437c2d Revert "Remove unused stuff"
debug rom still uses printf

This reverts commit a9fa3d355e.
2020-04-04 11:41:01 +00:00
a9fa3d355e Remove unused stuff 2020-04-04 09:27:33 +00:00
91cad67415 Reboot after keypress instead of halting on boot failure 2020-04-03 19:45:49 +00:00
6eca218f8e Explain the booterr code a bit 2020-04-03 19:43:10 +00:00
3da473a00c Use optimized error handling for boot sector 2020-04-03 17:38:33 +00:00
cb48e628db kernel stub: force large size to make sure cluster chaining works 2020-04-01 13:09:01 +00:00
1981a8efba fat32 bs: use BPB include header and base off BP
We now set BP once at the start to point to the beginning of the BPB.
Encoding an direct address access can then be done relative to BP, which
saves an immediate byte per access.
2020-03-31 20:03:05 +00:00
9044e3948c Remove BASE macro and companions 2020-03-31 19:46:59 +00:00
c67894551b Use directory path for includes, make them use *.asm as extension 2020-03-31 18:43:38 +00:00
73fb2b1e81 Add include file for BPB data 2020-03-31 13:04:13 +00:00
eabb1d9fa9 Properly set up registers when chainloading from boot sector 2020-03-30 20:41:32 +00:00
bc096f41d3 Compact bootloader code 2020-03-30 19:43:07 +00:00
0b2a7e7b64 fat32 bootloader: implement directory recursing and kernel load
this is actually working now.
2020-03-30 18:50:17 +00:00
bbe006c9bc Improve FAT offset calculation 2020-03-30 15:23:51 +00:00
d718777ef6 Mark path to kernel file with +s
This is actually a much easier way to find the kernel file than comparing
filenames and helps reducing the size of the bootsector.
2020-03-30 12:35:59 +00:00
955acdacba Split code up into directories for bs and com binaries 2020-03-30 12:14:47 +00:00
5a24ceb9b8 Implement cluster chaining for FAT 2020-03-28 17:36:52 +00:00
76880e9275 Advance on bootloader: load cluster data 2020-03-25 21:19:40 +00:00
c51dca9949 add kernel stub to distfiles
this way i can test if the bootloader works as intended
2020-03-25 20:56:00 +00:00