mirror of
https://github.com/brouhaha/a2bubble.git
synced 2024-05-28 19:41:33 +00:00
More updates to ZP defs.
This commit is contained in:
parent
d0b3073c2d
commit
75584e8260
80
a2bubble.asm
80
a2bubble.asm
|
@ -31,8 +31,7 @@ fcstrm macro s
|
||||||
; 00-01, 3a-46
|
; 00-01, 3a-46
|
||||||
|
|
||||||
Z18 equ $18
|
Z18 equ $18
|
||||||
Z26 equ $26
|
boot_buf_ptr equ $26
|
||||||
Z27 equ $27
|
|
||||||
|
|
||||||
bubble_track equ $2a
|
bubble_track equ $2a
|
||||||
|
|
||||||
|
@ -46,20 +45,15 @@ Z35 equ $35
|
||||||
|
|
||||||
cswl equ $36 ; monitor: character output vector (two bytes)
|
cswl equ $36 ; monitor: character output vector (two bytes)
|
||||||
|
|
||||||
Z38 equ $38
|
|
||||||
Z3a equ $3a
|
|
||||||
Z3b equ $3b
|
|
||||||
|
|
||||||
Z3c equ $3c ; ProDOS: pointer to BMC data register (two bytes)
|
|
||||||
Z3d equ $3d
|
|
||||||
|
|
||||||
Z3e equ $3e
|
Z3e equ $3e
|
||||||
|
|
||||||
Z3f equ $3f
|
Z3f equ $3f
|
||||||
Z41 equ $41
|
|
||||||
|
|
||||||
|
|
||||||
; boot ROM variables
|
; boot ROM variables
|
||||||
|
boot_sector_num equ $3d
|
||||||
|
boot_track_num equ $41
|
||||||
boot_retry_count equ $47
|
boot_retry_count equ $47
|
||||||
|
|
||||||
|
|
||||||
|
@ -215,7 +209,7 @@ bmc_cmd_reset_fifo equ $1d
|
||||||
ldx $20 ; $Cn01 = $20
|
ldx $20 ; $Cn01 = $20
|
||||||
ldy #$00 ; $Cn03 = $00
|
ldy #$00 ; $Cn03 = $00
|
||||||
ldx #$03 ; $Cn05 = $03
|
ldx #$03 ; $Cn05 = $03
|
||||||
stx Z3c ; $Cn07 = $3C, bootable by original Autostart ROM,
|
stx $3c ; $Cn07 = $3C, bootable by original Autostart ROM,
|
||||||
; no SmartPort support
|
; no SmartPort support
|
||||||
|
|
||||||
; get the slot number we're running in
|
; get the slot number we're running in
|
||||||
|
@ -233,11 +227,11 @@ bmc_cmd_reset_fifo equ $1d
|
||||||
tax
|
tax
|
||||||
lda led_on,x
|
lda led_on,x
|
||||||
lda #$00
|
lda #$00
|
||||||
sta Z26
|
sta boot_buf_ptr
|
||||||
sta Z3d
|
sta boot_sector_num
|
||||||
sta Z41
|
sta boot_track_num
|
||||||
lda #$08
|
lda #$08
|
||||||
sta Z27
|
sta boot_buf_ptr+1
|
||||||
clc
|
clc
|
||||||
bcc boot ; always taken
|
bcc boot ; always taken
|
||||||
|
|
||||||
|
@ -257,12 +251,12 @@ boot: lda c8xx_rom_disable
|
||||||
ldx dos_slot_16
|
ldx dos_slot_16
|
||||||
lda #$00
|
lda #$00
|
||||||
sta Z2f
|
sta Z2f
|
||||||
lda Z41
|
lda boot_track_num
|
||||||
sec
|
sec
|
||||||
sbc #$03
|
sbc #$03
|
||||||
bpl Lc671
|
bpl Lc671
|
||||||
lda Z41
|
lda boot_track_num
|
||||||
Lc671: sta Z41
|
Lc671: sta boot_track_num
|
||||||
clc
|
clc
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
|
@ -270,14 +264,14 @@ Lc671: sta Z41
|
||||||
asl
|
asl
|
||||||
rol Z2f
|
rol Z2f
|
||||||
sta Z2e
|
sta Z2e
|
||||||
ldy Z41
|
ldy boot_track_num
|
||||||
bne Lc687
|
bne Lc687
|
||||||
ldy Z3d
|
ldy boot_sector_num
|
||||||
lda Dcae8,y
|
lda Dcae8,y
|
||||||
bpl Lc697
|
bpl Lc697
|
||||||
Lc687: ldy Z3d
|
Lc687: ldy boot_sector_num
|
||||||
lda Dcad8,y
|
lda Dcad8,y
|
||||||
ldy Z41
|
ldy boot_track_num
|
||||||
cpy #$0e
|
cpy #$0e
|
||||||
bne Lc697
|
bne Lc697
|
||||||
clc
|
clc
|
||||||
|
@ -305,9 +299,9 @@ Lc6b3: jsr rdbub
|
||||||
bcs Lc6cb
|
bcs Lc6cb
|
||||||
|
|
||||||
lda spkr ; click speaker
|
lda spkr ; click speaker
|
||||||
inc Z27
|
inc boot_buf_ptr+1
|
||||||
inc Z3d
|
inc boot_sector_num
|
||||||
lda Z3d
|
lda boot_sector_num
|
||||||
jsr Sce83
|
jsr Sce83
|
||||||
ldx dos_slot_16
|
ldx dos_slot_16
|
||||||
bcc boot
|
bcc boot
|
||||||
|
@ -423,12 +417,12 @@ Lc856: cmp Dc08c,x
|
||||||
Lc860: lda led_on,x
|
Lc860: lda led_on,x
|
||||||
jsr click
|
jsr click
|
||||||
|
|
||||||
ldy #rwts_iopb_buf_ptr ; copy buf ptr from RWTS IOPB to Z26
|
ldy #rwts_iopb_buf_ptr ; copy buf ptr from RWTS IOPB to boot_buf_ptr
|
||||||
lda (rwts_iopb),y
|
lda (rwts_iopb),y
|
||||||
sta Z26
|
sta boot_buf_ptr
|
||||||
iny
|
iny
|
||||||
lda (rwts_iopb),y
|
lda (rwts_iopb),y
|
||||||
sta Z26+1
|
sta boot_buf_ptr+1
|
||||||
|
|
||||||
ldy #rwts_iopb_prev_volume ; set volume of last access to 254
|
ldy #rwts_iopb_prev_volume ; set volume of last access to 254
|
||||||
lda #254
|
lda #254
|
||||||
|
@ -543,7 +537,7 @@ rwts_check_status:
|
||||||
beq rwts_drive_error ; otherwise report drive error
|
beq rwts_drive_error ; otherwise report drive error
|
||||||
|
|
||||||
rwts_finish:
|
rwts_finish:
|
||||||
ldy #rwts_iopb_dct_ptr ; copy IOPB DCT ptr to Z3c
|
ldy #rwts_iopb_dct_ptr ; copy IOPB DCT ptr
|
||||||
lda (rwts_iopb),y ; (presumably for RWTS compatibility)
|
lda (rwts_iopb),y ; (presumably for RWTS compatibility)
|
||||||
sta rwts_dct
|
sta rwts_dct
|
||||||
iny
|
iny
|
||||||
|
@ -793,7 +787,7 @@ Lca36: jsr Sc9f2
|
||||||
ldx #$00
|
ldx #$00
|
||||||
lda (Z2c,x)
|
lda (Z2c,x)
|
||||||
ldx dos_slot_16
|
ldx dos_slot_16
|
||||||
sta (Z26),y
|
sta (boot_buf_ptr),y
|
||||||
iny
|
iny
|
||||||
jmp Lca36
|
jmp Lca36
|
||||||
|
|
||||||
|
@ -821,7 +815,7 @@ wrbub: jsr dos_setup_data_reg_ptr
|
||||||
; write data loop
|
; write data loop
|
||||||
Lca68: jsr Sc9f2
|
Lca68: jsr Sc9f2
|
||||||
bcs Lca79
|
bcs Lca79
|
||||||
lda (Z26),y
|
lda (boot_buf_ptr),y
|
||||||
iny
|
iny
|
||||||
ldx #$00
|
ldx #$00
|
||||||
sta (Z2c,x)
|
sta (Z2c,x)
|
||||||
|
@ -864,16 +858,16 @@ inbitmap:
|
||||||
bpl inbitmap_done
|
bpl inbitmap_done
|
||||||
lda #$fe
|
lda #$fe
|
||||||
ldy #$06
|
ldy #$06
|
||||||
sta (Z26),y
|
sta (boot_buf_ptr),y
|
||||||
lda #$00
|
lda #$00
|
||||||
ldy #$44
|
ldy #$44
|
||||||
Lcab1: sta (Z26),y
|
Lcab1: sta (boot_buf_ptr),y
|
||||||
iny
|
iny
|
||||||
cpy #$4c
|
cpy #$4c
|
||||||
bne Lcab1
|
bne Lcab1
|
||||||
iny
|
iny
|
||||||
lda #$e0
|
lda #$e0
|
||||||
sta (Z26),y
|
sta (boot_buf_ptr),y
|
||||||
|
|
||||||
inbitmap_done:
|
inbitmap_done:
|
||||||
rts
|
rts
|
||||||
|
@ -968,10 +962,10 @@ Lcb6b: ldy Zbe
|
||||||
lda #$02
|
lda #$02
|
||||||
bcs Lcb7a
|
bcs Lcb7a
|
||||||
Lcb77: ldy D03a8
|
Lcb77: ldy D03a8
|
||||||
Lcb7a: sty Z26
|
Lcb7a: sty boot_buf_ptr
|
||||||
sta Z27
|
sta boot_buf_ptr+1
|
||||||
sty Z3e
|
sty Z3e
|
||||||
sta Z3f
|
sta Z3e+1
|
||||||
jsr initchk
|
jsr initchk
|
||||||
bcc Lcb8c
|
bcc Lcb8c
|
||||||
Lcb87: jsr initial
|
Lcb87: jsr initial
|
||||||
|
@ -1049,9 +1043,9 @@ Lcbfb: lda led_on,x
|
||||||
jmp Lcca0
|
jmp Lcca0
|
||||||
|
|
||||||
Lcc12: lda D03e8
|
Lcc12: lda D03e8
|
||||||
sta Z26
|
sta boot_buf_ptr
|
||||||
lda D03e9
|
lda D03e9
|
||||||
sta Z27
|
sta boot_buf_ptr+1
|
||||||
lda D03e2
|
lda D03e2
|
||||||
sta D03e3
|
sta D03e3
|
||||||
lda D03e0
|
lda D03e0
|
||||||
|
@ -1158,9 +1152,9 @@ Lcccf: asl prodos_block
|
||||||
asl prodos_block
|
asl prodos_block
|
||||||
rol prodos_block+1
|
rol prodos_block+1
|
||||||
lda prodos_buf
|
lda prodos_buf
|
||||||
sta Z3a
|
sta prodos_buf_ptr
|
||||||
lda prodos_buf+1
|
lda prodos_buf+1
|
||||||
sta Z3b
|
sta prodos_buf_ptr+1
|
||||||
jsr Sccf4
|
jsr Sccf4
|
||||||
Lcce6: pla
|
Lcce6: pla
|
||||||
sta prodos_block+1
|
sta prodos_block+1
|
||||||
|
@ -1178,7 +1172,7 @@ Sccf4: lda #$00
|
||||||
sta Z3f
|
sta Z3f
|
||||||
lda prodos_unit
|
lda prodos_unit
|
||||||
and #$70
|
and #$70
|
||||||
sta Z3e
|
sta prodos_slot_16
|
||||||
jsr Scd5e
|
jsr Scd5e
|
||||||
lda prodos_unit
|
lda prodos_unit
|
||||||
sta prodos_prev_unit
|
sta prodos_prev_unit
|
||||||
|
@ -1438,10 +1432,10 @@ Lce89: lda Dce7f,x
|
||||||
bne Lce99
|
bne Lce99
|
||||||
dex
|
dex
|
||||||
bpl Lce89
|
bpl Lce89
|
||||||
inc Z3d
|
inc boot_sector_num
|
||||||
clc
|
clc
|
||||||
bcc Lce9e
|
bcc Lce9e
|
||||||
Lce99: lda Z3d
|
Lce99: lda boot_sector_num
|
||||||
cmp D0800
|
cmp D0800
|
||||||
Lce9e: rts
|
Lce9e: rts
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user