SXB: support rom loader as system fcode

This commit is contained in:
mgcaret 2019-07-13 01:15:12 -07:00
parent 77ed386fdd
commit a958087c59
3 changed files with 22 additions and 2 deletions

View File

@ -1 +1,5 @@
; Should we inclide the romloader in $SXB-ROMLDR
.define romloader_as_word 0
; Should we instead put it in the FCode to install at startup?
.define romloader_at_init 1

View File

@ -260,12 +260,28 @@ wait: phx ; note 8-bit mode!
jmp _sf_success
.endproc
.proc _sf_fcode ; none for now
.proc _sf_fcode
.if include_fcode
ldy #.loword(list)
lda #.hiword(list)
.else
lda #$0000
tay
.endif
plx
jsr _pushay
jmp _sf_success
.if include_fcode
list:
.if romloader_at_init
.dword romldr
.endif
.dword 0
.if romloader_at_init
romldr: PLATFORM_INCBIN "fcode/romloader.fc"
.endif
.endif
.endproc
; SXB really can't do this when ROM is banked out. Maybe restart Forth instead?

View File

@ -44,7 +44,7 @@ dword dCPU_HZ,"$CPU_HZ"
FCONSTANT cpu_clk
eword
.if include_fcode ; SXB stuff, should do different
.if include_fcode && romloader_as_word ; SXB stuff, should do different
dword SXB_ROMLDR,"$SXB-ROMLDR"
ENTER
ONLIT :+