mirror of
https://github.com/mi57730/a2d.git
synced 2024-12-01 05:50:24 +00:00
Identify QUERY_SCREEN
This commit is contained in:
parent
d0ed145ef5
commit
2fbbd23f20
@ -35,7 +35,22 @@ JUMP_TABLE_3F := $403F ; ???
|
|||||||
;;; ==================================================
|
;;; ==================================================
|
||||||
;;; A2D Calls
|
;;; A2D Calls
|
||||||
|
|
||||||
A2D_UNK_03 := $03 ; Appears to be "query screen box"
|
A2D_QUERY_SCREEN := $03 ; Get screen info
|
||||||
|
;; -- first bit is like SET_BOX/QUERY_BOX params
|
||||||
|
;; .word left
|
||||||
|
;; .word top
|
||||||
|
;; .addr addr A2D_SCREEN_ADDR
|
||||||
|
;; .word stride A2D_SCREEN_STRIDE
|
||||||
|
;; .word hoffset
|
||||||
|
;; .word voffset
|
||||||
|
;; .word width 560-1
|
||||||
|
;; .word height 192-1
|
||||||
|
;; .byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ???
|
||||||
|
;; .byte 0,0,0,0, ???
|
||||||
|
;; .word $100 ???
|
||||||
|
;; .word $1 ???
|
||||||
|
;; .word $7F ???
|
||||||
|
;; .word $88 ???
|
||||||
|
|
||||||
A2D_SET_BOX1 := $04 ; Not sure what BOX1 vs. BOX2 is for
|
A2D_SET_BOX1 := $04 ; Not sure what BOX1 vs. BOX2 is for
|
||||||
A2D_SET_BOX2 := $06 ; set vs. intersect? (not quite)
|
A2D_SET_BOX2 := $06 ; set vs. intersect? (not quite)
|
||||||
|
@ -102,7 +102,7 @@ call_init:
|
|||||||
;; Redraw window after drag
|
;; Redraw window after drag
|
||||||
lda ROMIN2
|
lda ROMIN2
|
||||||
lda #window_id
|
lda #window_id
|
||||||
jsr L089E
|
jsr draw_window
|
||||||
|
|
||||||
;; ???
|
;; ???
|
||||||
lda LCBANK1
|
lda LCBANK1
|
||||||
@ -139,7 +139,8 @@ L089D: .byte 0
|
|||||||
|
|
||||||
;; Called after window drag is complete
|
;; Called after window drag is complete
|
||||||
;; (called with window_id in A)
|
;; (called with window_id in A)
|
||||||
L089E: sta query_box_params_id
|
.proc draw_window
|
||||||
|
sta query_box_params_id
|
||||||
lda create_window_params_top
|
lda create_window_params_top
|
||||||
cmp #screen_height - 1
|
cmp #screen_height - 1
|
||||||
bcc :+
|
bcc :+
|
||||||
@ -152,8 +153,9 @@ L089E: sta query_box_params_id
|
|||||||
lda query_box_params_id
|
lda query_box_params_id
|
||||||
cmp #window_id
|
cmp #window_id
|
||||||
bne :+
|
bne :+
|
||||||
jmp draw_window
|
jmp draw_background
|
||||||
: rts
|
: rts
|
||||||
|
.endproc
|
||||||
|
|
||||||
;;; ==================================================
|
;;; ==================================================
|
||||||
;;; Call Params (and other data)
|
;;; Call Params (and other data)
|
||||||
@ -677,7 +679,7 @@ pixels: .byte px(%1000001)
|
|||||||
.byte px(%1001001)
|
.byte px(%1001001)
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
;; param block for a $03 and SET_BOX1 calls, and ref'd in A2D_QUERY_BOX call
|
;; param block for a QUERY_SCREEN and SET_BOX1 calls, and ref'd in A2D_QUERY_BOX call
|
||||||
.proc box_params
|
.proc box_params
|
||||||
left: .word 0
|
left: .word 0
|
||||||
top: .word 0
|
top: .word 0
|
||||||
@ -685,16 +687,16 @@ addr: .word 0
|
|||||||
stride: .word 0
|
stride: .word 0
|
||||||
hoffset:.word 0
|
hoffset:.word 0
|
||||||
voffset:.word 0
|
voffset:.word 0
|
||||||
width: .word 0 ; $03 call sets to screen_width-1
|
width: .word 0 ; QUERY_SCREEN call sets to screen_width-1
|
||||||
height: .word 0 ; $03 call sets to screen_height-1
|
height: .word 0 ; QUERY_SCREEN call sets to screen_height-1
|
||||||
|
|
||||||
;; unknown from here
|
;; unknown from here
|
||||||
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00 ; filled with $FF by $03 call
|
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00 ; filled with $FF by QUERY_SCREEN call
|
||||||
.byte $00,$00,$00,$00 ; left $00 by $03
|
.byte $00,$00,$00,$00 ; left $00 by QUERY_SCREEN
|
||||||
.word 0 ; $03 call sets to $100
|
.word 0 ; QUERY_SCREEN call sets to $100
|
||||||
.word 0 ; $03 call sets to $1
|
.word 0 ; QUERY_SCREEN call sets to $1
|
||||||
.word 0 ; $03 call sets to $7F (127)
|
.word 0 ; QUERY_SCREEN call sets to $7F (127)
|
||||||
.word 0 ; $03 call sets to $88 (136)
|
.word 0 ; QUERY_SCREEN call sets to $88 (136)
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
menu_bar_height := 13
|
menu_bar_height := 13
|
||||||
@ -749,7 +751,7 @@ height: .word window_height
|
|||||||
create_window_params_top := create_window_params::top
|
create_window_params_top := create_window_params::top
|
||||||
|
|
||||||
;; ???
|
;; ???
|
||||||
;; Same as latter part of box_params block after $03 call fills it in
|
;; Same as latter part of box_params block after QUERY_SCREEN call fills it in
|
||||||
.byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
.byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
.byte $00,$00
|
.byte $00,$00
|
||||||
.byte $00,$00,$00,$01,$01,$00,$7F,$00
|
.byte $00,$00,$00,$01,$01,$00,$7F,$00
|
||||||
@ -776,8 +778,8 @@ L0D18: sta ALTZPON
|
|||||||
lda LCBANK1
|
lda LCBANK1
|
||||||
A2D_CALL $1A, L08D4
|
A2D_CALL $1A, L08D4
|
||||||
A2D_CALL A2D_CREATE_WINDOW, create_window_params
|
A2D_CALL A2D_CREATE_WINDOW, create_window_params
|
||||||
A2D_CALL $03, box_params ; get display state?
|
A2D_CALL A2D_QUERY_SCREEN, box_params
|
||||||
A2D_CALL A2D_SET_BOX1, box_params ; set clipping bounds?
|
A2D_CALL A2D_SET_BOX1, box_params ; set clipping bounds?
|
||||||
A2D_CALL $2B
|
A2D_CALL $2B
|
||||||
lda #$01
|
lda #$01
|
||||||
sta input_state_params::state
|
sta input_state_params::state
|
||||||
@ -786,7 +788,7 @@ L0D18: sta ALTZPON
|
|||||||
lda ROMIN2
|
lda ROMIN2
|
||||||
jsr reset_buffer2
|
jsr reset_buffer2
|
||||||
lda #window_id
|
lda #window_id
|
||||||
jsr L089E
|
jsr draw_window
|
||||||
jsr reset_buffers_and_display
|
jsr reset_buffers_and_display
|
||||||
|
|
||||||
lda #'=' ; last operation
|
lda #'=' ; last operation
|
||||||
@ -1561,7 +1563,7 @@ loop: lda #' '
|
|||||||
;;; ==================================================
|
;;; ==================================================
|
||||||
;;; Draw the window contents (background, buttons)
|
;;; Draw the window contents (background, buttons)
|
||||||
|
|
||||||
.proc draw_window
|
.proc draw_background
|
||||||
;; Frame
|
;; Frame
|
||||||
A2D_CALL A2D_HIDE_CURSOR
|
A2D_CALL A2D_HIDE_CURSOR
|
||||||
A2D_CALL A2D_SET_PATTERN, background_pattern
|
A2D_CALL A2D_SET_PATTERN, background_pattern
|
||||||
@ -1570,8 +1572,12 @@ loop: lda #' '
|
|||||||
A2D_CALL A2D_DRAW_RECT, frame_display_params
|
A2D_CALL A2D_DRAW_RECT, frame_display_params
|
||||||
A2D_CALL A2D_SET_PATTERN, white_pattern
|
A2D_CALL A2D_SET_PATTERN, white_pattern
|
||||||
A2D_CALL A2D_FILL_RECT, clear_display_params
|
A2D_CALL A2D_FILL_RECT, clear_display_params
|
||||||
A2D_CALL $0C, L0BEF ; ???
|
|
||||||
|
|
||||||
|
A2D_CALL $0C, L0BEF ; ???
|
||||||
|
;; fall through
|
||||||
|
.endproc
|
||||||
|
|
||||||
|
.proc draw_buttons
|
||||||
;; Buttons
|
;; Buttons
|
||||||
ptr := $FA
|
ptr := $FA
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user