Commit Graph

312 Commits

Author SHA1 Message Date
Byron Lathi
5e03795c09 Get something simulated
Infinite loop being caused somewhere
2023-09-21 23:22:17 -07:00
Byron Lathi
1f503b2d80 update sim environment 2023-09-21 20:35:52 -07:00
Byron Lathi
e50203dd3e Add generic SDR 2023-09-21 19:23:31 -07:00
Byron Lathi
d37e32ec64 Add sim cpu 2023-09-18 23:27:54 -07:00
Byron Lathi
b30e4c73fb Merge branch '22-organize-project-better' into 'master'
Resolve "Organize Project Better"

Closes #22

See merge request bslathi19/super6502!22
2023-09-19 02:57:26 +00:00
Byron Lathi
c466c62969 Resolve "Organize Project Better" 2023-09-19 02:57:26 +00: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
1d5215187e Merge branch 'kernel_crashing' into 'master'
Kernel crashing

Closes #6

See merge request bslathi19/super6502!20
2023-08-26 23:15:37 +00: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
3487f35af8 Merge branch 'bios' into 'master'
#4 Load entire kernel into memory

See merge request bslathi19/super6502!19
2023-08-26 15:14:25 +00: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
155b2c2972 Merge branch 'bios' into 'master'
Link bootloader with bios to get access to symbols

See merge request bslathi19/super6502!18
2023-08-24 04:15:04 +00: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
5128fe64b6 Merge branch 'spi_master' into 'master'
add spi controller and sd asm code.

See merge request bslathi19/super6502!17
2023-07-29 22:32:21 +00: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