devalias
dev pci ls
-or-
dev pci1 ls
-or-
dev pci2 ls
dev pci1/@d .properties
I have a Sonnet Tempo attached to my G3 450mhz. Here's what it shows for me:
View attachment 1944014
Thought OP request was for the Sonnet Tempo ATA133 and / or ATA100 cards? Mac version pictured here. (Whereas the PC version does not have the “M” identifier at the end of PDC20269 - on the Promise chip.)
I have been working on my garage for the past week and a half and am finally getting to where all the computer stuff has been dumped (boxes, cables, screws, parts, bits and pieces, etc). I will keep an eye out for the box the card was sent in (it's in one of the piles) and verify.@eyoungren: thank you, but are you sure it's Sonnet Tempo ATA card with Promise chip? ROM revision on your screenshot and all listed HW IDs match Seritek's 1S2 card. Vendor ID is Silicon Image, device ID is SIL3112. Tempo ATA fimware revisions ended with something close to 4.50 AFAIR.
Oddly, loading the FCode ROM extracted from the Sonnet flasher doesn't work correct.
In real Mac's it builds a .word "driver-buffer", but that's it, no other properties change.
I assumed it may need the device to have an open/close word, as with nVidia FCode ROMs, when we load them from file we have to execute the ROM twice, once gives the device the open/close words and once gives the device all the other .properties.
So I setup the ATA card in PCI-Passthough to Openbios on Qemu, as Openbios gives any PCI device the Open/Close words. This got me a little further, it loaded and 'NDRV' driver,FrmTk,macos,pwpc, but none of the other .properties changed and we don't get the proper " name" property ( UltraTek133 ) or any of the child nodes for the two drive connectors.
I also tried to append Qemu command to include the ROMFILE and that does allow me to dump the FCode ROM from the proper address with PCIPeak and Macsbugs, so we know the Sonnet flashing program can read the ROM if that is one of the checks it does, but sadly it still says " no card".
Loading the 'NDRV' and changing the " name" property isn't enough to get the Sonnet Flashing program for OS 9 to find the card, it just say " No Card". So some other .properties we need to build in the device tree until we find the correct properties to get the Sonnet flashing program to find the card for flashing.
On a side note, the Beige G3 OF load command tries to do Load and Go as do all the New World Macs I have, but the PM9600 just does Load. What this means is you need to strip everything from the Fcode ROM( PCI Header ) to the start of the FCode before you load it from the OF Command line on the Macs, however the 9600 you can use the whole rom file and just do 1 byte-load from the load-base offset of the start of the Fcode.
hex
tokenizer[ 0000 ]tokenizer set-rev-level
tokenizer[ 004A ]tokenizer pci-architecture
tokenizer[ 002A ]tokenizer pci-data-structure-start
tokenizer[ 0020 ]tokenizer pci-data-structure-length
tokenizer[ 105A 4D69 018085 ]tokenizer pci-header
tokenizer[ 10000 ]tokenizer rom-size
fcode-version2
\ format: 0x08
\ checksum: 0x72c0 (ok)
\ len: 0xfd1a (64794 bytes)
hex
headerless
variable variable_800 \ (800)
…
variable variable_816 \ (816)
: colon_l! \ (817)
: colon_l@ \ (818)
: colon_variable_805_l@ \ (819)
: colon_variable_804_l@ \ (81a)
: colon_definition_function_81b \ (81b)
…
: colon_definition_function_822 \ (822)
: colon_variable_80a_l! \ (823)
: colon_definition_function_824 \ (824)
…
: colon_definition_function_83f \ (83f)
" "(…)" \ 252 bytes
encode-bytes
" "(…)" \ 252 bytes
encode-bytes
encode+
…
" "(…)" \ < 252 bytes
encode-bytes
encode+
" driver,FirmTek,MacOS,PowerPC"
property
colon_definition_function_83f \ (83f)
colon_definition_function_824 \ (824)
['] c@
byte-load
fcode-end
pci-end
: colon_definition_function_83f \ (83f)
" driver,FirmTek,MacOS,PowerPC"
colon_definition_function_83e \ (83e)
0=
if \ (0x5)
2drop
exit
then
get-package-property
if \ (0x4)
exit
then
drop
dup
colon_l@ \ (818)
dup
0
<>
if \ (0x56)
colon_variable_80a_l! \ (823)
4
+
colon_variable_809_l! \ (821)
" create driver-buffer"
evaluate
colon_variable_80a_l@ \ (822)
allot
" driver-buffer"
evaluate
colon_variable_80b_l! \ (825)
colon_variable_80b_l@ \ (824)
0
<>
if \ (0xb)
colon_variable_80b_l@ \ (824)
colon_variable_80a_l@ \ (822)
erase
colon_definition_function_83d \ (83d)
then
else \ (0x5)
2drop
then
" driver,FirmTek,MacOS,PowerPC"
delete-property
;
The Promise Dos Flashing utility refuses to flash the ROM extracted from the Sonnet utility rsrc fork, says "bad file" or some such. Older versions of PTIFlash supported a Dos command line switch of /Unlimit to bypass any checking for flashing the Promise ATA 100 and older cards, but these versions don't support the ATA 133 card.What about flashing the card under DOS using PROMISE flasher? It loads ROM from the file, unlike Sonnet utility which has it integrated in rsrc part of application. I got ROM dump from Tempo 133 (found on macos9lives forum), saved using PROMISE flasher, but I have a doubt if it's complete. File size is 32768 bytes, while length specified in the header should be 37888 bytes - unless my math is incorrect. 4A in hex gives 74 in decimal, 74x512 gives 37888. Incomplete ROM would brick the card and as I have only one ATA133 to play with, it most likely will be one-way journeyROM dump attached.
That really doesn't help, we really need a dump of the devices full Open Firmware .properties. Pretty easy on New World machines, but you'll need two Mac's with a serial connection to do it on an Old World machine.Panther & Tiger...
" enet:telnet,192.168.1.201" io
telnet 192.168.1.201
It's pretty apparent what the drive-buffer is, it's a buffer. LOLThe FCode probably has some compression and therefore loads itself in two different steps.
The first step is something like this:
Code:hex tokenizer[ 0000 ]tokenizer set-rev-level tokenizer[ 004A ]tokenizer pci-architecture tokenizer[ 002A ]tokenizer pci-data-structure-start tokenizer[ 0020 ]tokenizer pci-data-structure-length tokenizer[ 105A 4D69 018085 ]tokenizer pci-header tokenizer[ 10000 ]tokenizer rom-size fcode-version2 \ format: 0x08 \ checksum: 0x72c0 (ok) \ len: 0xfd1a (64794 bytes) hex headerless variable variable_800 \ (800) … variable variable_816 \ (816) : colon_l! \ (817) : colon_l@ \ (818) : colon_variable_805_l@ \ (819) : colon_variable_804_l@ \ (81a) : colon_definition_function_81b \ (81b) … : colon_definition_function_822 \ (822) : colon_variable_80a_l! \ (823) : colon_definition_function_824 \ (824) … : colon_definition_function_83f \ (83f) " "(…)" \ 252 bytes encode-bytes " "(…)" \ 252 bytes encode-bytes encode+ … " "(…)" \ < 252 bytes encode-bytes encode+ " driver,FirmTek,MacOS,PowerPC" property colon_definition_function_83f \ (83f) colon_definition_function_824 \ (824) ['] c@ byte-load fcode-end pci-end
" driver,FirmTek,MacOS,PowerPC" is a property that's ≈ 61K bytes. Some stuff is done with this (colon_definition_function_83f), then it calls byte-load on the result which means there's more FCode in the result.
colon_definition_function_83f is like this:
Code:: colon_definition_function_83f \ (83f) " driver,FirmTek,MacOS,PowerPC" colon_definition_function_83e \ (83e) 0= if \ (0x5) 2drop exit then get-package-property if \ (0x4) exit then drop dup colon_l@ \ (818) dup 0 <> if \ (0x56) colon_variable_80a_l! \ (823) 4 + colon_variable_809_l! \ (821) " create driver-buffer" evaluate colon_variable_80a_l@ \ (822) allot " driver-buffer" evaluate colon_variable_80b_l! \ (825) colon_variable_80b_l@ \ (824) 0 <> if \ (0xb) colon_variable_80b_l@ \ (824) colon_variable_80a_l@ \ (822) erase colon_definition_function_83d \ (83d) then else \ (0x5) 2drop then " driver,FirmTek,MacOS,PowerPC" delete-property ;
colon_definition_function_83d is maybe the decompression function.
load hd:,\SonnetPCIROM.bin
" pci/@e" open-dev to my-self
400004a 1 byte-load
dev pci/@e
" Ultra-Tek133P+" encode-string " name" property
" PDC20269" encode-string " model" property
The Promise Dos Flashing utility refuses to flash the ROM extracted from the Sonnet utility rsrc fork, says "bad file" or some such. Older versions of PTIFlash supported a Dos command line switch of /Unlimit to bypass any checking for flashing the Promise ATA 100 and older cards, but these versions don't support the ATA 133 card.
dev .properties
devalias
dev pci*number ls
You're right. File size 32768 is too short.What about flashing the card under DOS using PROMISE flasher? It loads ROM from the file, unlike Sonnet utility which has it integrated in rsrc part of application. I got ROM dump from Tempo 133 (found on macos9lives forum), saved using PROMISE flasher, but I have a doubt if it's complete. File size is 32768 bytes, while length specified in the header should be 37888 bytes - unless my math is incorrect. 4A in hex gives 74 in decimal, 74x512 gives 37888. Incomplete ROM would brick the card and as I have only one ATA133 to play with, it most likely will be one-way journeyROM dump attached.
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/joevt/Library/Python/2.7/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Volumes/Updates/Docs/Open_Firmware_and_Forth/OpenBIOS/JoesOpenBIOSStuff/detok/obj-amd64:/Volumes/Updates/Docs/Open_Firmware_and_Forth/OpenBIOS/JoesOpenBIOSStuff/toke/obj-amd64:/Volumes/Updates/Docs/Open_Firmware_and_Forth/MacOSX
cd /Volumes/Updates/Third\ Party\ System\ Software/Sonnet/ATA133\ Jaguar\ lg\ drive\ support2
theapp=ata133_lgdrv_45
derez "$theapp" > app.z
for theresource in $(perl -0777 -n -E 'while (/data .(....). \((\d+).*\n\t\$"55AA/mg) { print $1 . "_" . $2 . "\n"; }' app.z); do
echo $theresource
derez -only "'${theresource:0:4}'(${theresource:5})" "$theapp" | sed -nE '/.\$"([0-9A-F ]+).*/s//\1/p' | xxd -p -r > "${theresource}.rom"
DumpPCIRom.sh "${theresource}".rom > "${theresource}".4th 2> "${theresource}".log
done
The firmware is usually loaded from pci probe context. Maybe something is different when you're loading the firmware from disk. Compile a version of the firmware with a bunch of debug statements to see if it gets to the final byte-load command and also to output the address used for the byte load command.It's pretty apparent what the drive-buffer is, it's a buffer. LOL
The question is why is it not executed when we load the ROM from a file and execute the FCODE on a real Mac?
Code:load hd:,\SonnetPCIROM.bin " pci/@e" open-dev to my-self 400004a 1 byte-load
The driver,FirmTek,MacOS,PowerPC property during the first step of the load is not an NDRV - it is missing the PEF headerThe property driver,FirmTek,MacOS,PowerPC is just an 'NDRV', sadly just a binary blackbox that we can't really see what it does in any human readable from by detoking the FCODE.
Joy!peffpwpc
that an NDRV should have in the first 12 bytes.I have a Tempo 133 Firmware 4.0.app (for the Tempo Trio) It is similar to the other Tempo firmwares where it decompresses from a driver,FirmTek,MacOS,PowerPC property. I extracted part 2 of the firmware (the decompressed part) from memory in Open Firmware on my 8600 (I think I explained how to get the memory from Open Firmware elsewhere - basically just get a hex dump of the memory range used for the Open Firmware dictionary which also includes all the properties and buffers).Oddly the " Name" property " model" property and other properties built into the device tree by the ROM are not human readable as I've seen with every other FCODE ROM I've ever detoked, and those are the properties we need built into the device tree to get the Sonnet flashing utility to see the card and flash it.
Building the " name" property and the " model" property are not enough for the Sonnet flasher, looking inside the data fork it's not clear what the flasher is checking for, hopefully not something in the properties of the child nodes of the card, as I don't know how to easily create child nodes from the OF command line?
Diff:dev pci/@e " Ultra-Tek133P+" encode-string " name" property " PDC20269" encode-string " model" property
dev / ls
dump-device-tree
printenv
devalias
device-end
words
Thank you, it almost workedYou're right. File size 32768 is too short.
Use derez to get the firmware from the rsrc fork.
sed: RE error: illegal byte sequence
-bash: DumpPCIRom.sh: command not found
don't know what could cause that. Post the result ofEntered the folder containing unpacked Tempo 133.app, replaced your file name with mine after "theapp=".
And I got 2 errors:
Code:sed: RE error: illegal byte sequence
derez -only "'${theresource:0:4}'(${theresource:5})" "$theapp" > "${theresource}.txt"
as a zipped file.That's because you don't have DumpPCIRom.sh.and
Code:-bash: DumpPCIRom.sh: command not found
Result was 2 empty files, app.z and log with above error.
I'm using Monterey which uses zsh instead of bash so there might be a difference that needs fixing.I have command line tools installed, Intel Mac with High Sierra 10.13.6.
I don't know what you mean. Selecting 37888 bytes from what? It sounds like you want to just append some random extra bytes. How is that any better than not having the bytes at all (like your truncated 32768 sized rom).BTW, will just selecting and copying 37888 bytes from the start of PCI header of the ROM work as well? Attached the file I made this way.
Here you go. I got an error using this code, attached.don't know what could cause that. Post the result ofderez -only "'${theresource:0:4}'(${theresource:5})" "$theapp" > "${theresource}.txt"
as a zipped file.
That's because you don't have DumpPCIRom.sh.
I don't know what you mean. Selecting 37888 bytes from what? It sounds like you want to just append some random extra bytes. How is that any better than not having the bytes at all (like your truncated 32768 sized rom).
That's because you didn't run the first command which setsHere you go. I got an error using this code, attached.
theresource=fwre_136
How did you calculate 260 as the offset?The ROM image in rsrc fork of Sonnet Updater starts @offset 260 in decimal, with PCI header. 55 AA 4A - where 4A is length of the image, right? Converted to decimal and multiplied with 512 it gives image length 37888 in decimal. So image should end @offset 38148 in decimal (260 + 37888). Am I missing something here?
derez
to parse the resource fork?toke
to create a binary that doesn't have the pci header? (use DumpPCIRom to confirm the result matches the source). And this way you can add to the code to help with debugging.Regarding the compression, the example firmware I have has 64193 bytes of fcode in the first step (63K) and the decompressed fcode is 93816 bytes (91K) so you see how it can be useful if the rom chip is only 64K or if the rom chip also contained a BIOS or EFI image.The FCode probably has some compression and therefore loads itself in two different steps.
How did you calculate 260 as the offset?
Are you talking about offset 260 of the entire resource fork?