diff --git a/desk.acc/a2d.inc b/desk.acc/a2d.inc index 3d3d566..d9164ec 100644 --- a/desk.acc/a2d.inc +++ b/desk.acc/a2d.inc @@ -52,8 +52,8 @@ A2D_QUERY_SCREEN := $03 ; Get screen state ;; .word top ;; .addr addr A2D_SCREEN_ADDR ;; .word stride A2D_SCREEN_STRIDE - ;; .word hoffset - ;; .word voffset + ;; .word hoff + ;; .word voff ;; .word width 560-1 ;; .word height 192-1 ;; .res 8 pattern @@ -64,7 +64,7 @@ A2D_QUERY_SCREEN := $03 ; Get screen state ;; .byte hthick horizontal pen thickness ;; .byte vthick vertical pen thickness ;; .byte 0 ??? fill mode? - ;; .byte tmsk AND mask for text, default $7F + ;; .byte tmask AND mask for text, default $7F ;; .addr font A2D_DEFAULT_FONT A2D_SET_STATE := $04 ; Set full drawing state @@ -73,8 +73,8 @@ A2D_SET_STATE := $04 ; Set full drawing state ;; .word top ;; .addr addr A2D_SCREEN_ADDR ;; .word stride A2D_SCREEN_STRIDE - ;; .word hoffset pixels scrolled - ;; .word voffset + ;; .word hoff pixels scrolled + ;; .word voff ;; .word width pixels ;; .word height ;; .res 8 pattern @@ -85,7 +85,7 @@ A2D_SET_STATE := $04 ; Set full drawing state ;; .byte hthick horizontal pen thickness ;; .byte vthick vertical pen thickness ;; .byte 0 ??? fill mode? - ;; .byte tmsk AND mask for text, default $7F + ;; .byte tmask AND mask for text, default $7F ;; .addr font A2D_DEFAULT_FONT ;; $05 used in DeskTop but not DAs - icon click @@ -97,14 +97,14 @@ A2D_SET_BOX := $06 ; Set just the drawing box, subset of full state ;; .word top ;; .addr addr A2D_SCREEN_ADDR ($2000) ;; .word stride A2D_SCREEN_STRIDE ($80) - ;; .word hoffset pixels scrolled - ;; .word voffset + ;; .word hoff pixels scrolled + ;; .word voff ;; .word width pixels ;; .word height A2D_SET_FILL_MODE := $07 ;; (input length 1 byte) - ;; .byte mode 0 = normal, 6 = xor (<4, >=4) + ;; .byte mode (>=4 also sets eor mask to $7f) A2D_SET_PATTERN := $08 ;; (input length 8 bytes) @@ -167,8 +167,8 @@ A2D_DRAW_BITMAP := $14 ; Draw pattern ;; .addr bitmap bitmap is 7 bits per byte, 0 = black, 1 = white ;; .byte stride bitmap width in bytes ;; .byte 0 ??? - ;; .word hoffset offset within bitmap definition - ;; .word voffset + ;; .word hoff offset within bitmap definition + ;; .word voff ;; .word width pixels ;; .word height pixels @@ -258,8 +258,8 @@ A2D_CREATE_WINDOW := $38 ;; .word top ;; .word screen_addr ;; .word screen_stride - ;; .word hoffset pixels scrolled - ;; .word voffset + ;; .word hoff pixels scrolled + ;; .word voff ;; .word width pixels ;; .word height ;; .res 8 pattern @@ -270,7 +270,7 @@ A2D_CREATE_WINDOW := $38 ;; .byte hthick ;; .byte vthick ;; .byte 0 ??? fill mode? - ;; .byte tmsk AND mask for text, default $7F + ;; .byte tmask AND mask for text, default $7F ;; .addr font A2D_DEFAULT_FONT ;; .addr next address of next lower window in stack (filled in by call) @@ -413,7 +413,7 @@ A2D_CZP_OVERWRITE := 0 ;;; Used in various state blocks A2D_DEFAULT_MSKAND := $FF A2D_DEFAULT_MSKOR := $00 -A2D_DEFAULT_TMSK := $7F +A2D_DEFAULT_TMASK := $7F ;;; ================================================== diff --git a/desk.acc/a2d.md b/desk.acc/a2d.md index 30546ba..f3e219e 100644 --- a/desk.acc/a2d.md +++ b/desk.acc/a2d.md @@ -19,8 +19,8 @@ The _box_ block is reused in several places. It has the following structure: .word top pixels from screen top edge .addr addr A2D_SCREEN_ADDR ($2000) .word stride A2D_SCREEN_STRIDE ($80) - .word hoffset pixels scrolled left - .word voffset pixels scrolled up + .word hoff pixels scrolled left + .word voff pixels scrolled up .word width pixels wide .word height pixels tall ``` diff --git a/desk.acc/calc_fixed.s b/desk.acc/calc_fixed.s index 89aef2b..72f75f7 100644 --- a/desk.acc/calc_fixed.s +++ b/desk.acc/calc_fixed.s @@ -242,8 +242,8 @@ top: .word row1_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte 'c' @@ -257,8 +257,8 @@ top: .word row1_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte 'e' @@ -272,8 +272,8 @@ top: .word row1_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '=' @@ -287,8 +287,8 @@ top: .word row1_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '*' @@ -302,8 +302,8 @@ top: .word row2_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '7' @@ -317,8 +317,8 @@ top: .word row2_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '8' @@ -332,8 +332,8 @@ top: .word row2_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '9' @@ -347,8 +347,8 @@ top: .word row2_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '/' @@ -362,8 +362,8 @@ top: .word row3_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '4' @@ -377,8 +377,8 @@ top: .word row3_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '5' @@ -392,8 +392,8 @@ top: .word row3_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '6' @@ -407,8 +407,8 @@ top: .word row3_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '-' @@ -422,8 +422,8 @@ top: .word row4_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '1' @@ -437,8 +437,8 @@ top: .word row4_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '2' @@ -452,8 +452,8 @@ top: .word row4_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '3' @@ -467,8 +467,8 @@ top: .word row5_top - border_lt bitmap: .addr wide_button_bitmap stride: .byte 8 ; bitmap_stride (bytes) .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word 49 ; 0 is extra wide height: .word button_height + border_lt + border_br label: .byte '0' @@ -482,8 +482,8 @@ top: .word row5_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '.' @@ -497,8 +497,8 @@ top: .word row4_top - border_lt bitmap: .addr tall_button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word 27 ; + is extra tall label: .byte '+' @@ -698,8 +698,8 @@ top: .word $FFF7 ; overwritten bitmap:.addr pixels stride: .byte 1 .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word 6 height: .word 5 ;; (not part of struct, but not referenced outside) @@ -711,14 +711,13 @@ pixels: .byte px(%1000001) .byte px(%1001001) .endproc - ;; param block for a QUERY_SCREEN and SET_STATE calls, and ref'd in QUERY_STATE call .proc state_params left: .word 0 top: .word 0 -saddr: .word 0 +addr: .word 0 stride: .word 0 -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word 0 height: .word 0 pattern:.res 8, 0 @@ -728,12 +727,13 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 0 vthick: .byte 0 - .byte 0 ; ??? +mode: .byte 0 tmask: .byte 0 font: .addr 0 - .byte 0,0 ; ??? .endproc + .byte 0,0 ; ??? + menu_bar_height := 13 screen_width := 560 screen_height := 192 @@ -744,7 +744,7 @@ font: .addr 0 .word menu_bar_height .word A2D_SCREEN_ADDR .word A2D_SCREEN_STRIDE - .word 0, 0 ; hoffset/voffset + .word 0, 0 ; hoff/voff .word screen_width - 1 .word screen_height - menu_bar_height - 2 .endproc @@ -781,10 +781,10 @@ w2: .word window_width h2: .word window_height left: .word default_left top: .word default_top -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word window_width height: .word window_height pattern:.res 8, $FF @@ -794,7 +794,7 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? +mode: .byte 0 tmask: .byte 0 font: .addr A2D_DEFAULT_FONT next: .addr 0 diff --git a/desk.acc/calculator.s b/desk.acc/calculator.s index 9915b7d..f1fc5e9 100644 --- a/desk.acc/calculator.s +++ b/desk.acc/calculator.s @@ -247,8 +247,8 @@ top: .word row1_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte 'c' @@ -262,8 +262,8 @@ top: .word row1_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte 'e' @@ -277,8 +277,8 @@ top: .word row1_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '=' @@ -292,8 +292,8 @@ top: .word row1_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '*' @@ -307,8 +307,8 @@ top: .word row2_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '7' @@ -322,8 +322,8 @@ top: .word row2_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '8' @@ -337,8 +337,8 @@ top: .word row2_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '9' @@ -352,8 +352,8 @@ top: .word row2_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '/' @@ -367,8 +367,8 @@ top: .word row3_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '4' @@ -382,8 +382,8 @@ top: .word row3_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '5' @@ -397,8 +397,8 @@ top: .word row3_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '6' @@ -412,8 +412,8 @@ top: .word row3_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '-' @@ -427,8 +427,8 @@ top: .word row4_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '1' @@ -442,8 +442,8 @@ top: .word row4_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '2' @@ -457,8 +457,8 @@ top: .word row4_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '3' @@ -472,8 +472,8 @@ top: .word row5_top - border_lt bitmap: .addr wide_button_bitmap stride: .byte 8 ; bitmap_stride (bytes) .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word 49 ; 0 is extra wide height: .word button_height + border_lt + border_br label: .byte '0' @@ -487,8 +487,8 @@ top: .word row5_top - border_lt bitmap: .addr button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word button_height + border_lt + border_br label: .byte '.' @@ -502,8 +502,8 @@ top: .word row4_top - border_lt bitmap: .addr tall_button_bitmap stride: .byte bitmap_stride .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word button_width + border_lt + border_br height: .word 27 ; + is extra tall label: .byte '+' @@ -703,8 +703,8 @@ top: .word $FFF7 ; overwritten bitmap:.addr pixels stride: .byte 1 .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word 6 height: .word 5 ;; (not part of struct, but not referenced outside) @@ -720,10 +720,10 @@ pixels: .byte px(%1000001) .proc state_params left: .word 0 top: .word 0 -saddr: .word 0 +addr: .word 0 stride: .word 0 -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word 0 height: .word 0 pattern:.res 8, 0 @@ -733,7 +733,7 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 0 vthick: .byte 0 - .byte 0 ; ??? +mode: .byte 0 tmask: .byte 0 font: .addr 0 .endproc @@ -747,13 +747,14 @@ font: .addr 0 ;; params for A2D_SET_BOX when decorating title bar .proc screen_box - .word 0 - .word menu_bar_height - .word A2D_SCREEN_ADDR - .word A2D_SCREEN_STRIDE - .word 0, 0 ; hoffset/voffset - .word screen_width - 1 - .word screen_height - menu_bar_height - 2 +left: .word 0 +top: .word menu_bar_height +addr: .word A2D_SCREEN_ADDR +stride: .word A2D_SCREEN_STRIDE +hoff: .word 0 +voff: .word 0 +width: .word screen_width - 1 +height: .word screen_height - menu_bar_height - 2 .endproc .proc fill_mode_normal @@ -788,10 +789,10 @@ w2: .word window_width h2: .word window_height left: .word default_left top: .word default_top -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word window_width height: .word window_height pattern:.res 8, $FF @@ -801,7 +802,7 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? +mode: .byte 0 tmask: .byte $7f font: .addr A2D_DEFAULT_FONT next: .addr 0 diff --git a/desk.acc/date.s b/desk.acc/date.s index c99d84b..90def9b 100644 --- a/desk.acc/date.s +++ b/desk.acc/date.s @@ -270,10 +270,10 @@ h2: .word $1F4 .proc box left: .word 180 top: .word 50 -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word $C7 height: .word $40 .endproc @@ -284,7 +284,7 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 4 vthick: .byte 2 - .byte 0 ; ??? +mode: .byte 0 tmask: .byte $7F font: .addr A2D_DEFAULT_FONT next: .addr 0 diff --git a/desk.acc/puzzle.s b/desk.acc/puzzle.s index deea433..d7c0812 100644 --- a/desk.acc/puzzle.s +++ b/desk.acc/puzzle.s @@ -239,8 +239,8 @@ top: .word 0 addr: .addr 0 stride: .byte 4 .byte 0 ; ??? -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word 27 height: .word 15 .endproc @@ -608,10 +608,10 @@ h2: .word default_height left: .word default_left top: .word default_top -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word default_width height: .word default_height @@ -622,7 +622,7 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? +mode: .byte 0 tmask: .byte $7F font: .addr A2D_DEFAULT_FONT next: .addr 0 @@ -632,10 +632,10 @@ next: .addr 0 .proc box_cruft ; Unknown usage left: .word default_left top: .word default_top -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word default_width height: .word default_height pattern:.res 8, $FF @@ -645,7 +645,7 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? +mode: .byte 0 tmask: .byte $7F font: .addr A2D_DEFAULT_FONT .byte 0,0 ; ??? diff --git a/desk.acc/show_image_file.s b/desk.acc/show_image_file.s index 6f0a464..fcabf4c 100644 --- a/desk.acc/show_image_file.s +++ b/desk.acc/show_image_file.s @@ -209,10 +209,10 @@ h2: .word default_height .proc box left: .word default_left top: .word default_top -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word default_width height: .word default_height .endproc @@ -224,7 +224,7 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? +mode: .byte 0 tmask: .byte $7F font: .addr A2D_DEFAULT_FONT next: .addr 0 diff --git a/desk.acc/show_text_file.s b/desk.acc/show_text_file.s index 35d2d12..5150e64 100644 --- a/desk.acc/show_text_file.s +++ b/desk.acc/show_text_file.s @@ -318,10 +318,10 @@ h2: .word default_height .proc box left: .word default_left top: .word default_top -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE -hoffset:.word 0 ; Also used for A2D_FILL_RECT -voffset:.word 0 +hoff: .word 0 ; Also used for A2D_FILL_RECT +voff: .word 0 width: .word default_width height: .word default_height .endproc @@ -333,7 +333,7 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? +mode: .byte 0 tmask: .byte $7F font: .addr A2D_DEFAULT_FONT next: .addr 0 @@ -345,8 +345,8 @@ left: .word default_left top: .word default_top addr: .word A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE -hoffset:.word 0 -voffset:.word 0 +hoff: .word 0 +voff: .word 0 width: .word default_width height: .word default_height .endproc @@ -580,10 +580,10 @@ title: jsr on_title_bar_click sec lda window_params::box::width sbc window_width - sta window_params::box::hoffset + sta window_params::box::hoff lda window_params::box::width+1 sbc window_width+1 - sta window_params::box::hoffset+1 + sta window_params::box::hoff+1 wider: lda window_params::hscroll ldx window_width cpx #= 17, skip this next bit bcs L58B7 + lda state_font ldx state_font+1 clc - adc #$03 + adc #3 bcc L588C inx -L588C: sta $FB +L588C: sta $FB ; set $FB/$FC to start of widths stx $FC + sec adc $FE bcc L5896 inx -L5896: ldy #$00 + +L5896: ldy #0 ; loop 0... height-1 + L5898: sta L58BC,y pha txa @@ -2577,25 +2606,24 @@ L5898: sta L58BC,y pla sec adc $FE - bcc L58A7 + bcc :+ inx -L58A7: bit $FD - bpl L58B1 +: bit $FD + bpl :+ sec adc $FE - bcc L58B1 + bcc :+ inx -L58B1: iny - cpy $FF +: iny + cpy $FF ; =height? bne L5898 rts L58B7: lda #$83 jmp a2d_exit_with_a -L58BC: .byte 0 +L58BC: .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 L58CC: .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00 @@ -2697,7 +2725,7 @@ L596B: sta $9B ldy $9F iny bne L595C -L5972: jsr L4DBC +L5972: jsr set_up_fill_mode jsr L4EA9 lda $87 clc @@ -3260,10 +3288,10 @@ L5E5A: lda L5F1E,x ldx L5E79+1 jsr L5EA0 lda #$7F - sta $F6 + sta fill_eor_mask jsr FILL_RECT_IMPL lda #$00 - sta $F6 + sta fill_eor_mask rts L5E79: .addr $5F42 @@ -3416,8 +3444,8 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? -tmsk: .byte 0 +mode: .byte 0 +tmask: .byte 0 font: .addr 0 .endproc @@ -3881,7 +3909,7 @@ L6348: lda $82,x dex bpl L6348 lda #$7F - sta L5F1E::tmsk + sta L5F1E::tmask lda $87 sta L5F1E::font lda $88 @@ -7642,7 +7670,7 @@ L7F66: pha lda #$04 sta L7D74 ldx #$0A -L7F7D: lda SPKR +L7F7D: lda SPKR ; Beep? ldy #$00 L7F82: dey bne L7F82 @@ -7754,21 +7782,21 @@ L8056: jsr L7EE2 L805C: pha jsr L8035 pla - cmp #$1B + cmp #KEY_ESCAPE bne L8073 - lda #$00 + lda #0 sta L7D80 sta L7D7F lda #$80 sta L7D81 rts -L8073: cmp #$0D +L8073: cmp #KEY_RETURN bne L807D jsr L7E8C jmp L7EAD -L807D: cmp #$0B +L807D: cmp #KEY_UP bne L80A3 L8081: dec L7D7B bpl L8091 @@ -7785,7 +7813,7 @@ L8091: ldx L7D7B bne L8081 L80A0: jmp L800F -L80A3: cmp #$0A +L80A3: cmp #KEY_DOWN bne L80D0 L80A7: inc L7D7B ldx L7D7A @@ -7794,7 +7822,7 @@ L80A7: inc L7D7B cmp $AA bcc L80BE beq L80BE - lda #$00 + lda #0 sta L7D7B L80BE: ldx L7D7B beq L80CD @@ -7805,9 +7833,9 @@ L80BE: ldx L7D7B bne L80A7 L80CD: jmp L800F -L80D0: cmp #$15 +L80D0: cmp #KEY_RIGHT bne L80EB - lda #$00 + lda #0 sta L7D7B inc L7D7A lda L7D7A @@ -7817,9 +7845,9 @@ L80D0: cmp #$15 sta L7D7A L80E8: jmp L800F -L80EB: cmp #$08 +L80EB: cmp #KEY_LEFT bne L8105 - lda #$00 + lda #0 sta L7D7B dec L7D7A bmi L80FC @@ -9129,7 +9157,8 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte $96,$00 ; ??? +mode: .byte $96 ; ??? +tmask: .byte 0 font: .addr A2D_DEFAULT_FONT .endproc @@ -9154,8 +9183,8 @@ xpos: .word 0 ypos: .word 0 hthick: .byte 0 vthick: .byte 0 - .byte 0 ; ??? -tmsk: .byte 0 +mode: .byte 0 +tmask: .byte 0 font: .addr 0 .endproc diff --git a/desktop/s2_aux2.s b/desktop/s2_aux2.s index 13ff521..42d350d 100644 --- a/desktop/s2_aux2.s +++ b/desktop/s2_aux2.s @@ -374,7 +374,7 @@ w2: .word $1F4 h2: .word $8C left: .word $4B top: .word $23 -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE hoff: .word 0 voff: .word 0 @@ -383,11 +383,12 @@ height: .word $64 pattern:.res 8, $FF mskand: .byte A2D_DEFAULT_MSKAND mskor: .byte A2D_DEFAULT_MSKOR - .byte 0,0,0,0 ; ??? +xpos: .word 0 +ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? -tmsk: .byte A2D_DEFAULT_TMSK +fill: .byte 0 +tmask: .byte A2D_DEFAULT_TMASK font: .addr A2D_DEFAULT_FONT next: .addr 0 .endproc @@ -409,7 +410,7 @@ w2: .word $1F4 h2: .word $8C left: .word $19 top: .word $14 -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE hoff: .word 0 voff: .word 0 @@ -418,11 +419,12 @@ height: .word $99 pattern:.res 8, $FF mskand: .byte A2D_DEFAULT_MSKAND mskor: .byte A2D_DEFAULT_MSKOR - .byte 0,0,0,0 ; ??? +xpos: .word 0 +ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? -tmsk: .byte A2D_DEFAULT_TMSK +mode: .byte 0 +tmask: .byte A2D_DEFAULT_TMASK font: .addr A2D_DEFAULT_FONT next: .addr 0 .endproc @@ -444,7 +446,7 @@ w2: .word $64 h2: .word $46 left: .word $35 top: .word $32 -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE hoff: .word 0 voff: .word 0 @@ -453,11 +455,12 @@ height: .word $46 pattern:.res 8, $FF mskand: .byte A2D_DEFAULT_MSKAND mskor: .byte A2D_DEFAULT_MSKOR - .byte 0,0,0,0 ; ??? +xpos: .word 0 +ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? -tmsk: .byte A2D_DEFAULT_TMSK +mode: .byte 0 +tmask: .byte A2D_DEFAULT_TMASK font: .addr A2D_DEFAULT_FONT next: .addr 0 .endproc @@ -479,7 +482,7 @@ w2: .word $1F4 h2: .word $8C left: .word $50 top: .word $28 -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE hoff: .word 0 voff: .word 0 @@ -488,11 +491,12 @@ height: .word $6E pattern:.res 8, $FF mskand: .byte A2D_DEFAULT_MSKAND mskor: .byte A2D_DEFAULT_MSKOR - .byte 0,0,0,0 ; ??? +xpos: .word 0 +ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? -tmsk: .byte A2D_DEFAULT_TMSK +mode: .byte 0 +tmask: .byte A2D_DEFAULT_TMASK font: .addr A2D_DEFAULT_FONT next: .addr 0 .endproc @@ -514,7 +518,7 @@ w2: .word $1F4 h2: .word $8C left: .word $69 top: .word $19 -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE hoff: .word 0 voff: .word 0 @@ -523,11 +527,12 @@ height: .word $6E pattern:.res 8, $FF mskand: .byte A2D_DEFAULT_MSKAND mskor: .byte A2D_DEFAULT_MSKOR - .byte 0,0,0,0 ; ??? +xpos: .word 0 +ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? -tmsk: .byte A2D_DEFAULT_TMSK +mode: .byte 0 +tmask: .byte A2D_DEFAULT_TMASK font: .addr A2D_DEFAULT_FONT next: .addr 0 .endproc @@ -868,7 +873,7 @@ w2: .word 545 h2: .word 175 left: .word 20 top: .word 27 -saddr: .addr A2D_SCREEN_ADDR +addr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE hoff: .word 0 voff: .word 0 @@ -877,11 +882,12 @@ height: .word 120 pattern:.res 8, $FF mskand: .byte A2D_DEFAULT_MSKAND mskor: .byte A2D_DEFAULT_MSKOR - .byte 0,0,0,0 ; ??? +xpos: .word 0 +ypos: .word 0 hthick: .byte 1 vthick: .byte 1 - .byte 0 ; ??? -tmsk: .byte A2D_DEFAULT_TMSK +mode: .byte 0 +tmask: .byte A2D_DEFAULT_TMASK font: .addr A2D_DEFAULT_FONT next: .addr 0 .endproc