mirror of
https://github.com/irmen/prog8.git
synced 2024-09-08 10:55:08 +00:00
commander-x16 prototype board #2 (rom v39+) address changes
This commit is contained in:
parent
6aa0f5a392
commit
ec60cad8bb
@ -172,7 +172,7 @@ cx16 {
|
|||||||
|
|
||||||
; I/O
|
; I/O
|
||||||
|
|
||||||
const uword via1 = $9f60 ;VIA 6522 #1
|
const uword via1 = $9f00 ;VIA 6522 #1
|
||||||
&ubyte d1prb = via1+0
|
&ubyte d1prb = via1+0
|
||||||
&ubyte d1pra = via1+1
|
&ubyte d1pra = via1+1
|
||||||
&ubyte d1ddrb = via1+2
|
&ubyte d1ddrb = via1+2
|
||||||
@ -190,7 +190,7 @@ cx16 {
|
|||||||
&ubyte d1ier = via1+14
|
&ubyte d1ier = via1+14
|
||||||
&ubyte d1ora = via1+15
|
&ubyte d1ora = via1+15
|
||||||
|
|
||||||
const uword via2 = $9f70 ;VIA 6522 #2
|
const uword via2 = $9f10 ;VIA 6522 #2
|
||||||
&ubyte d2prb = via2+0
|
&ubyte d2prb = via2+0
|
||||||
&ubyte d2pra = via2+1
|
&ubyte d2pra = via2+1
|
||||||
&ubyte d2ddrb = via2+2
|
&ubyte d2ddrb = via2+2
|
||||||
@ -208,6 +208,11 @@ cx16 {
|
|||||||
&ubyte d2ier = via2+14
|
&ubyte d2ier = via2+14
|
||||||
&ubyte d2ora = via2+15
|
&ubyte d2ora = via2+15
|
||||||
|
|
||||||
|
&ubyte ym2151adr = $9f40
|
||||||
|
&ubyte ym2151dat = $9f41
|
||||||
|
|
||||||
|
const uword extdev = $9f60
|
||||||
|
|
||||||
|
|
||||||
; ---- Commander X-16 additions on top of C64 kernal routines ----
|
; ---- Commander X-16 additions on top of C64 kernal routines ----
|
||||||
; spelling of the names is taken from the Commander X-16 rom sources
|
; spelling of the names is taken from the Commander X-16 rom sources
|
||||||
@ -294,16 +299,14 @@ romsub $fecc = monitor() clobbers(A,X,Y)
|
|||||||
inline asmsub rombank(ubyte rombank @A) {
|
inline asmsub rombank(ubyte rombank @A) {
|
||||||
; -- set the rom banks
|
; -- set the rom banks
|
||||||
%asm {{
|
%asm {{
|
||||||
sta $01 ; rom bank register (new)
|
sta $01 ; rom bank register (v39+, used to be cx16.d1prb $9f60 in v38)
|
||||||
sta cx16.d1prb ; rom bank register (old)
|
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline asmsub rambank(ubyte rambank @A) {
|
inline asmsub rambank(ubyte rambank @A) {
|
||||||
; -- set the ram bank
|
; -- set the ram bank
|
||||||
%asm {{
|
%asm {{
|
||||||
sta $00 ; ram bank register (new)
|
sta $00 ; ram bank register (v39+, used to be cx16.d1pra $9f61 in v38)
|
||||||
sta cx16.d1pra ; ram bank register (old)
|
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,9 +503,7 @@ asmsub init_system() {
|
|||||||
%asm {{
|
%asm {{
|
||||||
sei
|
sei
|
||||||
cld
|
cld
|
||||||
;stz $00
|
stz $01 ; select rom bank 0 (enable kernal)
|
||||||
;stz $01
|
|
||||||
;stz d1prb ; select rom bank 0 (enable kernal)
|
|
||||||
lda #$80
|
lda #$80
|
||||||
sta VERA_CTRL
|
sta VERA_CTRL
|
||||||
jsr c64.IOINIT
|
jsr c64.IOINIT
|
||||||
@ -707,8 +708,7 @@ sys {
|
|||||||
; Soft-reset the system back to Basic prompt.
|
; Soft-reset the system back to Basic prompt.
|
||||||
%asm {{
|
%asm {{
|
||||||
sei
|
sei
|
||||||
stz $01 ; bank the kernal in (new rom bank register)
|
stz $01 ; bank the kernal in
|
||||||
stz cx16.d1prb ; bank the kernal in (old rom bank register)
|
|
||||||
jmp (cx16.RESET_VEC)
|
jmp (cx16.RESET_VEC)
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user