more work on monitor integration
This commit is contained in:
1 parent
7259468163
commit
dc4edbb81c
5 files changed
+90
-9
No files matched your search
@@ -61,7 +61,9 @@
|
|||||||
!addr Disk_Sector = $32 ; logical sector 0 -> 255
|
!addr Disk_Sector = $32 ; logical sector 0 -> 255
|
||||||
!addr Disk_Status = $33 ; BCD value of status
|
!addr Disk_Status = $33 ; BCD value of status
|
||||||
|
|
||||||
; $34-$3F - free space, unused for now
|
; $34-$3B - free space, unused for now
|
||||||
|
|
||||||
|
!addr Long_TMP = $3C ; temporary pointer, for fetching/storing memory content
|
||||||
|
|
||||||
!addr Disk_Msg = $40 ; 40 bytes, disk status as text message ; XXX rework code to make it not needed
|
!addr Disk_Msg = $40 ; 40 bytes, disk status as text message ; XXX rework code to make it not needed
|
||||||
!addr Mon_Data = $68 ; 40 bytes, buffer for hunt and filename
|
!addr Mon_Data = $68 ; 40 bytes, buffer for hunt and filename
|
||||||
+6
-8
@@ -529,9 +529,8 @@ Dump_4_Bytes: ; XXX to be adapted
|
|||||||
; ***********
|
; ***********
|
||||||
|
|
||||||
JSR CHROUT ; colour
|
JSR CHROUT ; colour
|
||||||
@loop BBS7 Long_PC+3,@banked ; trigger banked access
|
@loop
|
||||||
+NOP ; use LDA [Long_PC],Z
|
JSR Get_From_Memory
|
||||||
@banked LDA (Long_PC),Z
|
|
||||||
JSR Print_Hex_Blank
|
JSR Print_Hex_Blank
|
||||||
INZ
|
INZ
|
||||||
TZA
|
TZA
|
||||||
@@ -546,9 +545,8 @@ Dump_4_Chars: ; XXX to be adapted
|
|||||||
LDY #0
|
LDY #0
|
||||||
STY QTSW ; disable quote mode
|
STY QTSW ; disable quote mode
|
||||||
JSR CHROUT ; colour
|
JSR CHROUT ; colour
|
||||||
@loop BBS7 Long_PC+3,@banked ; trigger banked access
|
@loop
|
||||||
+NOP ; use LDA [Long_PC],Z
|
JSR Get_From_Memory
|
||||||
@banked LDA (Long_PC),Z
|
|
||||||
TAY
|
TAY
|
||||||
AND #%01100000
|
AND #%01100000
|
||||||
BNE @laba
|
BNE @laba
|
||||||
@@ -589,9 +587,9 @@ Dump_Row:
|
|||||||
LDX #2 ; 4 blocks in 80 columns
|
LDX #2 ; 4 blocks in 80 columns
|
||||||
BBR7 MODE_80,@lchr
|
BBR7 MODE_80,@lchr
|
||||||
DEX ; 2 blocks in 40 columns
|
DEX ; 2 blocks in 40 columns
|
||||||
@lchr LDA #KEY_LT_RED
|
@lchr LDA #KEY_LT_RED ; XXX replace color with bold attribute
|
||||||
JSR Dump_4_Chars
|
JSR Dump_4_Chars
|
||||||
LDA #KEY_WHITE
|
LDA #KEY_WHITE ; XXX replace color with bold attribute
|
||||||
JSR Dump_4_Chars
|
JSR Dump_4_Chars
|
||||||
DEX
|
DEX
|
||||||
BNE @lchr
|
BNE @lchr
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
|
; Based on BSM (Bit Shifter's Monitor)
|
||||||
|
|
||||||
Mon_Memory:
|
Mon_Memory:
|
||||||
|
|
||||||
jsr Set_MODE_80
|
jsr Set_MODE_80
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
; Based on BSM (Bit Shifter's Monitor)
|
||||||
|
|
||||||
Get_Addr_To_LAC:
|
Get_Addr_To_LAC:
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
|
||||||
|
; Monitor helper code - read and write
|
||||||
|
|
||||||
|
; XXX there is a bug somewhere with wrapping arounf $FFFF
|
||||||
|
|
||||||
|
Get_From_Memory:
|
||||||
|
|
||||||
|
phx
|
||||||
|
phy
|
||||||
|
phz
|
||||||
|
|
||||||
|
; Copy PC + .Z to TMP, set .Z to 0
|
||||||
|
|
||||||
|
clc
|
||||||
|
tza
|
||||||
|
adc Long_PC+0
|
||||||
|
sta Long_TMP+0
|
||||||
|
|
||||||
|
ldx #$02
|
||||||
|
@1:
|
||||||
|
lda Long_PC+1,x
|
||||||
|
adc #$00
|
||||||
|
sta Long_TMP+1,x
|
||||||
|
dex
|
||||||
|
bpl @1
|
||||||
|
|
||||||
|
ldz #$00
|
||||||
|
|
||||||
|
; Check addressing mode
|
||||||
|
|
||||||
|
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
|
||||||
|
dec
|
||||||
|
dec
|
||||||
|
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
|
||||||
|
|
||||||
|
@mode_flat:
|
||||||
|
|
||||||
|
lda Long_TMP+3
|
||||||
|
ora Long_TMP+2
|
||||||
|
ora Long_TMP+1
|
||||||
|
bne @read_flat
|
||||||
|
|
||||||
|
lda Long_TMP+0
|
||||||
|
dec
|
||||||
|
dec
|
||||||
|
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
|
||||||
|
|
||||||
|
@read_flat:
|
||||||
|
+nop
|
||||||
|
@read:
|
||||||
|
lda (Long_TMP),Z
|
||||||
|
|
||||||
|
plz
|
||||||
|
ply
|
||||||
|
plx
|
||||||
|
|
||||||
|
rts
|
||||||
Reference in new issue
Block a user