Commit Graph

489 Commits

Author SHA1 Message Date
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
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
Byron Lathi
1c693b029d readres3 assembly rewrite 2023-07-23 18:25:29 -07:00
Byron Lathi
028a431189 readres2 and readbytes assembly rewrite 2023-07-23 18:00:22 -07:00
Byron Lathi
2ef463846f Consolidate another res1 function 2023-07-23 17:30:05 -07:00
Byron Lathi
60072603d9 Rewrite readRes1, consolidate res1 commands 2023-07-23 17:26:40 -07:00
Byron Lathi
709c60cf36 SD_command assembly rewrite 2023-07-23 16:25:13 -07:00
Byron Lathi
5ca5fca29b Get SD card working in SPI 2023-07-23 14:55:14 -07:00
Byron Lathi
6a1a76db35 Implement basic SPI controller 2023-07-21 23:01:37 -07:00
Byron Lathi
85f12c75f1 Start spi controller and tb 2023-07-21 22:10:39 -07:00
Byron Lathi
6706cc502e Update software to match efinix hw 2023-07-19 21:07:17 -07:00
Byron Lathi
6eeecda368 Add wait states during refresh 2023-07-19 21:06:54 -07:00
Byron Lathi
21e3a477c1 Update IP 2023-07-19 21:06:20 -07:00
Byron Lathi
2f11808f11 Change to simpler rom 2023-01-13 13:07:13 -06:00
Byron Lathi
7682dffe3c Change test program to use correct args
Seems to work, when you run the test program it resets the card and
sends the voltage and test pattern, and it does receive a response from
the card.
2023-01-12 21:45:13 -06:00
Byron Lathi
98c07b59b4 Add files from previous version 2023-01-12 17:06:25 -06:00
Byron Lathi
3ff6205e93 Add weak pull up (NEED STRONGER PULLUP)
weak pullup is enabled, but these are only about 40k when 10k is needed.
I added two 10k resistors to the board.
2023-01-12 17:05:06 -06:00
Byron Lathi
519cd19739 Add uart2 test program
Reads input from uart and then writes it back out again immediately.
2023-01-12 14:05:13 -06:00
Byron Lathi
d5bccd46e3 Add write flag and reset logic for read flag 2023-01-12 14:04:44 -06:00
Byron Lathi
ab46236816 First throw at UART. 2023-01-12 13:34:46 -06:00
Byron Lathi
7e97784992 Create UART and uart_wrapper 2023-01-11 21:16:16 -05:00
Byron Lathi
2f37965464 Add labels for sd mode 2023-01-10 16:58:08 -06:00
Byron Lathi
b5fc0587ac Add labels on fpga side 2023-01-10 16:55:14 -06:00