First upload. Untested software

This commit is contained in:
2026-04-08 17:02:29 +02:00
commit 9b83763318
11 changed files with 698 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
# startup.s - Baremetal startup code for Milk-V Duo
#/* Baremetal Risc-V USB <=> Amiga Joystick/Mouse HID converter.
#* March 2026 - Anders Holck
#* This software has no license. If you choose to use, please include my name :)
#*/
.section .text.startup
.global _start
_start:
# 1. Disable interrupts
csrw mie, zero
# 2. Set up stack pointer (end of SRAM)
li sp, 0x0E000000 + 128*1024
# 3. Clear BSS
la t0, _bss_start
la t1, _bss_end
bss_clear_loop:
bgeu t0, t1, bss_clear_done
sd zero, 0(t0)
addi t0, t0, 8
j bss_clear_loop
bss_clear_done:
j main
.section .text
# The main function will be in amiga_joystick_mouse.s