mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-28 15:50:16 +00:00
Icon for AppleTalk file shares. Fixes #88
This commit is contained in:
parent
c8cc3bde53
commit
120c9bac55
@ -13,6 +13,7 @@
|
||||
* Show Text File DA: Keyboard support. Escape quits, arrows scroll. (#4)
|
||||
* Reorganized/renamed several menu items. (#13)
|
||||
* New icons for graphics, AppleWorks, relocatable, command, and IIgs-specific file types. (#105)
|
||||
* Desktop icon shown for AppleTalk file shares. (#88)
|
||||
* Improvements to several existing icon bitmaps. (#74)
|
||||
* DAs with high bit in aux-type set are skipped. (#102)
|
||||
* Icons for volumes positioned more predictably and sensibly. (#94)
|
||||
|
@ -1763,7 +1763,7 @@ highlighted: copy #$80, icon_flags ; is highlighted
|
||||
MGTK_CALL MGTK::InitPort, grafport
|
||||
jsr set_port_for_erasing_vol_icon
|
||||
|
||||
;; Why this loopy thing? handle obscured by windows?
|
||||
;; Handle obscuration by windows???
|
||||
: jsr LA6A3
|
||||
jsr LA097
|
||||
lda L9F93
|
||||
@ -1779,17 +1779,19 @@ highlighted: copy #$80, icon_flags ; is highlighted
|
||||
bvc window
|
||||
|
||||
;; On desktop, clear background
|
||||
MGTK_CALL MGTK::SetPenMode, penOR_2
|
||||
MGTK_CALL MGTK::SetPenMode, penOR_2 ; clear with mask to white
|
||||
bit icon_flags
|
||||
bpl :+ ; highlighted?
|
||||
MGTK_CALL MGTK::SetPenMode, penBIC_2
|
||||
MGTK_CALL MGTK::SetPenMode, penBIC_2 ; or black if highlighted
|
||||
: MGTK_CALL MGTK::PaintBits, mask_paintbits_params
|
||||
MGTK_CALL MGTK::SetPenMode, penXOR_2
|
||||
MGTK_CALL MGTK::PaintBits, icon_paintbits_params
|
||||
jmp continue
|
||||
|
||||
;; TODO: For windowed, consider similar logic to above
|
||||
;; always draw mask, always xor normal
|
||||
;; NOTE: Since having many windowed icons is more common,
|
||||
;; the bitmap is just drawn without mask/xor if not
|
||||
;; selected, since the performance difference is measurable.
|
||||
;; (At 1MHz, about 10ms/icon)
|
||||
window:
|
||||
MGTK_CALL MGTK::SetPenMode, notpencopy_2
|
||||
bit icon_flags
|
||||
@ -2233,7 +2235,7 @@ volume:
|
||||
MGTK_CALL MGTK::InitPort, grafport
|
||||
jsr set_port_for_erasing_vol_icon
|
||||
|
||||
;; Why this loopy thing? Handle obscured by windows??
|
||||
;; Handle obscuration by windows???
|
||||
: jsr LA6A3
|
||||
jsr erase_desktop_icon
|
||||
lda L9F93
|
||||
@ -2817,6 +2819,40 @@ profile_mask:
|
||||
.byte px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1110000)
|
||||
.byte px(%0000111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000111),px(%0000000)
|
||||
|
||||
fileshare_pixels:
|
||||
.byte px(%0000000),px(%0000000),px(%0011001),px(%1111111),px(%1000000)
|
||||
.byte px(%0000000),px(%0000000),px(%1100110),px(%0000000),px(%1110000)
|
||||
.byte px(%0011111),px(%1110011),px(%0000001),px(%1000000),px(%1111100)
|
||||
.byte px(%0011000),px(%0011111),px(%1100000),px(%0110000),px(%0001100)
|
||||
.byte px(%0011000),px(%0000000),px(%0011000),px(%0001100),px(%0001100)
|
||||
.byte px(%0011000),px(%0000000),px(%0011000),px(%0110000),px(%0001100)
|
||||
.byte px(%0011000),px(%0000000),px(%0011001),px(%1000000),px(%0001100)
|
||||
.byte px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111110)
|
||||
.byte px(%0110000),px(%0000000),px(%0000000),px(%0000000),px(%0000110)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0000000),px(%0000000),px(%0000110),px(%0110000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0001110),px(%0111000),px(%0000000)
|
||||
.byte px(%1100111),px(%1111111),px(%1111000),px(%0001111),px(%1110011)
|
||||
.byte px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%0000000)
|
||||
.byte px(%1100111),px(%1111111),px(%1111110),px(%0111111),px(%1110011)
|
||||
|
||||
fileshare_mask:
|
||||
.byte px(%0000000),px(%0000000),px(%0011001),px(%1111111),px(%1000000)
|
||||
.byte px(%0000000),px(%0000000),px(%1111111),px(%1111111),px(%1110000)
|
||||
.byte px(%0011111),px(%1110011),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111110)
|
||||
.byte px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111110)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0000000),px(%0000000),px(%0000111),px(%1110000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0001111),px(%1111000),px(%0000000)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%1111111)
|
||||
|
||||
trash_pixels:
|
||||
.byte px(%0000001),px(%1111111),px(%1000000)
|
||||
.byte px(%0000011),px(%1000001),px(%1100000)
|
||||
|
@ -8564,13 +8564,15 @@ pos_win: .word 0, 0
|
||||
;;; 1 = SmartPort, RAM Disk
|
||||
;;; 2 = SmartPort, Fixed (e.g. ProFile)
|
||||
;;; 3 = SmartPort, Removable (e.g. UniDisk 3.5)
|
||||
;;; 4 = unknown / RAM-based driver
|
||||
;;; 4 = AppleTalk file share
|
||||
;;; 5 = unknown / RAM-based driver
|
||||
|
||||
device_type_to_icon_address_table:
|
||||
.addr floppy140_icon
|
||||
.addr ramdisk_icon
|
||||
.addr profile_icon
|
||||
.addr floppy800_icon
|
||||
.addr fileshare_icon
|
||||
.addr profile_icon ; unknown
|
||||
|
||||
.proc get_device_type
|
||||
@ -8600,10 +8602,9 @@ device_type_to_icon_address_table:
|
||||
|
||||
: ldy #$07 ; SmartPort signature byte ($Cn07)
|
||||
lda (slot_addr),y ; $00 = SmartPort
|
||||
beq :+
|
||||
unk: return #device_type_unknown
|
||||
bne unk
|
||||
|
||||
: ldy #$FB ; SmartPort ID Type Byte ($CnFB)
|
||||
ldy #$FB ; SmartPort ID Type Byte ($CnFB)
|
||||
lda (slot_addr),y ; bit 0 = is RAM Card?
|
||||
and #%00000001
|
||||
beq :+
|
||||
@ -8620,15 +8621,23 @@ ram: return #device_type_ramdisk
|
||||
|
||||
;; So instead, just assume <=1600 blocks is a 3.5" floppy
|
||||
jsr get_block_count
|
||||
bcs :+
|
||||
bcs hd
|
||||
stax blocks
|
||||
cmp16 blocks, #1601
|
||||
bcs :+
|
||||
bcs hd
|
||||
return #device_type_removable
|
||||
|
||||
: return #device_type_profile
|
||||
;; Try AppleTalk
|
||||
unk: MLI_RELAY_CALL READ_BLOCK, block_params
|
||||
beq hd
|
||||
cmp #ERR_NETWORK_ERROR
|
||||
bne hd
|
||||
return #device_type_fileshare
|
||||
|
||||
unit_number: .byte 0
|
||||
hd: return #device_type_profile
|
||||
|
||||
DEFINE_READ_BLOCK_PARAMS block_params, $800, 0
|
||||
unit_number := block_params::unit_num
|
||||
|
||||
blocks: .word 0
|
||||
.endproc
|
||||
|
@ -846,6 +846,14 @@ profile_icon:
|
||||
DEFINE_RECT 0, 0, 52, 9 ; maprect
|
||||
.addr desktop_aux::profile_mask
|
||||
|
||||
;;; File Share
|
||||
fileshare_icon:
|
||||
.addr desktop_aux::fileshare_pixels ; mapbits
|
||||
.byte 5 ; mapwidth
|
||||
.byte 0 ; reserved
|
||||
DEFINE_RECT 0, 0, 34, 14 ; maprect
|
||||
.addr desktop_aux::fileshare_mask
|
||||
|
||||
;;; Trash Can
|
||||
trash_icon:
|
||||
.addr desktop_aux::trash_pixels ; mapbits
|
||||
@ -1099,7 +1107,8 @@ startup_menu_item_7: PASCAL_STRING "Slot 0 "
|
||||
device_type_ramdisk = 1
|
||||
device_type_profile = 2
|
||||
device_type_removable = 3
|
||||
device_type_unknown = 4
|
||||
device_type_fileshare = 4
|
||||
device_type_unknown = 5
|
||||
|
||||
;;; Templates used for device names
|
||||
device_template_table:
|
||||
@ -1107,13 +1116,14 @@ device_template_table:
|
||||
.addr str_ramcard_slot_x
|
||||
.addr str_profile_slot_x
|
||||
.addr str_unidisk_xy
|
||||
.addr str_fileshare_x
|
||||
.addr str_slot_drive
|
||||
|
||||
device_template_slot_offset_table:
|
||||
.byte 15, 15, 15, 15, 6
|
||||
.byte 15, 15, 15, 15, 18, 6
|
||||
|
||||
device_template_drive_offset_table:
|
||||
.byte 19, 0, 0, 19, 15 ; 0 = no drive # for this type
|
||||
.byte 19, 0, 0, 19, 0, 15 ; 0 = no drive # for this type
|
||||
|
||||
;;; Disk II
|
||||
str_disk_ii_sd:
|
||||
@ -1131,6 +1141,10 @@ str_unidisk_xy:
|
||||
str_ramcard_slot_x:
|
||||
PASCAL_STRING "RAMCard Slot x "
|
||||
|
||||
;;; File Share
|
||||
str_fileshare_x:
|
||||
PASCAL_STRING "AppleShare Slot x "
|
||||
|
||||
;;; Unknown devices
|
||||
str_slot_drive:
|
||||
PASCAL_STRING "Slot x drive y "
|
||||
|
@ -145,6 +145,7 @@ ERR_VOLUME_DIR_FULL = $49
|
||||
ERR_END_OF_FILE = $4C
|
||||
ERR_ACCESS_ERROR = $4E
|
||||
ERR_DUPLICATE_VOLUME = $57
|
||||
ERR_NETWORK_ERROR = $88
|
||||
|
||||
;;; ============================================================
|
||||
;;; Misc Structures
|
||||
|
Loading…
Reference in New Issue
Block a user