icon entries

This commit is contained in:
Joshua Bell 2018-02-08 21:42:59 -08:00
parent 620967a511
commit d4b00af67a
3 changed files with 506 additions and 377 deletions

View File

@ -81,27 +81,47 @@ label := *
;;; NOTE: Some of these are used by Desk Accessories ;;; NOTE: Some of these are used by Desk Accessories
;; These are DeskTop internals, but it appears there is no ;;; These are DeskTop internals, but it appears there is no
;; API for getting the selected file. ;;; API for getting the selected file.
file_selected := $DF21 ; 0 if no selection, 1 otherwise file_selected := $DF21 ; 0 if no selection, 1 otherwise
path_index := $DF20 ; index of selected window (used to get prefix) path_index := $DF20 ; index of selected window (used to get prefix)
path_table := $DFB3 ; window address table path_table := $DFB3 ; window address table
;; each entry is 65 bytes long ;;; each entry is 65 bytes long
;; length-prefixed path string (no trailing /) ;;; length-prefixed path string (no trailing /)
file_index := $DF22 ; indexes of selected file (global, not w/in window, up to 127) file_index := $DF22 ; indexes of selected file (global, not w/in window, up to 127)
file_table := $DD9F ; file address table file_table := $DD9F ; file address table
;; each entry is 27 bytes long ;;; each entry is 27 bytes long
;; .byte icon icon index ;;; .byte icon icon index
;; .byte ?? ;;; .byte ??
;; .byte type/icon (bits 4,5,6 clear = directory; $70=trash, $80=profile, $01=folder, $11=sys, $21=bin, ???) ;;; .byte type/window_id
;; .word iconx (pixels) ;;; (bits 0-3 window_id)
;; .word icony (pixels) ;;; (bits 4,5,6)
;; .addr iconbits (addr of {mapbits, mapwidth, reserved, maprect}) ;;; 000 = directory
;; .byte len (name length + 2) ;;; 001 = system
;; .res 17 name (name, with a space before and after) ;;; 010 = binary
;;; 011 = basic
;;; 100 = (unused)
;;; 101 = text/generic
;;; 110 = (unused)
;;; 111 = trash
;;; (bit 7 = open flag)
;;; .word iconx (pixels)
;;; .word icony (pixels)
;;; .addr iconbits (addr of {mapbits, mapwidth, reserved, maprect})
;;; .byte len (name length + 2)
;;; .res 17 name (name, with a space before and after)
icon_entry_open_mask := %10000000
icon_entry_type_mask := %01110000
icon_entry_winid_mask := %00001111
icon_entry_type_dir := %00000000
icon_entry_type_sys := %00010000
icon_entry_type_bin := %00100000
icon_entry_type_bas := %00110000
icon_entry_type_txt := %01010000
icon_entry_type_trash := %01110000
;;; ================================================== ;;; ==================================================
;;; Internals - Default Font ;;; Internals - Default Font

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,9 @@
;;; Generic Macros ;;; Generic Macros
;;; ================================================== ;;; ==================================================
.define is_immediate(arg) (.match (.mid (0, 1, {arg}), #))
.define is_register(arg) (.match ({arg}, x) .or .match ({arg}, y))
;;; ================================================== ;;; ==================================================
;;; Pad with zeros to the given address ;;; Pad with zeros to the given address
@ -18,6 +21,12 @@
jsr target jsr target
.endmacro .endmacro
.macro addr_call_indirect target, addr
lda addr
ldx addr+1
jsr target
.endmacro
.macro addr_jump target, addr .macro addr_jump target, addr
lda #<addr lda #<addr
ldx #>addr ldx #>addr
@ -59,9 +68,6 @@
;;; ================================================== ;;; ==================================================
;;; 16-bit pseudo-ops ;;; 16-bit pseudo-ops
.define is_immediate(arg) (.match (.mid (0, 1, {arg}), #))
.define is_register(arg) (.match ({arg}, x) .or .match ({arg}, y))
;;; Load A,X ;;; Load A,X
;;; ldax #$1234 ; immediate ;;; ldax #$1234 ; immediate
;;; ldax $1234 ; absolute ;;; ldax $1234 ; absolute