Merge remote-tracking branch 'origin/disasm'

This commit is contained in:
Joshua Bell 2019-02-08 19:07:04 -08:00
commit 1bb9388d32
4 changed files with 94 additions and 70 deletions

View File

@ -3193,23 +3193,26 @@ special_menu:
;;; ============================================================
;; Rects
confirm_dialog_outer_rect: DEFINE_RECT 4,2,396,98
confirm_dialog_inner_rect: DEFINE_RECT 5,3,395,97
cancel_button_rect: DEFINE_RECT 40,81,140,92
alert_dialog_width = 400
alert_dialog_height = 100
confirm_dialog_outer_rect: DEFINE_RECT 4,2,alert_dialog_width-4,alert_dialog_height-2
confirm_dialog_inner_rect: DEFINE_RECT 5,3,alert_dialog_width-5,alert_dialog_height-3
cancel_button_rect: DEFINE_RECT 40,alert_dialog_height-19,140,alert_dialog_height-8
LAE18: DEFINE_RECT 193,30,293,41
ok_button_rect: DEFINE_RECT 260,81,360,92
yes_button_rect: DEFINE_RECT 200,81,240,92
no_button_rect: DEFINE_RECT 260,81,300,92
all_button_rect: DEFINE_RECT 320,81,360,92
ok_button_rect: DEFINE_RECT 260,alert_dialog_height-19,360,alert_dialog_height-8
yes_button_rect: DEFINE_RECT 200,alert_dialog_height-19,240,alert_dialog_height-8
no_button_rect: DEFINE_RECT 260,alert_dialog_height-19,300,alert_dialog_height-8
all_button_rect: DEFINE_RECT 320,alert_dialog_height-19,360,alert_dialog_height-8
str_ok_label:
PASCAL_STRING {"OK ",GLYPH_RETURN}
ok_label_pos: DEFINE_POINT 265,91
cancel_label_pos: DEFINE_POINT 45,91
yes_label_pos: DEFINE_POINT 205,91
no_label_pos: DEFINE_POINT 265,91
all_label_pos: DEFINE_POINT 325,91
ok_label_pos: DEFINE_POINT 265,alert_dialog_height-9
cancel_label_pos: DEFINE_POINT 45,alert_dialog_height-9
yes_label_pos: DEFINE_POINT 205,alert_dialog_height-9
no_label_pos: DEFINE_POINT 265,alert_dialog_height-9
all_label_pos: DEFINE_POINT 325,alert_dialog_height-9
.byte $1C,$00,$70,$00
.byte $1C,$00,$87,$00
@ -3217,12 +3220,16 @@ all_label_pos: DEFINE_POINT 325,91
textbg_black: .byte $00
textbg_white: .byte $7F
press_ok_to_rect: DEFINE_RECT 39,25,360,80
prompt_rect: DEFINE_RECT 40,60,360,80
current_target_file_pos: DEFINE_POINT 75,43
current_dest_file_pos: DEFINE_POINT 75,51
current_target_file_rect: DEFINE_RECT 75,35,394,42
current_dest_file_rect: DEFINE_RECT 75,43,394,50
dialog_label_height = 8
dialog_label_base_y = 27
.define dialog_label_row_y(num) (((num)*(dialog_label_height))+(dialog_label_base_y))
clear_dialog_labels_rect: DEFINE_RECT 39,25,360,alert_dialog_height-20
prompt_rect: DEFINE_RECT 40,60,360,alert_dialog_height-20
current_target_file_pos: DEFINE_POINT 75,dialog_label_row_y {2}
current_dest_file_pos: DEFINE_POINT 75,dialog_label_row_y {3}
current_target_file_rect: DEFINE_RECT 75,(dialog_label_row_y {1}),394,(dialog_label_row_y {2})-1
current_dest_file_rect: DEFINE_RECT 75,(dialog_label_row_y {2}),394,(dialog_label_row_y {3})-1
str_cancel_label:
PASCAL_STRING "Cancel Esc"
@ -3237,8 +3244,12 @@ LAEB6: PASCAL_STRING "Source filename:"
LAEC7: PASCAL_STRING "Destination filename:"
;; "About" dialog resources
about_dialog_outer_rect: DEFINE_RECT 4, 2, 396, 108
about_dialog_inner_rect: DEFINE_RECT 5, 3, 395, 107
about_dialog_width = 400
about_dialog_height = 110
about_dialog_outer_rect: DEFINE_RECT 4, 2, about_dialog_width-4, about_dialog_height-2
about_dialog_inner_rect: DEFINE_RECT 5, 3, about_dialog_width-5, about_dialog_height-3
str_about1: PASCAL_STRING "Apple II DeskTop"
str_about2: PASCAL_STRING "Copyright Apple Computer Inc., 1986"
@ -3276,9 +3287,9 @@ str_large_prompt:
PASCAL_STRING "This file is too large to copy, click OK to continue."
copy_file_count_pos:
DEFINE_POINT 110, 35
DEFINE_POINT 110, dialog_label_row_y {1}
copy_file_count_pos2:
DEFINE_POINT 170, 59
DEFINE_POINT 170, dialog_label_row_y {4}
;; "Delete" dialog strings
str_delete_title:
@ -3294,12 +3305,14 @@ str_delete_remaining:
str_delete_locked_file:
PASCAL_STRING "This file is locked, do you want to delete it anyway ?"
LB16A: DEFINE_POINT 145, 59
delete_file_count_pos:
DEFINE_POINT 145, dialog_label_row_y {4}
delete_remaining_count_pos:
DEFINE_POINT 204, 59
DEFINE_POINT 204, dialog_label_row_y {4}
LB172: DEFINE_POINT 300, 59
delete_file_count_pos2:
DEFINE_POINT 300, dialog_label_row_y {4}
;; "New Folder" dialog strings
str_new_folder_title:
@ -3340,12 +3353,12 @@ str_info_blocks:
str_colon:
PASCAL_STRING ": "
unlock_remaining_count_pos2: DEFINE_POINT 160,59
lock_remaining_count_pos2: DEFINE_POINT 145,59
files_pos: DEFINE_POINT 200,59
files_pos2: DEFINE_POINT 185,59
unlock_remaining_count_pos: DEFINE_POINT 205,59
lock_remaining_count_pos: DEFINE_POINT 195,59
unlock_remaining_count_pos2: DEFINE_POINT 160,dialog_label_row_y {4}
lock_remaining_count_pos2: DEFINE_POINT 145,dialog_label_row_y {4}
files_pos: DEFINE_POINT 200,dialog_label_row_y {4}
files_pos2: DEFINE_POINT 185,dialog_label_row_y {4}
unlock_remaining_count_pos: DEFINE_POINT 205,dialog_label_row_y {4}
lock_remaining_count_pos: DEFINE_POINT 195,dialog_label_row_y {4}
str_format_disk: PASCAL_STRING "Format a Disk ..."
str_select_format: PASCAL_STRING "Select the location where the disk is to be formatted"

View File

@ -13225,7 +13225,7 @@ do2: lda winfo_alert_dialog
: jsr prompt_input_loop
bmi :-
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
jsr erase_ok_button
return #0
.endproc
@ -13277,10 +13277,10 @@ do1: ldy #1
jsr set_port_from_window_id
lda LAD1F
bne LAD54
MGTK_RELAY_CALL MGTK::MoveTo, desktop_aux::LB16A
MGTK_RELAY_CALL MGTK::MoveTo, desktop_aux::delete_file_count_pos
jmp LAD5D
LAD54: MGTK_RELAY_CALL MGTK::MoveTo, desktop_aux::LB172
LAD54: MGTK_RELAY_CALL MGTK::MoveTo, desktop_aux::delete_file_count_pos2
LAD5D: addr_call draw_text1, str_file_count
addr_call draw_text1, str_files
rts
@ -13316,7 +13316,7 @@ LADC4: jsr prompt_input_loop
bmi LADC4
bne LADF4
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
jsr erase_ok_cancel_buttons
yax_call draw_dialog_label, 2, desktop_aux::str_file_colon
yax_call draw_dialog_label, 4, desktop_aux::str_delete_remaining
@ -13604,7 +13604,7 @@ LB0FA: jsr prompt_input_loop
bmi LB0FA
bne LB139
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::ok_button_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::cancel_button_rect
yax_call draw_dialog_label, 2, desktop_aux::str_file_colon
@ -13691,7 +13691,7 @@ LB218: jsr prompt_input_loop
bmi LB218
bne LB257
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::ok_button_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::cancel_button_rect
yax_call draw_dialog_label, 2, desktop_aux::str_file_colon
@ -14114,15 +14114,15 @@ done: jmp reset_grafport3a
pla
tay
skip: dey ; ypos = (Y-1) * 8 + pointD::ycoord
skip: dey ; ypos = (Y-1) * 8 + dialog_label_base_pos::ycoord
tya
asl a
asl a
asl a
clc
adc pointD::ycoord
adc dialog_label_base_pos::ycoord
sta dialog_label_pos+2
lda pointD::ycoord+1
lda dialog_label_base_pos::ycoord+1
adc #0
sta dialog_label_pos+3
MGTK_RELAY_CALL MGTK::MoveTo, dialog_label_pos

View File

@ -297,6 +297,9 @@ alert_bitmap2_params:
DEFINE_RECT 0, 0, 36, 23 ; maprect
.proc winfo_alert_dialog
width = 400
height = 100
window_id: .byte $0F
options: .byte MGTK::Option::dialog_box
title: .addr 0
@ -316,7 +319,7 @@ port:
viewloc: DEFINE_POINT 75, 35
mapbits: .addr MGTK::screen_mapbits
mapwidth: .word MGTK::screen_mapwidth
cliprect: DEFINE_RECT 0, 0, 400, 100
cliprect: DEFINE_RECT 0, 0, width, height
penpattern: .res 8, $FF
colormasks: .byte MGTK::colormask_and, MGTK::colormask_or
penloc: DEFINE_POINT 0, 0
@ -400,6 +403,7 @@ nextwinfo: .addr 0
.proc winfo_about_dialog
width = 400
height = 110
window_id: .byte $18
options: .byte MGTK::Option::dialog_box
@ -420,7 +424,7 @@ port:
viewloc: DEFINE_POINT (screen_width - width) / 2, 40
mapbits: .addr MGTK::screen_mapbits
mapwidth: .word MGTK::screen_mapwidth
cliprect: DEFINE_RECT 0, 0, width, 110
cliprect: DEFINE_RECT 0, 0, width, height
penpattern: .res 8, $FF
colormasks: .byte MGTK::colormask_and, MGTK::colormask_or
penloc: DEFINE_POINT 0, 0
@ -477,7 +481,9 @@ name_input_textpos: DEFINE_POINT 45,70, name_input_textpos
pos_dialog_title: DEFINE_POINT 0, 18, pos_dialog_title
point7: DEFINE_POINT 40,18, point7
pointD: DEFINE_POINT 40,35, pointD
dialog_label_base_pos:
DEFINE_POINT 40,35, dialog_label_base_pos
dialog_label_default_x = 40
dialog_label_pos:
@ -563,8 +569,8 @@ rect_D87F:
LD887:
.byte 0
rect_D888:
DEFINE_RECT 0,0,0,0
select_volume_rect:
DEFINE_RECT 0,0,0,0,select_volume_rect
LD890:
.byte 0

View File

@ -43,7 +43,7 @@ L085F: bit LD887
lda winfo_alert_dialog
jsr desktop_main::set_port_from_window_id
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::FrameRect, name_input_rect
jsr desktop_main::clear_path_buf1
@ -67,7 +67,7 @@ L08B7: lda path_buf1
lda winfo_alert_dialog
jsr desktop_main::set_port_from_window_id
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
ldx LD887
lda DEVLST,x
sta L09D8
@ -86,7 +86,7 @@ L0902: jsr desktop_main::prompt_input_loop
L090C: lda winfo_alert_dialog
jsr desktop_main::set_port_from_window_id
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
axy_call desktop_main::draw_dialog_label, 1, desktop_aux::str_formatting
lda L09D7
jsr L12C1
@ -99,7 +99,7 @@ L090C: lda winfo_alert_dialog
L0942: lda winfo_alert_dialog
jsr desktop_main::set_port_from_window_id
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
axy_call desktop_main::draw_dialog_label, 1, desktop_aux::str_erasing
addr_call upcase_string, path_buf1
ldxy #path_buf1
@ -174,7 +174,7 @@ L0A18: bit LD887
lda winfo_alert_dialog
jsr desktop_main::set_port_from_window_id
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::FrameRect, name_input_rect
jsr desktop_main::clear_path_buf1
@ -198,7 +198,7 @@ L0A7A: lda path_buf1
lda winfo_alert_dialog
jsr desktop_main::set_port_from_window_id
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
copy #$00, has_input_field_flag
ldx LD887
lda DEVLST,x
@ -217,7 +217,7 @@ L0AC7: jsr desktop_main::prompt_input_loop
L0AD1: lda winfo_alert_dialog
jsr desktop_main::set_port_from_window_id
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
axy_call desktop_main::draw_dialog_label, 1, desktop_aux::str_erasing
addr_call upcase_string, path_buf1
jsr desktop_main::set_cursor_watch
@ -323,37 +323,42 @@ L0C0F: lda L0C1E
L0C1E: .byte 0
L0C1F: .byte 0
L0C20: ldy #$27
sty rect_D888
ldy #$00
sty rect_D888+1
;;; ============================================================
;;; Hilight volume label
;;; Input: A = volume index
L0C20: ldy #39
sty select_volume_rect::x1
ldy #0
sty select_volume_rect::x1+1
tax
lsr a ; / 4
lsr a
lsr a
sta L0CA9
sta L0CA9 ; columne (0, 1, or 2)
beq L0C5B
add16 rect_D888, #$0078, rect_D888
add16 select_volume_rect::x1, #120, select_volume_rect::x1
lda L0CA9
cmp #$01
cmp #1
beq L0C5B
add16 rect_D888, #$0078, rect_D888
L0C5B: asl L0CA9
add16 select_volume_rect::x1, #120, select_volume_rect::x1
L0C5B: asl L0CA9 ; * 4
asl L0CA9
txa
sec
sbc L0CA9
sbc L0CA9 ; entry % 4
asl a
asl a
asl a
clc
adc #$2B
sta rect_D888+2
sta select_volume_rect::y1
lda #$00
sta rect_D888+3
add16 rect_D888, #$0077, rect_D888+4
add16 rect_D888+2, #$0007, rect_D888+6
sta select_volume_rect::y1+1
add16 select_volume_rect::x1, #119, select_volume_rect::x2
add16 select_volume_rect::y1, #7, select_volume_rect::y2
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, rect_D888
MGTK_RELAY_CALL MGTK::PaintRect, select_volume_rect
rts
L0CA9: .byte 0
@ -366,10 +371,10 @@ L0CB7: rts
;; Called from desktop_main
L0CB8: lda LD887
bpl L0CC1
lda #$00
lda #0
beq L0CCE
L0CC1: clc
adc #$04
adc #4
cmp LD890
bcs L0CD4
pha