mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-29 07:49:20 +00:00
MGTK internal renames
This commit is contained in:
parent
1ae615fb20
commit
a63eca2a0e
@ -740,7 +740,7 @@ font: .addr 0
|
|||||||
screen_width := 560
|
screen_width := 560
|
||||||
screen_height := 192
|
screen_height := 192
|
||||||
|
|
||||||
;; params for MGTK::SetPortSite when decorating title bar
|
;; params for MGTK::SetPortBits when decorating title bar
|
||||||
.proc screen_box
|
.proc screen_box
|
||||||
.word 0
|
.word 0
|
||||||
.word menu_bar_height
|
.word menu_bar_height
|
||||||
@ -1668,7 +1668,7 @@ draw_title_bar:
|
|||||||
bcs :+
|
bcs :+
|
||||||
dex
|
dex
|
||||||
: stx title_bar_decoration::top+1
|
: stx title_bar_decoration::top+1
|
||||||
MGTK_CALL MGTK::SetPortSite, screen_box ; set clipping rect to whole screen
|
MGTK_CALL MGTK::SetPortBits, screen_box ; set clipping rect to whole screen
|
||||||
MGTK_CALL MGTK::PaintBits, title_bar_decoration ; Draws decoration in title bar
|
MGTK_CALL MGTK::PaintBits, title_bar_decoration ; Draws decoration in title bar
|
||||||
lda #window_id
|
lda #window_id
|
||||||
sta query_state_params::id
|
sta query_state_params::id
|
||||||
|
@ -747,7 +747,7 @@ font: .addr 0
|
|||||||
screen_width := 560
|
screen_width := 560
|
||||||
screen_height := 192
|
screen_height := 192
|
||||||
|
|
||||||
;; params for MGTK::SetPortSite when decorating title bar
|
;; params for MGTK::SetPortBits when decorating title bar
|
||||||
.proc screen_box
|
.proc screen_box
|
||||||
left: .word 0
|
left: .word 0
|
||||||
top: .word menu_bar_height
|
top: .word menu_bar_height
|
||||||
@ -1715,7 +1715,7 @@ draw_title_bar:
|
|||||||
bcs :+
|
bcs :+
|
||||||
dex
|
dex
|
||||||
: stx title_bar_decoration::top+1
|
: stx title_bar_decoration::top+1
|
||||||
MGTK_CALL MGTK::SetPortSite, screen_box ; set clipping rect to whole screen
|
MGTK_CALL MGTK::SetPortBits, screen_box ; set clipping rect to whole screen
|
||||||
MGTK_CALL MGTK::PaintBits, title_bar_decoration ; Draws decoration in title bar
|
MGTK_CALL MGTK::PaintBits, title_bar_decoration ; Draws decoration in title bar
|
||||||
lda #window_id
|
lda #window_id
|
||||||
sta query_state_params::id
|
sta query_state_params::id
|
||||||
|
@ -1471,7 +1471,7 @@ base: .word 10 ; vertical text offset (to baseline)
|
|||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.proc draw_mode
|
.proc draw_mode
|
||||||
MGTK_CALL MGTK::SetPortSite, mode_box
|
MGTK_CALL MGTK::SetPortBits, mode_box
|
||||||
MGTK_CALL MGTK::MoveTo, mode_pos
|
MGTK_CALL MGTK::MoveTo, mode_pos
|
||||||
lda fixed_mode_flag
|
lda fixed_mode_flag
|
||||||
beq else ; is proportional?
|
beq else ; is proportional?
|
||||||
@ -1484,6 +1484,6 @@ loop: lda default_box,x
|
|||||||
sta window_params::box,x
|
sta window_params::box,x
|
||||||
dex
|
dex
|
||||||
bpl loop
|
bpl loop
|
||||||
MGTK_CALL MGTK::SetPortSite, window_params::box
|
MGTK_CALL MGTK::SetPortBits, window_params::box
|
||||||
rts
|
rts
|
||||||
.endproc
|
.endproc
|
||||||
|
@ -2247,7 +2247,7 @@ LA085: jsr LA6A3
|
|||||||
jsr LA097
|
jsr LA097
|
||||||
lda L9F93
|
lda L9F93
|
||||||
bne LA085
|
bne LA085
|
||||||
MGTK_CALL MGTK::SetPortSite, query_screen_params
|
MGTK_CALL MGTK::SetPortBits, query_screen_params
|
||||||
rts
|
rts
|
||||||
|
|
||||||
LA097: MGTK_CALL MGTK::HideCursor, DESKTOP_DIRECT ; These params should be ignored - bogus?
|
LA097: MGTK_CALL MGTK::HideCursor, DESKTOP_DIRECT ; These params should be ignored - bogus?
|
||||||
@ -2632,7 +2632,7 @@ LA3FD: jsr LA6A3
|
|||||||
jsr LA411
|
jsr LA411
|
||||||
lda L9F93
|
lda L9F93
|
||||||
bne LA3FD
|
bne LA3FD
|
||||||
MGTK_CALL MGTK::SetPortSite, query_screen_params
|
MGTK_CALL MGTK::SetPortBits, query_screen_params
|
||||||
jmp LA446
|
jmp LA446
|
||||||
|
|
||||||
LA411: lda #$00
|
LA411: lda #$00
|
||||||
@ -2944,7 +2944,7 @@ LA674: lda L8E15,x
|
|||||||
lda #$02
|
lda #$02
|
||||||
sta LA62C
|
sta LA62C
|
||||||
sta set_box_params2::width+1
|
sta set_box_params2::width+1
|
||||||
LA69C: MGTK_CALL MGTK::SetPortSite, set_box_params2
|
LA69C: MGTK_CALL MGTK::SetPortBits, set_box_params2
|
||||||
rts
|
rts
|
||||||
|
|
||||||
LA6A3: lda #$00
|
LA6A3: lda #$00
|
||||||
@ -3033,7 +3033,7 @@ LA747: lda LA6B0
|
|||||||
bne LA775
|
bne LA775
|
||||||
lda #$00
|
lda #$00
|
||||||
sta LA6B0
|
sta LA6B0
|
||||||
LA753: MGTK_CALL MGTK::SetPortSite, set_box_params2
|
LA753: MGTK_CALL MGTK::SetPortBits, set_box_params2
|
||||||
lda set_box_params2::width+1
|
lda set_box_params2::width+1
|
||||||
cmp LA62C
|
cmp LA62C
|
||||||
bne LA76F
|
bne LA76F
|
||||||
@ -3934,7 +3934,7 @@ LBA0B: sta state2_left,x
|
|||||||
MGTK_RELAY2_CALL MGTK::PaintRect, alert_rect ; alert background
|
MGTK_RELAY2_CALL MGTK::PaintRect, alert_rect ; alert background
|
||||||
MGTK_RELAY2_CALL MGTK::SetPenMode, const2 ; ensures corners are inverted
|
MGTK_RELAY2_CALL MGTK::SetPenMode, const2 ; ensures corners are inverted
|
||||||
MGTK_RELAY2_CALL MGTK::FrameRect, alert_rect ; alert outline
|
MGTK_RELAY2_CALL MGTK::FrameRect, alert_rect ; alert outline
|
||||||
MGTK_RELAY2_CALL MGTK::SetPortSite, LB6D3
|
MGTK_RELAY2_CALL MGTK::SetPortBits, LB6D3
|
||||||
MGTK_RELAY2_CALL MGTK::FrameRect, alert_inner_frame_rect1 ; inner 2x border
|
MGTK_RELAY2_CALL MGTK::FrameRect, alert_inner_frame_rect1 ; inner 2x border
|
||||||
MGTK_RELAY2_CALL MGTK::FrameRect, alert_inner_frame_rect2
|
MGTK_RELAY2_CALL MGTK::FrameRect, alert_inner_frame_rect2
|
||||||
MGTK_RELAY2_CALL MGTK::SetPenMode, const0 ; restores normal mode
|
MGTK_RELAY2_CALL MGTK::SetPenMode, const0 ; restores normal mode
|
||||||
@ -19938,7 +19938,7 @@ LB8F5: jsr LBD3B
|
|||||||
lda $D6B5+1
|
lda $D6B5+1
|
||||||
sta $08+1
|
sta $08+1
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
||||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||||
bit LD8EB
|
bit LD8EB
|
||||||
bpl LB92D
|
bpl LB92D
|
||||||
MGTK_RELAY_CALL MGTK::SetTextBG, desktop_aux::LAE6C
|
MGTK_RELAY_CALL MGTK::SetTextBG, desktop_aux::LAE6C
|
||||||
@ -19969,7 +19969,7 @@ LB961: lda path_buf1
|
|||||||
MGTK_RELAY_CALL MGTK::SetPenMode, const2
|
MGTK_RELAY_CALL MGTK::SetPenMode, const2
|
||||||
MGTK_RELAY_CALL MGTK::FrameRect, LD6AB
|
MGTK_RELAY_CALL MGTK::FrameRect, LD6AB
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, LD6B3
|
MGTK_RELAY_CALL MGTK::MoveTo, LD6B3
|
||||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||||
addr_call draw_text1, path_buf1
|
addr_call draw_text1, path_buf1
|
||||||
addr_call draw_text1, path_buf2
|
addr_call draw_text1, path_buf2
|
||||||
addr_call draw_text1, str_2_spaces
|
addr_call draw_text1, str_2_spaces
|
||||||
@ -20146,7 +20146,7 @@ LBB1A: lda LBB62
|
|||||||
lda $D6B5+1
|
lda $D6B5+1
|
||||||
sta $08+1
|
sta $08+1
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
||||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||||
addr_call draw_text1, str_1_char
|
addr_call draw_text1, str_1_char
|
||||||
addr_call draw_text1, path_buf2
|
addr_call draw_text1, path_buf2
|
||||||
lda winF
|
lda winF
|
||||||
@ -20167,7 +20167,7 @@ LBB69: dec path_buf1
|
|||||||
lda $D6B5+1
|
lda $D6B5+1
|
||||||
sta $08+1
|
sta $08+1
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
||||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||||
addr_call draw_text1, path_buf2
|
addr_call draw_text1, path_buf2
|
||||||
addr_call draw_text1, str_2_spaces
|
addr_call draw_text1, str_2_spaces
|
||||||
lda winF
|
lda winF
|
||||||
@ -20199,7 +20199,7 @@ LBBBC: ldx path_buf1
|
|||||||
lda $D6B5+1
|
lda $D6B5+1
|
||||||
sta $08+1
|
sta $08+1
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
||||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||||
addr_call draw_text1, path_buf2
|
addr_call draw_text1, path_buf2
|
||||||
addr_call draw_text1, str_2_spaces
|
addr_call draw_text1, str_2_spaces
|
||||||
lda winF
|
lda winF
|
||||||
@ -20227,7 +20227,7 @@ LBC21: lda $D485,x
|
|||||||
bne LBC21
|
bne LBC21
|
||||||
LBC2D: dec path_buf2
|
LBC2D: dec path_buf2
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, LD6B3
|
MGTK_RELAY_CALL MGTK::MoveTo, LD6B3
|
||||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||||
addr_call draw_text1, path_buf1
|
addr_call draw_text1, path_buf1
|
||||||
addr_call draw_text1, path_buf2
|
addr_call draw_text1, path_buf2
|
||||||
addr_call draw_text1, str_2_spaces
|
addr_call draw_text1, str_2_spaces
|
||||||
|
753
desktop/mgtk.s
753
desktop/mgtk.s
File diff suppressed because it is too large
Load Diff
137
mgtk.inc
137
mgtk.inc
@ -12,13 +12,15 @@ MLI := $4000
|
|||||||
;;; Graphics Primitives
|
;;; Graphics Primitives
|
||||||
;;; ==================================================
|
;;; ==================================================
|
||||||
|
|
||||||
;;; --------------------------------------------------
|
|
||||||
;;; Initialization Commands
|
|
||||||
|
|
||||||
NoOp := $00 ; No-op
|
NoOp := $00 ; No-op
|
||||||
;; (input length 0 bytes)
|
;; (input length 0 bytes)
|
||||||
|
|
||||||
SetSwitches := $02 ; Configure display switches
|
;;; --------------------------------------------------
|
||||||
|
;;; Initialization Commands
|
||||||
|
|
||||||
|
InitGraf := $01
|
||||||
|
|
||||||
|
SetSwitches := $02 ; Configure display switches
|
||||||
;; (input length 1 byte)
|
;; (input length 1 byte)
|
||||||
;; Turns on 80 col/DHR, and then:
|
;; Turns on 80 col/DHR, and then:
|
||||||
;; bit 0: LoRes if clear, HiRes if set
|
;; bit 0: LoRes if clear, HiRes if set
|
||||||
@ -72,12 +74,12 @@ SetPort := $04 ; Set full drawing state
|
|||||||
;; .byte tmask AND mask for text, default $7F
|
;; .byte tmask AND mask for text, default $7F
|
||||||
;; .addr font
|
;; .addr font
|
||||||
|
|
||||||
GetPort := $05 ; Get pointer to active drawing state
|
GetPort := $05 ; Get pointer to active drawing state
|
||||||
;; (input length 0 bytes)
|
;; (input length 0 bytes)
|
||||||
;; (output length 2 bytes)
|
;; (output length 2 bytes)
|
||||||
;; .addr state (out)
|
;; .addr state (out)
|
||||||
|
|
||||||
SetPortSite := $06 ; Set just the drawing box, subset of full state
|
SetPortBits := $06 ; Set just the drawing box, subset of full state
|
||||||
;; (input length 16 bytes)
|
;; (input length 16 bytes)
|
||||||
;; .word left pixels from screen edge
|
;; .word left pixels from screen edge
|
||||||
;; .word top
|
;; .word top
|
||||||
@ -88,79 +90,79 @@ SetPortSite := $06 ; Set just the drawing box, subset of full state
|
|||||||
;; .word width pixels
|
;; .word width pixels
|
||||||
;; .word height
|
;; .word height
|
||||||
|
|
||||||
SetPenMode := $07
|
SetPenMode := $07
|
||||||
;; (input length 1 byte)
|
;; (input length 1 byte)
|
||||||
;; .byte mode (>=4 also sets eor mask to $7f)
|
;; .byte mode (>=4 also sets eor mask to $7f)
|
||||||
;; 0 = white (???)
|
;; 0 = white (???)
|
||||||
;; 2 = black (???)
|
;; 2 = black (???)
|
||||||
|
|
||||||
SetPattern := $08
|
SetPattern := $08
|
||||||
;; (input length 8 bytes)
|
;; (input length 8 bytes)
|
||||||
;; .res 8 pattern 8x8 pixel pattern for PaintRect calls
|
;; .res 8 pattern 8x8 pixel pattern for PaintRect calls
|
||||||
|
|
||||||
SetColorMasks := $09
|
SetColorMasks := $09
|
||||||
;; (input length 2 bytes)
|
;; (input length 2 bytes)
|
||||||
;; .byte mskand
|
;; .byte mskand
|
||||||
;; .byte mskor
|
;; .byte mskor
|
||||||
|
|
||||||
SetPenSize := $0A
|
SetPenSize := $0A
|
||||||
;; (input length 2 bytes)
|
;; (input length 2 bytes)
|
||||||
;; .byte hthick horizontal pen thickness
|
;; .byte hthick horizontal pen thickness
|
||||||
;; .byte vthick vertical pen thickness
|
;; .byte vthick vertical pen thickness
|
||||||
|
|
||||||
SetFont := $0B
|
SetFont := $0B
|
||||||
;; (input length 2 bytes)
|
;; (input length 2 bytes)
|
||||||
;; .addr font font definition (see below)
|
;; .addr font font definition (see below)
|
||||||
|
|
||||||
SetTextBG := $0C ; Stored to background before XORing glyph
|
SetTextBG := $0C ; Stored to background before XORing glyph
|
||||||
;; (input length 1 byte)
|
;; (input length 1 byte)
|
||||||
;; .byte mask
|
;; .byte mask
|
||||||
|
|
||||||
;;; --------------------------------------------------
|
;;; --------------------------------------------------
|
||||||
;;; Drawing Commands
|
;;; Drawing Commands
|
||||||
|
|
||||||
Move := $0D ; Adjust start of subsequent DRAW_TEXT, DRAW_LINE
|
Move := $0D ; Adjust start of subsequent DRAW_TEXT, DRAW_LINE
|
||||||
;; (input length 4 bytes)
|
;; (input length 4 bytes)
|
||||||
;; .word xdelta
|
;; .word xdelta
|
||||||
;; .word ydelta
|
;; .word ydelta
|
||||||
|
|
||||||
MoveTo := $0E ; Start of subsequent DRAW_TEXT, DRAW_LINE
|
MoveTo := $0E ; Start of subsequent DRAW_TEXT, DRAW_LINE
|
||||||
;; (input length 4 bytes)
|
;; (input length 4 bytes)
|
||||||
;; .word xcoord
|
;; .word xcoord
|
||||||
;; .word ycoord
|
;; .word ycoord
|
||||||
|
|
||||||
Line := $0F ; Draw line (from SET_POS)
|
Line := $0F ; Draw line (from SET_POS)
|
||||||
;; (input length 4 bytes)
|
;; (input length 4 bytes)
|
||||||
;; .word xdelta signed, delta in pixels
|
;; .word xdelta signed, delta in pixels
|
||||||
;; .word ydelta
|
;; .word ydelta
|
||||||
|
|
||||||
LineTo := $10 ; Draw line (from SET_POS)
|
LineTo := $10 ; Draw line (from SET_POS)
|
||||||
;; (input length 4 bytes)
|
;; (input length 4 bytes)
|
||||||
;; .word xcoord end coords in pixels
|
;; .word xcoord end coords in pixels
|
||||||
;; .word ycoord
|
;; .word ycoord
|
||||||
|
|
||||||
PaintRect := $11 ; Fill rectangle with selected simple pattern/thickness
|
PaintRect := $11 ; Fill rectangle with selected simple pattern/thickness
|
||||||
;; (input length 8 bytes)
|
;; (input length 8 bytes)
|
||||||
;; .word left (includes scroll pos)
|
;; .word left (includes scroll pos)
|
||||||
;; .word top
|
;; .word top
|
||||||
;; .word right pixels
|
;; .word right pixels
|
||||||
;; .word bottom
|
;; .word bottom
|
||||||
|
|
||||||
FrameRect := $12 ; Draw rectangle with selected simple pattern/thickness
|
FrameRect := $12 ; Draw rectangle with selected simple pattern/thickness
|
||||||
;; (input length 8 bytes)
|
;; (input length 8 bytes)
|
||||||
;; .word left pixels
|
;; .word left pixels
|
||||||
;; .word top
|
;; .word top
|
||||||
;; .word right
|
;; .word right
|
||||||
;; .word bottom
|
;; .word bottom
|
||||||
|
|
||||||
InRect := $13 ; Is pos (via SET_POS) in bounds? Returns true/false in A
|
InRect := $13 ; Is pos (via SET_POS) in bounds? Returns true/false in A
|
||||||
;; (input length 8 bytes)
|
;; (input length 8 bytes)
|
||||||
;; .word left
|
;; .word left
|
||||||
;; .word top
|
;; .word top
|
||||||
;; .word right
|
;; .word right
|
||||||
;; .word bottom
|
;; .word bottom
|
||||||
|
|
||||||
PaintBits := $14 ; Draw pattern
|
PaintBits := $14 ; Draw pattern
|
||||||
;; (input length 16 bytes)
|
;; (input length 16 bytes)
|
||||||
;; .word left
|
;; .word left
|
||||||
;; .word top
|
;; .word top
|
||||||
@ -172,10 +174,10 @@ PaintBits := $14 ; Draw pattern
|
|||||||
;; .word width pixels
|
;; .word width pixels
|
||||||
;; .word height pixels
|
;; .word height pixels
|
||||||
|
|
||||||
;; $15 used in DeskTop but not DAs - icon redraw
|
PaintPoly := $15
|
||||||
;; (input length 0 bytes)
|
;; (input length 0 bytes)
|
||||||
|
|
||||||
FramePoly := $16 ; Draw multiple closed polygons
|
FramePoly := $16 ; Draw multiple closed polygons
|
||||||
;; (input length 0 bytes)
|
;; (input length 0 bytes)
|
||||||
;; Address points at struct:
|
;; Address points at struct:
|
||||||
;; .byte points count
|
;; .byte points count
|
||||||
@ -187,16 +189,18 @@ FramePoly := $16 ; Draw multiple closed polygons
|
|||||||
;; $17 used in DeskTop but not DAs - maybe selection drag
|
;; $17 used in DeskTop but not DAs - maybe selection drag
|
||||||
;; (input length 0 bytes)
|
;; (input length 0 bytes)
|
||||||
|
|
||||||
|
InPoly := $16
|
||||||
|
|
||||||
;;; --------------------------------------------------
|
;;; --------------------------------------------------
|
||||||
;;; Text Commands
|
;;; Text Commands
|
||||||
|
|
||||||
TextWidth := $18 ; Measure the width of a string in pixels
|
TextWidth := $18 ; Measure the width of a string in pixels
|
||||||
;; (input length 3 bytes)
|
;; (input length 3 bytes)
|
||||||
;; .addr data
|
;; .addr data
|
||||||
;; .byte length
|
;; .byte length
|
||||||
;; .word width result in pixels
|
;; .word width result in pixels
|
||||||
|
|
||||||
DrawText := $19 ; Drawn at last SET_POS as left, baseline
|
DrawText := $19 ; Drawn at last SET_POS as left, baseline
|
||||||
;; (input length 3 bytes)
|
;; (input length 3 bytes)
|
||||||
;; .addr data
|
;; .addr data
|
||||||
;; .byte length
|
;; .byte length
|
||||||
@ -204,14 +208,15 @@ DrawText := $19 ; Drawn at last SET_POS as left, baseline
|
|||||||
;;; --------------------------------------------------
|
;;; --------------------------------------------------
|
||||||
;;; Utility Commands
|
;;; Utility Commands
|
||||||
|
|
||||||
SetZP1 := $1A ; Configure ZP usage by API (speed vs. convenience)
|
SetZP1 := $1A ; Configure ZP usage by API (speed vs. convenience)
|
||||||
;; (input length 1 byte)
|
;; (input length 1 byte)
|
||||||
;; .byte flag (AWS_CZP_*; high bit set = preserve ZP during calls)
|
;; .byte flag (AWS_CZP_*; high bit set = preserve ZP during calls)
|
||||||
|
|
||||||
SetZP2 := $1B ; Stash or restore lower 128 bytes of ZP; calls are idempotent
|
SetZP2 := $1B ; Stash or restore lower 128 bytes of ZP; calls are idempotent
|
||||||
;; (input length 1 byte)
|
;; (input length 1 byte)
|
||||||
;; .byte flag (high bit set = stash ZP, clear = unstash ZP)
|
;; .byte flag (high bit set = stash ZP, clear = unstash ZP)
|
||||||
|
|
||||||
|
Version := $1C ; ???
|
||||||
|
|
||||||
;;; ==================================================
|
;;; ==================================================
|
||||||
;;; Mouse Graphics Tool Kit Calls
|
;;; Mouse Graphics Tool Kit Calls
|
||||||
@ -220,21 +225,28 @@ SetZP2 := $1B ; Stash or restore lower 128 bytes of ZP; calls are idempo
|
|||||||
;;; --------------------------------------------------
|
;;; --------------------------------------------------
|
||||||
;;; Initialization Calls
|
;;; Initialization Calls
|
||||||
|
|
||||||
StartDeskTop := $1D; Inits state, registers interrupt handler, draws desktop
|
StartDeskTop := $1D ; Inits state, registers interrupt handler, draws desktop
|
||||||
;; (input length 12 byte)
|
;; (input length 12 byte)
|
||||||
;; ???
|
;; ???
|
||||||
|
|
||||||
StopDeskTop := $1E ; Deallocates interrupt, hides cursor
|
StopDeskTop := $1E ; Deallocates interrupt, hides cursor
|
||||||
;; (no parameters; pass $0000 as address)
|
;; (no parameters; pass $0000 as address)
|
||||||
|
|
||||||
SetUserHook := $20 ; Install mouse hook; A=0 on success, $95 if mouse disabled
|
|
||||||
|
;;; $1F ???
|
||||||
|
|
||||||
|
SetUserHook := $20 ; Install mouse hook; A=0 on success, $95 if mouse disabled
|
||||||
;; NOTE: Doesn't set the internal flag - buggy ???
|
;; NOTE: Doesn't set the internal flag - buggy ???
|
||||||
;; (input length 2 bytes)
|
;; (input length 2 bytes)
|
||||||
;; (output length 2 bytes)
|
;; (output length 2 bytes)
|
||||||
;; .addr hook Mouse hook routine to install
|
;; .addr hook Mouse hook routine to install
|
||||||
;; .addr mouse_state (out) Address of mouse state (.word x, y; .byte status)
|
;; .addr mouse_state (out) Address of mouse state (.word x, y; .byte status)
|
||||||
|
|
||||||
GetIntHandler := $23 ; Get address of interrupt handler
|
ScaleMouse := $21 ; ???
|
||||||
|
|
||||||
|
KeyboardMouse := $22 ; ???
|
||||||
|
|
||||||
|
GetIntHandler := $23 ; Get address of interrupt handler
|
||||||
;; (input length 0)
|
;; (input length 0)
|
||||||
;; (output length 2 bytes)
|
;; (output length 2 bytes)
|
||||||
;; .addr handler (out) Address of interrupt handler (after cld)
|
;; .addr handler (out) Address of interrupt handler (after cld)
|
||||||
@ -266,7 +278,9 @@ GetCursorAddr := $28 ; Get cursor definition
|
|||||||
;;; --------------------------------------------------
|
;;; --------------------------------------------------
|
||||||
;;; Event Manager Calls
|
;;; Event Manager Calls
|
||||||
|
|
||||||
GetEvent := $2A
|
CheckEvents := $29 ; ???
|
||||||
|
|
||||||
|
GetEvent := $2A
|
||||||
;; (input length 0 bytes)
|
;; (input length 0 bytes)
|
||||||
;; (output length 5 bytes)
|
;; (output length 5 bytes)
|
||||||
;; .byte state
|
;; .byte state
|
||||||
@ -277,13 +291,15 @@ GetEvent := $2A
|
|||||||
;; .word xcoord
|
;; .word xcoord
|
||||||
;; .word ycoord
|
;; .word ycoord
|
||||||
|
|
||||||
FlushEvents := $2B
|
FlushEvents := $2B
|
||||||
;; (no parameters; pass $0000 as address)
|
;; (no parameters; pass $0000 as address)
|
||||||
|
|
||||||
;; $2C used in DeskTop but not DAs - icon drag
|
;; $2C used in DeskTop but not DAs - icon drag
|
||||||
;; (input length 0 bytes)
|
;; (input length 0 bytes)
|
||||||
|
|
||||||
PostEvent := $2D ; Set pending input state (mouse or keyboard)
|
PeekEvent := $4C
|
||||||
|
|
||||||
|
PostEvent := $2D ; Set pending input state (mouse or keyboard)
|
||||||
;; (input length 5 bytes)
|
;; (input length 5 bytes)
|
||||||
;; .byte state
|
;; .byte state
|
||||||
;; if state is key_down:
|
;; if state is key_down:
|
||||||
@ -293,14 +309,16 @@ PostEvent := $2D ; Set pending input state (mouse or keyboard)
|
|||||||
;; .word xcoord
|
;; .word xcoord
|
||||||
;; .word ycoord
|
;; .word ycoord
|
||||||
|
|
||||||
SetKeyEvent := $2E ; When set, keyboard is ignored in $29 calls
|
SetKeyEvent := $2E ; When set, keyboard is ignored in $29 calls
|
||||||
;; (input length 1 byte)
|
;; (input length 1 byte)
|
||||||
;; .byte flag high bit set = ignore keyboard, otherwise check
|
;; .byte flag high bit set = ignore keyboard, otherwise check
|
||||||
|
|
||||||
;;; --------------------------------------------------
|
;;; --------------------------------------------------
|
||||||
;;; Menu Manager Calls
|
;;; Menu Manager Calls
|
||||||
|
|
||||||
SetMenu := $30 ; Configure (and draw) menu
|
InitMenu := $2F
|
||||||
|
|
||||||
|
SetMenu := $30 ; Configure (and draw) menu
|
||||||
;; (input not copied)
|
;; (input not copied)
|
||||||
;; .word count Number of top-level menus
|
;; .word count Number of top-level menus
|
||||||
;;
|
;;
|
||||||
@ -322,16 +340,23 @@ SetMenu := $30 ; Configure (and draw) menu
|
|||||||
;; or for a separator:
|
;; or for a separator:
|
||||||
;; .word $40, $13, $0
|
;; .word $40, $13, $0
|
||||||
|
|
||||||
MenuSelect := $31 ; Enter modal loop for handling mouse-down on menu bar
|
MenuSelect := $31 ; Enter modal loop for handling mouse-down on menu bar
|
||||||
;; (input not copied)
|
;; (input not copied)
|
||||||
;; (output 2 bytes)
|
;; (output 2 bytes)
|
||||||
;; .byte menu_id Top level menu identifier, or 0 if none
|
;; .byte menu_id Top level menu identifier, or 0 if none
|
||||||
;; .byte item_num Index (1-based) of item in menu, or 0 if none
|
;; .byte item_num Index (1-based) of item in menu, or 0 if none
|
||||||
|
|
||||||
|
MenuKey := $32
|
||||||
|
HiliteMenu := $33
|
||||||
|
DisableMenu := $34
|
||||||
|
DisableItem := $35
|
||||||
|
CheckItem := $36
|
||||||
|
SetMark := $37
|
||||||
|
|
||||||
;;; --------------------------------------------------
|
;;; --------------------------------------------------
|
||||||
;;; Window Manager Calls
|
;;; Window Manager Calls
|
||||||
|
|
||||||
OpenWindow := $38
|
OpenWindow := $38
|
||||||
;; (input not copied)
|
;; (input not copied)
|
||||||
;; .byte id
|
;; .byte id
|
||||||
;; .byte options option_*
|
;; .byte options option_*
|
||||||
@ -369,11 +394,13 @@ OpenWindow := $38
|
|||||||
;; .addr font
|
;; .addr font
|
||||||
;; .addr next address of next lower window in stack (filled in by call)
|
;; .addr next address of next lower window in stack (filled in by call)
|
||||||
|
|
||||||
CloseWindow := $39
|
CloseWindow := $39
|
||||||
;; (input length 1 byte)
|
;; (input length 1 byte)
|
||||||
;; .byte id
|
;; .byte id
|
||||||
|
|
||||||
GetWinPtr := $3B ; Get pointer to window params by id; A=0 on success
|
CloseAll := $3A
|
||||||
|
|
||||||
|
GetWinPtr := $3B ; Get pointer to window params by id; A=0 on success
|
||||||
;; (input length 1 byte)
|
;; (input length 1 byte)
|
||||||
;; (output length 3 bytes)
|
;; (output length 3 bytes)
|
||||||
;; .byte id of window
|
;; .byte id of window
|
||||||
@ -384,47 +411,49 @@ GetWinPort := $3C ; get drawing state of window
|
|||||||
;; .byte id window
|
;; .byte id window
|
||||||
;; .addr state state definition to populate, like SetPort
|
;; .addr state state definition to populate, like SetPort
|
||||||
|
|
||||||
SetWinPort := $3D ; Update drawing state by passed window id
|
SetWinPort := $3D ; Update drawing state by passed window id
|
||||||
;; ** Implementation appears buggy - or maybe just really cryptic ??? **
|
;; ** Implementation appears buggy - or maybe just really cryptic ??? **
|
||||||
;; (input length 2 bytes)
|
;; (input length 2 bytes)
|
||||||
;; .byte id window
|
;; .byte id window
|
||||||
;; .byte ???
|
;; .byte ???
|
||||||
|
|
||||||
|
|
||||||
BeginUpdate := $3E ; Draws window border, background, title bar, scroll bars
|
BeginUpdate := $3E
|
||||||
;; (input length 1 byte)
|
;; (input length 1 byte)
|
||||||
;; .byte id
|
;; .byte id
|
||||||
|
|
||||||
FindWindow := $40
|
EndUpdate := $3F
|
||||||
|
|
||||||
|
FindWindow := $40
|
||||||
;; (input length 4 bytes)
|
;; (input length 4 bytes)
|
||||||
;; .word queryx relative to screen
|
;; .word queryx relative to screen
|
||||||
;; .word queryy
|
;; .word queryy
|
||||||
;; .byte element (out) area_*
|
;; .byte element (out) area_*
|
||||||
;; .byte id (out) of window
|
;; .byte id (out) of window
|
||||||
|
|
||||||
FrontWindow := $41 ; Get id of top window
|
FrontWindow := $41 ; Get id of top window
|
||||||
;; (input length 0 bytes)
|
;; (input length 0 bytes)
|
||||||
;; (output length 1 byte)
|
;; (output length 1 byte)
|
||||||
;; .byte id (out) window, or 0 if none
|
;; .byte id (out) window, or 0 if none
|
||||||
|
|
||||||
SelectWindow := $42 ; Make window topmost
|
SelectWindow := $42 ; Make window topmost
|
||||||
;; (input length 1 byte)
|
;; (input length 1 byte)
|
||||||
;; .byte id window
|
;; .byte id window
|
||||||
|
|
||||||
TrackGoAway := $43
|
TrackGoAway := $43
|
||||||
;; (input length 0 bytes)
|
;; (input length 0 bytes)
|
||||||
;; .byte clicked (out) 0 = cancelled, 1 = clicked
|
;; .byte clicked (out) 0 = cancelled, 1 = clicked
|
||||||
;; .byte ?? (out)
|
;; .byte ?? (out)
|
||||||
;; .byte ?? (out)
|
;; .byte ?? (out)
|
||||||
|
|
||||||
DragWindow := $44
|
DragWindow := $44
|
||||||
;; (input length 5 bytes)
|
;; (input length 5 bytes)
|
||||||
;; .byte id window
|
;; .byte id window
|
||||||
;; .word xcoord mouse coords
|
;; .word xcoord mouse coords
|
||||||
;; .word ycoord
|
;; .word ycoord
|
||||||
;; .byte moved high bit set if moved, clear if not
|
;; .byte moved high bit set if moved, clear if not
|
||||||
|
|
||||||
GrowWindow := $45
|
GrowWindow := $45
|
||||||
;; (input length 5 bytes)
|
;; (input length 5 bytes)
|
||||||
;; .byte id window
|
;; .byte id window
|
||||||
;; .word xcoord mouse coords
|
;; .word xcoord mouse coords
|
||||||
@ -439,23 +468,25 @@ ScreenToWindow := $46 ; Map screen coords to client coords
|
|||||||
;; .word clientx
|
;; .word clientx
|
||||||
;; .word clienty
|
;; .word clienty
|
||||||
|
|
||||||
|
WindowToScreen := $47
|
||||||
|
|
||||||
;;; --------------------------------------------------
|
;;; --------------------------------------------------
|
||||||
;;; Control Manager Calls
|
;;; Control Manager Calls
|
||||||
|
|
||||||
FindControl := $48
|
FindControl := $48
|
||||||
;; (input length 4 bytes)
|
;; (input length 4 bytes)
|
||||||
;; .word xcoord
|
;; .word xcoord
|
||||||
;; .word ycoord
|
;; .word ycoord
|
||||||
;; .byte part ctl_*
|
;; .byte part ctl_*
|
||||||
;; .byte scroll part_*
|
;; .byte scroll part_*
|
||||||
|
|
||||||
SetCtlMax := $49 ; ???
|
SetCtlMax := $49 ; ???
|
||||||
;; (input length 3 bytes)
|
;; (input length 3 bytes)
|
||||||
;; .byte ??? maybe part (i.e. HSCROLL or VSCROLL) ???
|
;; .byte ??? maybe part (i.e. HSCROLL or VSCROLL) ???
|
||||||
;; .byte ??? width fraction ??
|
;; .byte ??? width fraction ??
|
||||||
;; .byte ???
|
;; .byte ???
|
||||||
|
|
||||||
TrackThumb := $4A
|
TrackThumb := $4A
|
||||||
;; (input length 5 bytes)
|
;; (input length 5 bytes)
|
||||||
;; .byte type ctl_horizontal_scroll_bar or ctl_vertical_scroll_bar
|
;; .byte type ctl_horizontal_scroll_bar or ctl_vertical_scroll_bar
|
||||||
;; .word mouse xcoord
|
;; .word mouse xcoord
|
||||||
@ -463,18 +494,20 @@ TrackThumb := $4A
|
|||||||
;; .byte position 0...255
|
;; .byte position 0...255
|
||||||
;; .byte moved 0 = no change, 1 = moved
|
;; .byte moved 0 = no change, 1 = moved
|
||||||
|
|
||||||
UpdateThumb := $4B
|
UpdateThumb := $4B
|
||||||
;; (input length 3 bytes)
|
;; (input length 3 bytes)
|
||||||
;; .byte type ctl_horizontal_scroll_bar or ctl_vertical_scroll_bar
|
;; .byte type ctl_horizontal_scroll_bar or ctl_vertical_scroll_bar
|
||||||
;; .byte pos new position 0...250
|
;; .byte pos new position 0...250
|
||||||
;; .byte ???
|
;; .byte ???
|
||||||
|
|
||||||
|
ActivateCtl := $4C ; ???
|
||||||
|
|
||||||
;;; $4E is last call
|
;;; $4E is last call
|
||||||
|
|
||||||
;;; ==================================================
|
;;; ==================================================
|
||||||
;;; Graphics Primitives Constants
|
;;; Graphics Primitives Constants
|
||||||
|
|
||||||
;;; Used in GetWinPort / SetPortSite
|
;;; Used in GetWinPort / SetPortBits
|
||||||
screen_mapbits := $2000 ; Screen address
|
screen_mapbits := $2000 ; Screen address
|
||||||
screen_mapwidth := $80 ; Stride in bytes
|
screen_mapwidth := $80 ; Stride in bytes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user