
Ce projet contient plusieurs outils pour les applications et jeux Mac OS classiques de l'ingénierie inverse.
Les outils de ce projet sont:
apt-get install zlibg1-dev .)cmake . , alors make .Ce projet devrait s'appuyer correctement sur des versions suffisamment récentes de MacOS et Linux.
Resource_dasm est un désassembleur pour les fourches de ressources Mac OS Mac classiques. Il extrait les ressources de la fourche de ressources de tout fichier et convertit de nombreux formats de ressources Mac OS classiques (images, sons, texte, etc.) en formats modernes.
Exemples:
Exportez toutes les ressources à partir d'un fichier spécifique et convertissez-les en formats modernes (la sortie est écrite dans le répertoire <fileName> .out par défaut): ./resource_dasm files/Tesserae
Exporter toutes les ressources de tous les fichiers d'un dossier, en écrivant les fichiers de sortie dans une structure de dossiers parallèles dans le répertoire actuel: ./resource_dasm "files/Apeiron ƒ/" ./apeiron.out
Exporter une ressource spécifique à partir d'un fichier spécifique, dans des formats modernes et originaux: ./resource_dasm "files/MacSki 1.7/MacSki Sounds" ./macski.out --target-type=snd --target-id=1023 --save-raw=yes
Exporter les ressources d'une application PowerPC et démonter son code: ./resource_dasm "files/Adventures of Billy" ./billy.out ./m68kdasm --pef "files/Adventures of Billy" ./billy.out/dasm.txt
Exporter toutes les ressources à partir d'une archive mohawk: ./resource_dasm files/Riven/Data/a_Data.MHK ./riven_data_a.out --index-format=mohawk
En raison de la copie de fichiers sur différents types de systèmes de fichiers, vous pouvez avoir une fourche de ressource d'un fichier dans la fourche de données d'un fichier séparé à la place. Pour exporter des ressources à partir d'un tel fichier: ./resource_dasm "windows/Realmz/Data Files/Portraits.rsf" ./portraits.out --data-fork
Créez un nouveau fichier de ressources, avec quelques ressources textuelles et clut: ./resource_dasm --create --add-resource=TEXT:[email protected] --add-resource=TEXT:[email protected] --add-resource=clut:[email protected] output.rsrc
Ajoutez une ressource à un fichier de ressources existant: ./resource_dasm file.rsrc --add-resource=TEXT:[email protected] output.rsrc
Supprimer une ressource d'un fichier de ressources existant: ./resource_dasm file.rsrc --delete-resource=TEXT:128 output.rsrc
Ce n'est pas tout ce que Resource_dasm peut faire. Exécutez-le sans aucun argument (ou regardez print_usage() dans src / ressource_dasm.cc) pour une description complète de toutes les options.
Resource_dasm peut convertir ces types de ressources:
Type | Output format | Notes
------------------------------------------------------------------------
Text resources
bstr | .txt (one file per string) | *3
card | .txt |
finf | .txt (description of contents) |
FCMT | .txt | *3
FONT | .txt (description) and image (one image per glyph) | *E
lstr | .txt | *3
MACS | .txt | *3
minf | .txt | *3
mstr | .txt | *3
mst# | .txt (one file per string) | *3
NFNT | .txt (description) and image (one image per glyph) | *E
PSAP | .txt |
sfnt | .ttf (TrueType font) |
STR | .txt | *3
STR# | .txt (one file per string) | *3
styl | .rtf | *4
TEXT | .txt | *3
TwCS | .txt (one file per string) |
wstr | .txt |
------------------------------------------------------------------------
Image and color resources
actb | image (24-bit) | *E *8
acur | .txt (list of cursor frame IDs) |
cctb | image (24-bit) | *E *8
cicn | image (32-bit and monochrome) | *E
clut | image (24-bit) | *E *8
crsr | image (32-bit and monochrome) | *E *1
CTBL | image (24-bit) | *E
CURS | image (32-bit) | *E *1
dctb | image (24-bit) | *E *8
fctb | image (24-bit) | *E *8
icl4 | image (24 or 32-bit) and .icns | *E *0
icl8 | image (24 or 32-bit) and .icns | *E *0
icm# | image (32-bit) | *E
icm4 | image (24 or 32-bit) | *E *0
icm8 | image (24 or 32-bit) | *E *0
ICN# | image (32-bit) and .icns | *E
icns | image, .png, .jp2, .txt, .plist, .bin, etc. | *E *9
ICON | image (24-bit) | *E
ics# | image (32-bit) and .icns | *E
ics4 | image (24 or 32-bit) and .icns | *E *0
ics8 | image (24 or 32-bit) and .icns | *E *0
kcs# | image (32-bit) | *E
kcs4 | image (24 or 32-bit) | *E *0
kcs8 | image (24 or 32-bit) | *E *0
PAT | image (24-bit; pattern and 8x8 tiling) | *E
PAT# | image (24-bit; pattern and 8x8 tiling for each pattern) | *E
PICT | image (24-bit) or other format | *E *2
pltt | image (24-bit) | *E *8
ppat | image (24-bit; color, color 8x8, mono, mono 8x8) | *E
ppt# | image (24-bit; 4 images as above for each pattern) | *E
SICN | image (24-bit, one per icon) | *E
wctb | image (24-bit) | *E *8
------------------------------------------------------------------------
Sound and sequence resources
.mod | .mod (ProTracker module) |
ALIS | .txt (description of contents) |
cmid | .midi |
csnd | .wav or .mp3 | *5
ecmi | .midi |
emid | .midi |
esnd | .wav or .mp3 | *5
ESnd | .wav or .mp3 | *5
INST | .json | *6
MADH | .madh (PlayerPRO module) |
MADI | .madi (PlayerPRO module) |
MIDI | .midi |
Midi | .midi |
midi | .midi |
SMSD | .wav | *A
snd | .wav or .mp3 | *5
SONG | .json (smssynth) | *6
SOUN | .wav | *A
Tune | .midi | *7
Ysnd | .wav |
------------------------------------------------------------------------
Code resources
ADBS | .txt (68K assembly) | *C
adio | .txt (68K assembly) | *C
AINI | .txt (68K assembly) | *C
atlk | .txt (68K assembly) | *C
boot | .txt (68K assembly) | *C
CDEF | .txt (68K assembly) | *C
cdek | .txt (PPC32 assembly and header description) |
cdev | .txt (68K assembly) | *C
CDRV | .txt (68K assembly) | *C
cfrg | .txt (description of code fragments) | *D
citt | .txt (68K assembly) | *C
clok | .txt (68K assembly) | *C
cmtb | .txt (68K assembly) | *C
cmu! | .txt (68K assembly) | *C
CODE | .txt (68K assembly or import table description) | *B *C
code | .txt (68K assembly) | *C
dcmp | .txt (68K assembly) | *C
dcod | .txt (PPC32 assembly and header description) |
dem | .txt (68K assembly) | *C
dimg | .txt (68K assembly) | *C
drvr | .txt (68K assembly) | *C
DRVR | .txt (68K assembly) | *C
enet | .txt (68K assembly) | *C
epch | .txt (PPC32 assembly) |
expt | .txt (PPC32 assembly) |
FKEY | .txt (68K assembly) | *C
fovr | .txt (PPC32 assembly and header description) |
gcko | .txt (68K assembly) | *C
gdef | .txt (68K assembly) | *C
GDEF | .txt (68K assembly) | *C
gnld | .txt (68K assembly) | *C
INIT | .txt (68K assembly) | *C
krnl | .txt (PPC32 assembly) |
LDEF | .txt (68K assembly) | *C
lmgr | .txt (68K assembly) | *C
lodr | .txt (68K assembly) | *C
ltlk | .txt (68K assembly) | *C
MBDF | .txt (68K assembly) | *C
MDEF | .txt (68K assembly) | *C
mntr | .txt (68K assembly) | *C
ncmp | .txt (PPC32 assembly and header description) |
ndlc | .txt (PPC32 assembly and header description) |
ndmc | .txt (PPC32 assembly and header description) |
ndrv | .txt (PPC32 assembly and header description) |
nift | .txt (PPC32 assembly and header description) |
nitt | .txt (PPC32 assembly and header description) |
nlib | .txt (PPC32 assembly and header description) |
nsnd | .txt (PPC32 assembly and header description) |
nsrd | .txt (PPC32 assembly) |
ntrb | .txt (PPC32 assembly and header description) |
osl | .txt (68K assembly) | *C
otdr | .txt (68K assembly) | *C
otlm | .txt (68K assembly) | *C
PACK | .txt (68K assembly) | *C
pnll | .txt (68K assembly) | *C
ppct | .txt (PPC32 assembly and header description) |
proc | .txt (68K assembly) | *C
PTCH | .txt (68K assembly) | *C
ptch | .txt (68K assembly) | *C
pthg | .txt (68K or PPC32 assembly and header description) | *C
qtcm | .txt (PPC32 assembly and header description) |
ROvr | .txt (68K assembly) | *C
RSSC | .txt (68K assembly) | *C
scal | .txt (PPC32 assembly and header description) |
scod | .txt (68K assembly) | *C
SERD | .txt (68K assembly) | *C
sfvr | .txt (PPC32 assembly and header description) |
shal | .txt (68K assembly) | *C
sift | .txt (68K assembly) | *C
SMOD | .txt (68K assembly) | *C
snth | .txt (68K assembly) | *C
tdig | .txt (68K assembly) | *C
tokn | .txt (68K assembly) | *C
vdig | .txt (68K or PPC32 assembly and header description) | *C
wart | .txt (68K assembly) | *C
WDEF | .txt (68K assembly) | *C
XCMD | .txt (68K assembly) | *C
XFCN | .txt (68K assembly) | *C
------------------------------------------------------------------------
MacApp resources
68k! | .txt (description of memory config for 680x0) |
CMNU | .txt (description of menu) |
cmnu | .txt (description of menu) |
errs | .txt (description of error ranges) |
mem! | .txt (description of memory config) |
ppc! | .txt (description of memory config for PPC) |
res! | .txt (string list of always resident segments) |
seg! | .txt (string list of segments) |
TxSt | .txt (description of text style) |
------------------------------------------------------------------------
Miscellaneous resources
ALRT | .txt (alert parameters) |
APPL | .txt (description of contents) |
audt | .txt (description of contents) |
BNDL | .txt (description of contents) |
CMDK | .txt (list of keys) |
CNTL | .txt (description of control) |
CTY# | .txt (description of cities) |
dbex | .txt (description of contents) |
DITL | .txt (dialog parameters) |
DLOG | .txt (dialog parameters) |
FBTN | .txt (description of buttons) |
FDIR | .txt (description of contents) |
fld# | .txt (description of folders) |
flst | .txt (description of font family list) |
fmap | .txt (description of finder icon mappings) |
FREF | .txt (description of file references) |
FRSV | .txt (list of font IDs) |
FWID | .txt (font parameters) |
gbly | .txt (description of Gibbly aka. System Enabler) |
GNRL | .txt (description of contents) |
hwin | .txt (description of help window) |
icmt | .txt (icon reference and comment) |
inbb | .txt (description of contents) |
indm | .txt (description of contents) |
infs | .txt (description of contents) |
inpk | .txt (description of contents) |
inra | .txt (description of contents) |
insc | .txt (description of contents) |
itl0 | .txt (international formatting information) |
ITL1 | .txt (short dates flag value) |
itlb | .txt (internationalization parameters) |
itlc | .txt (internationalization parameters) |
itlk | .txt (keyboard mappings) |
KBDN | .txt (keyboard name) |
LAYO | .txt (description of layout) |
mach | .txt (description of contents) |
MBAR | .txt (list of menu IDs) |
mcky | .txt (threshold values) |
MENU | .txt (description of menu) |
mitq | .txt (description of queue sizes) |
nrct | .txt (rectangle boundaries) |
PAPA | .txt (printer parameters) |
PICK | .txt (picker parameters) |
ppcc | .txt (description of contents) |
ppci | .txt (description of contents) |
PRC0 | .txt (description of contents) |
PRC3 | .txt (description of contents) |
pslt | .txt (description of Nubus pseudo-slot lists) |
ptbl | .txt (description of patch table) |
qrsc | .txt (description of queries) |
RECT | .txt (description of the rectangle) |
resf | .txt (list of fonts) |
RMAP | .txt (type mapping and list of ID exceptions) |
ROv# | .txt (list of overridden resource IDs) |
rtt# | .txt (list of database result handlers) |
RVEW | .txt (description of contents) |
scrn | .txt (screen device parameters) |
sect | .txt (description of contents) |
SIGN | .txt (description of contents) |
SIZE | .txt (description of parameters) |
slut | .txt (description of mapping) |
thn# | .txt (description of 'thng' mapping) |
TMPL | .txt (description of format) |
TOOL | .txt (description of contents) |
vers | .txt (version flags and strings) |
WIND | .txt (window parameters) |
Notes:
*0: Produces a 32-bit image if a corresponding monochrome resource exists
(ICN# for icl4/8, icm# for icm4/8, ics# for ics4/8, kcs# for kcs4/8). If
no monochrome resource exists, produces a 24-bit image instead. All
color information in the original resource is reproduced in the output,
even for fully-transparent pixels. If the icon was originally intended
to be used with a nonstandard compositing mode, the colors of fully-
transparent pixels may have been relevant, but most modern image viewers
and editors don't have a way to display this information.
*1: The hotspot coordinates are appended to the output filename. As in *0,
resource_dasm faithfully reproduces the color values of transparent
pixels in the output file, but most modern image editors won't show
these "transparent" pixels.
*2: resource_dasm implements multiple PICT decoders. It will first attempt
to decode the PICT using its internal decoder, which usually produces
correct results but fails on PICTs that contain complex drawing opcodes.
This decoder can handle basic QuickTime images as well (e.g. embedded
JPEGs and PNGs), but can't do any drawing under or over them, or
matte/mask effects. PICTs that contain embedded JPEGs or PNGs will
result in a JPEG or PNG file rather than the format specified by
--image-format (which is BMP by default). If the internal decoder fails,
resource_dasm will fall back to a decoder that uses picttoppm, which is
part of NetPBM. There is a rare failure mode in which picttoppm hangs
forever; resource_dasm gives it 10 seconds to do its job before killing
it and giving up. If picttoppm is not installed, fails to decode the
PICT, or is killed due to a timeout, resource_dasm will prepend the
necessary header and save the data as a PICT file instead.
*3: Text is assumed to use the Mac OS Roman encoding. It is converted to
UTF-8, and line endings (r) are converted to Unix style (n).
*4: Some rare style options may not be translated correctly. styl resources
provide styling information for the TEXT resource with the same ID, so
such a resource must be present to properly decode a styl.
*5: RMF archives can contain snd resources that are actually in MP3 format;
in this case, the exported sound will be a .mp3 file. Otherwise, the
exported sound is an uncompressed WAV file, even if the resource's data
is compressed. resource_dasm can decompress IMA 4:1, MACE 3:1, MACE 6:1,
A-law, and mu-law (ulaw) compression.
*6: JSON files from SoundMusicSys SONG resources can be played with smssynth
(http://www.github.com/fuzziqersoftware/gctools). The JSON file refers
to the instrument sounds and MIDI sequence by filename and does not
include directory names, so if you want to play these, you'll have to
manually put the sounds and MIDI files in the same directory as the JSON
file if you're using --filename-format.
*7: Tune decoding is experimental and will likely produce unplayable MIDIs.
*8: For color table resources, the raw data is always saved even if it is
decoded properly, since the original data contains 16-bit values for
each channel and the output image file has less-precise 8-bit channels.
*9: icns resources are decoded into many different file types depending on
the contents of the resource. For subfields that have split alpha
channels (that is, the transparency data is in a different subfield),
resource_dasm produces an original image and one with transparency
applied. Some icns resources also contain metadata, which is exported as
.bin, .txt, and .plist files, except for the Icon Composer version used
to create the file, which is ignored. If you want the result in Icon
Composer format, use --save-raw=yes and resource_dasm will save it as a
.icns file.
*A: These resources appear to have a fixed format, with a constant sample
rate, sample width and channel count. You may have to adjust these
parameters in the output if it turns out that these are configurable.
*B: The disassembler attempts to find exported functions by parsing the jump
table in the CODE 0 resource, but if this resource is missing or not in
the expected format, it skips this step and does not fail. Generally, if
any "export_X:" labels appear in the disassembly, then export resolution
succeeded and all of the labels should be correct (otherwise they will
all be missing).
*C: Some coprocessor and floating-point opcodes (F-class) are not
implemented and will disassemble with the comment "// unimplemented".
*D: Most PowerPC applications have their executable code in the data fork.
To disassemble it, use m68kdasm (example above).
*E: The output image format can be specified using --image-format. The
default output format is bmp (Windows bitmap); other supported formats
are png and ppm.
Si Resource_dasm ne parvient pas à convertir une ressource ou ne sait pas comment, il tentera de décoder la ressource à l'aide de la ressource TMPL (modèle) correspondante si elle existe. S'il n'y a pas de TMPL approprié, le TMPL est corrompu ou que le TMPL ne peut pas décoder la ressource, Resource_Dasm produira plutôt les données brutes de la ressource.
La plupart des implémentations de décodeur dans Resource_dasm sont basées sur les logiciels existants inverses et la pigeon à travers la lie des anciennes documents, donc certains types de ressources plus rares ne fonctionneront probablement pas. Cependant, je veux que ce projet soit aussi complet que possible, donc si vous avez une ressource qui, selon vous, devrait être décodable, mais Resource_Dasm ne peut pas le décoder, envoyez-le-moi (peut-être en attachant à un problème GitHub) et je ferai de mon mieux pour que Resource_dasm le comprenne.
Resource_dasm décompressée transparente les ressources qui sont marquées par le gestionnaire de ressources compressées.
Le système de compression des gestionnaires de ressources n'a jamais été officiellement documenté par Apple ou rendu public, de sorte que la mise en œuvre de ces décompresseurs est basée sur la resedit de l'ingénierie inverse et d'autres code Mac OS classiques. En résumé, les ressources sont décompressées en exécutant le code 68K ou PowerPC à partir d'une ressource DCMP ou NCMP, qui est examinée à l'exécution dans la chaîne de fichiers de ressources ouvertes comme la plupart des autres ressources. (En pratique, le DCMP / NCMP pertinent est généralement contenu dans le même fichier que la ressource compressée ou dans le fichier système.) Il existe deux formats différents de ressources compressées et deux formats correspondants de décompresseurs 68k; Resource_dasm implémente la prise en charge des deux formats.
Resource_dasm contient des implémentations natives des quatre décompresseurs intégrés dans le fichier système Mac OS. Spécifiquement:
Resource_dasm propose des émulateurs intégrés de 68k et PowerPC pour exécuter des décompresseurs sans défaut. Ces émulateurs peuvent également exécuter les décompresseurs par défaut, qui sont inclus avec Resource_dasm. État actuel des décompresseurs imités:
Il peut y avoir d'autres décompresseurs que je n'ai pas vus, ce qui peut ne pas fonctionner. Si vous voyez "AVERTISSEMENT: Impossible de décompresser les ressources" Lorsque vous utilisez Resource_Dasm, veuillez créer un problème GitHub et télécharger la ressource compressée exportée (fichier .bin) qui a provoqué l'échec, et toutes les ressources DCMP et NCMP à partir du même fichier source.
Exécutez sudo make install pour copier les fichiers d'en-tête et la bibliothèque sur les chemins pertinents après la construction. Après l'installation, vous pouvez #include <resource_file/IndexFormats/ResourceFork.hh> (par exemple) et lier avec -lresource_file . Il n'y a pas de documentation pour cette bibliothèque au-delà de ce qui est écrit dans les fichiers d'en-tête.
La bibliothèque contient les fonctions et classes utiles suivantes:
L'utilisation de m68kdasm est assez simple. Exécutez m68kdasm --help pour une liste complète des options.
Actuellement, M68KDASM peut démonter ces types de données:
Certains de ces formats exécutables prennent en charge les architectures CPU que M68KDASM ne supporte pas; S'il en rencontre l'un, il imprime les segments de code comme des segments de données à la place.
M68KDASM peut également assembler l'assemblage de PowerPC, X86 et SH-4 en binaire brut. (Il ne prend pas en charge l'assemblage du texte M68K en binaire, mais cela sera implémenté à l'avenir.) La syntaxe d'entrée attendue pour chaque architecture correspond à la syntaxe de démontage; Pour PowerPC et SH-4, ce n'est pas la syntaxe standard utilisée par la plupart des autres outils.
M68KEXEC est un émulateur de processeur et un débogueur pour les architectures Motorola 68000, 32 bits PowerPC et x86. Je l'utilise souvent pour aider à comprendre ce qu'un code archaïque essaie de faire, ou pour comparer le comportement du code que j'ai transcrit à une langue moderne avec le comportement du code d'origine. Pour des cas d'utilisation comme celui-ci, vous voudrez généralement configurer une ou plusieurs régions d'entrée contenant les données avec lesquelles vous testez, et une ou plusieurs régions de sortie pour que le code émulé à écrire.
Cela est peut-être mieux expliqué par l'exemple. Cette commande est utilisée pour exécuter la fonction de génération de contexte de chiffrement de Phantasy Star Online Blue Burst, pour le comparer avec la même fonction que celle implémentée dans Newsserv:
./m68kexec --x86 --trace
--mem=A0000000/2AC43585C46A6366188889BCE3DB88B15C2B3C751DB6757147E7E9390598275CC79547B2E5C00DD145002816B59C067C
--mem=A1000000:1048
--load-pe=files/windows/pso/psobb.exe
--pc=00763FD0
--reg=ecx:A1000000
--push=00000030
--push=A0000000
--push=FFFFFFFF
--breakpoint=FFFFFFFF
Les options --mem configurent les régions d'entrée; La région A0000000 contient la graine de chiffrement (0x30 octets) et la région A1000000 contiendra le contexte de cryptage généré lorsque la fonction retourne. L'option --load-pe charge le code à exécuter et --pc indique à l'émulateur par où commencer. (Par défaut, il commencera sur le point d'entrée défini dans l'exécutable, le cas échéant, nous voulons plutôt appeler une fonction spécifique.) L'option --reg définit this pointeur dans la fonction dans l'espace que nous avons alloué. Les options --push définissent les arguments de la fonction et l'adresse de retour. Il reviendra à FFFFFFFF, qui n'a pas de mémoire allouée, mais nous avons également défini un --breakpoint à cette adresse qui arrêtera l'émulation juste avant qu'une exception ne soit lancée.
Puisque nous avons utilisé --trace , l'émulateur imprime l'état des registres après chaque opcode, afin que nous puissions retracer son comportement et le comparer avec notre implémentation externe de la même fonction. Lorsque la fonction renvoie et déclenche le point d'arrêt, nous pouvons utiliser r A1000000 1048 dans le shell pour voir les données qu'elle a générées, et également le comparer au résultat de notre fonction externe.
Render_Bits est utile pour répondre à la question "que ces données binaires à l'air aléatoire pourraient-elles réellement être une image ou un tableau 2D?" Donnez-lui un format de couleur et des données binaires, et il produira un fichier BMP en couleur que vous pouvez consulter avec votre visionneuse d'image ou l'éditeur préférée. Vous pouvez également donner une table de couleurs (fichier .bin produit par Resource_dasm à partir d'une ressource Clut) si vous pensez que l'entrée est des données de couleur indexées. Si la sortie ressemble à des ordures, jouez avec la largeur et le format de couleur jusqu'à ce que vous compreniez les bons paramètres.
Exécutez Render_Bits sans aucune option pour les informations d'utilisation.
Render_text vous permet de voir à quoi ressemblerait le texte réel lorsqu'il est rendu avec une police bitmap (ressource FONT / NFNT). Pour l'utiliser, obtenez un fichier .bin à partir d'une ressource de police ou de NFNT (par exemple avec Resource_dasm --Save-RAW). Ensuite, exécutez Render_text sans arguments pour voir comment l'utiliser.
Parfois, au cours de l'ingénierie inverse, vous vous retrouverez avec une image qui a le bon contenu et la bonne structure, mais les couleurs sont complètement fausses. Il y a de fortes chances qu'il ait été rendu avec la mauvaise table de couleurs; Pour résoudre ce problème, vous pouvez utiliser Replace_Clut pour cartographier tous les pixels de l'image d'un espace de couleurs à un autre.
Exécutez Replace_Clut sans aucune option d'informations d'utilisation.
Certains jeux stockent de grandes images divisées en un ensemble de textures plus petites; asseble_images peut les combiner par programme en une seule grande image unique. Exécutez asseble_images sans aucune option pour voir comment l'utiliser.
DUPE_Finder trouve des ressources en double du même type dans un ou plusieurs fichiers de ressources.
Exécutez DUPE_Finder sans aucune option pour les informations d'utilisation.
hypercard_dasm stack_file [output_dir] , ou simplement hypercard_dasm pour voir toutes les optionsicon_dearchiver archive_file [output_dir] déballe les icônes sur les fichiers .icns.vrfs_dump VRFS_file [output_dir]Decode_data peut décoder et décompresser quelques formats de codage personnalisés utilisés par divers jeux. Spécifiquement:
Game/App/Library | Encoding | CLI option | Notes
-------------------------------------------------------------
DinoPark Tycoon | LZSS | --dinopark | %0
DinoPark Tycoon | RLE | --dinopark |
Flashback | LZSS | --presage | %0
MacSki | COOK | --macski |
MacSki | CO2K | --macski |
MacSki | RUN4 | --macski |
PackBits (compress) | PackBits | --pack-bits |
PackBits (decompress) | PackBits | --unpack-bits |
Pathways Into Darkness | Pathways | --unpack-pathways |
SoundMusicSys | LZSS | --sms | %0
Notes:
%0: Although these are all variants of LZSS (and are indeed very similar to
each other), they are mutually incompatible formats.
Decode_data peut être utilisé seul pour décompresser les données, ou peut être utilisé comme un préprocesseur externe via Resource_dasm pour décompresser transparente certains formats. Par exemple, pour utiliser decode_data pour les ressources Macski, vous pouvez exécuter une commande comme resource_dasm --external-preprocessor="./decode_data --macski" input_filename ...
Render_sprite peut rendre plusieurs formats de sprite de jeu personnalisés. Pour certains formats répertoriés ci-dessous, vous devrez fournir une ressource de table de couleur en plus de la ressource Sprite. Un fichier .bin produit par Resource_dasm à partir d'une ressource Clut, PLTT ou CTBL suffira; Habituellement, ceux-ci peuvent être trouvés dans le même fichier que les ressources Sprite ou dans l'application de jeu. Exécutez Render_Sprite sans arguments pour les informations d'utilisation.
Formats pris en charge:
Game | Type | CLI option | Need color table | Notes
---------------------------------------------------------------------------
Beyond Dark Castle | PBLK | --PBLK | No |
Beyond Dark Castle | PPCT | --PPCT | No |
Beyond Dark Castle | PSCR | --PSCR-v2 | No |
Blobbo | BTMP | --BTMP | No |
Blobbo | PMP8 | --PMP8 | Yes | $9
BodyScope | Imag | --Imag | Yes | $2 $3
Bonkheads | Sprt | --Sprt | Yes |
Bubble Trouble | btSP | --btSP | Yes |
Dark Castle (color) | DC2 | --DC2 | No | $4
Dark Castle (monochrome) | PPCT | --PPCT | No |
Dark Castle (monochrome) | PSCR | --PSCR-v1 | No |
DinoPark Tycoon | BMap | --BMap | No |
DinoPark Tycoon | XBig | --XBig | No | $2
DinoPark Tycoon | XMap | --XMap | Yes | $2 $7
Dr. Quandary | Imag | --Imag | Sometimes | $1 $2 $3
Factory | 1img | --1img | No |
Factory | 4img | --4img | Yes |
Factory | 8img | --8img | Yes |
Flashback | PPSS | --PPSS | Yes | $2 $8
Fraction Munchers | Imag | --Imag-fm | Sometimes | $1 $2 $3
Greebles | GSIF | --GSIF | Yes |
Harry the Handsome Executive | HrSp | --HrSp | Yes | $9
Lemmings | SHPD | --SHPD-v1 | Sometimes | $0 $1 $2 $5
Marathon | .256 | --.256-m | No | $2
Mario Teaches Typing | Pak | --Pak | Sometimes | $1 $2
Mars Rising | btSP | --btSP | Yes |
Number Munchers | Imag | --Imag-fm | Sometimes | $1 $2 $3
Odell Down Under | Imag | --Imag | Sometimes | $1 $2 $3
Oh No! More Lemmings | SHPD | --SHPD-v2 | Sometimes | $0 $1 $2 $5
Pathways Into Darkness | .256 | --.256-pd | No | $2
Prince of Persia | SHPD | --SHPD-p | Sometimes | $0 $1 $2 $5
Prince of Persia 2 | SHAP | --SHAP | Yes |
SimCity 2000 | SPRT | --SPRT | Yes | $2
SimTower | | | No | $A
Slithereens | SprD | --SprD | Yes | $2
SnapDragon | Imag | --Imag | Sometimes | $1 $2 $3
Spectre | shap | --shap | No | $6
Step On It! | sssf | --sssf | Yes | $2
Super Munchers | Imag | --Imag-fm | Sometimes | $1 $2 $3
Swamp Gas | PPic | --PPic | Sometimes | $0 $2 $3
The Amazon Trail | Imag | --Imag | Sometimes | $2 $3
The Oregon Trail | Imag | --Imag | Sometimes | $1 $2 $3
TheZone | Spri | --Spri | Yes |
Word Munchers | Imag | --Imag-fm | Sometimes | $1 $2 $3
Notes:
$0: render_sprite can't tell from the contents of the resource whether it is
color or monochrome, so it assumes the resource is color if you give a
color table on the command line. If decoding fails with a color table,
try decoding without one (or vice versa).
$1: These games contain some color and some monochrome graphics. It should
be obvious which are which (usually color graphics are in a separate
file), but if not, you can give a clut anyway in these cases and
render_sprite will ignore it if the image is monochrome.
$2: These sprite formats contain multiple images, so render_sprite will
produce multiple image files.
$3: Resources of this type can contain embedded color tables; if you're
rendering a color image that doesn't have a color table, you'll have to
provide one via a command-line option. If the resource (or individual
images therein) contain their own color tables or are monochrome, no
color table is required on the command line, and any provided color
table via the command line will be ignored.
$4: You can get DC2 sprites from the DC Data file with
`resource_dasm --index-format=dc-data "DC Data"`.
$5: The graphics files contain resources that refer to segments of the data
fork in the same file. So, this option expects the original Graphics or
BW Graphics or Persia file (with both data and resource forks present),
not an already-extracted resource.
$6: shap resources contain 3D models and 2D top-down projections of them.
When given a shap resource, render_sprite produces an STL file and an
OBJ file for the 3D model, and an SVG file for the 2D top-down view.
$7: Some XMap resources are stored inside CBag archives. You can extract
them with `resource_dasm --index-format=cbag <CBAG_file.bin>`.
$8: This game has only one clut and it's huge - far longer than the usual
256 entries. It seems PPSS image sets are meant to be rendered with a
subset of this clut, but I haven't been able to figure out (yet) how the
game chooses what subset of it to use.
$9: The game doesn't contain any color tables. You can use a 256-color clut
resource from the Mac OS System file, or use the --default-clut option.
$A: The game stores its sprites in normal PICT resources with an incorrect
type. Use `resource_dasm --copy-handler=PICT:%89%E6%91%9C` to decode
them instead of using render_sprite.
icon_dearchiver déballage les icônes d'une icône archiver (par Alessandro Levi Montalcini) Archive to .icns. Exécutez-le sans options pour les informations d'utilisation.
blobbo_render <Blev-file.bin> <PMP8-128.bmp>ferazel_render dans le répertoire avec les fichiers de données, ou ferazel_render --help pour voir toutes les options (il y en a beaucoup!)gamma_zee_render gamma_zee_application levels_filenameharry_render --clut-file=clut.bin , ou tout simplement harry_render pour voir toutes les options (il y en a beaucoup!)infotron_render dans le répertoire d'informations sur les fichiers de donnéeslemmings_render --clut-file=clut.bin , ou lemmings_render --help pour voir toutes les optionsmshines_render world_file [output_directory]lemmings_render comme pour les lemmings originaux, mais utilisez également l'option --v2realmz_dasm global_data_dir [scenario_dir] out_dir (si scénario_dir n'est pas donné, démontez les données partagées à la place)