started work on disassemble command integration

This commit is contained in:
FeralChild64 authored and FeralChild64 committed 2021-01-26 00:03:07 +01:00
1 parent 9bda3b8520
commit 5d036749f5
5 files changed
+109 -91

No files matched your search

+38 -31
View File
@@ -4,6 +4,9 @@
Get_From_Memory:
; XXX consider temporarily switching off $C000-$CFFF ROM
; XXX consider using long mode for addresses below $8000 always
phx
phy
phz
@@ -12,59 +15,63 @@ Get_From_Memory:
clc
tza
adc Long_PC+0
sta Long_TMP+0
adc Long_PC+0
sta Long_TMP+0
ldx #$01
ldx #$01
@1:
lda Long_PC+0,x
adc #$00
sta Long_TMP+0,x
lda Long_PC+0,x
adc #$00
sta Long_TMP+0,x
inx
cpx #$04
bne @1
cpx #$04
bne @1
ldz #$00
ldz #$00
; Check addressing mode
bbs7 Adr_Mode, @mode_flat
bbs7 Adr_Mode, @mode_flat
@mode_64k:
lda Long_TMP+1
bne @read ; branch if no need to handle shadow memory (not zero page)
lda Long_TMP+0
lda #$00 ; make sure this is 64K address
sta Long_TMP+2
sta Long_TMP+3
lda Long_TMP+1
bne @read ; branch if no need to handle shadow memory (not zero page)
lda Long_TMP+0
dec
dec
cmp #$8E
bcs @read ; branch if no need to handle shadow memory (0, 1, or above $8F)
cmp #$8E
bcs @read ; branch if no need to handle shadow memory (0, 1, or above $8F)
@2:
sta Long_TMP+0
bra @read_shadow
sta Long_TMP+0
bra @read_shadow
@mode_flat:
lda Long_TMP+3
ora Long_TMP+2
ora Long_TMP+1
bne @read_flat
lda Long_TMP+3
ora Long_TMP+2
ora Long_TMP+1
bne @read_flat
lda Long_TMP+0
lda Long_TMP+0
dec
dec
cmp #$8E
bcs @read_flat
bra @2
cmp #$8E
bcs @read_flat
bra @2
@read_shadow:
lda #MEMCONF_SHADOW_BZP_1
sta Long_TMP+1
lda #MEMCONF_SHADOW_BZP_2
sta Long_TMP+2
lda #MEMCONF_SHADOW_BZP_3
sta Long_TMP+3
lda #MEMCONF_SHADOW_BZP_1
sta Long_TMP+1
lda #MEMCONF_SHADOW_BZP_2
sta Long_TMP+2
lda #MEMCONF_SHADOW_BZP_3
sta Long_TMP+3
@read_flat:
+nop