mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-29 07:49:20 +00:00
Merge remote-tracking branch 'origin/disasm'
This commit is contained in:
commit
5006979e27
4
APIs.md
4
APIs.md
@ -102,11 +102,11 @@ No-Op command (RTS)
|
|||||||
|
|
||||||
#### `JUMP_TABLE_ALERT_0` ($4030)
|
#### `JUMP_TABLE_ALERT_0` ($4030)
|
||||||
|
|
||||||
Show alert 0
|
Show alert in A, default options
|
||||||
|
|
||||||
#### `JUMP_TABLE_ALERT_X` ($4033)
|
#### `JUMP_TABLE_ALERT_X` ($4033)
|
||||||
|
|
||||||
Show alert X
|
Show alert in A, options in X
|
||||||
|
|
||||||
#### `JUMP_TABLE_LAUNCH_FILE` ($4036)
|
#### `JUMP_TABLE_LAUNCH_FILE` ($4036)
|
||||||
|
|
||||||
|
14
desktop.inc
14
desktop.inc
@ -51,13 +51,23 @@ JUMP_TABLE_COPY_TO_BUF := $4024 ; Copy to buffer
|
|||||||
JUMP_TABLE_COPY_FROM_BUF:= $4027 ; Copy from buffer
|
JUMP_TABLE_COPY_FROM_BUF:= $4027 ; Copy from buffer
|
||||||
JUMP_TABLE_NOOP := $402A ; No-Op command (RTS)
|
JUMP_TABLE_NOOP := $402A ; No-Op command (RTS)
|
||||||
JUMP_TABLE_2D := $402D ; ??? (Draw type/size/date in non-icon views?)
|
JUMP_TABLE_2D := $402D ; ??? (Draw type/size/date in non-icon views?)
|
||||||
JUMP_TABLE_ALERT_0 := $4030 ; Show alert 0
|
JUMP_TABLE_ALERT_0 := $4030 ; Show alert (A=err code, default options)
|
||||||
JUMP_TABLE_ALERT_X := $4033 ; Show alert X
|
JUMP_TABLE_ALERT_X := $4033 ; Show alert X (A=err code, X=options)
|
||||||
JUMP_TABLE_LAUNCH_FILE := $4036 ; Launch file
|
JUMP_TABLE_LAUNCH_FILE := $4036 ; Launch file
|
||||||
JUMP_TABLE_CUR_POINTER := $4039 ; Changes mouse cursor to pointer *
|
JUMP_TABLE_CUR_POINTER := $4039 ; Changes mouse cursor to pointer *
|
||||||
JUMP_TABLE_CUR_WATCH := $403C ; Changes mouse cursor to watch
|
JUMP_TABLE_CUR_WATCH := $403C ; Changes mouse cursor to watch
|
||||||
JUMP_TABLE_RESTORE_OVL := $403F ; Restore from overlay routine
|
JUMP_TABLE_RESTORE_OVL := $403F ; Restore from overlay routine
|
||||||
|
|
||||||
|
;;; ============================================================
|
||||||
|
;;; Error codes used for alerts which are not ProDOS errors
|
||||||
|
|
||||||
|
ERR_DUPLICATE_VOL_NAME = $F9
|
||||||
|
ERR_FILE_NOT_RUNNABLE = $FA
|
||||||
|
ERR_NAME_TOO_LONG = $FB
|
||||||
|
ERR_INSERT_SRC_DISK = $FC
|
||||||
|
ERR_INSERT_DST_DISK = $FD
|
||||||
|
ERR_BASIC_SYS_NOT_FOUND = $FE
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; API Calls (from aux memory)
|
;;; API Calls (from aux memory)
|
||||||
|
|
||||||
|
@ -3091,7 +3091,7 @@ maprect: DEFINE_RECT 0, 0, 420, 55, maprect
|
|||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; Show Alert Dialog
|
;;; Show Alert Dialog
|
||||||
;;; Call show_alert_dialog with prompt number in X (???), A = ???
|
;;; Call show_alert_dialog with prompt number A, options in X
|
||||||
|
|
||||||
.proc show_alert_dialog_impl
|
.proc show_alert_dialog_impl
|
||||||
|
|
||||||
@ -3168,9 +3168,9 @@ alert_action_table:
|
|||||||
.byte $00,$80,$80,$00
|
.byte $00,$80,$80,$00
|
||||||
|
|
||||||
;; Actual entry point
|
;; Actual entry point
|
||||||
start: pha
|
start: pha ; error code
|
||||||
txa
|
txa
|
||||||
pha
|
pha ; options???
|
||||||
MGTK_RELAY2_CALL MGTK::HideCursor
|
MGTK_RELAY2_CALL MGTK::HideCursor
|
||||||
MGTK_RELAY2_CALL MGTK::SetCursor, pointer_cursor
|
MGTK_RELAY2_CALL MGTK::SetCursor, pointer_cursor
|
||||||
MGTK_RELAY2_CALL MGTK::ShowCursor
|
MGTK_RELAY2_CALL MGTK::ShowCursor
|
||||||
@ -3183,12 +3183,13 @@ start: pha
|
|||||||
lda LCBANK1
|
lda LCBANK1
|
||||||
lda LCBANK1
|
lda LCBANK1
|
||||||
|
|
||||||
ldx #$03
|
ldx #.sizeof(MGTK::Point)-1
|
||||||
lda #$00
|
lda #$00
|
||||||
LBA0B: sta grafport3_viewloc_xcoord,x
|
LBA0B: sta grafport3_viewloc_xcoord,x
|
||||||
sta grafport3_cliprect_x1,x
|
sta grafport3_cliprect_x1,x
|
||||||
dex
|
dex
|
||||||
bpl LBA0B
|
bpl LBA0B
|
||||||
|
|
||||||
copy16 #550, grafport3_cliprect_x2
|
copy16 #550, grafport3_cliprect_x2
|
||||||
copy16 #185, grafport3_cliprect_y2
|
copy16 #185, grafport3_cliprect_y2
|
||||||
MGTK_RELAY2_CALL MGTK::SetPort, grafport3
|
MGTK_RELAY2_CALL MGTK::SetPort, grafport3
|
||||||
@ -3202,7 +3203,7 @@ LBA0B: sta grafport3_viewloc_xcoord,x
|
|||||||
lda portmap::viewloc::xcoord+1
|
lda portmap::viewloc::xcoord+1
|
||||||
adc portmap::maprect::x2+1
|
adc portmap::maprect::x2+1
|
||||||
tax
|
tax
|
||||||
pla
|
pla ; options???
|
||||||
jsr LBF8B
|
jsr LBF8B
|
||||||
sty LBFCC
|
sty LBFCC
|
||||||
sta LBFCE
|
sta LBFCE
|
||||||
@ -3225,6 +3226,7 @@ LBA0B: sta grafport3_viewloc_xcoord,x
|
|||||||
MGTK_RELAY2_CALL MGTK::HideCursor
|
MGTK_RELAY2_CALL MGTK::HideCursor
|
||||||
MGTK_RELAY2_CALL MGTK::PaintBits, alert_bitmap_params
|
MGTK_RELAY2_CALL MGTK::PaintBits, alert_bitmap_params
|
||||||
MGTK_RELAY2_CALL MGTK::ShowCursor
|
MGTK_RELAY2_CALL MGTK::ShowCursor
|
||||||
|
|
||||||
pla
|
pla
|
||||||
tax
|
tax
|
||||||
pla
|
pla
|
||||||
@ -3630,28 +3632,28 @@ LBF51: .byte 0
|
|||||||
|
|
||||||
.proc LBF52
|
.proc LBF52
|
||||||
lda LBFB0
|
lda LBFB0
|
||||||
cmp #$07
|
cmp #7
|
||||||
beq LBF5F
|
beq LBF5F
|
||||||
inc LBFB0
|
inc LBFB0
|
||||||
jmp LBF2C
|
jmp LBF2C
|
||||||
|
|
||||||
LBF5F: lda #$00
|
LBF5F: lda #0
|
||||||
sta LBFB0
|
sta LBFB0
|
||||||
lda LBFAF
|
lda LBFAF
|
||||||
cmp #$38
|
cmp #56
|
||||||
beq LBF74
|
beq LBF74
|
||||||
clc
|
clc
|
||||||
adc #$08
|
adc #8
|
||||||
sta LBFAF
|
sta LBFAF
|
||||||
jmp LBF2C
|
jmp LBF2C
|
||||||
|
|
||||||
LBF74: lda #$00
|
LBF74: lda #0
|
||||||
sta LBFAF
|
sta LBFAF
|
||||||
lda LBFAE
|
lda LBFAE
|
||||||
clc
|
clc
|
||||||
adc #$40
|
adc #64
|
||||||
sta LBFAE
|
sta LBFAE
|
||||||
cmp #$C0
|
cmp #192
|
||||||
beq LBF89
|
beq LBF89
|
||||||
jmp LBF2C
|
jmp LBF2C
|
||||||
|
|
||||||
@ -3660,26 +3662,28 @@ LBF89: sec
|
|||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.proc LBF8B
|
.proc LBF8B
|
||||||
ldy #$00
|
ldy #0
|
||||||
cpx #$02
|
cpx #2
|
||||||
bne LBF96
|
bne :+
|
||||||
ldy #$49
|
ldy #73
|
||||||
clc
|
clc
|
||||||
adc #$01
|
adc #1
|
||||||
LBF96: cpx #$01
|
|
||||||
bne LBFA4
|
: cpx #1
|
||||||
ldy #$24
|
bne :+
|
||||||
|
ldy #36
|
||||||
clc
|
clc
|
||||||
adc #$04
|
adc #4
|
||||||
bcc LBFA4
|
bcc :+
|
||||||
iny
|
iny
|
||||||
sbc #$07
|
sbc #7
|
||||||
LBFA4: cmp #$07
|
: cmp #7
|
||||||
bcc LBFAD
|
bcc :+
|
||||||
sbc #$07
|
sbc #7
|
||||||
iny
|
iny
|
||||||
bne LBFA4
|
bne :-
|
||||||
LBFAD: rts
|
|
||||||
|
: rts
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
LBFAE: .byte $00
|
LBFAE: .byte $00
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -928,7 +928,7 @@ win_table:
|
|||||||
.addr 0,winfo1,winfo2,winfo3,winfo4,winfo5,winfo6,winfo7,winfo8
|
.addr 0,winfo1,winfo2,winfo3,winfo4,winfo5,winfo6,winfo7,winfo8
|
||||||
|
|
||||||
;; Window to Path mapping table
|
;; Window to Path mapping table
|
||||||
window_address_table:
|
window_path_addr_table:
|
||||||
.assert * = path_table, error, "Entry point mismatch"
|
.assert * = path_table, error, "Entry point mismatch"
|
||||||
.addr $0000
|
.addr $0000
|
||||||
.repeat 8,i
|
.repeat 8,i
|
||||||
@ -939,6 +939,8 @@ window_address_table:
|
|||||||
|
|
||||||
str_file_type: .res 4, 0
|
str_file_type: .res 4, 0
|
||||||
|
|
||||||
|
;;; ============================================================
|
||||||
|
|
||||||
path_buf4:
|
path_buf4:
|
||||||
.res 65, 0
|
.res 65, 0
|
||||||
path_buf3:
|
path_buf3:
|
||||||
@ -946,18 +948,36 @@ path_buf3:
|
|||||||
filename_buf:
|
filename_buf:
|
||||||
.res 16, 0
|
.res 16, 0
|
||||||
|
|
||||||
LE05B: .byte $00
|
LE05B: .byte 0
|
||||||
LE05C: .byte $00
|
LE05C: .byte 0 ; flag - always set to 0 ???
|
||||||
LE05D: .byte $00
|
LE05D: .byte 0 ; counter of some sort ???
|
||||||
LE05E: .byte $0D
|
|
||||||
LE05F: .byte $00
|
|
||||||
LE060: .byte $00
|
|
||||||
LE061: .byte $00
|
|
||||||
|
|
||||||
|
;;; Number of file entries per directory block
|
||||||
|
num_entries_per_block:
|
||||||
|
.byte 13
|
||||||
|
|
||||||
LE062: .res 170, 0
|
entries_read:
|
||||||
LE10C: .byte 0
|
.byte 0
|
||||||
LE10D: .res 137, 0
|
op_ref_num:
|
||||||
|
.byte 0
|
||||||
|
entries_to_skip:
|
||||||
|
.byte 0
|
||||||
|
|
||||||
|
;;; During directory traversal, the number of file entries processed
|
||||||
|
;;; at the current level is pushed here, so that following a descent
|
||||||
|
;;; the previous entries can be skipped.
|
||||||
|
entry_count_stack:
|
||||||
|
.res 170, 0
|
||||||
|
|
||||||
|
entry_count_stack_index:
|
||||||
|
.byte 0
|
||||||
|
|
||||||
|
entries_read_this_block:
|
||||||
|
.byte 0
|
||||||
|
|
||||||
|
PAD_TO $E196 ; why ???
|
||||||
|
|
||||||
|
;;; ============================================================
|
||||||
|
|
||||||
;; Backup copy of DEVLST made before detaching ramdisk
|
;; Backup copy of DEVLST made before detaching ramdisk
|
||||||
devlst_backup:
|
devlst_backup:
|
||||||
|
@ -157,7 +157,7 @@ L7178: jsr common_overlay::jt_redraw_input
|
|||||||
|
|
||||||
L7189: addr_call common_overlay::L647C, path_buf0
|
L7189: addr_call common_overlay::L647C, path_buf0
|
||||||
beq L7198
|
beq L7198
|
||||||
L7192: lda #$40
|
L7192: lda #ERR_INVALID_PATHNAME
|
||||||
jsr JUMP_TABLE_ALERT_0
|
jsr JUMP_TABLE_ALERT_0
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ jt_filename:
|
|||||||
|
|
||||||
L70B1: addr_call common_overlay::L647C, path_buf0
|
L70B1: addr_call common_overlay::L647C, path_buf0
|
||||||
beq L70C0
|
beq L70C0
|
||||||
lda #$40
|
lda #ERR_INVALID_PATHNAME
|
||||||
jsr JUMP_TABLE_ALERT_0
|
jsr JUMP_TABLE_ALERT_0
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -224,11 +224,11 @@ L72CD: addr_call common_overlay::L647C, path_buf0
|
|||||||
bcs L72E8
|
bcs L72E8
|
||||||
jmp L72EE
|
jmp L72EE
|
||||||
|
|
||||||
L72E2: lda #$40
|
L72E2: lda #ERR_INVALID_PATHNAME
|
||||||
jsr JUMP_TABLE_ALERT_0
|
jsr JUMP_TABLE_ALERT_0
|
||||||
L72E7: rts
|
L72E7: rts
|
||||||
|
|
||||||
L72E8: lda #$FB
|
L72E8: lda #ERR_NAME_TOO_LONG
|
||||||
jsr JUMP_TABLE_ALERT_0
|
jsr JUMP_TABLE_ALERT_0
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -105,6 +105,7 @@ FT_SYSTEM := $FF
|
|||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
ACCESS_DEFAULT := %11000011
|
ACCESS_DEFAULT := %11000011
|
||||||
|
ACCESS_LOCKED := %00100001
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; Storage Types
|
;;; Storage Types
|
||||||
@ -120,6 +121,7 @@ ST_VOLUME_DIRECTORY := $0F
|
|||||||
|
|
||||||
ERR_DEVICE_NOT_CONNECTED := $28
|
ERR_DEVICE_NOT_CONNECTED := $28
|
||||||
ERR_WRITE_PROTECTED := $2B
|
ERR_WRITE_PROTECTED := $2B
|
||||||
|
ERR_INVALID_PATHNAME := $40
|
||||||
ERR_INVALID_REFERENCE := $43
|
ERR_INVALID_REFERENCE := $43
|
||||||
ERR_PATH_NOT_FOUND := $44
|
ERR_PATH_NOT_FOUND := $44
|
||||||
ERR_VOL_NOT_FOUND := $45
|
ERR_VOL_NOT_FOUND := $45
|
||||||
|
Loading…
Reference in New Issue
Block a user