Commit Graph

207 Commits

Author SHA1 Message Date
Byron Lathi
6a684f62f8 Remove another wait, update sd emulator 2023-10-04 20:24:56 -07:00
Byron Lathi
019b9c8120 Update sd, remove wait state 2023-10-04 19:11:45 -07:00
Byron Lathi
3a211faed7 Don't have sd wait in simulation
need to figure out how to set that RTL_SIM flag only when we are
compiling code for the sim

also bro the sim is like 8000x slower than irl.
2023-09-30 17:40:01 -07:00
Byron Lathi
d3d3fea916 Resolve "Use dependencies instead of makefile chaining" 2023-09-30 04:16:52 +00:00
Byron Lathi
85f53816f9 Remove unneeded CR 2023-09-27 23:03:22 -07:00
Byron Lathi
915188e8f1 New test program that causes the error 2023-09-26 18:23:01 -07:00
Byron Lathi
3fcfa4d3ac Add REPO_TOP env var 2023-09-24 10:35:17 -07:00
Byron Lathi
9bd031e35e Add support for test programs 2023-09-24 10:29:32 -07:00
Byron Lathi
a770d938de Copy bios device functions to kernel 2023-09-04 14:31:55 -07:00
Byron Lathi
791bffb248 Add copy data back 2023-09-04 14:08:52 -07:00
Byron Lathi
15b7d50a30 Fix zerobss bug
Well, not really fix but problem is avoided for now
2023-09-01 21:49:36 -07:00
Byron Lathi
b2b3b84bc4 Kernel crashing 2023-08-26 23:15:36 +00:00
Byron Lathi
eba24c2990 Disable inits which fail 2023-08-26 13:42:06 -07:00
Byron Lathi
0dfe8ae584 Remove init code to get kernel to run 2023-08-26 13:17:12 -07:00
Byron Lathi
0247565f49 Get super simple kernel code running 2023-08-26 13:09:02 -07:00
Byron Lathi
d2700a64fb Read entire file into memory 2023-08-26 08:10:20 -07:00
Byron Lathi
4b2b1a425e Parse options properly 2023-08-25 21:26:28 -07:00
Byron Lathi
a971e7a717 Start reading options 2023-08-25 20:03:03 -07:00
Byron Lathi
21b456067a Read text and data offset/length 2023-08-25 19:22:21 -07:00
Byron Lathi
becc9094c8 Don't save segments as separate files 2023-08-23 21:12:15 -07:00
Byron Lathi
eb72e83629 Use old offset calculation, save ptr3
Looks like cprintf modifies ptr3, so make sure to save it if you are
calling that.

There also may have been an issue with how the previous sector address
was calculated, the one which does not account for carries seems to
work.
2023-08-23 20:48:57 -07:00
Byron Lathi
8273e01ad8 Read size of file in sectors 2023-08-23 20:45:09 -07:00
Byron Lathi
9b1576774b Factor out relocation code into method 2023-08-23 19:52:11 -07:00
Byron Lathi
cc1d8d2015 Update o65dump to show reloc and undef symbols 2023-08-23 00:11:57 -07:00
Byron Lathi
8bccfed867 Change segment order to make o65 layout valid
VECTORS was messing things up
2023-08-22 20:49:07 -07:00
Byron Lathi
c5b1a47c8e start o65dump.py 2023-08-22 19:27:26 -07:00
Byron Lathi
9972f8cb36 Update order for kernel segments 2023-08-22 19:27:09 -07:00
Byron Lathi
851c26e4dd Print out filenames as we read them 2023-08-21 20:02:57 -07:00
Byron Lathi
de9353a009 Find kernel in second stage bootloader 2023-08-21 19:33:52 -07:00
Byron Lathi
906516c4b5 Add comments and use less magic 2023-08-15 23:06:10 -07:00
Byron Lathi
68ff523b10 Use actual values from sd card 2023-08-15 19:30:11 -07:00
Byron Lathi
dfdb41a875 Automatically copy rom image and warn about rebuild 2023-08-14 23:44:51 -07:00
Byron Lathi
a657957ae2 Load a multi-sector file and execute it 2023-08-14 20:44:27 -07:00
Byron Lathi
3bd022107e Read start cluster 2023-08-14 20:21:03 -07:00
Byron Lathi
937a04c891 Remove some debug info 2023-08-12 19:16:46 -07:00
Byron Lathi
053b0d7e3e Find bootloader in FAT 2023-08-12 19:03:24 -07:00
Byron Lathi
fd9389268a Load root directory from sd card 2023-08-12 16:09:03 -07:00
Byron Lathi
7039e649bb Update cc65 2023-08-12 12:28:16 -07:00
Byron Lathi
7ad1079289 Restart kernel 2023-08-12 11:59:45 -07:00
Byron Lathi
069ae5db4b Update format script
I think there may still be some issues with a drive that is formatted
wrong, but it works consistently right now.

When modifying the boot sector, it now leaves alone the partition tables
and the bios parameter block. This does reduce the amount of code from
510 bytes to 380, but this is find as it only takes about 29 bytes to
load a sector into memory.
2023-08-09 22:46:18 -07:00
Byron Lathi
d191c1da5b Modify disk script to leave partition table intact 2023-08-08 23:52:57 -07:00
Byron Lathi
6b0caea84c Link bootloader with bios to get access to symbols
By doing this we don't need to call bios functions, we can just jsr
directly to the addresses. This does mean that everytime the bios
changes the bootloader has to change, but ideally all the bootloader
does is load the bios and then get remapped out of memory. Any important
drivers like file system can be loaded from the bootloader.

This also means that the runtime functions are located in the bios for
the bootloader, so the rom will have to stay mapped in until the kernel
is started, at which point it will have its own runtime and the rom and
bootloader are no longer needed.
2023-08-08 22:16:42 -07:00
Byron Lathi
e73c4e1d08 Rewrite readblock in assembly 2023-08-08 19:28:10 -07:00
Byron Lathi
446f4e7539 Get bios calls starting to work 2023-08-06 21:41:15 -07:00
Byron Lathi
6b42843f4b remote testing code 2023-07-31 20:03:59 -07:00
Byron Lathi
18b8ac7ccf Rename bootloader to bios, add actual bootloader 2023-07-31 19:58:32 -07:00
Byron Lathi
096472e084 Get SD card reads working 2023-07-23 22:44:19 -07:00
Byron Lathi
d16675ed3c Consolidate resp3 and resp7, fix stack issue
wasn't pushing res to stack, which makes stack pointer wrong
2023-07-23 21:45:54 -07:00
Byron Lathi
7e958c8a11 powerupseq assembly rewrite 2023-07-23 19:00:39 -07:00
Byron Lathi
8f3a1a5968 res1_cmd assembly rewrite 2023-07-23 18:43:39 -07:00