Skip to content

Commit

Permalink
This Apple: Detect a handful of block devices by name
Browse files Browse the repository at this point in the history
Use signatures to detect BOOTI (tested!) and NVRAM (untested!) block
devices, rather than calling them "Generic".
  • Loading branch information
inexorabletash committed Sep 24, 2023
1 parent ce00e06 commit c51136e
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 7 deletions.
4 changes: 3 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ Project Page: https://github.com/a2stuff/a2d
### Desk Accessories

* Sort Directory: Correctly order SYS files with ".SYSTEM" suffix. ([#762](https://github.com/a2stuff/a2d/issues/762))
* This Apple: Detect Grappler, ThunderClock, Apple-CAT, and Workstation card.
* This Apple:
* Detect Grappler, ThunderClock, Apple-CAT, and Workstation card.
* Detect NVRAM and BOOTI block devices.
* Image Preview: Add slideshow mode - press 'S' to auto-advance images.

## 1.3
Expand Down
2 changes: 2 additions & 0 deletions desk.acc/res/this.apple.res.da
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
.define res_string_card_type_applecat "Apple-CAT II Modem"
.define res_string_card_type_workstation "Workstation Card"
.define res_string_device_type_cricket "The Cricket!"
.define res_string_device_type_nvram "NVRAM Block Device"
.define res_string_device_type_booti "BOOTI Block Device"
.define res_string_unknown "(ukendt)"
.define res_string_empty "(tom)"
.define res_string_none "(ingen)"
Expand Down
2 changes: 2 additions & 0 deletions desk.acc/res/this.apple.res.de
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
.define res_string_card_type_applecat "Apple-CAT II Modem"
.define res_string_card_type_workstation "Workstation Card"
.define res_string_device_type_cricket "The Cricket!"
.define res_string_device_type_nvram "NVRAM Block Device"
.define res_string_device_type_booti "BOOTI Block Device"
.define res_string_unknown "(unbekannt)"
.define res_string_empty "(leer)"
.define res_string_none "(keine)"
Expand Down
2 changes: 2 additions & 0 deletions desk.acc/res/this.apple.res.en
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
.define res_string_card_type_applecat "Apple-CAT II Modem"
.define res_string_card_type_workstation "Workstation Card"
.define res_string_device_type_cricket "The Cricket!"
.define res_string_device_type_nvram "NVRAM Block Device"
.define res_string_device_type_booti "BOOTI Block Device"
.define res_string_unknown "(unknown)"
.define res_string_empty "(empty)"
.define res_string_none "(none)"
Expand Down
2 changes: 2 additions & 0 deletions desk.acc/res/this.apple.res.es
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
.define res_string_card_type_applecat "Apple-CAT II Modem"
.define res_string_card_type_workstation "Workstation Card"
.define res_string_device_type_cricket "The Cricket!"
.define res_string_device_type_nvram "NVRAM Block Device"
.define res_string_device_type_booti "BOOTI Block Device"
.define res_string_unknown "(desconocido)"
.define res_string_empty "(vac\x12o)"
.define res_string_none "(nada)"
Expand Down
2 changes: 2 additions & 0 deletions desk.acc/res/this.apple.res.fr
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
.define res_string_card_type_applecat "Apple-CAT II Modem"
.define res_string_card_type_workstation "Workstation Card"
.define res_string_device_type_cricket "The Cricket!"
.define res_string_device_type_nvram "NVRAM Block Device"
.define res_string_device_type_booti "BOOTI Block Device"
.define res_string_unknown "(inconnu)"
.define res_string_empty "(vide)"
.define res_string_none "(aucun)"
Expand Down
2 changes: 2 additions & 0 deletions desk.acc/res/this.apple.res.it
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
.define res_string_card_type_applecat "Apple-CAT II Modem"
.define res_string_card_type_workstation "Workstation Card"
.define res_string_device_type_cricket "The Cricket!"
.define res_string_device_type_nvram "NVRAM Block Device"
.define res_string_device_type_booti "BOOTI Block Device"
.define res_string_unknown "(sconosciuto)"
.define res_string_empty "(vuoto)"
.define res_string_none "(nessuno)"
Expand Down
2 changes: 2 additions & 0 deletions desk.acc/res/this.apple.res.nl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
.define res_string_card_type_applecat "Apple-CAT II Modem"
.define res_string_card_type_workstation "Workstation Card"
.define res_string_device_type_cricket "The Cricket!"
.define res_string_device_type_nvram "NVRAM Block Device"
.define res_string_device_type_booti "BOOTI Block Device"
.define res_string_unknown "(onbekend)"
.define res_string_empty "(leeg)"
.define res_string_none "(geen)"
Expand Down
2 changes: 2 additions & 0 deletions desk.acc/res/this.apple.res.pt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
.define res_string_card_type_applecat "Apple-CAT II Modem"
.define res_string_card_type_workstation "Workstation Card"
.define res_string_device_type_cricket "The Cricket!"
.define res_string_device_type_nvram "NVRAM Block Device"
.define res_string_device_type_booti "BOOTI Block Device"
.define res_string_unknown "(desconhecido)"
.define res_string_empty "(v@cuo)"
.define res_string_none "(nenhum)"
Expand Down
2 changes: 2 additions & 0 deletions desk.acc/res/this.apple.res.sv
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
.define res_string_card_type_applecat "Apple-CAT II Modem"
.define res_string_card_type_workstation "Workstation Card"
.define res_string_device_type_cricket "The Cricket!"
.define res_string_device_type_nvram "NVRAM Block Device"
.define res_string_device_type_booti "BOOTI Block Device"
.define res_string_unknown "(ok{nt)"
.define res_string_empty "(t|mma)"
.define res_string_none "(ingen)"
Expand Down
30 changes: 24 additions & 6 deletions desk.acc/this.apple.s
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,8 @@ slot_pos_table:
kMaxSmartportDevices = 8

str_diskii: PASCAL_STRING res_string_card_type_diskii
str_nvram: PASCAL_STRING res_string_device_type_nvram
str_booti: PASCAL_STRING res_string_device_type_booti
str_block: PASCAL_STRING res_string_card_type_block
kStrSmartportLength = .strlen(res_string_card_type_smartport)
str_smartport: PASCAL_STRING res_string_card_type_smartport
Expand Down Expand Up @@ -1312,25 +1314,37 @@ mask: .byte 0

ldax #sigtable_prodos_device
jsr SigCheck
bcc notpro
IF_CS

;;; Per Technical Note: ProDOS #21: Identifying ProDOS Devices
;;; http://www.1000bit.it/support/manuali/apple/technotes/pdos/tn.pdos.21.html
COMPARE_FWB $FF, $00 ; $CnFF == $00 ?
bne :+
return16 #str_diskii
:
;; Smartport?
COMPARE_FWB $07, $00 ; $Cn07 == $00 ?
beq :+
sec
return16 #str_block
:
bne :+
sec
bit ret ; set V flag to signal SmartPort
ldax #str_smartport
ret: rts
:
;; Block devices - a few signatures
ldax #sigtable_nvram
jsr SigCheck
bcc :+
return16 #str_nvram
:
ldax #sigtable_booti
jsr SigCheck
bcc :+
return16 #str_booti
:
sec
return16 #str_block

notpro:
END_IF

;;; ---------------------------------------------
;;; VidHD
Expand Down Expand Up @@ -1504,6 +1518,10 @@ sigtable_comm: .byte 2, $05, $18, $07, $38
sigtable_serial: .byte 2, $05, $38, $07, $18
sigtable_parallel: .byte 2, $05, $48, $07, $48

;;; Block Devices
sigtable_nvram: .byte 3, $07, $3C, $0B, $58, $0C, $FF
sigtable_booti: .byte 3, $07, $3C, $0B, $B0, $0C, $01

.endproc ; ProbeSlot

;;; ============================================================
Expand Down

0 comments on commit c51136e

Please sign in to comment.