of816/platforms/Neon816/romboot.s

49 lines
1.5 KiB
ArmAsm
Raw Normal View History

2021-07-30 04:07:55 +00:00
.p816
2019-12-05 05:18:42 +00:00
.a16
.i16
.include "macros.inc"
.include "./Neon816-hw.inc"
.segment "ROMBOOT"
.proc romboot
2021-07-30 04:07:55 +00:00
; Go full native mode
2019-12-05 05:18:42 +00:00
clc
xce
rep #SHORT_A|SHORT_I
.a16
.i16
lda #$01FF
tcs
2021-07-30 04:07:55 +00:00
; Set up MMU for bank 0 - map all but the top 4K to bank $80,
; leaving the top (MMU) page for ROM
2019-12-05 05:18:42 +00:00
ldx #$001C
lda #$8000
: sta f:NeonMMU,x
dex
dex
bpl :-
2021-07-30 04:07:55 +00:00
jml f:Neon_ROM ; assume main firmware starts at $200000
2019-12-05 05:18:42 +00:00
.endproc
.segment "VECTORS"
.proc vectors
; native mode vectors
.word $FFFF ; FFE0 - reserved
.word $FFFF ; FFE2 - reserved
.word $FFFF ; FFE4 - COP
2021-07-30 04:07:55 +00:00
.word .loword(romboot) ; FFE6 - BRK - handle like reset for now
2019-12-05 05:18:42 +00:00
.word $FFFF ; FFE8 - ABORT
.word $FFFF ; FFEA - NMI
.word $FFFF ; FFEC - reserved
.word $FFFF ; FFEE - IRQ
; emulation mode vectors
.word $FFFF ; FFF0 - reserved
.word $FFFF ; FFF2 - reserved
.word $FFFF ; FFF4 - COP
.word $FFFF ; FFF6 - reserved
.word $FFFF ; FFF8 - ABORT
.word $FFFF ; FFFA - NMI
.word .loword(romboot) ; FFFC - RESET
2021-07-30 04:07:55 +00:00
.word .loword(romboot) ; FFFE - IRQ/BRK - handle like reset for now
2019-12-05 05:18:42 +00:00
.endproc