Commit Graph

145 Commits

Author SHA1 Message Date
Nero cc3fe6c4ee kernel: fix banner printing 2020-08-27 21:01:41 +00:00
Nero f0a000b7d1 kernel: implement diskio using drive table 2020-08-27 20:52:16 +00:00
Nero fde87d651c kernel: read A: geometry from BIOS 2020-08-15 21:15:31 +00:00
Nero 626b7e5624 Add struc for disk parameter table 2020-08-15 18:30:17 +00:00
Nero 5382edc2ae Improve ordering of binary data in kernel 2020-07-04 10:35:38 +02:00
Nero f9b180ea57 Implement file descriptor table and CON as file descriptor 2020-06-28 19:01:14 +02:00
Nero 1b42f1a480 Implement calculation for FAT position 2020-05-10 16:47:48 +00:00
Nero 36f4673c91 Another attempt on disk i/o 2020-05-02 23:57:23 +02:00
Nero 404825387b mbr: make use of BPB includes 2020-04-30 20:22:14 +02:00
Nero b73bfbe043 Split out kernel components in kernel/ 2020-04-27 15:56:41 +02:00
Nero 2d949a01f8 Implement whacky first version for 25h disk read 2020-04-26 23:14:34 +02:00
Nero 43e5cd6379 Direct console input: Dont return non-ascii keypresses 2020-04-25 21:54:15 +02:00
Nero da41f6b0e2 Rework early startup and fix bss memory reservation 2020-04-23 21:49:10 +02:00
Nero 4804bf28ea Place variables into area after binary 2020-04-23 21:36:20 +02:00
Nero 3619a20703 Implement some console i/o 2020-04-23 21:35:28 +02:00
Nero 035b69db10 fat.bs: Implement correctly for FAT12 2020-04-22 21:45:40 +02:00
Nero 34ef468aa9 fat.bs: Smaller BPB size when not FAT32 2020-04-22 21:45:06 +02:00
Nero 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
Nero bbfcd42f61 Set up interrupt table at startup directly (less code), not calling setint 2020-04-21 20:22:42 +02:00
Nero f8788720f5 Implement int 28h: Idle callout 2020-04-20 19:21:02 +02:00
Nero 40065266f3 Implement int 29h: Fast console output 2020-04-20 19:20:43 +02:00
Nero c5088789f9 Proof kernel against being invoked via 0x7C0:0 2020-04-19 15:14:10 +02:00
Nero 97f26c1f89 Remove stack switching, implement some syscalls 2020-04-19 00:35:31 +02:00
Nero c1c012c5fc Make getint and setint reuse cs segment 2020-04-18 23:44:16 +02:00
Nero 4a92c4bc1e Drop MCBs as mean to manage memory 2020-04-18 22:59:46 +02:00
Nero 6c165f40c0 Create basic MCB at boot 2020-04-17 01:24:23 +02:00
Nero 70a675442a Reorder disk access and fix missing si setting 2020-04-16 23:04:06 +02:00
Nero 27e4dec580 Implement loading BPB from media 2020-04-15 23:51:07 +02:00
Nero 23ddd6b41a Implement some PoC of reading from disk 2020-04-15 00:17:58 +02:00
Nero 6b49a20865 Implement syscall subfunction jump table 2020-04-13 18:03:54 +02:00
Nero 39ef1f9a3e Implement some syscall handling 2020-04-13 13:53:21 +00:00
Nero 6ba3e0c071 Implement stack switching for dos syscall entry point 2020-04-10 15:00:26 +00:00
Nero f46871502c Pave way for supporting FAT16 and FAT12 2020-04-06 19:20:15 +00:00
Nero e34accfcff Improve support for auto-selecting LBA addressing 2020-04-04 21:05:44 +00:00
Nero 3b438074ef Reorder fat32 bootsector to reduce number of calls/rets 2020-04-04 16:03:02 +00:00
Nero 1e99086fc6 Add CHS+LBA dual support for boot sector 2020-04-04 14:29:33 +00:00
Nero 3da473a00c Use optimized error handling for boot sector 2020-04-03 17:38:33 +00:00
Nero cb48e628db kernel stub: force large size to make sure cluster chaining works 2020-04-01 13:09:01 +00:00
Nero 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
Nero 9044e3948c Remove BASE macro and companions 2020-03-31 19:46:59 +00:00
Nero eabb1d9fa9 Properly set up registers when chainloading from boot sector 2020-03-30 20:41:32 +00:00
Nero bc096f41d3 Compact bootloader code 2020-03-30 19:43:07 +00:00
Nero 0b2a7e7b64 fat32 bootloader: implement directory recursing and kernel load
this is actually working now.
2020-03-30 18:50:17 +00:00
Nero bbe006c9bc Improve FAT offset calculation 2020-03-30 15:23:51 +00:00
Nero 955acdacba Split code up into directories for bs and com binaries 2020-03-30 12:14:47 +00:00
Nero bc238a3bf9 i still dont know what im doing 2020-03-01 16:45:16 +00:00
Nero 4847eb4d88 Revert "Throw out previous x86 stuff"
This reverts commit 807db4a592.
2020-03-01 12:03:35 +00:00
Nero 807db4a592 Throw out previous x86 stuff 2019-12-22 02:52:40 +01:00
Nero eb67071ffb Ubuntu needs stdint.h for uint8_t 2019-11-24 11:28:39 +00:00
Nero af61db5e40 Improve memory position handling 2019-10-28 10:49:42 +00:00
Nero 47630b2c03 Implement boot based on reserved sectors 2019-10-28 10:38:18 +00:00
Nero f81de2bfe8 Rename kernel to bdos 2019-10-27 18:59:42 +00:00
Nero f6b8df0598 Remove misplaced data 2019-10-12 15:10:19 +00:00
Nero d1dab01633 Rename rdos.sys to rdos.bin
*.sys is meant for DOS-like driver binaries. I actually have a flat
binary with a specific load offset.
2019-09-29 21:26:59 +00:00
Nero 56f9df5773 Throw DOS api away, re-layout memory to fit CP/M model 2019-09-29 08:52:00 +00:00
Nero 80a7b03ddc Provide config file via CX (len) and BX (ptr) to kernel entry 2019-09-24 21:33:04 +00:00
Nero a4e6a943b0 Make bootloader load both kernel and kernel config 2019-09-24 21:14:29 +00:00
Nero cd7aafde09 Run kernel with from offset 0
I try to get the interrupt handlers into a offset as low as possible.
This is necessity if i want to relocate it later on its own.

For running from HMA, a minimal offset of 16 bytes would still be
necessary.
2019-09-23 22:06:29 +00:00
Nero df4d3a90e3 Use SYS extension for kernel 2019-09-23 22:05:01 +00:00
Nero 0b7d141af7 Add warning about mformat overwriting bootsector code 2019-09-23 21:19:12 +00:00
Nero 705cd5c725 Remove command line parsing from bootloader 2019-09-23 20:25:39 +00:00
Nero 54149839a3 Rename fatvbr -> fat, generalize makefile 2019-09-21 18:05:41 +00:00
Nero c70f388548 Get MBR ready, add hdimage target 2019-09-17 22:41:39 +00:00
Nero 7c4a618385 Add first attempt of a MBR 2019-09-17 21:53:10 +00:00
Nero da03aa1481 Relocate boot sector to 0x600 2019-09-16 12:05:15 +00:00
Nero fe42e9145a fatvbr: correctly setup segment registers 2019-09-15 19:49:58 +00:00
Nero bfb5b227b6 Fix cmdline setup in fatvbr 2019-09-15 17:51:44 +00:00
Nero e143159a7a Rename floppy bootsec into fatvbr, thats more accurate 2019-09-15 17:33:01 +00:00
Nero 567e09f7e9 Bootloader: parse cmdline field 2019-09-15 17:26:09 +00:00
Nero 4c9086e365 Rework bootloader to have adjustable memory layout 2019-09-14 13:18:23 +00:00
Nero 05c7e905d0 Fix copying of kernel arguments 2019-09-08 11:00:19 +00:00
Nero b6972dcc69 Fix floppy VBR: wrong stack location 2019-09-08 10:03:00 +00:00
Nero e7108f6622 Fix max argument length 126 -> 127 2019-09-08 01:05:32 +00:00
Nero d853b87ec7 Use COM-based format, get bootloader working 2019-09-08 01:04:01 +00:00
Nero 6b424844e9 Optimize fix_chs code 2019-06-24 17:05:57 +00:00
Nero 78d5b6aa28 Add prototype for serial bootloader 2019-06-24 16:47:31 +00:00
Nero 1259fe14fe Rework VBR 2019-05-19 20:07:08 +00:00
Nero c288bbffb9 Fix alignment fuckup in VBR 2019-05-07 17:50:07 +00:00
Nero 9b1c54f5d3 Disable interrupts during boot 2019-05-02 20:51:20 +00:00
Nero d8fe1b211c Change kernel blob format to be option rom compatible 2019-04-20 21:02:35 +00:00
Nero 8cdc21b596 Relocate kernel to 0x01000 per convention 2019-04-16 07:22:53 +00:00
Nero 9a6ecabfd7 vbr: now able to load first cluster 2019-03-31 20:53:14 +00:00
Nero dad80532ab Allow arbitrary floppy sizes 2019-03-31 13:22:24 +00:00
Nero 208b2f95b5 vbr: Reorder code, improve error behavior 2019-03-31 13:08:39 +00:00
Nero 6e209d9e55 vbr: reduce size for error reporting 2019-03-31 12:44:50 +00:00
Nero 9aa032a90c Rename vbr to fat12vbr 2019-03-30 12:39:53 +00:00
Nero 97fe07a210 vbr: implement file searching in rootdir 2019-03-29 23:48:18 +00:00
Nero cb3c977286 vbr: bail out on disk read error 2019-03-29 22:32:50 +00:00
Nero f70242dfa2 vbr: display drive geometry 2019-03-29 21:40:44 +00:00
Nero 6bfb0dd21e vbr: read root directory into memory 2019-03-27 23:06:13 +00:00
Nero 7492e99c3f vbr: relocate to 0x00500 2019-03-27 23:05:46 +00:00
Nero c88395c12d vbr: work in progress on block reading 2019-03-27 22:05:00 +00:00
Nero 391a1aa7d5 vbr: CHS reading seems to work so far 2019-03-26 20:46:40 +00:00
Nero 96234c2a40 vbr: Parse CHS from BIOS to optionally overwrite hardcoded CHS data 2019-03-25 22:00:07 +00:00
Nero 2229c319b6 Add first steps for VBR bootloader 2019-03-25 08:51:37 +00:00