reduce byte-wise similarity with KERNAL through use of X instead of A
This commit is contained in:
1 parent
f5c5f787a4
commit
a311c08289
2 files changed
+26
-15
No files matched your search
+14
-11
@@ -40,17 +40,20 @@ ramtas_l2:
|
||||
STA $DD00
|
||||
|
||||
;; Set screen address pointer ("Compute's Mapping the 64" p238)
|
||||
LDA #>$0400
|
||||
STA HIBASE
|
||||
;; This is obvious boiler plate containing no creative input, but to avoid
|
||||
;; unnecessarily similarity to the C64 KERNAL, we use X instead of A to do this,
|
||||
;; and several following
|
||||
LDX #>$0400
|
||||
STX HIBASE
|
||||
|
||||
;; Work out RAM size and put in MEMSTR and MEMSIZ
|
||||
;; "Compute's Mapping the 64", p54
|
||||
;; http://unusedino.de/ec64/technical/project64/mapping_c64.html
|
||||
lda #>$0800
|
||||
sta MEMSTR+1
|
||||
lda #$00
|
||||
sta MEMSTR+0
|
||||
sta MEMSIZ+0
|
||||
ldx #>$0800
|
||||
stx MEMSTR+1
|
||||
ldx #$00
|
||||
stx MEMSTR+0
|
||||
stx MEMSIZ+0
|
||||
;; Try to modify $8000, if it fails then RAM ends at $7FFF, else $9FFF
|
||||
lda $8000
|
||||
eor #$FF
|
||||
@@ -60,13 +63,13 @@ ramtas_l2:
|
||||
cmp $8000
|
||||
beq ramtas_32K_RAM
|
||||
sta $8000
|
||||
lda #$A0
|
||||
sta MEMSIZ+1
|
||||
ldx #$A0
|
||||
stx MEMSIZ+1
|
||||
jmp ramtas_RAM_sized
|
||||
ramtas_32K_RAM:
|
||||
sta $8000 ; in case RAM is hiding beneath a ROM
|
||||
lda #$80
|
||||
sta MEMSIZ+1
|
||||
ldx #$80
|
||||
stx MEMSIZ+1
|
||||
;; Fall through
|
||||
ramtas_RAM_sized:
|
||||
|
||||
|
||||
Reference in new issue
Block a user