|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
.include "mmu.inc"
|
|
|
|
|
|
|
|
|
|
.export _rb_enable, _rb_disable, _rb_map_device, _rb_set_window
|
|
|
|
|
.export _rb_enable, _rb_disable, _rb_map_device, _rb_set_window, _rb_set_window_ext, _rb_disable_ext
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.segment "CODE"
|
|
|
|
@ -53,3 +53,42 @@ _rb_map_device:
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;------------------------------------------
|
|
|
|
|
; void __fastcall__ rb_set_window_ext(void* address);
|
|
|
|
|
;------------------------------------------
|
|
|
|
|
_rb_set_window_ext:
|
|
|
|
|
;switch to native 16bit
|
|
|
|
|
clc
|
|
|
|
|
.byte $FB ; XCE
|
|
|
|
|
.byte $C2, $30 ; REP #$30
|
|
|
|
|
|
|
|
|
|
; init redstone external window:
|
|
|
|
|
;.byte $A9, $00, $03 ; LDA #$0300
|
|
|
|
|
.byte $EB ; XBA
|
|
|
|
|
stx $55
|
|
|
|
|
ora $55
|
|
|
|
|
.byte $EB ; XBA
|
|
|
|
|
mmu $03
|
|
|
|
|
|
|
|
|
|
;switch to emulated 8bit
|
|
|
|
|
.byte $E2, $30 ; SEP #$30
|
|
|
|
|
sec
|
|
|
|
|
.byte $FB ;XCE
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;------------------------------------------
|
|
|
|
|
; void __inline__ rb_enable_ext(void);
|
|
|
|
|
;------------------------------------------
|
|
|
|
|
_rb_enable_ext:
|
|
|
|
|
mmu $04
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;------------------------------------------
|
|
|
|
|
; void __inline__ rb_enable_ext(void);
|
|
|
|
|
;------------------------------------------
|
|
|
|
|
_rb_disable_ext:
|
|
|
|
|
mmu $84
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|