mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-29 07:49:20 +00:00
Identify window/box pattern fields, use .res
This commit is contained in:
parent
40026a0f46
commit
ae232b1cf4
@ -44,8 +44,7 @@ JUMP_TABLE_3F := $403F ; ???
|
||||
|
||||
A2D_QUERY_SCREEN := $03 ; Get screen info
|
||||
;; (input length 0 bytes)
|
||||
;; (input length 35 bytes)
|
||||
;; -- first part is like SET_BOX/QUERY_BOX params
|
||||
;; (output length 35 bytes)
|
||||
;; .word left
|
||||
;; .word top
|
||||
;; .addr addr A2D_SCREEN_ADDR
|
||||
@ -54,14 +53,28 @@ A2D_QUERY_SCREEN := $03 ; Get screen info
|
||||
;; .word voffset
|
||||
;; .word width 560-1
|
||||
;; .word height 192-1
|
||||
;; -- next part is ???
|
||||
;; .byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ??? pattern + ?
|
||||
;; .byte 0,0,0,0 ???
|
||||
;; .res 8 pattern
|
||||
;; .byte $FF,0,0,0,0 ???
|
||||
;; .byte 1,1,0,$7F,0,$88 line w,h, ???
|
||||
|
||||
A2D_SET_BOX1 := $04 ; Not sure what BOX1 vs. BOX2 is for
|
||||
;; (input length 36 bytes)
|
||||
;; (first bit is like SET_BOX2, think rest is full draw state)
|
||||
;; - first part is like A2D_SET_BOX2
|
||||
;; .word left pixels from screen edge
|
||||
;; .word top
|
||||
;; .addr addr A2D_SCREEN_ADDR ($2000)
|
||||
;; .word stride A2D_SCREEN_STRIDE ($80)
|
||||
;; .word hoffset pixels scrolled
|
||||
;; .word voffset
|
||||
;; .word width pixels
|
||||
;; .word height
|
||||
;; -- next part is full draw state ???
|
||||
;; .res 8 pattern
|
||||
;; .byte $FF,0,0,0,0 ???
|
||||
;; .byte hthick horizontal pen thickness
|
||||
;; .byte vthick vertical pen thickness
|
||||
;; .byte 0,$7F,0,$88
|
||||
|
||||
A2D_SET_BOX2 := $06 ; set vs. intersect? (not quite)
|
||||
;; (input length 16 bytes)
|
||||
;; .word left pixels from screen edge
|
||||
@ -79,9 +92,10 @@ A2D_SET_FILL_MODE := $07
|
||||
|
||||
A2D_SET_PATTERN := $08
|
||||
;; (input length 8 bytes)
|
||||
;; .byte r0...r7 8x8 pixel pattern for A2D_FILL_RECT calls
|
||||
;; .res 8 pattern 8x8 pixel pattern for A2D_FILL_RECT calls
|
||||
;; (TODO: Is there an output???)
|
||||
|
||||
A2D_SET_LINE_WIDTH := $0A
|
||||
A2D_SET_THICKNESS := $0A
|
||||
;; (input length 2 bytes)
|
||||
;; .byte hthick horizontal pen thickness
|
||||
;; .byte vthick vertical pen thickness
|
||||
@ -200,7 +214,7 @@ A2D_CREATE_WINDOW := $38
|
||||
;; .word voffset
|
||||
;; .word width pixels
|
||||
;; .word height
|
||||
;; .byte pattern (8 bytes)
|
||||
;; .res 8 pattern
|
||||
;; .byte $FF,$00,$00,$00,$00,$00 ???
|
||||
;; .byte hthick
|
||||
;; .byte vthick
|
||||
@ -213,7 +227,7 @@ A2D_DESTROY_WINDOW := $39
|
||||
A2D_QUERY_BOX := $3C ; get client "box" of window
|
||||
;; (input length 3 bytes)
|
||||
;; .byte id window
|
||||
;; .addr box box definition to populate, like A2D_SET_BOX1 (or 2 ???)
|
||||
;; .addr box box definition to populate, like A2D_SET_BOX1
|
||||
|
||||
A2D_QUERY_TARGET := $40
|
||||
;; (input length 4 bytes)
|
||||
|
@ -569,11 +569,11 @@ background_pattern:
|
||||
.byte $00
|
||||
|
||||
black_pattern:
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.res 8, $00
|
||||
.byte $00
|
||||
|
||||
white_pattern:
|
||||
.byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||
.res 8, $FF
|
||||
.byte $00
|
||||
|
||||
;; ???
|
||||
@ -613,8 +613,7 @@ length: .byte 15
|
||||
text_buffer_size := 14
|
||||
|
||||
text_buffer1:
|
||||
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
||||
.res text_buffer_size+2, 0
|
||||
|
||||
.proc draw_text_params2
|
||||
addr: .addr text_buffer2
|
||||
@ -622,7 +621,7 @@ length: .byte 15
|
||||
.endproc
|
||||
|
||||
text_buffer2:
|
||||
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.res text_buffer_size+2, 0
|
||||
|
||||
spaces_string:
|
||||
A2D_DEFSTRING " "
|
||||
@ -657,8 +656,7 @@ left: .word 69
|
||||
base: .word 16
|
||||
.endproc
|
||||
|
||||
farg:
|
||||
.byte $00,$00,$00,$00,$00,$00
|
||||
farg: .byte $00,$00,$00,$00,$00,$00
|
||||
|
||||
.proc title_bar_decoration ; Params for A2D_DRAW_PATTERN
|
||||
left: .word 115 ; overwritten
|
||||
@ -685,16 +683,14 @@ addr: .word 0
|
||||
stride: .word 0
|
||||
hoffset:.word 0
|
||||
voffset:.word 0
|
||||
width: .word 0 ; QUERY_SCREEN call sets to screen_width-1
|
||||
height: .word 0 ; QUERY_SCREEN call sets to screen_height-1
|
||||
|
||||
;; unknown from here
|
||||
.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 QUERY_SCREEN
|
||||
.word 0 ; QUERY_SCREEN call sets to $100
|
||||
.word 0 ; QUERY_SCREEN call sets to $1
|
||||
.word 0 ; QUERY_SCREEN call sets to $7F (127)
|
||||
.word 0 ; QUERY_SCREEN call sets to $88 (136)
|
||||
width: .word 0
|
||||
height: .word 0
|
||||
pattern:.res 8, 0
|
||||
.byte 0
|
||||
.byte 0,0,0,0,0 ; ???
|
||||
hthick: .byte 0
|
||||
vthick: .byte 0
|
||||
.byte 0,0,0,0,0 ; ???
|
||||
.endproc
|
||||
|
||||
menu_bar_height := 13
|
||||
@ -750,19 +746,12 @@ hoffset:.word 0
|
||||
voffset:.word 0
|
||||
width: .word window_width
|
||||
height: .word window_height
|
||||
|
||||
;; ???
|
||||
;; Same as latter part of box_params block after QUERY_SCREEN call fills it in
|
||||
pattern:.byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||
.byte $FF
|
||||
.byte $00,$00
|
||||
.byte $00,$00,$00
|
||||
pattern:.res 8, $FF
|
||||
.byte $FF ; ???
|
||||
.byte 0,0,0,0,0 ; ???
|
||||
hthick: .byte 1
|
||||
vthick: .byte 1
|
||||
.byte $00,$7F,$00
|
||||
.byte $88,$00
|
||||
|
||||
.byte $00
|
||||
.byte $00,$7F,$00,$88,$00,$00 ; ???
|
||||
.endproc
|
||||
create_window_params_top := create_window_params::top
|
||||
|
||||
|
@ -181,11 +181,11 @@ year_rect:
|
||||
.word $7F,$14,$95,$1E
|
||||
|
||||
;; Params for $0C call (1 byte?)
|
||||
L08FC: .byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
L08FC: .res 8, $00
|
||||
.byte $FF
|
||||
|
||||
.proc white_pattern
|
||||
.byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||
.res 8, $FF
|
||||
.endproc
|
||||
.byte $FF ; ??
|
||||
|
||||
@ -282,7 +282,7 @@ voff: .word 0
|
||||
width: .word $C7
|
||||
height: .word $40
|
||||
.endproc
|
||||
pattern:.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
pattern:.res 8,$00
|
||||
.byte $FF,$00,$00,$00,$00,$00
|
||||
hthick: .byte 4
|
||||
vthick: .byte 2
|
||||
@ -777,7 +777,7 @@ label_uparrow_pos:
|
||||
label_downarrow_pos:
|
||||
.word $AC,$27
|
||||
|
||||
.proc line_width_params
|
||||
.proc thickness_params
|
||||
hthick: .byte 1
|
||||
vthick: .byte 1
|
||||
.endproc
|
||||
@ -788,7 +788,7 @@ vthick: .byte 1
|
||||
draw_window:
|
||||
A2D_CALL A2D_SET_BOX1, create_window_params::box
|
||||
A2D_CALL A2D_DRAW_RECT, border_rect
|
||||
A2D_CALL A2D_SET_LINE_WIDTH, line_width_params
|
||||
A2D_CALL A2D_SET_THICKNESS, thickness_params
|
||||
A2D_CALL A2D_DRAW_RECT, date_rect
|
||||
A2D_CALL A2D_DRAW_RECT, ok_button_rect
|
||||
A2D_CALL A2D_DRAW_RECT, cancel_button_rect
|
||||
@ -928,38 +928,7 @@ loop: lda zp_buffer,x
|
||||
.endproc
|
||||
|
||||
zp_buffer:
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.res 256, 0
|
||||
|
||||
;;; ==================================================
|
||||
;;; Convert number to two ASCII digits (in A, X)
|
||||
|
@ -12,11 +12,7 @@ SPKR := $C030
|
||||
|
||||
jmp copy2aux
|
||||
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0
|
||||
.res 36, 0
|
||||
|
||||
;;; ==================================================
|
||||
;;; Copy the DA to AUX and invoke it
|
||||
@ -178,8 +174,7 @@ element := *+4
|
||||
id := *+5
|
||||
.endproc
|
||||
|
||||
.byte 0,0,0,0 ; storage for above
|
||||
.byte 0,0,0,0
|
||||
.res 8, 0 ; storage for above
|
||||
|
||||
.byte 0,0 ; ???
|
||||
|
||||
@ -231,11 +226,8 @@ space_positions: ; left, top for all 16 holes
|
||||
.endproc
|
||||
|
||||
;; Current position table
|
||||
position_table := *
|
||||
.byte 0,0,0,0
|
||||
.byte 0,0,0,0
|
||||
.byte 0,0,0,0
|
||||
.byte 0,0,0,0
|
||||
position_table:
|
||||
.res 16, 0
|
||||
|
||||
.proc draw_pattern_params
|
||||
left: .word 0
|
||||
@ -532,12 +524,13 @@ piece16:
|
||||
.byte $00 ; ???
|
||||
|
||||
.proc pattern_black
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.res 8, 0
|
||||
.endproc
|
||||
|
||||
;; ???
|
||||
.byte $00,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||
.byte $FF,$00
|
||||
.byte $00
|
||||
.res 8, $FF
|
||||
.byte $00
|
||||
|
||||
.proc set_pos_params ; for what ??? (board is at 5,3)
|
||||
.word 5, 2
|
||||
@ -610,14 +603,12 @@ voffset:.word 0
|
||||
width: .word default_width
|
||||
height: .word default_height
|
||||
|
||||
pattern:.byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||
pattern:.res 8, $FF
|
||||
.byte $FF,$00
|
||||
.byte $00,$00,$00,$00
|
||||
hthick: .byte 1
|
||||
vthick: .byte 1
|
||||
.byte $00,$7F
|
||||
.byte $00,$88
|
||||
.byte $00,$00
|
||||
.byte $00,$7F,$00,$88,$00,$00
|
||||
|
||||
;; This is QUERY_BOX/SET_BOX cruft only below
|
||||
|
||||
@ -628,13 +619,12 @@ vthick: .byte 1
|
||||
.byte $00,$00,$00,$00
|
||||
.word default_width
|
||||
.word default_height
|
||||
.byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||
.res 8, $FF
|
||||
.byte $FF,$00,$00,$00
|
||||
.byte $00,$00
|
||||
.byte 1
|
||||
.byte 1
|
||||
.byte $00,$7F,$00,$88
|
||||
.byte $00,$00
|
||||
.byte $00,$7F,$00,$88,$00,$00
|
||||
|
||||
.endproc
|
||||
name: PASCAL_STRING "Puzzle"
|
||||
@ -992,38 +982,7 @@ loop: lda saved_zp,x
|
||||
.endproc
|
||||
|
||||
saved_zp:
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.res 256, 0
|
||||
|
||||
;;; ==================================================
|
||||
;;; Draw pieces
|
||||
|
@ -181,14 +181,7 @@ ref_num:.byte 0 ; ref_num
|
||||
|
||||
.proc pathname ; 1st byte is length, rest is full path
|
||||
length: .byte $00
|
||||
data: .byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
data: .res 64, 0
|
||||
.endproc
|
||||
|
||||
|
||||
@ -622,6 +615,5 @@ cloop: lda (src),y
|
||||
rts
|
||||
.endproc
|
||||
|
||||
|
||||
.include "hires_table.inc"
|
||||
.include "hgr_to_dhr.inc"
|
||||
|
@ -191,14 +191,7 @@ ref_num:.byte 0 ; ref_num
|
||||
|
||||
.proc pathname ; 1st byte is length, rest is full path
|
||||
length: .byte $00
|
||||
data: .byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
data: .res 64, $00
|
||||
.endproc
|
||||
|
||||
L0945: .byte $00
|
||||
@ -211,10 +204,10 @@ params_end := * + 4 ; bug in original? (harmless as this is static)
|
||||
;;; ----------------------------------------
|
||||
|
||||
black_pattern:
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.res 8, $00
|
||||
|
||||
white_pattern:
|
||||
.byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||
.res $8, $FF
|
||||
|
||||
window_id := $64
|
||||
|
||||
@ -334,8 +327,8 @@ width: .word default_width
|
||||
height: .word default_height
|
||||
.endproc
|
||||
|
||||
pattern:.byte $00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$FF,$00,$00,$00,$00,$00
|
||||
pattern:.res 8, $00
|
||||
.byte $FF,$00,$00,$00,$00,$00
|
||||
hthick: .byte 1
|
||||
vthick: .byte 1
|
||||
.byte $00,$7F,$00,$88,$00,$00
|
||||
|
Loading…
Reference in New Issue
Block a user