mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-25 10:30:50 +00:00
Merge remote-tracking branch 'origin/disasm'
This commit is contained in:
commit
6e8e5a4cd4
34
MGTK.md
34
MGTK.md
@ -378,16 +378,16 @@ otherwise:
|
||||
```
|
||||
|
||||
```
|
||||
event_kind_no_event := 0 ; No mouse or keypress
|
||||
event_kind_button_down := 1 ; Mouse button was depressed
|
||||
event_kind_button_up := 2 ; Mouse button was released
|
||||
event_kind_key_down := 3 ; Key was pressed
|
||||
event_kind_drag := 4 ; Mouse button still down
|
||||
event_kind_apple_key := 5 ; Mouse button was depressed, modifier key down
|
||||
event_kind_update := 6 ; Window update needed
|
||||
event_kind_no_event = 0 ; No mouse or keypress
|
||||
event_kind_button_down = 1 ; Mouse button was depressed
|
||||
event_kind_button_up = 2 ; Mouse button was released
|
||||
event_kind_key_down = 3 ; Key was pressed
|
||||
event_kind_drag = 4 ; Mouse button still down
|
||||
event_kind_apple_key = 5 ; Mouse button was depressed, modifier key down
|
||||
event_kind_update = 6 ; Window update needed
|
||||
|
||||
event_modifier_open_apple := 1 << 0
|
||||
event_modifier_solid_apple := 1 << 1
|
||||
event_modifier_open_apple = 1 << 0
|
||||
event_modifier_solid_apple = 1 << 1
|
||||
```
|
||||
|
||||
### Menu
|
||||
@ -443,15 +443,15 @@ _title bar_ which in turn has an optional _close box_. Within the content area a
|
||||
optional _resize box_ and optional _scroll bars_.
|
||||
|
||||
```
|
||||
option_dialog_box := 1 << 0
|
||||
option_go_away_box := 1 << 1
|
||||
option_grow_box := 1 << 2
|
||||
option_dialog_box = 1 << 0
|
||||
option_go_away_box = 1 << 1
|
||||
option_grow_box = 1 << 2
|
||||
|
||||
scroll_option_none := 0
|
||||
scroll_option_present := 1 << 7
|
||||
scroll_option_thumb := 1 << 6
|
||||
scroll_option_active := 1 << 0
|
||||
scroll_option_normal := scroll_option_present | scroll_option_thumb | scroll_option_active
|
||||
scroll_option_none = 0
|
||||
scroll_option_present = 1 << 7
|
||||
scroll_option_thumb = 1 << 6
|
||||
scroll_option_active = 1 << 0
|
||||
scroll_option_normal = scroll_option_present | scroll_option_thumb | scroll_option_active
|
||||
```
|
||||
## Commands
|
||||
|
||||
|
@ -88,7 +88,7 @@ call_init:
|
||||
sta RAMWRTON
|
||||
rts
|
||||
.endproc
|
||||
sizeof_routine := * - routine
|
||||
sizeof_routine = * - routine
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
@ -152,31 +152,31 @@ flag: .byte MGTK::zp_overwrite
|
||||
;;; ============================================================
|
||||
;;; Button Definitions
|
||||
|
||||
button_width := 17
|
||||
button_height := 9
|
||||
button_width = 17
|
||||
button_height = 9
|
||||
|
||||
col1_left := 13
|
||||
col1_right := col1_left+button_width ; 30
|
||||
col2_left := 42
|
||||
col2_right := col2_left+button_width ; 59
|
||||
col3_left := 70
|
||||
col3_right := col3_left+button_width ; 87
|
||||
col4_left := 98
|
||||
col4_right := col4_left+button_width ; 115
|
||||
col1_left = 13
|
||||
col1_right = col1_left+button_width ; 30
|
||||
col2_left = 42
|
||||
col2_right = col2_left+button_width ; 59
|
||||
col3_left = 70
|
||||
col3_right = col3_left+button_width ; 87
|
||||
col4_left = 98
|
||||
col4_right = col4_left+button_width ; 115
|
||||
|
||||
row1_top := 22
|
||||
row1_bot := row1_top+button_height ; 31
|
||||
row2_top := 38
|
||||
row2_bot := row2_top+button_height ; 47
|
||||
row3_top := 53
|
||||
row3_bot := row3_top+button_height ; 62
|
||||
row4_top := 68
|
||||
row4_bot := row4_top+button_height ; 77
|
||||
row5_top := 83
|
||||
row5_bot := row5_top+button_height ; 92
|
||||
row1_top = 22
|
||||
row1_bot = row1_top+button_height ; 31
|
||||
row2_top = 38
|
||||
row2_bot = row2_top+button_height ; 47
|
||||
row3_top = 53
|
||||
row3_bot = row3_top+button_height ; 62
|
||||
row4_top = 68
|
||||
row4_bot = row4_top+button_height ; 77
|
||||
row5_top = 83
|
||||
row5_bot = row5_top+button_height ; 92
|
||||
|
||||
border_lt := 1 ; border width pixels (left/top)
|
||||
border_br := 2 ; (bottom/right)
|
||||
border_lt = 1 ; border width pixels (left/top)
|
||||
border_br = 2 ; (bottom/right)
|
||||
|
||||
.proc btn_c
|
||||
viewloc: DEFINE_POINT col1_left - border_lt, row1_top - border_lt
|
||||
@ -381,7 +381,7 @@ port: .word col4_left,row4_top,col4_right,row5_bot
|
||||
;; drawing the shadowed buttons.
|
||||
|
||||
;; bitmaps are low 7 bits, 0=black 1=white
|
||||
bitmap_stride := 3 ; bytes
|
||||
bitmap_stride = 3 ; bytes
|
||||
button_bitmap: ; bitmap for normal buttons
|
||||
.byte px(%0000000),px(%0000000),px(%0000001)
|
||||
.byte px(%0111111),px(%1111111),px(%1111100)
|
||||
@ -397,7 +397,7 @@ button_bitmap: ; bitmap for normal buttons
|
||||
.byte px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%1000000),px(%0000000),px(%0000000)
|
||||
|
||||
wide_bitmap_stride := 8
|
||||
wide_bitmap_stride = 8
|
||||
wide_button_bitmap: ; bitmap for '0' button
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1111111)
|
||||
.byte px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0111111)
|
||||
@ -483,10 +483,10 @@ white_pattern:
|
||||
backcolor: .byte $7F
|
||||
.endproc
|
||||
|
||||
display_left := 10
|
||||
display_top := 5
|
||||
display_width := 120
|
||||
display_height := 17
|
||||
display_left = 10
|
||||
display_top = 5
|
||||
display_width = 120
|
||||
display_height = 17
|
||||
|
||||
.proc frame_display_params
|
||||
left: .word display_left
|
||||
@ -514,7 +514,7 @@ textptr: .addr text_buffer1
|
||||
textlen: .byte 15
|
||||
.endproc
|
||||
|
||||
text_buffer_size := 14
|
||||
text_buffer_size = 14
|
||||
|
||||
text_buffer1:
|
||||
.res text_buffer_size+2, 0
|
||||
@ -595,7 +595,7 @@ textfont: .addr 0
|
||||
|
||||
.byte 0 ; ???
|
||||
|
||||
menu_bar_height := 13
|
||||
menu_bar_height = 13
|
||||
|
||||
;; params for MGTK::SetPortBits when decorating title bar
|
||||
.proc screen_port
|
||||
@ -619,10 +619,10 @@ penmode: .byte MGTK::pencopy
|
||||
penmode: .byte MGTK::notpenXOR
|
||||
.endproc
|
||||
|
||||
window_width := 130
|
||||
window_height := 96
|
||||
default_left := 210
|
||||
default_top := 60
|
||||
window_width = 130
|
||||
window_height = 96
|
||||
default_left = 210
|
||||
default_top = 60
|
||||
|
||||
.proc winfo
|
||||
window_id: .byte da_window_id
|
||||
@ -786,7 +786,7 @@ exit: MGTK_CALL MGTK::CloseWindow, closewindow_params
|
||||
sta RAMWRTOFF
|
||||
jmp exit_da
|
||||
.endproc
|
||||
sizeof_routine := * - routine ; Can't use .sizeof before the .proc definition
|
||||
sizeof_routine = * - routine ; Can't use .sizeof before the .proc definition
|
||||
.endproc
|
||||
|
||||
: cmp #MGTK::Area::dragbar ; Title bar?
|
||||
@ -1479,8 +1479,8 @@ loop: ldy #0
|
||||
;;; Draw the title bar decoration
|
||||
|
||||
draw_title_bar:
|
||||
offset_left := 115 ; pixels from left of client area
|
||||
offset_top := 22 ; pixels from top of client area (up!)
|
||||
offset_left = 115 ; pixels from left of client area
|
||||
offset_top = 22 ; pixels from top of client area (up!)
|
||||
ldx winfo::left+1
|
||||
lda winfo::left
|
||||
clc
|
||||
@ -1549,7 +1549,7 @@ loop: inc TXTPTR
|
||||
end: rts
|
||||
.endproc
|
||||
.org save_org + .sizeof(adjust_txtptr_copied)
|
||||
sizeof_adjust_txtptr_copied := .sizeof(adjust_txtptr_copied)
|
||||
sizeof_adjust_txtptr_copied = .sizeof(adjust_txtptr_copied)
|
||||
|
||||
|
||||
CALL_FLOAT:
|
||||
|
@ -31,7 +31,7 @@ filename:
|
||||
|
||||
write_buffer:
|
||||
.byte 0,0
|
||||
sizeof_write_buffer := * - write_buffer
|
||||
sizeof_write_buffer = * - write_buffer
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
@ -128,10 +128,10 @@ start_da:
|
||||
;; The following 7 rects are iterated over to identify
|
||||
;; a hit target for a click.
|
||||
|
||||
num_hit_rects := 7
|
||||
first_hit_rect := *
|
||||
up_rect_index := 3
|
||||
down_rect_index := 4
|
||||
num_hit_rects = 7
|
||||
first_hit_rect = *
|
||||
up_rect_index = 3
|
||||
down_rect_index = 4
|
||||
|
||||
ok_button_rect:
|
||||
.word $6A,$2E,$B5,$39
|
||||
@ -209,7 +209,7 @@ which_area:.byte 0
|
||||
window_id: .byte 0
|
||||
.endproc
|
||||
|
||||
da_window_id := 100
|
||||
da_window_id = 100
|
||||
|
||||
.proc screentowindow_params
|
||||
window_id: .byte da_window_id
|
||||
@ -520,12 +520,12 @@ decrement_table:
|
||||
.addr 0, decrement_day, decrement_month, decrement_year
|
||||
|
||||
|
||||
day_min := 1
|
||||
day_max := 31
|
||||
month_min := 1
|
||||
month_max := 12
|
||||
year_min := 0
|
||||
year_max := 99
|
||||
day_min = 1
|
||||
day_max = 31
|
||||
month_min = 1
|
||||
month_max = 12
|
||||
year_min = 0
|
||||
year_max = 99
|
||||
|
||||
increment_day:
|
||||
clc
|
||||
@ -598,7 +598,7 @@ decrement_year:
|
||||
|
||||
ptr := $07
|
||||
str := month_string + 3
|
||||
len := 3
|
||||
len = 3
|
||||
|
||||
copy16 #str, ptr
|
||||
|
||||
@ -661,7 +661,7 @@ skip: jmp dest
|
||||
sta RAMWRTOFF
|
||||
jmp save_date_and_exit
|
||||
.endproc
|
||||
sizeof_routine := * - routine
|
||||
sizeof_routine = * - routine
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
@ -64,7 +64,7 @@ stash_stack: .byte 0
|
||||
jmp create_window
|
||||
.endproc
|
||||
|
||||
da_window_id := 51
|
||||
da_window_id = 51
|
||||
|
||||
;;; ============================================================
|
||||
;;; Redraw the screen (all windows) after a EventKind::drag
|
||||
@ -98,7 +98,7 @@ skip: lda #0
|
||||
sta RAMWRTON
|
||||
rts
|
||||
.endproc
|
||||
sizeof_routine := * - routine
|
||||
sizeof_routine = * - routine
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
@ -176,16 +176,16 @@ a_grafport: .addr setport_params
|
||||
getwinport_params_window_id := getwinport_params::window_id
|
||||
|
||||
;; Puzzle piece row/columns
|
||||
cw := 28
|
||||
c1 := 5
|
||||
c2 := c1 + cw
|
||||
c3 := c2 + cw
|
||||
c4 := c3 + cw
|
||||
rh := 16
|
||||
r1 := 3
|
||||
r2 := r1 + rh
|
||||
r3 := r2 + rh
|
||||
r4 := r3 + rh
|
||||
cw = 28
|
||||
c1 = 5
|
||||
c2 = c1 + cw
|
||||
c3 = c2 + cw
|
||||
c4 = c3 + cw
|
||||
rh = 16
|
||||
r1 = 3
|
||||
r2 = r1 + rh
|
||||
r3 = r2 + rh
|
||||
r4 = r3 + rh
|
||||
|
||||
space_positions: ; left, top for all 16 holes
|
||||
.word c1,r1
|
||||
@ -579,10 +579,10 @@ setport_params:
|
||||
.byte $00,$2F,$02,$B1,$00,$00,$01,$02
|
||||
.byte $06
|
||||
|
||||
default_left := 220
|
||||
default_top := 80
|
||||
default_width := $79
|
||||
default_height := $44
|
||||
default_left = 220
|
||||
default_top = 80
|
||||
default_width = $79
|
||||
default_height = $44
|
||||
|
||||
.proc winfo
|
||||
window_id: .byte da_window_id
|
||||
@ -743,7 +743,7 @@ destroy:
|
||||
sta RAMWRTOFF
|
||||
jmp exit_da
|
||||
.endproc
|
||||
sizeof_routine := * - routine
|
||||
sizeof_routine = * - routine
|
||||
|
||||
;; title bar?
|
||||
check_title:
|
||||
@ -844,7 +844,7 @@ nope: clc
|
||||
;;; ============================================================
|
||||
;;; Process piece click
|
||||
|
||||
hole_piece := 12
|
||||
hole_piece = 12
|
||||
|
||||
.proc process_click
|
||||
|
||||
|
@ -56,7 +56,7 @@ call_main_addr := call_main_trampoline+7 ; address patched in her
|
||||
sta RAMWRTON
|
||||
rts
|
||||
.endproc
|
||||
sizeof_call_main_template := * - call_main_template
|
||||
sizeof_call_main_template = * - call_main_template
|
||||
|
||||
.proc call_init
|
||||
;; run the DA
|
||||
@ -160,7 +160,7 @@ params_start:
|
||||
|
||||
io_buf := $0C00
|
||||
default_buffer := $1200
|
||||
read_length := $0100
|
||||
read_length = $0100
|
||||
|
||||
DEFINE_OPEN_PARAMS open_params, pathbuf, io_buf
|
||||
DEFINE_READ_PARAMS read_params, default_buffer, read_length
|
||||
@ -185,10 +185,10 @@ black_pattern:
|
||||
white_pattern:
|
||||
.res $8, $FF
|
||||
|
||||
da_window_id := 100
|
||||
da_window_id = 100
|
||||
|
||||
line_spacing := 10
|
||||
right_const := 506
|
||||
line_spacing = 10
|
||||
right_const = 506
|
||||
|
||||
L095A: .byte $00
|
||||
L095B: .word right_const
|
||||
@ -279,10 +279,10 @@ textptr: .addr 0 ; address
|
||||
textlen: .byte 0 ; length
|
||||
.endproc
|
||||
|
||||
default_width := 512
|
||||
default_height := 150
|
||||
default_left := 10
|
||||
default_top := 28
|
||||
default_width = 512
|
||||
default_height = 150
|
||||
default_left = 10
|
||||
default_top = 28
|
||||
|
||||
.proc winfo
|
||||
window_id: .byte da_window_id ; window identifier
|
||||
@ -582,7 +582,7 @@ no_mod:
|
||||
jsr redraw_screen
|
||||
jsr calc_window_size
|
||||
|
||||
max_width := default_width
|
||||
max_width = default_width
|
||||
lda #>max_width
|
||||
cmp winfo::maprect::x2+1
|
||||
bne :+
|
||||
@ -731,7 +731,7 @@ end: rts
|
||||
end: rts
|
||||
.endproc
|
||||
|
||||
vscroll_max := $FA
|
||||
vscroll_max = $FA
|
||||
|
||||
.proc on_vscroll_below_click
|
||||
loop: jsr page_down
|
||||
@ -1481,8 +1481,8 @@ ignore: clc ; Click ignored
|
||||
|
||||
fixed_str: DEFINE_STRING "Fixed "
|
||||
prop_str: DEFINE_STRING "Proportional"
|
||||
label_width := 50
|
||||
title_bar_height := 12
|
||||
label_width = 50
|
||||
title_bar_height = 12
|
||||
|
||||
.proc mode_mapinfo ; bounding port for mode label
|
||||
viewloc: DEFINE_POINT 0, 0, viewloc
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
dir_data_buffer := $0E00
|
||||
dir_data_buffer_len := $0E00
|
||||
dir_data_buffer_len = $0E00
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
@ -139,7 +139,7 @@ on_line_buffer:
|
||||
|
||||
io_buf := $1C00
|
||||
buffer := dir_data_buffer
|
||||
buffer_len := dir_data_buffer_len
|
||||
buffer_len = dir_data_buffer_len
|
||||
|
||||
DEFINE_OPEN_PARAMS open_params, path_buf, io_buf
|
||||
DEFINE_READ_PARAMS read_params, buffer, buffer_len
|
||||
|
78
desktop.inc
78
desktop.inc
@ -2,8 +2,8 @@
|
||||
;;; DeskTop Internals
|
||||
;;; ============================================================
|
||||
|
||||
screen_width := 560
|
||||
screen_height := 192
|
||||
screen_width = 560
|
||||
screen_height = 192
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
@ -11,7 +11,7 @@ VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 2
|
||||
.define VERSION_SUFFIX "-alpha1"
|
||||
|
||||
DA_FILE_TYPE := $F1
|
||||
DA_FILE_TYPE = $F1
|
||||
|
||||
max_desk_acc_count = 12
|
||||
|
||||
@ -20,7 +20,7 @@ INVOKER_FILENAME := $280 ; File to invoke (PREFIX must be set)
|
||||
|
||||
DA_LOAD_ADDRESS := $800 ; Loaded into MAIN
|
||||
DA_IO_BUFFER := $1C00 ; ...through $1FFF
|
||||
DA_MAX_SIZE := DA_IO_BUFFER - DA_LOAD_ADDRESS
|
||||
DA_MAX_SIZE = DA_IO_BUFFER - DA_LOAD_ADDRESS
|
||||
;; Can't load DA past I/O Buffer at MAIN $1C00,
|
||||
;; but icon tables start at AUX $1B00 so can't clone there.
|
||||
|
||||
@ -79,24 +79,24 @@ DESKTOP := $8E00
|
||||
|
||||
;; Implementation bounces to $93BC, uses jump table at $939E
|
||||
|
||||
DT_ADD_ICON := $01 ; { .addr icondata }
|
||||
DT_HIGHLIGHT_ICON := $02 ; { .byte icon }
|
||||
DT_REDRAW_ICON := $03 ; { .byte icon }
|
||||
DT_REMOVE_ICON := $04 ; { .byte icon }
|
||||
DT_HIGHLIGHT_ALL := $05 ; { .byte window_id }
|
||||
DT_UNHIGHLIGHT_ALL := $06
|
||||
DT_CLOSE_WINDOW := $07 ; { .byte window_id }
|
||||
DT_GET_HIGHLIGHTED := $08 ; { .res 20 }
|
||||
DT_FIND_ICON := $09 ; { .word mousex, .word mousey, .byte result }
|
||||
DT_DRAG_HIGHLIGHTED := $0A ; { .byte param }
|
||||
DT_ADD_ICON = $01 ; { .addr icondata }
|
||||
DT_HIGHLIGHT_ICON = $02 ; { .byte icon }
|
||||
DT_REDRAW_ICON = $03 ; { .byte icon }
|
||||
DT_REMOVE_ICON = $04 ; { .byte icon }
|
||||
DT_HIGHLIGHT_ALL = $05 ; { .byte window_id }
|
||||
DT_UNHIGHLIGHT_ALL = $06
|
||||
DT_CLOSE_WINDOW = $07 ; { .byte window_id }
|
||||
DT_GET_HIGHLIGHTED = $08 ; { .res 20 }
|
||||
DT_FIND_ICON = $09 ; { .word mousex, .word mousey, .byte result }
|
||||
DT_DRAG_HIGHLIGHTED = $0A ; { .byte param }
|
||||
; Input: specific icon being dragged
|
||||
; Output: 0 = on desktop (no-op)
|
||||
; hi bit clear: low bits are target icon
|
||||
; hi bit set: low bits are target window
|
||||
DT_UNHIGHLIGHT_ICON := $0B ; { .addr iconentry }
|
||||
DT_REDRAW_ICONS := $0C ; Repaints desktop icons *
|
||||
DT_ICON_IN_RECT := $0D ; { .byte icon, rect bounds }
|
||||
DT_REDRAW_ICON_IDX := $0E ; { .byte icon_index }
|
||||
DT_UNHIGHLIGHT_ICON = $0B ; { .addr iconentry }
|
||||
DT_REDRAW_ICONS = $0C ; Repaints desktop icons *
|
||||
DT_ICON_IN_RECT = $0D ; { .byte icon, rect bounds }
|
||||
DT_REDRAW_ICON_IDX = $0E ; { .byte icon_index }
|
||||
|
||||
;;; `icon` is the icon number, i.e. first field in icon entry
|
||||
;;; `icon_index` is the index in the icon table
|
||||
@ -209,17 +209,17 @@ last_menu_click_params := $E25A
|
||||
name .res 17 ; 15 chars plus leading/trailing spaces
|
||||
.endstruct
|
||||
|
||||
max_icon_count := 127
|
||||
max_icon_count = 127
|
||||
|
||||
icon_entry_open_mask := %10000000
|
||||
icon_entry_type_mask := %01110000
|
||||
icon_entry_winid_mask := %00001111
|
||||
icon_entry_type_dir := %00000000
|
||||
icon_entry_type_sys := %00010000
|
||||
icon_entry_type_bin := %00100000
|
||||
icon_entry_type_bas := %00110000
|
||||
icon_entry_type_txt := %01010000
|
||||
icon_entry_type_trash := %01110000
|
||||
icon_entry_open_mask = %10000000
|
||||
icon_entry_type_mask = %01110000
|
||||
icon_entry_winid_mask = %00001111
|
||||
icon_entry_type_dir = %00000000
|
||||
icon_entry_type_sys = %00010000
|
||||
icon_entry_type_bin = %00100000
|
||||
icon_entry_type_bas = %00110000
|
||||
icon_entry_type_txt = %01010000
|
||||
icon_entry_type_trash = %01110000
|
||||
|
||||
;;; ============================================================
|
||||
;;; Internals - Default Font
|
||||
@ -249,19 +249,19 @@ DEFAULT_FONT := $8800
|
||||
;;; $0E = (C) $1E = solid apple (MT:@)
|
||||
;;; $0F = (R) $1F = open apple (MT:A)
|
||||
|
||||
GLYPH_FOLDERL := $01
|
||||
GLYPH_FOLDERR := $02
|
||||
GLYPH_FOLDERL = $01
|
||||
GLYPH_FOLDERR = $02
|
||||
|
||||
GLYPH_SPC := $00
|
||||
GLYPH_INSPT := $06
|
||||
GLYPH_SPC = $00
|
||||
GLYPH_INSPT = $06
|
||||
|
||||
GLYPH_LARROW := $09
|
||||
GLYPH_RARROW := $15
|
||||
GLYPH_UARROW := $0B
|
||||
GLYPH_DARROW := $0A
|
||||
GLYPH_RETURN := $0D
|
||||
GLYPH_OAPPLE := $1F
|
||||
GLYPH_SAPPLE := $1E
|
||||
GLYPH_LARROW = $09
|
||||
GLYPH_RARROW = $15
|
||||
GLYPH_UARROW = $0B
|
||||
GLYPH_DARROW = $0A
|
||||
GLYPH_RETURN = $0D
|
||||
GLYPH_OAPPLE = $1F
|
||||
GLYPH_SAPPLE = $1E
|
||||
|
||||
;;; Menu (by default) uses:
|
||||
;;; Solid Mod $1E
|
||||
|
@ -638,7 +638,7 @@ done: rts
|
||||
|
||||
open_io_buffer := $A000
|
||||
dir_buffer := $A400
|
||||
dir_bufsize := BLOCK_SIZE
|
||||
dir_bufsize = BLOCK_SIZE
|
||||
|
||||
entry_length_offset := $23
|
||||
file_count_offset := $25
|
||||
|
@ -12,12 +12,12 @@
|
||||
|
||||
;;; Constants needed in both main and aux
|
||||
|
||||
menu_id_apple := 1
|
||||
menu_id_file := 2
|
||||
menu_id_view := 4
|
||||
menu_id_special := 5
|
||||
menu_id_startup := 8
|
||||
menu_id_selector := 3
|
||||
menu_id_apple = 1
|
||||
menu_id_file = 2
|
||||
menu_id_view = 4
|
||||
menu_id_special = 5
|
||||
menu_id_startup = 8
|
||||
menu_id_selector = 3
|
||||
|
||||
;;; Various routines callable from MAIN
|
||||
|
||||
|
@ -24,15 +24,15 @@ dst_path_buf := $1FC0
|
||||
dynamic_routine_7000 := $7000
|
||||
dynamic_routine_9000 := $9000
|
||||
|
||||
dynamic_routine_disk_copy := 0
|
||||
dynamic_routine_format_erase := 1
|
||||
dynamic_routine_selector1 := 2
|
||||
dynamic_routine_common := 3
|
||||
dynamic_routine_file_copy := 4
|
||||
dynamic_routine_file_delete := 5
|
||||
dynamic_routine_selector2 := 6
|
||||
dynamic_routine_restore5000 := 7
|
||||
dynamic_routine_restore9000 := 8
|
||||
dynamic_routine_disk_copy = 0
|
||||
dynamic_routine_format_erase = 1
|
||||
dynamic_routine_selector1 = 2
|
||||
dynamic_routine_common = 3
|
||||
dynamic_routine_file_copy = 4
|
||||
dynamic_routine_file_delete = 5
|
||||
dynamic_routine_selector2 = 6
|
||||
dynamic_routine_restore5000 = 7
|
||||
dynamic_routine_restore9000 = 8
|
||||
|
||||
|
||||
.org $4000
|
||||
@ -12128,17 +12128,17 @@ driver: jmp (RAMSLOT)
|
||||
;;; ============================================================
|
||||
;;; Dialog Launcher (or just proc handler???)
|
||||
|
||||
index_about_dialog := 0
|
||||
index_copy_dialog := 1
|
||||
index_delete_dialog := 2
|
||||
index_new_folder_dialog := 3
|
||||
index_get_info_dialog := 6
|
||||
index_lock_dialog := 7
|
||||
index_unlock_dialog := 8
|
||||
index_rename_dialog := 9
|
||||
index_download_dialog := $A
|
||||
index_get_size_dialog := $B
|
||||
index_warning_dialog := $C
|
||||
index_about_dialog = 0
|
||||
index_copy_dialog = 1
|
||||
index_delete_dialog = 2
|
||||
index_new_folder_dialog = 3
|
||||
index_get_info_dialog = 6
|
||||
index_lock_dialog = 7
|
||||
index_unlock_dialog = 8
|
||||
index_rename_dialog = 9
|
||||
index_download_dialog = 10
|
||||
index_get_size_dialog = 11
|
||||
index_warning_dialog = 12
|
||||
|
||||
invoke_dialog_proc:
|
||||
.assert * = $A500, error, "Entry point used by overlay"
|
||||
@ -13492,13 +13492,13 @@ warning_message_table:
|
||||
.addr desktop_aux::str_too_many_windows,desktop_aux::str_1_space
|
||||
.addr desktop_aux::str_save_selector_list,desktop_aux::str_on_system_disk
|
||||
.endproc
|
||||
warning_msg_insert_system_disk := 0
|
||||
warning_msg_selector_list_full := 1
|
||||
warning_msg_selector_list_full2 := 2
|
||||
warning_msg_window_must_be_closed := 3
|
||||
warning_msg_window_must_be_closed2 := 4
|
||||
warning_msg_too_many_windows := 5
|
||||
warning_msg_save_selector_list := 6
|
||||
warning_msg_insert_system_disk = 0
|
||||
warning_msg_selector_list_full = 1
|
||||
warning_msg_selector_list_full2 = 2
|
||||
warning_msg_window_must_be_closed = 3
|
||||
warning_msg_window_must_be_closed2 = 4
|
||||
warning_msg_too_many_windows = 5
|
||||
warning_msg_save_selector_list = 6
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
@ -13568,8 +13568,8 @@ set_penmode_xor2:
|
||||
.proc detect_double_click
|
||||
.assert * = $B445, error, "Entry point used by overlay"
|
||||
|
||||
double_click_deltax := 5
|
||||
double_click_deltay := 4
|
||||
double_click_deltax = 5
|
||||
double_click_deltay = 4
|
||||
|
||||
;; Stash initial coords
|
||||
ldx #3
|
||||
@ -13722,7 +13722,7 @@ done: jmp reset_grafport3a
|
||||
;;; A,X has pointer to DrawText params block
|
||||
;;; Y has row number (1, 2, ... ) with high bit to center it
|
||||
|
||||
DDL_CENTER := $80
|
||||
DDL_CENTER = $80
|
||||
|
||||
.proc draw_dialog_label
|
||||
.assert * = $B590, error, "Entry point used by overlay"
|
||||
|
@ -457,7 +457,7 @@ nextwinfo: .addr 0
|
||||
;;; "About Apple II Desktop" Dialog
|
||||
|
||||
.proc winfo_about_dialog
|
||||
width := 400
|
||||
width = 400
|
||||
|
||||
window_id: .byte $18
|
||||
options: .byte MGTK::Option::dialog_box
|
||||
@ -494,7 +494,7 @@ winfo_about_dialog_port := winfo_about_dialog::port
|
||||
;;; Dialog used for Edit/Delete/Run an Entry ...
|
||||
|
||||
.proc winfo_entry_picker
|
||||
width := 350
|
||||
width = 350
|
||||
|
||||
window_id: .byte $1B
|
||||
options: .byte MGTK::Option::dialog_box
|
||||
@ -537,7 +537,7 @@ pos_dialog_title: DEFINE_POINT 0, 18, pos_dialog_title
|
||||
point7: DEFINE_POINT 40,18, point7
|
||||
pointD: DEFINE_POINT 40,35, pointD
|
||||
|
||||
dialog_label_default_x := 40
|
||||
dialog_label_default_x = 40
|
||||
dialog_label_pos:
|
||||
DEFINE_POINT dialog_label_default_x,0, dialog_label_pos
|
||||
|
||||
@ -652,7 +652,7 @@ has_input_field_flag:
|
||||
.byte 0
|
||||
|
||||
|
||||
prompt_insertion_point_blink_count := $14
|
||||
prompt_insertion_point_blink_count = $14
|
||||
|
||||
prompt_ip_counter:
|
||||
.byte prompt_insertion_point_blink_count
|
||||
@ -1247,11 +1247,11 @@ LE6C1:
|
||||
.addr winfo8title_ptr
|
||||
|
||||
;; (low nibble must match menu order)
|
||||
view_by_icon := $80
|
||||
view_by_name := $81
|
||||
view_by_date := $82
|
||||
view_by_size := $83
|
||||
view_by_type := $84
|
||||
view_by_icon = $80
|
||||
view_by_name = $81
|
||||
view_by_date = $82
|
||||
view_by_size = $83
|
||||
view_by_type = $84
|
||||
|
||||
win_view_by_table:
|
||||
.res 8, 0
|
||||
|
@ -422,14 +422,10 @@ max_page:
|
||||
.org $280
|
||||
|
||||
SLOT1 := $C100
|
||||
TAB := $09
|
||||
LF := $0A
|
||||
CR := $0D
|
||||
ESC := $1B
|
||||
|
||||
hbasl := $6
|
||||
screen_width := 560
|
||||
screen_height := 192
|
||||
screen_width = 560
|
||||
screen_height = 192
|
||||
|
||||
;; Test for OpenApple+SolidApple+P
|
||||
pha
|
||||
@ -484,7 +480,7 @@ done: rts
|
||||
bne :-
|
||||
rts
|
||||
init_graphics:
|
||||
.byte ESC,"G0560" ; Graphics, 560 data bytes
|
||||
.byte CHAR_ESCAPE,"G0560" ; Graphics, 560 data bytes
|
||||
.endproc
|
||||
|
||||
.proc send_row
|
||||
@ -560,9 +556,9 @@ done: sta PAGE2OFF ; Read main mem $2000-$3FFF
|
||||
|
||||
;; Print a row (560x8), CR+LF
|
||||
loop: jsr send_row
|
||||
lda #CR
|
||||
lda #CHAR_RETURN
|
||||
jsr cout
|
||||
lda #LF
|
||||
lda #CHAR_DOWN
|
||||
jsr cout
|
||||
|
||||
lda y_coord
|
||||
@ -571,9 +567,9 @@ loop: jsr send_row
|
||||
bcc loop
|
||||
|
||||
;; Finish up
|
||||
lda #CR
|
||||
lda #CHAR_RETURN
|
||||
jsr cout
|
||||
lda #CR
|
||||
lda #CHAR_RETURN
|
||||
jsr cout
|
||||
jsr send_restore_state
|
||||
sta ALTZPON
|
||||
@ -612,7 +608,7 @@ loop: jsr send_row
|
||||
sta COUT_HOOK+1
|
||||
lda #<SLOT1
|
||||
sta COUT_HOOK
|
||||
lda #(CR | $80)
|
||||
lda #(CHAR_RETURN | $80)
|
||||
jsr invoke_slot1
|
||||
rts
|
||||
.endproc
|
||||
@ -633,15 +629,15 @@ col_num:.byte 0 ; 0...79
|
||||
.byte 0, 0
|
||||
|
||||
spacing_sequence:
|
||||
.byte ESC,'e' ; 107 DPI (horizontal)
|
||||
.byte ESC,"T16" ; distance between lines (16/144")
|
||||
.byte TAB,$4C,$20,$44,$8D ; ???
|
||||
.byte TAB,$5A,$8D ; ???
|
||||
.byte CHAR_ESCAPE,'e' ; 107 DPI (horizontal)
|
||||
.byte CHAR_ESCAPE,"T16" ; distance between lines (16/144")
|
||||
.byte CHAR_TAB,$4C,$20,$44,$8D ; ???
|
||||
.byte CHAR_TAB,$5A,$8D ; ???
|
||||
.byte 0
|
||||
|
||||
restore_state:
|
||||
.byte ESC,'N' ; 80 DPI (horizontal)
|
||||
.byte ESC,"T24" ; distance between lines (24/144")
|
||||
.byte CHAR_ESCAPE,'N' ; 80 DPI (horizontal)
|
||||
.byte CHAR_ESCAPE,"T24" ; distance between lines (24/144")
|
||||
.byte 0
|
||||
|
||||
invoke_slot1:
|
||||
|
@ -87,9 +87,9 @@ key_mods := * + 3
|
||||
;;; ============================================================
|
||||
;;; Menu definition
|
||||
|
||||
menu_id_apple := 1
|
||||
menu_id_file := 2
|
||||
menu_id_facilities := 3
|
||||
menu_id_apple = 1
|
||||
menu_id_file = 2
|
||||
menu_id_facilities = 3
|
||||
|
||||
menu_definition:
|
||||
DEFINE_MENU_BAR 3
|
||||
|
@ -208,24 +208,24 @@ WRMODE := $C08F ; Turn on write mode
|
||||
|
||||
;;; Firmware Routines
|
||||
|
||||
SETMOUSE := $12
|
||||
SERVEMOUSE := $13
|
||||
READMOUSE := $14
|
||||
CLEARMOUSE := $15
|
||||
POSMOUSE := $16
|
||||
CLAMPMOUSE := $17
|
||||
HOMEMOUSE := $18
|
||||
INITMOUSE := $19
|
||||
SETMOUSE = $12
|
||||
SERVEMOUSE = $13
|
||||
READMOUSE = $14
|
||||
CLEARMOUSE = $15
|
||||
POSMOUSE = $16
|
||||
CLAMPMOUSE = $17
|
||||
HOMEMOUSE = $18
|
||||
INITMOUSE = $19
|
||||
|
||||
;;; Constants
|
||||
|
||||
CLAMP_X := 0
|
||||
CLAMP_Y := 1
|
||||
CLAMP_X = 0
|
||||
CLAMP_Y = 1
|
||||
|
||||
MOUSE_MODE_OFF := $00
|
||||
MOUSE_MODE_TRANS:= $01
|
||||
MOUSE_MODE_INT := $03
|
||||
MOUSE_MODE_BTN := $05
|
||||
MOUSE_MODE_OFF = $00
|
||||
MOUSE_MODE_TRANS= $01
|
||||
MOUSE_MODE_INT = $03
|
||||
MOUSE_MODE_BTN = $05
|
||||
|
||||
;;; RAM Locations
|
||||
|
||||
@ -249,16 +249,16 @@ MOUSE_MODE := $0738
|
||||
;;; Character Constants (Screen/Key Codes)
|
||||
;;; ============================================================
|
||||
|
||||
CHAR_MASK := $7F
|
||||
CASE_MASK := $DF
|
||||
CHAR_MASK = $7F
|
||||
CASE_MASK = $DF
|
||||
|
||||
CHAR_CTRL_C := $03
|
||||
CHAR_LEFT := $08
|
||||
CHAR_TAB := $09
|
||||
CHAR_DOWN := $0A
|
||||
CHAR_UP := $0B
|
||||
CHAR_RETURN := $0D
|
||||
CHAR_CTRL_O := $0F
|
||||
CHAR_RIGHT := $15
|
||||
CHAR_ESCAPE := $1B
|
||||
CHAR_DELETE := $7F
|
||||
CHAR_CTRL_C = $03
|
||||
CHAR_LEFT = $08
|
||||
CHAR_TAB = $09
|
||||
CHAR_DOWN = $0A
|
||||
CHAR_UP = $0B
|
||||
CHAR_RETURN = $0D
|
||||
CHAR_CTRL_O = $0F
|
||||
CHAR_RIGHT = $15
|
||||
CHAR_ESCAPE = $1B
|
||||
CHAR_DELETE = $7F
|
||||
|
130
inc/prodos.inc
130
inc/prodos.inc
@ -13,7 +13,7 @@ DEVNUM := $BF30 ; Most recent accessed device
|
||||
DEVCNT := $BF31 ; Number of on-line devices minus 1
|
||||
DEVLST := $BF32 ; Up to 14 units ($BF32-$BF3F)
|
||||
BITMAP := $BF58 ; System memory bitmap
|
||||
BITMAP_SIZE := $18 ; Bits for pages $00 to $BF
|
||||
BITMAP_SIZE = $18 ; Bits for pages $00 to $BF
|
||||
DATELO := $BF90 ; Date lo
|
||||
DATEHI := $BF91 ; Date hi
|
||||
TIMELO := $BF92 ; Time lo
|
||||
@ -27,45 +27,45 @@ KVERSION := $BFFF ; ProDOS Kernel Version
|
||||
;;; Patch Locations
|
||||
SELECTOR := $D100
|
||||
|
||||
BLOCK_SIZE := $200
|
||||
BLOCK_SIZE = $200
|
||||
|
||||
;;; ============================================================
|
||||
;;; MLI Calls
|
||||
;;; ============================================================
|
||||
|
||||
;;; Housekeeping Calls
|
||||
CREATE := $C0
|
||||
DESTROY := $C1
|
||||
RENAME := $C2
|
||||
SET_FILE_INFO := $C3
|
||||
GET_FILE_INFO := $C4
|
||||
ON_LINE := $C5
|
||||
SET_PREFIX := $C6
|
||||
GET_PREFIX := $C7
|
||||
CREATE = $C0
|
||||
DESTROY = $C1
|
||||
RENAME = $C2
|
||||
SET_FILE_INFO = $C3
|
||||
GET_FILE_INFO = $C4
|
||||
ON_LINE = $C5
|
||||
SET_PREFIX = $C6
|
||||
GET_PREFIX = $C7
|
||||
|
||||
;;; Filing Calls
|
||||
OPEN := $C8
|
||||
NEWLINE := $C9
|
||||
READ := $CA
|
||||
WRITE := $CB
|
||||
CLOSE := $CC
|
||||
FLUSH := $CD
|
||||
SET_MARK := $CE
|
||||
GET_MARK := $CF
|
||||
SET_EOF := $D0
|
||||
GET_EOF := $D1
|
||||
SET_BUF := $D2
|
||||
GET_BUF := $D3
|
||||
OPEN = $C8
|
||||
NEWLINE = $C9
|
||||
READ = $CA
|
||||
WRITE = $CB
|
||||
CLOSE = $CC
|
||||
FLUSH = $CD
|
||||
SET_MARK = $CE
|
||||
GET_MARK = $CF
|
||||
SET_EOF = $D0
|
||||
GET_EOF = $D1
|
||||
SET_BUF = $D2
|
||||
GET_BUF = $D3
|
||||
|
||||
;;; System Calls
|
||||
GET_TIME := $82
|
||||
ALLOC_INTERRUPT := $40
|
||||
DEALLOC_INTERRUPT := $41
|
||||
QUIT := $65
|
||||
GET_TIME = $82
|
||||
ALLOC_INTERRUPT = $40
|
||||
DEALLOC_INTERRUPT = $41
|
||||
QUIT = $65
|
||||
|
||||
;;; Direct Disk Access Commands
|
||||
READ_BLOCK := $80
|
||||
WRITE_BLOCK := $81
|
||||
READ_BLOCK = $80
|
||||
WRITE_BLOCK = $81
|
||||
|
||||
;;; ============================================================
|
||||
;;; Device Types (low nibble of unit number in DEVLST)
|
||||
@ -73,10 +73,10 @@ WRITE_BLOCK := $81
|
||||
|
||||
;;; As used by DeskTop; these are not actually correct...
|
||||
|
||||
DT_DISKII := $0
|
||||
DT_PROFILE := $4
|
||||
DT_REMOVABLE := $B
|
||||
DT_RAM := $F
|
||||
DT_DISKII = $0
|
||||
DT_PROFILE = $4
|
||||
DT_REMOVABLE = $B
|
||||
DT_RAM = $F
|
||||
|
||||
;;; See ProDOS Tech Note #21 - other than the above types, there
|
||||
;;; is not an "ID nibble". The nibble is a copy of $CnFE's high
|
||||
@ -90,48 +90,48 @@ DT_RAM := $F
|
||||
;;; File Types
|
||||
;;; ============================================================
|
||||
|
||||
FT_TYPELESS := $00
|
||||
FT_BAD := $01
|
||||
FT_TEXT := $04
|
||||
FT_BINARY := $06
|
||||
FT_DIRECTORY := $0F
|
||||
FT_SRC := $B0 ; IIgs system type; re-used?
|
||||
FT_S16 := $B3 ; IIgs Application Program
|
||||
FT_BASIC := $FC
|
||||
FT_SYSTEM := $FF
|
||||
FT_TYPELESS = $00
|
||||
FT_BAD = $01
|
||||
FT_TEXT = $04
|
||||
FT_BINARY = $06
|
||||
FT_DIRECTORY = $0F
|
||||
FT_SRC = $B0 ; IIgs system type; re-used?
|
||||
FT_S16 = $B3 ; IIgs Application Program
|
||||
FT_BASIC = $FC
|
||||
FT_SYSTEM = $FF
|
||||
|
||||
;;; ============================================================
|
||||
;;; Access
|
||||
;;; ============================================================
|
||||
|
||||
ACCESS_DEFAULT := %11000011
|
||||
ACCESS_LOCKED := %00100001
|
||||
ACCESS_DEFAULT = %11000011
|
||||
ACCESS_LOCKED = %00100001
|
||||
|
||||
;;; ============================================================
|
||||
;;; Storage Types
|
||||
;;; ============================================================
|
||||
|
||||
ST_STANDARD_FILE := $01
|
||||
ST_LINKED_DIRECTORY := $0D
|
||||
ST_VOLUME_DIRECTORY := $0F
|
||||
ST_STANDARD_FILE = $01
|
||||
ST_LINKED_DIRECTORY = $0D
|
||||
ST_VOLUME_DIRECTORY = $0F
|
||||
|
||||
;;; ============================================================
|
||||
;;; Errors
|
||||
;;; ============================================================
|
||||
|
||||
ERR_DEVICE_NOT_CONNECTED := $28
|
||||
ERR_WRITE_PROTECTED := $2B
|
||||
ERR_INVALID_PATHNAME := $40
|
||||
ERR_INVALID_REFERENCE := $43
|
||||
ERR_PATH_NOT_FOUND := $44
|
||||
ERR_VOL_NOT_FOUND := $45
|
||||
ERR_FILE_NOT_FOUND := $46
|
||||
ERR_DUPLICATE_FILENAME:= $47
|
||||
ERR_OVERRUN_ERROR := $48
|
||||
ERR_VOLUME_DIR_FULL := $49
|
||||
ERR_END_OF_FILE := $4C
|
||||
ERR_ACCESS_ERROR := $4E
|
||||
ERR_DUPLICATE_VOLUME := $57
|
||||
ERR_DEVICE_NOT_CONNECTED = $28
|
||||
ERR_WRITE_PROTECTED = $2B
|
||||
ERR_INVALID_PATHNAME = $40
|
||||
ERR_INVALID_REFERENCE = $43
|
||||
ERR_PATH_NOT_FOUND = $44
|
||||
ERR_VOL_NOT_FOUND = $45
|
||||
ERR_FILE_NOT_FOUND = $46
|
||||
ERR_DUPLICATE_FILENAME= $47
|
||||
ERR_OVERRUN_ERROR = $48
|
||||
ERR_VOLUME_DIR_FULL = $49
|
||||
ERR_END_OF_FILE = $4C
|
||||
ERR_ACCESS_ERROR = $4E
|
||||
ERR_DUPLICATE_VOLUME = $57
|
||||
|
||||
;;; ============================================================
|
||||
;;; Misc Structures
|
||||
@ -148,8 +148,8 @@ ERR_DUPLICATE_VOLUME := $57
|
||||
;;; Directory Structures
|
||||
;;; ============================================================
|
||||
|
||||
STORAGE_TYPE_MASK := $F0
|
||||
NAME_LENGTH_MASK := $0F
|
||||
STORAGE_TYPE_MASK = $F0
|
||||
NAME_LENGTH_MASK = $0F
|
||||
|
||||
;;; Volume Directory Header structure
|
||||
.struct VolumeDirectoryHeader
|
||||
@ -225,10 +225,10 @@ DRIVER_BUFFER := $44
|
||||
DRIVER_BLOCK_NUMBER := $46
|
||||
|
||||
;;; Commands
|
||||
DRIVER_COMMAND_STATUS := 0
|
||||
DRIVER_COMMAND_READ := 1
|
||||
DRIVER_COMMAND_WRITE := 2
|
||||
DRIVER_COMMAND_FORMAT := 3
|
||||
DRIVER_COMMAND_STATUS = 0
|
||||
DRIVER_COMMAND_READ = 1
|
||||
DRIVER_COMMAND_WRITE = 2
|
||||
DRIVER_COMMAND_FORMAT = 3
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
|
222
mgtk.inc
222
mgtk.inc
@ -78,112 +78,112 @@ MLI := $4000
|
||||
;; row0right .res N bits (double-width only)
|
||||
.endstruct
|
||||
|
||||
NoOp := $00 ; No-op
|
||||
NoOp = $00 ; No-op
|
||||
;;; (no parameters)
|
||||
|
||||
;;; --------------------------------------------------
|
||||
;;; Initialization Commands
|
||||
|
||||
InitGraf := $01
|
||||
InitGraf = $01
|
||||
;;; (no parameters)
|
||||
|
||||
SetSwitches := $02 ; Configure display switches
|
||||
SetSwitches = $02 ; Configure display switches
|
||||
;;; .byte flags bit 0=hires, 1=page2, 2=mixed, 3=text
|
||||
|
||||
;;; --------------------------------------------------
|
||||
;;; GrafPort Commands
|
||||
|
||||
InitPort := $03 ; Initialize GrafPort to standard values
|
||||
InitPort = $03 ; Initialize GrafPort to standard values
|
||||
;;; (input is address of GrafPort record)
|
||||
|
||||
SetPort := $04 ; Set current port as specified
|
||||
SetPort = $04 ; Set current port as specified
|
||||
;;; (input is address of GrafPort record)
|
||||
|
||||
GetPort := $05 ; Get pointer to current port
|
||||
GetPort = $05 ; Get pointer to current port
|
||||
;;; .addr port (out)
|
||||
|
||||
SetPortBits := $06 ; Set just the mapinfo (viewloc, mapbits)
|
||||
SetPortBits = $06 ; Set just the mapinfo (viewloc, mapbits)
|
||||
;;; (input is address of MapInfo record)
|
||||
|
||||
SetPenMode := $07 ; Set the current pen mode
|
||||
SetPenMode = $07 ; Set the current pen mode
|
||||
;;; .byte mode pen*/notpen*
|
||||
|
||||
SetPattern := $08 ; Set the current pattern
|
||||
SetPattern = $08 ; Set the current pattern
|
||||
;;; .res 8 pattern 8x8 pixel pattern for PaintRect calls
|
||||
|
||||
SetColorMasks := $09 ; Set the current color masks
|
||||
SetColorMasks = $09 ; Set the current color masks
|
||||
;;; .byte and_mask
|
||||
;;; .byte or_mask
|
||||
|
||||
SetPenSize := $0A ; Set the current pen size
|
||||
SetPenSize = $0A ; Set the current pen size
|
||||
;;; .byte penwidth horizontal pen thickness
|
||||
;;; .byte penheight vertical pen thickness
|
||||
|
||||
SetFont := $0B ; Set the current font
|
||||
SetFont = $0B ; Set the current font
|
||||
;;; .addr textfont font definition
|
||||
|
||||
SetTextBG := $0C ; Set the current text background
|
||||
SetTextBG = $0C ; Set the current text background
|
||||
;;; .byte backcolor 0=black, $7F=white
|
||||
|
||||
;;; --------------------------------------------------
|
||||
;;; Drawing Commands
|
||||
|
||||
Move := $0D ; Set current pen location (relative)
|
||||
Move = $0D ; Set current pen location (relative)
|
||||
;;; .word xdelta
|
||||
;;; .word ydelta
|
||||
|
||||
MoveTo := $0E ; Set current pen location (absolute)
|
||||
MoveTo = $0E ; Set current pen location (absolute)
|
||||
;;; Point pos
|
||||
|
||||
Line := $0F ; Draw line from current pen location (relative)
|
||||
Line = $0F ; Draw line from current pen location (relative)
|
||||
;;; .word xdelta
|
||||
;;; .word ydelta
|
||||
|
||||
LineTo := $10 ; Draw line from current pen location (absolute)
|
||||
LineTo = $10 ; Draw line from current pen location (absolute)
|
||||
;;; Point pos
|
||||
|
||||
PaintRect := $11 ; Fill rectangle with selected simple pattern/thickness
|
||||
PaintRect = $11 ; Fill rectangle with selected simple pattern/thickness
|
||||
;;; Rect rect
|
||||
|
||||
FrameRect := $12 ; Draw rectangle with selected simple pattern/thickness
|
||||
FrameRect = $12 ; Draw rectangle with selected simple pattern/thickness
|
||||
;;; Rect rect
|
||||
|
||||
InRect := $13 ; Is current position in bounds? A=$80 true, 0 false
|
||||
InRect = $13 ; Is current position in bounds? A=$80 true, 0 false
|
||||
;;; Rect rect
|
||||
|
||||
PaintBits := $14 ; Draw pattern
|
||||
PaintBits = $14 ; Draw pattern
|
||||
;;; (input is address of MapInfo record)
|
||||
|
||||
PaintPoly := $15
|
||||
PaintPoly = $15
|
||||
;;; (input is address of PolyList record)
|
||||
|
||||
FramePoly := $16 ; Draw multiple closed polygons
|
||||
FramePoly = $16 ; Draw multiple closed polygons
|
||||
;;; (input is address of PolyList record)
|
||||
|
||||
InPoly := $17 ; Is current position in bounds? A=$80 true, 0 false
|
||||
InPoly = $17 ; Is current position in bounds? A=$80 true, 0 false
|
||||
;;; (input is address of PolyList record)
|
||||
|
||||
|
||||
;;; --------------------------------------------------
|
||||
;;; Text Commands
|
||||
|
||||
TextWidth := $18 ; Measure the width of a string in pixels
|
||||
TextWidth = $18 ; Measure the width of a string in pixels
|
||||
;;; .addr data
|
||||
;;; .byte length
|
||||
;;; .word width (out) result in pixels
|
||||
|
||||
DrawText := $19 ; Drawn at penpos as left, baseline
|
||||
DrawText = $19 ; Drawn at penpos as left, baseline
|
||||
;;; .addr data
|
||||
;;; .byte length
|
||||
|
||||
;;; --------------------------------------------------
|
||||
;;; Utility Commands
|
||||
|
||||
SetZP1 := $1A ; Configure lower half of ZP usage by API (speed vs. convenience)
|
||||
SetZP2 := $1B ; Configure upper half ZP usage by API (speed vs. convenience)
|
||||
SetZP1 = $1A ; Configure lower half of ZP usage by API (speed vs. convenience)
|
||||
SetZP2 = $1B ; Configure upper half ZP usage by API (speed vs. convenience)
|
||||
;;; .byte preserve 0=stash/no auto restore; 1=restore now and onward
|
||||
|
||||
Version := $1C ; Get toolkit version
|
||||
Version = $1C ; Get toolkit version
|
||||
;;; .byte (out) major
|
||||
;;; .byte (out) minor
|
||||
;;; .byte (out) patch
|
||||
@ -197,7 +197,7 @@ Version := $1C ; Get toolkit version
|
||||
;;; --------------------------------------------------
|
||||
;;; Initialization Calls
|
||||
|
||||
StartDeskTop := $1D ; Inits state, registers interrupt handler, draws desktop
|
||||
StartDeskTop = $1D ; Inits state, registers interrupt handler, draws desktop
|
||||
;;; .byte machine ROM FBB3 ($06 = IIe or later)
|
||||
;;; .byte subid ROM FBC0 ($EA = IIe, $E0 = IIe enh/IIgs, $00 = IIc/IIc+)
|
||||
;;; .byte op_sys 0=ProDOS, 1=Pascal
|
||||
@ -207,25 +207,25 @@ StartDeskTop := $1D ; Inits state, registers interrupt handler, draw
|
||||
;;; .addr savearea buffer for saving screen data (e.g. behind menus)
|
||||
;;; .word savesize bytes
|
||||
|
||||
StopDeskTop := $1E ; Deallocates interrupt, hides cursor
|
||||
StopDeskTop = $1E ; Deallocates interrupt, hides cursor
|
||||
;;; (no parameters)
|
||||
|
||||
SetUserHook := $1F
|
||||
SetUserHook = $1F
|
||||
;;; .byte hook_id 0=before, 1=after event checking
|
||||
;;; .addr routine_ptr 0=remove hook_id
|
||||
|
||||
AttachDriver := $20 ; Install pointer driver; A=0 on success, $95 if mouse disabled
|
||||
AttachDriver = $20 ; Install pointer driver; A=0 on success, $95 if mouse disabled
|
||||
;;; .addr hook Mouse hook routine to install
|
||||
;;; .addr mouse_state (out) Address of mouse state (.word x, y; .byte status)
|
||||
|
||||
ScaleMouse := $21 ; Set mouse/screen scaling
|
||||
ScaleMouse = $21 ; Set mouse/screen scaling
|
||||
;;; .byte x_exponent x-scale factor for mouse, 0...3
|
||||
;;; .byte y_exponent y-scale factor for mouse, 0...3
|
||||
|
||||
KeyboardMouse := $22 ; Next operation will be performed by keyboard
|
||||
KeyboardMouse = $22 ; Next operation will be performed by keyboard
|
||||
;;; (no parameters)
|
||||
|
||||
GetIntHandler := $23 ; Get address of interrupt handler
|
||||
GetIntHandler = $23 ; Get address of interrupt handler
|
||||
;;; .addr handler (out) Address of interrupt handler (after cld)
|
||||
|
||||
;;; --------------------------------------------------
|
||||
@ -234,8 +234,8 @@ GetIntHandler := $23 ; Get address of interrupt handler
|
||||
;;; Cursor record:
|
||||
;;;
|
||||
|
||||
cursor_height := 12
|
||||
cursor_width := 2
|
||||
cursor_height = 12
|
||||
cursor_width = 2
|
||||
|
||||
.struct Cursor
|
||||
bits .byte 24 ; 2x12 byte bitmap (XOR'd after mask)
|
||||
@ -243,19 +243,19 @@ cursor_width := 2
|
||||
hotspot .byte 2 ; x, y - hotspot coords (pixels)
|
||||
.endstruct
|
||||
|
||||
SetCursor := $24 ; Set cursor definition
|
||||
SetCursor = $24 ; Set cursor definition
|
||||
;;; (input is address of Cursor record)
|
||||
|
||||
ShowCursor := $25 ; Return cursor to visibility
|
||||
ShowCursor = $25 ; Return cursor to visibility
|
||||
;;; (no parameters)
|
||||
|
||||
HideCursor := $26 ; Cursor hidden until ShowCursor call
|
||||
HideCursor = $26 ; Cursor hidden until ShowCursor call
|
||||
;;; (no parameters)
|
||||
|
||||
ObscureCursor := $27 ; Cursor hidden until moved
|
||||
ObscureCursor = $27 ; Cursor hidden until moved
|
||||
;;; (no parameters)
|
||||
|
||||
GetCursorAddr := $28 ; Get cursor definition
|
||||
GetCursorAddr = $28 ; Get cursor definition
|
||||
;;; .addr definition (out) Address of cursor record
|
||||
|
||||
;;; --------------------------------------------------
|
||||
@ -280,22 +280,22 @@ GetCursorAddr := $28 ; Get cursor definition
|
||||
.endunion
|
||||
.endstruct
|
||||
|
||||
CheckEvents := $29 ; Process mouse/kbd if GetEvent will be delayed.
|
||||
CheckEvents = $29 ; Process mouse/kbd if GetEvent will be delayed.
|
||||
;;; (no parameters)
|
||||
|
||||
GetEvent := $2A
|
||||
GetEvent = $2A
|
||||
;;; (parameter is address of Event record)
|
||||
|
||||
FlushEvents := $2B
|
||||
FlushEvents = $2B
|
||||
;;; (no parameters)
|
||||
|
||||
PeekEvent := $2C
|
||||
PeekEvent = $2C
|
||||
;;; (parameter is address of Event record)
|
||||
|
||||
PostEvent := $2D ; Post event to queue
|
||||
PostEvent = $2D ; Post event to queue
|
||||
;;; (parameter is address of Event record)
|
||||
|
||||
SetKeyEvent := $2E ; If set, keypresses are ignored by Tool Kit
|
||||
SetKeyEvent = $2E ; If set, keypresses are ignored by Tool Kit
|
||||
;;; .byte handle_keys high bit set = ignore keyboard, otherwise check
|
||||
|
||||
;;; --------------------------------------------------
|
||||
@ -329,43 +329,43 @@ SetKeyEvent := $2E ; If set, keypresses are ignored by Tool Kit
|
||||
name .addr ; Address of length-prefixed string
|
||||
.endstruct
|
||||
|
||||
InitMenu := $2F
|
||||
InitMenu = $2F
|
||||
;;; .byte solid_char char code to use for solid apple glyph
|
||||
;;; .byte open_char char code to use for open apple glyph
|
||||
;;; .byte check_char char code to use for checkmark glyph
|
||||
;;; .byte control_char char code to use for control key glyph
|
||||
|
||||
SetMenu := $30 ; Configure (and draw) menu
|
||||
SetMenu = $30 ; Configure (and draw) menu
|
||||
;;; (input is address of Menu Bar record)
|
||||
|
||||
MenuSelect := $31 ; Enter modal loop for handling mouse-down on menu bar
|
||||
MenuSelect = $31 ; Enter modal loop for handling mouse-down on menu bar
|
||||
;;; .byte menu_id (out) Top level menu identifier, or 0 if none
|
||||
;;; .byte menu_item (out) Index (1-based) of item in menu, or 0 if none
|
||||
|
||||
MenuKey := $32 ; Find menu item corresponding to keypress
|
||||
MenuKey = $32 ; Find menu item corresponding to keypress
|
||||
;;; .byte menu_id (out)
|
||||
;;; .byte menu_item (out)
|
||||
;;; .byte which_key
|
||||
;;; .byte key_mods bit 0=OA, bit 1=SA
|
||||
|
||||
HiliteMenu := $33 ; Toggle highlight state of menu
|
||||
HiliteMenu = $33 ; Toggle highlight state of menu
|
||||
;;; .byte menu_id
|
||||
|
||||
DisableMenu := $34
|
||||
DisableMenu = $34
|
||||
;;; .byte menu_id
|
||||
;;; .byte disable 0=enable, 1=disable
|
||||
|
||||
DisableItem := $35
|
||||
DisableItem = $35
|
||||
;;; .byte menu_id
|
||||
;;; .byte menu_item
|
||||
;;; .byte disable 0=enable, 1=disable
|
||||
|
||||
CheckItem := $36
|
||||
CheckItem = $36
|
||||
;;; .byte menu_id
|
||||
;;; .byte menu_item
|
||||
;;; .byte check 0=unchecked, 1=checked
|
||||
|
||||
SetMark := $37
|
||||
SetMark = $37
|
||||
;;; .byte menu_id
|
||||
;;; .byte menu_item
|
||||
;;; .byte set_char 0=use checkmark, 1=use mark_char
|
||||
@ -394,68 +394,68 @@ SetMark := $37
|
||||
nextwinfo .addr ; address of next lower window in stack
|
||||
.endstruct
|
||||
|
||||
OpenWindow := $38
|
||||
OpenWindow = $38
|
||||
;;; (input is address of Winfo record)
|
||||
|
||||
CloseWindow := $39
|
||||
CloseWindow = $39
|
||||
;;; .byte window_id
|
||||
|
||||
CloseAll := $3A
|
||||
CloseAll = $3A
|
||||
;;; (no parameters)
|
||||
|
||||
GetWinPtr := $3B ; Get pointer to window params by id; A=0 on success
|
||||
GetWinPtr = $3B ; Get pointer to window params by id; A=0 on success
|
||||
;;; .byte window_id
|
||||
;;; .addr window_ptr (out) winfo address
|
||||
|
||||
GetWinPort := $3C ; Get drawing state of window (possibly clipped)
|
||||
GetWinPort = $3C ; Get drawing state of window (possibly clipped)
|
||||
;;; .byte window_id
|
||||
;;; .addr port address of grafport to populate
|
||||
|
||||
SetWinPort := $3D ; Update port of window
|
||||
SetWinPort = $3D ; Update port of window
|
||||
;;; .byte window_id
|
||||
;;; .addr port GrafPort to copy from
|
||||
|
||||
BeginUpdate := $3E ; Respond to update event for window
|
||||
BeginUpdate = $3E ; Respond to update event for window
|
||||
;;; .byte window_id
|
||||
|
||||
EndUpdate := $3F
|
||||
EndUpdate = $3F
|
||||
;;; (no parameters)
|
||||
|
||||
FindWindow := $40
|
||||
FindWindow = $40
|
||||
;;; .word mousex screen coordinates
|
||||
;;; .word mousey
|
||||
;;; .byte which_area (out) area_*
|
||||
;;; .byte window_id (out) of window
|
||||
|
||||
FrontWindow := $41 ; Get id of top window
|
||||
FrontWindow = $41 ; Get id of top window
|
||||
;;; .byte window_id (out) window, or 0 if none
|
||||
|
||||
SelectWindow := $42 ; Make window topmost
|
||||
SelectWindow = $42 ; Make window topmost
|
||||
;;; .byte window_id
|
||||
|
||||
TrackGoAway := $43
|
||||
TrackGoAway = $43
|
||||
;;; .byte clicked (out) 0 = cancelled, 1 = close
|
||||
|
||||
DragWindow := $44
|
||||
DragWindow = $44
|
||||
;;; .byte window_id
|
||||
;;; .word dragx mouse coords
|
||||
;;; .word dragy
|
||||
;;; .byte moved high bit set if moved, clear if not
|
||||
|
||||
GrowWindow := $45
|
||||
GrowWindow = $45
|
||||
;;; .byte window_id
|
||||
;;; .word mousex
|
||||
;;; .word mousey
|
||||
;;; .byte itgrew (out) 0 = no change, 1 = moved
|
||||
|
||||
ScreenToWindow := $46 ; Map screen coords to content coords
|
||||
ScreenToWindow = $46 ; Map screen coords to content coords
|
||||
;;; .byte window_id
|
||||
;;; .word screenx
|
||||
;;; .word screeny
|
||||
;;; .word windowx (out)
|
||||
;;; .word windowy (out)
|
||||
|
||||
WindowToScreen := $47 ; Map content coords to screen coords
|
||||
WindowToScreen = $47 ; Map content coords to screen coords
|
||||
;;; .byte window_id
|
||||
;;; .word windowx
|
||||
;;; .word windowy
|
||||
@ -465,28 +465,28 @@ WindowToScreen := $47 ; Map content coords to screen coords
|
||||
;;; --------------------------------------------------
|
||||
;;; Control Manager Calls
|
||||
|
||||
FindControl := $48
|
||||
FindControl = $48
|
||||
;;; .word mousex
|
||||
;;; .word mousey
|
||||
;;; .byte which_ctl ctl_*
|
||||
;;; .byte which_part part_*
|
||||
|
||||
SetCtlMax := $49
|
||||
SetCtlMax = $49
|
||||
;;; .byte which_ctl ctl_*_scroll_bar
|
||||
;;; .byte ctlmax maximum value
|
||||
|
||||
TrackThumb := $4A
|
||||
TrackThumb = $4A
|
||||
;;; .byte which_ctl ctl_*_scroll_bar
|
||||
;;; .word mousex
|
||||
;;; .word mousey
|
||||
;;; .byte thumbpos (out) 0...255
|
||||
;;; .byte thumbmoved (out) 0 = no change, 1 = moved
|
||||
|
||||
UpdateThumb := $4B
|
||||
UpdateThumb = $4B
|
||||
;;; .byte which_ctl ctl_*_scroll_bar
|
||||
;;; .byte thumbpos new position 0...250
|
||||
|
||||
ActivateCtl := $4C ; Activate/deactivate scroll bar
|
||||
ActivateCtl = $4C ; Activate/deactivate scroll bar
|
||||
;;; .byte which_ctl ctl_*_scroll_bar
|
||||
;;; .byte activate 0=deactivate, 1=activate
|
||||
|
||||
@ -500,28 +500,28 @@ ActivateCtl := $4C ; Activate/deactivate scroll bar
|
||||
;;; Graphics Primitives Constants
|
||||
|
||||
;;; Used in GetWinPort / SetPortBits
|
||||
screen_mapbits := $2000 ; Screen address
|
||||
screen_mapwidth := $80 ; Stride in bytes
|
||||
screen_mapbits = $2000 ; Screen address
|
||||
screen_mapwidth = $80 ; Stride in bytes
|
||||
|
||||
;;; Used in SetPenMode
|
||||
pencopy := 0
|
||||
penOR := 1
|
||||
penXOR := 2
|
||||
penBIC := 3
|
||||
notpencopy := 4
|
||||
notpenOR := 5
|
||||
notpenXOR := 6
|
||||
notpenBIC := 7
|
||||
pencopy = 0
|
||||
penOR = 1
|
||||
penXOR = 2
|
||||
penBIC = 3
|
||||
notpencopy = 4
|
||||
notpenOR = 5
|
||||
notpenXOR = 6
|
||||
notpenBIC = 7
|
||||
|
||||
;;; Used in SetZP1
|
||||
zp_overwrite := 0
|
||||
zp_preserve := 1<<7
|
||||
zp_overwrite = 0
|
||||
zp_preserve = 1<<7
|
||||
|
||||
;;; Used in GrafPorts
|
||||
colormask_and := $FF
|
||||
colormask_or := $00
|
||||
textbg_black := $00
|
||||
textbg_white := $7F
|
||||
colormask_and = $FF
|
||||
colormask_or = $00
|
||||
textbg_black = $00
|
||||
textbg_white = $7F
|
||||
|
||||
;;; ============================================================
|
||||
;;; MouseGraphics ToolKit Constants
|
||||
@ -537,8 +537,8 @@ textbg_white := $7F
|
||||
update = 6 ; Window update needed
|
||||
.endenum
|
||||
|
||||
event_modifier_open_apple := 1 << 0
|
||||
event_modifier_solid_apple := 1 << 1
|
||||
event_modifier_open_apple = 1 << 0
|
||||
event_modifier_solid_apple = 1 << 1
|
||||
|
||||
;;; Used in FindWindow
|
||||
.enum Area
|
||||
@ -596,29 +596,29 @@ event_modifier_solid_apple := 1 << 1
|
||||
disable_flag = 1 << 7
|
||||
.endenum
|
||||
|
||||
disablemenu_enable := 0
|
||||
disablemenu_disable := 1
|
||||
disableitem_enable := 0
|
||||
disableitem_disable := 1
|
||||
disablemenu_enable = 0
|
||||
disablemenu_disable = 1
|
||||
disableitem_enable = 0
|
||||
disableitem_disable = 1
|
||||
|
||||
checkitem_uncheck := 0
|
||||
checkitem_check := 1
|
||||
checkitem_uncheck = 0
|
||||
checkitem_check = 1
|
||||
|
||||
;;; Used in ActivateCtl
|
||||
activatectl_deactivate := 0
|
||||
activatectl_activate := 1
|
||||
activatectl_deactivate = 0
|
||||
activatectl_activate = 1
|
||||
|
||||
;;; Response from InRect/InPoly
|
||||
inrect_inside := $80
|
||||
inrect_outside := $00
|
||||
inpoly_inside := $80
|
||||
inpoly_outside := $00
|
||||
inrect_inside = $80
|
||||
inrect_outside = $00
|
||||
inpoly_inside = $80
|
||||
inpoly_outside = $00
|
||||
|
||||
;;; ============================================================
|
||||
;;; Offsets
|
||||
|
||||
short_event_size := 4 ; events that don't have mouse coordinates
|
||||
event_size := 5 ; any kind of event
|
||||
short_event_size = 4 ; events that don't have mouse coordinates
|
||||
event_size = 5 ; any kind of event
|
||||
|
||||
;;; ============================================================
|
||||
;;; Errors
|
||||
|
Loading…
Reference in New Issue
Block a user