From e94b6e7f2db2384266e05723eaa3f4b261bb98d1 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Tue, 19 Sep 2017 07:58:17 -0700 Subject: [PATCH] Identify SET_INPUT --- desk.acc/a2d.inc | 9 ++++++++- desk.acc/calculator.s | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/desk.acc/a2d.inc b/desk.acc/a2d.inc index 9371e33..bce7d1f 100644 --- a/desk.acc/a2d.inc +++ b/desk.acc/a2d.inc @@ -208,8 +208,15 @@ A2D_UNK_2B := $2B ; Unknown - possibly "reset drawing state" ;; $2C used in DeskTop but not DAs ;; (input length 0 bytes) -A2D_UNK_2D := $2D ; Unknown - used in calculator +A2D_SET_INPUT := $2D ; Set pending input state (mouse or keyboard) ;; (input length 5 bytes) + ;; .byte state (A2D_INPUT_*) + ;; if state is A2D_INPUT_KEY: + ;; .byte key (ASCII code; high bit clear) + ;; .byte modifiers (0=none, 1=open-apple, 2=closed-apple, 3=both) + ;; if state otherwise: + ;; .word xcoord + ;; .word ycoord A2D_CREATE_WINDOW := $38 ;; .byte id diff --git a/desk.acc/calculator.s b/desk.acc/calculator.s index 19b7083..3bea513 100644 --- a/desk.acc/calculator.s +++ b/desk.acc/calculator.s @@ -799,8 +799,8 @@ init: sta ALTZPON A2D_CALL $2B ; reset drawing state? lda #$01 sta input_state_params::state - A2D_CALL $2D, input_state_params ; ??? - A2D_CALL A2D_GET_INPUT, input_state_params ; ??? + A2D_CALL A2D_SET_INPUT, input_state_params + A2D_CALL A2D_GET_INPUT, input_state_params lda ROMIN2 jsr reset_buffer2 lda #window_id