polyfile-weave 0.5.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of polyfile-weave might be problematic. Click here for more details.
- polyfile/__init__.py +15 -0
- polyfile/__main__.py +394 -0
- polyfile/arithmetic.py +27 -0
- polyfile/ast.py +114 -0
- polyfile/debugger.py +1039 -0
- polyfile/expressions.py +346 -0
- polyfile/fileutils.py +343 -0
- polyfile/html.py +135 -0
- polyfile/http/__init__.py +1 -0
- polyfile/http/defacto.py +37 -0
- polyfile/http/deprecated.py +51 -0
- polyfile/http/experimental.py +67 -0
- polyfile/http/http_11.py +548 -0
- polyfile/http/matcher.py +37 -0
- polyfile/http/structured_headers.py +48 -0
- polyfile/iterators.py +72 -0
- polyfile/jpeg.py +24 -0
- polyfile/kaitai/__init__.py +0 -0
- polyfile/kaitai/compiler.py +156 -0
- polyfile/kaitai/parser.py +312 -0
- polyfile/kaitai/parsers/__init__.py +0 -0
- polyfile/kaitai/parsers/aix_utmp.py +116 -0
- polyfile/kaitai/parsers/allegro_dat.py +367 -0
- polyfile/kaitai/parsers/andes_firmware.py +64 -0
- polyfile/kaitai/parsers/android_bootldr_asus.py +105 -0
- polyfile/kaitai/parsers/android_bootldr_huawei.py +181 -0
- polyfile/kaitai/parsers/android_bootldr_qcom.py +217 -0
- polyfile/kaitai/parsers/android_dto.py +138 -0
- polyfile/kaitai/parsers/android_img.py +319 -0
- polyfile/kaitai/parsers/android_nanoapp_header.py +83 -0
- polyfile/kaitai/parsers/android_opengl_shaders_cache.py +151 -0
- polyfile/kaitai/parsers/android_sparse.py +237 -0
- polyfile/kaitai/parsers/android_super.py +401 -0
- polyfile/kaitai/parsers/apm_partition_table.py +196 -0
- polyfile/kaitai/parsers/apple_single_double.py +180 -0
- polyfile/kaitai/parsers/asn1_der.py +235 -0
- polyfile/kaitai/parsers/au.py +138 -0
- polyfile/kaitai/parsers/avantes_roh60.py +112 -0
- polyfile/kaitai/parsers/avi.py +296 -0
- polyfile/kaitai/parsers/bcd.py +111 -0
- polyfile/kaitai/parsers/bitcoin_transaction.py +210 -0
- polyfile/kaitai/parsers/blender_blend.py +334 -0
- polyfile/kaitai/parsers/bmp.py +780 -0
- polyfile/kaitai/parsers/bson.py +411 -0
- polyfile/kaitai/parsers/btrfs_stream.py +318 -0
- polyfile/kaitai/parsers/bytes_with_io.py +27 -0
- polyfile/kaitai/parsers/chrome_pak.py +194 -0
- polyfile/kaitai/parsers/code_6502.py +456 -0
- polyfile/kaitai/parsers/compressed_resource.py +217 -0
- polyfile/kaitai/parsers/cpio_old_le.py +154 -0
- polyfile/kaitai/parsers/cramfs.py +344 -0
- polyfile/kaitai/parsers/creative_voice_file.py +342 -0
- polyfile/kaitai/parsers/dbf.py +274 -0
- polyfile/kaitai/parsers/dcmp_0.py +664 -0
- polyfile/kaitai/parsers/dcmp_1.py +422 -0
- polyfile/kaitai/parsers/dcmp_2.py +312 -0
- polyfile/kaitai/parsers/dcmp_variable_length_integer.py +66 -0
- polyfile/kaitai/parsers/dex.py +1086 -0
- polyfile/kaitai/parsers/dicom.py +4370 -0
- polyfile/kaitai/parsers/dime_message.py +201 -0
- polyfile/kaitai/parsers/dns_packet.py +569 -0
- polyfile/kaitai/parsers/doom_wad.py +654 -0
- polyfile/kaitai/parsers/dos_datetime.py +191 -0
- polyfile/kaitai/parsers/dos_mz.py +172 -0
- polyfile/kaitai/parsers/ds_store.py +513 -0
- polyfile/kaitai/parsers/dtb.py +310 -0
- polyfile/kaitai/parsers/dune_2_pak.py +126 -0
- polyfile/kaitai/parsers/edid.py +472 -0
- polyfile/kaitai/parsers/efivar_signature_list.py +331 -0
- polyfile/kaitai/parsers/elf.py +2482 -0
- polyfile/kaitai/parsers/ethernet_frame.py +114 -0
- polyfile/kaitai/parsers/exif.py +723 -0
- polyfile/kaitai/parsers/ext2.py +537 -0
- polyfile/kaitai/parsers/fallout2_dat.py +187 -0
- polyfile/kaitai/parsers/fallout_dat.py +156 -0
- polyfile/kaitai/parsers/fasttracker_xm_module.py +558 -0
- polyfile/kaitai/parsers/ftl_dat.py +90 -0
- polyfile/kaitai/parsers/genmidi_op2.py +161 -0
- polyfile/kaitai/parsers/gettext_mo.py +541 -0
- polyfile/kaitai/parsers/gif.py +492 -0
- polyfile/kaitai/parsers/gimp_brush.py +244 -0
- polyfile/kaitai/parsers/glibc_utmp.py +114 -0
- polyfile/kaitai/parsers/gltf_binary.py +132 -0
- polyfile/kaitai/parsers/google_protobuf.py +151 -0
- polyfile/kaitai/parsers/gpt_partition_table.py +175 -0
- polyfile/kaitai/parsers/gran_turismo_vol.py +140 -0
- polyfile/kaitai/parsers/grub2_font.py +337 -0
- polyfile/kaitai/parsers/gzip.py +232 -0
- polyfile/kaitai/parsers/hashcat_restore.py +60 -0
- polyfile/kaitai/parsers/hccap.py +111 -0
- polyfile/kaitai/parsers/hccapx.py +103 -0
- polyfile/kaitai/parsers/heaps_pak.py +177 -0
- polyfile/kaitai/parsers/heroes_of_might_and_magic_agg.py +116 -0
- polyfile/kaitai/parsers/heroes_of_might_and_magic_bmp.py +34 -0
- polyfile/kaitai/parsers/icmp_packet.py +136 -0
- polyfile/kaitai/parsers/ico.py +129 -0
- polyfile/kaitai/parsers/id3v1_1.py +220 -0
- polyfile/kaitai/parsers/id3v2_3.py +324 -0
- polyfile/kaitai/parsers/id3v2_4.py +423 -0
- polyfile/kaitai/parsers/ines.py +282 -0
- polyfile/kaitai/parsers/ipv4_packet.py +158 -0
- polyfile/kaitai/parsers/ipv6_packet.py +55 -0
- polyfile/kaitai/parsers/iso9660.py +544 -0
- polyfile/kaitai/parsers/java_class.py +1113 -0
- polyfile/kaitai/parsers/jpeg.py +361 -0
- polyfile/kaitai/parsers/luks.py +149 -0
- polyfile/kaitai/parsers/lzh.py +165 -0
- polyfile/kaitai/parsers/mac_os_resource_snd.py +493 -0
- polyfile/kaitai/parsers/mach_o.py +3033 -0
- polyfile/kaitai/parsers/mach_o_fat.py +92 -0
- polyfile/kaitai/parsers/magicavoxel_vox.py +391 -0
- polyfile/kaitai/parsers/manifest.json +1 -0
- polyfile/kaitai/parsers/mbr_partition_table.py +119 -0
- polyfile/kaitai/parsers/mcap.py +1015 -0
- polyfile/kaitai/parsers/microsoft_cfb.py +293 -0
- polyfile/kaitai/parsers/microsoft_network_monitor_v2.py +309 -0
- polyfile/kaitai/parsers/microsoft_pe.py +765 -0
- polyfile/kaitai/parsers/mifare_classic.py +706 -0
- polyfile/kaitai/parsers/minecraft_nbt.py +449 -0
- polyfile/kaitai/parsers/monomakh_sapr_chg.py +69 -0
- polyfile/kaitai/parsers/mozilla_mar.py +239 -0
- polyfile/kaitai/parsers/mp4.py +333 -0
- polyfile/kaitai/parsers/msgpack.py +467 -0
- polyfile/kaitai/parsers/nitf.py +1189 -0
- polyfile/kaitai/parsers/nt_mdt_pal.py +155 -0
- polyfile/kaitai/parsers/ogg.py +118 -0
- polyfile/kaitai/parsers/openpgp_message.py +993 -0
- polyfile/kaitai/parsers/packet_ppi.py +515 -0
- polyfile/kaitai/parsers/pcap.py +344 -0
- polyfile/kaitai/parsers/pcf_font.py +506 -0
- polyfile/kaitai/parsers/pcx.py +195 -0
- polyfile/kaitai/parsers/pcx_dcx.py +79 -0
- polyfile/kaitai/parsers/phar_without_stub.py +399 -0
- polyfile/kaitai/parsers/php_serialized_value.py +505 -0
- polyfile/kaitai/parsers/png.py +721 -0
- polyfile/kaitai/parsers/protocol_body.py +260 -0
- polyfile/kaitai/parsers/psx_tim.py +104 -0
- polyfile/kaitai/parsers/python_pickle.py +718 -0
- polyfile/kaitai/parsers/python_pyc_27.py +510 -0
- polyfile/kaitai/parsers/quake_mdl.py +441 -0
- polyfile/kaitai/parsers/quake_pak.py +112 -0
- polyfile/kaitai/parsers/quicktime_mov.py +634 -0
- polyfile/kaitai/parsers/rar.py +265 -0
- polyfile/kaitai/parsers/regf.py +569 -0
- polyfile/kaitai/parsers/renderware_binary_stream.py +877 -0
- polyfile/kaitai/parsers/resource_fork.py +611 -0
- polyfile/kaitai/parsers/respack.py +57 -0
- polyfile/kaitai/parsers/riff.py +409 -0
- polyfile/kaitai/parsers/rpm.py +964 -0
- polyfile/kaitai/parsers/rtcp_payload.py +579 -0
- polyfile/kaitai/parsers/rtp_packet.py +150 -0
- polyfile/kaitai/parsers/rtpdump.py +115 -0
- polyfile/kaitai/parsers/ruby_marshal.py +423 -0
- polyfile/kaitai/parsers/s3m.py +493 -0
- polyfile/kaitai/parsers/saints_row_2_vpp_pc.py +254 -0
- polyfile/kaitai/parsers/shapefile_index.py +174 -0
- polyfile/kaitai/parsers/shapefile_main.py +893 -0
- polyfile/kaitai/parsers/some_ip.py +209 -0
- polyfile/kaitai/parsers/some_ip_container.py +37 -0
- polyfile/kaitai/parsers/some_ip_sd.py +86 -0
- polyfile/kaitai/parsers/some_ip_sd_entries.py +160 -0
- polyfile/kaitai/parsers/some_ip_sd_options.py +374 -0
- polyfile/kaitai/parsers/specpr.py +404 -0
- polyfile/kaitai/parsers/sqlite3.py +472 -0
- polyfile/kaitai/parsers/ssh_public_key.py +252 -0
- polyfile/kaitai/parsers/standard_midi_file.py +390 -0
- polyfile/kaitai/parsers/stl.py +111 -0
- polyfile/kaitai/parsers/sudoers_ts.py +201 -0
- polyfile/kaitai/parsers/swf.py +406 -0
- polyfile/kaitai/parsers/systemd_journal.py +361 -0
- polyfile/kaitai/parsers/tcp_segment.py +57 -0
- polyfile/kaitai/parsers/tga.py +213 -0
- polyfile/kaitai/parsers/tls_client_hello.py +293 -0
- polyfile/kaitai/parsers/tr_dos_image.py +322 -0
- polyfile/kaitai/parsers/tsm.py +198 -0
- polyfile/kaitai/parsers/ttf.py +1847 -0
- polyfile/kaitai/parsers/udp_datagram.py +42 -0
- polyfile/kaitai/parsers/uefi_te.py +236 -0
- polyfile/kaitai/parsers/uimage.py +198 -0
- polyfile/kaitai/parsers/utf8_string.py +137 -0
- polyfile/kaitai/parsers/vfat.py +410 -0
- polyfile/kaitai/parsers/vlq_base128_be.py +104 -0
- polyfile/kaitai/parsers/vlq_base128_le.py +129 -0
- polyfile/kaitai/parsers/vmware_vmdk.py +167 -0
- polyfile/kaitai/parsers/vp8_ivf.py +112 -0
- polyfile/kaitai/parsers/warcraft_2_pud.py +423 -0
- polyfile/kaitai/parsers/wav.py +1014 -0
- polyfile/kaitai/parsers/websocket.py +167 -0
- polyfile/kaitai/parsers/windows_evt_log.py +304 -0
- polyfile/kaitai/parsers/windows_lnk_file.py +467 -0
- polyfile/kaitai/parsers/windows_minidump.py +575 -0
- polyfile/kaitai/parsers/windows_resource_file.py +243 -0
- polyfile/kaitai/parsers/windows_shell_items.py +190 -0
- polyfile/kaitai/parsers/windows_systemtime.py +52 -0
- polyfile/kaitai/parsers/wmf.py +502 -0
- polyfile/kaitai/parsers/xar.py +181 -0
- polyfile/kaitai/parsers/xwd.py +189 -0
- polyfile/kaitai/parsers/zip.py +685 -0
- polyfile/kaitai/parsers/zisofs.py +158 -0
- polyfile/kaitai/parsers/zx_spectrum_tap.py +184 -0
- polyfile/kaitaimatcher.py +113 -0
- polyfile/languagematcher.py +217 -0
- polyfile/logger.py +135 -0
- polyfile/magic.py +2983 -0
- polyfile/magic_defs/COPYING +29 -0
- polyfile/magic_defs/__init__.py +0 -0
- polyfile/magic_defs/acorn +102 -0
- polyfile/magic_defs/adi +13 -0
- polyfile/magic_defs/adventure +122 -0
- polyfile/magic_defs/aes +29 -0
- polyfile/magic_defs/algol68 +35 -0
- polyfile/magic_defs/allegro +9 -0
- polyfile/magic_defs/alliant +18 -0
- polyfile/magic_defs/alpha +32 -0
- polyfile/magic_defs/amanda +12 -0
- polyfile/magic_defs/amigaos +218 -0
- polyfile/magic_defs/android +259 -0
- polyfile/magic_defs/animation +1197 -0
- polyfile/magic_defs/aout +46 -0
- polyfile/magic_defs/apache +28 -0
- polyfile/magic_defs/apl +7 -0
- polyfile/magic_defs/apple +773 -0
- polyfile/magic_defs/application +7 -0
- polyfile/magic_defs/applix +13 -0
- polyfile/magic_defs/apt +52 -0
- polyfile/magic_defs/archive +2586 -0
- polyfile/magic_defs/aria +38 -0
- polyfile/magic_defs/arm +50 -0
- polyfile/magic_defs/asf +132 -0
- polyfile/magic_defs/assembler +18 -0
- polyfile/magic_defs/asterix +18 -0
- polyfile/magic_defs/att3b +41 -0
- polyfile/magic_defs/audio +1291 -0
- polyfile/magic_defs/avm +33 -0
- polyfile/magic_defs/basis +18 -0
- polyfile/magic_defs/beetle +7 -0
- polyfile/magic_defs/ber +65 -0
- polyfile/magic_defs/bflt +14 -0
- polyfile/magic_defs/bhl +10 -0
- polyfile/magic_defs/bioinformatics +178 -0
- polyfile/magic_defs/biosig +154 -0
- polyfile/magic_defs/blackberry +8 -0
- polyfile/magic_defs/blcr +25 -0
- polyfile/magic_defs/blender +50 -0
- polyfile/magic_defs/blit +24 -0
- polyfile/magic_defs/bm +10 -0
- polyfile/magic_defs/bout +11 -0
- polyfile/magic_defs/bsdi +33 -0
- polyfile/magic_defs/bsi +10 -0
- polyfile/magic_defs/btsnoop +13 -0
- polyfile/magic_defs/burp +7 -0
- polyfile/magic_defs/bytecode +41 -0
- polyfile/magic_defs/c-lang +110 -0
- polyfile/magic_defs/c64 +531 -0
- polyfile/magic_defs/cad +437 -0
- polyfile/magic_defs/cafebabe +107 -0
- polyfile/magic_defs/cbor +21 -0
- polyfile/magic_defs/ccf +14 -0
- polyfile/magic_defs/cddb +12 -0
- polyfile/magic_defs/chord +15 -0
- polyfile/magic_defs/cisco +12 -0
- polyfile/magic_defs/citrus +12 -0
- polyfile/magic_defs/clarion +27 -0
- polyfile/magic_defs/claris +48 -0
- polyfile/magic_defs/clipper +65 -0
- polyfile/magic_defs/clojure +30 -0
- polyfile/magic_defs/coff +98 -0
- polyfile/magic_defs/commands +201 -0
- polyfile/magic_defs/communications +22 -0
- polyfile/magic_defs/compress +461 -0
- polyfile/magic_defs/console +1213 -0
- polyfile/magic_defs/convex +69 -0
- polyfile/magic_defs/coverage +91 -0
- polyfile/magic_defs/cracklib +14 -0
- polyfile/magic_defs/crypto +31 -0
- polyfile/magic_defs/csv +8 -0
- polyfile/magic_defs/ctags +6 -0
- polyfile/magic_defs/ctf +23 -0
- polyfile/magic_defs/cubemap +8 -0
- polyfile/magic_defs/cups +56 -0
- polyfile/magic_defs/dact +11 -0
- polyfile/magic_defs/database +886 -0
- polyfile/magic_defs/dataone +47 -0
- polyfile/magic_defs/dbpf +15 -0
- polyfile/magic_defs/der +146 -0
- polyfile/magic_defs/diamond +12 -0
- polyfile/magic_defs/dif +33 -0
- polyfile/magic_defs/diff +41 -0
- polyfile/magic_defs/digital +59 -0
- polyfile/magic_defs/dolby +69 -0
- polyfile/magic_defs/dsf +25 -0
- polyfile/magic_defs/dump +96 -0
- polyfile/magic_defs/dwarfs +45 -0
- polyfile/magic_defs/dyadic +61 -0
- polyfile/magic_defs/ebml +8 -0
- polyfile/magic_defs/edid +11 -0
- polyfile/magic_defs/editors +43 -0
- polyfile/magic_defs/efi +15 -0
- polyfile/magic_defs/elf +379 -0
- polyfile/magic_defs/encore +22 -0
- polyfile/magic_defs/epoc +62 -0
- polyfile/magic_defs/erlang +21 -0
- polyfile/magic_defs/espressif +57 -0
- polyfile/magic_defs/esri +28 -0
- polyfile/magic_defs/etf +33 -0
- polyfile/magic_defs/fcs +9 -0
- polyfile/magic_defs/filesystems +2694 -0
- polyfile/magic_defs/finger +16 -0
- polyfile/magic_defs/firmware +133 -0
- polyfile/magic_defs/flash +62 -0
- polyfile/magic_defs/flif +36 -0
- polyfile/magic_defs/fonts +449 -0
- polyfile/magic_defs/forth +82 -0
- polyfile/magic_defs/fortran +9 -0
- polyfile/magic_defs/frame +62 -0
- polyfile/magic_defs/freebsd +164 -0
- polyfile/magic_defs/fsav +128 -0
- polyfile/magic_defs/fusecompress +12 -0
- polyfile/magic_defs/games +696 -0
- polyfile/magic_defs/gcc +17 -0
- polyfile/magic_defs/gconv +10 -0
- polyfile/magic_defs/gentoo +85 -0
- polyfile/magic_defs/geo +166 -0
- polyfile/magic_defs/geos +20 -0
- polyfile/magic_defs/gimp +77 -0
- polyfile/magic_defs/git +13 -0
- polyfile/magic_defs/glibc +21 -0
- polyfile/magic_defs/gnome +59 -0
- polyfile/magic_defs/gnu +173 -0
- polyfile/magic_defs/gnumeric +8 -0
- polyfile/magic_defs/gpt +240 -0
- polyfile/magic_defs/gpu +28 -0
- polyfile/magic_defs/grace +21 -0
- polyfile/magic_defs/graphviz +12 -0
- polyfile/magic_defs/gringotts +48 -0
- polyfile/magic_defs/guile +13 -0
- polyfile/magic_defs/hardware +12 -0
- polyfile/magic_defs/hitachi-sh +30 -0
- polyfile/magic_defs/hp +433 -0
- polyfile/magic_defs/human68k +26 -0
- polyfile/magic_defs/ibm370 +52 -0
- polyfile/magic_defs/ibm6000 +35 -0
- polyfile/magic_defs/icc +214 -0
- polyfile/magic_defs/iff +80 -0
- polyfile/magic_defs/images +4210 -0
- polyfile/magic_defs/inform +9 -0
- polyfile/magic_defs/intel +310 -0
- polyfile/magic_defs/interleaf +9 -0
- polyfile/magic_defs/island +10 -0
- polyfile/magic_defs/ispell +63 -0
- polyfile/magic_defs/isz +15 -0
- polyfile/magic_defs/java +52 -0
- polyfile/magic_defs/javascript +171 -0
- polyfile/magic_defs/jpeg +252 -0
- polyfile/magic_defs/json +8 -0
- polyfile/magic_defs/karma +9 -0
- polyfile/magic_defs/kde +11 -0
- polyfile/magic_defs/keepass +20 -0
- polyfile/magic_defs/kerberos +45 -0
- polyfile/magic_defs/kicad +85 -0
- polyfile/magic_defs/kml +34 -0
- polyfile/magic_defs/lammps +64 -0
- polyfile/magic_defs/lecter +6 -0
- polyfile/magic_defs/lex +12 -0
- polyfile/magic_defs/lif +50 -0
- polyfile/magic_defs/linux +557 -0
- polyfile/magic_defs/lisp +78 -0
- polyfile/magic_defs/llvm +22 -0
- polyfile/magic_defs/locoscript +12 -0
- polyfile/magic_defs/lua +31 -0
- polyfile/magic_defs/luks +126 -0
- polyfile/magic_defs/m4 +11 -0
- polyfile/magic_defs/mach +303 -0
- polyfile/magic_defs/macintosh +505 -0
- polyfile/magic_defs/macos +7 -0
- polyfile/magic_defs/magic +10 -0
- polyfile/magic_defs/magic.mgc +0 -0
- polyfile/magic_defs/mail.news +132 -0
- polyfile/magic_defs/make +21 -0
- polyfile/magic_defs/map +413 -0
- polyfile/magic_defs/maple +109 -0
- polyfile/magic_defs/marc21 +30 -0
- polyfile/magic_defs/mathcad +8 -0
- polyfile/magic_defs/mathematica +188 -0
- polyfile/magic_defs/matroska +17 -0
- polyfile/magic_defs/mcrypt +52 -0
- polyfile/magic_defs/measure +44 -0
- polyfile/magic_defs/mercurial +13 -0
- polyfile/magic_defs/metastore +8 -0
- polyfile/magic_defs/meteorological +53 -0
- polyfile/magic_defs/microfocus +21 -0
- polyfile/magic_defs/mime +9 -0
- polyfile/magic_defs/mips +120 -0
- polyfile/magic_defs/mirage +8 -0
- polyfile/magic_defs/misctools +140 -0
- polyfile/magic_defs/mkid +11 -0
- polyfile/magic_defs/mlssa +8 -0
- polyfile/magic_defs/mmdf +6 -0
- polyfile/magic_defs/modem +92 -0
- polyfile/magic_defs/modulefile +9 -0
- polyfile/magic_defs/motorola +71 -0
- polyfile/magic_defs/mozilla +37 -0
- polyfile/magic_defs/msdos +2304 -0
- polyfile/magic_defs/msooxml +68 -0
- polyfile/magic_defs/msvc +222 -0
- polyfile/magic_defs/msx +309 -0
- polyfile/magic_defs/mup +24 -0
- polyfile/magic_defs/music +17 -0
- polyfile/magic_defs/nasa +7 -0
- polyfile/magic_defs/natinst +24 -0
- polyfile/magic_defs/ncr +49 -0
- polyfile/magic_defs/neko +12 -0
- polyfile/magic_defs/netbsd +251 -0
- polyfile/magic_defs/netscape +26 -0
- polyfile/magic_defs/netware +11 -0
- polyfile/magic_defs/news +13 -0
- polyfile/magic_defs/nifty +202 -0
- polyfile/magic_defs/nim-lang +29 -0
- polyfile/magic_defs/nitpicker +14 -0
- polyfile/magic_defs/numpy +9 -0
- polyfile/magic_defs/oasis +12 -0
- polyfile/magic_defs/ocaml +14 -0
- polyfile/magic_defs/octave +6 -0
- polyfile/magic_defs/ole2compounddocs +760 -0
- polyfile/magic_defs/olf +98 -0
- polyfile/magic_defs/openfst +17 -0
- polyfile/magic_defs/opentimestamps +16 -0
- polyfile/magic_defs/oric +16 -0
- polyfile/magic_defs/os2 +186 -0
- polyfile/magic_defs/os400 +39 -0
- polyfile/magic_defs/os9 +80 -0
- polyfile/magic_defs/osf1 +10 -0
- polyfile/magic_defs/palm +156 -0
- polyfile/magic_defs/parix +13 -0
- polyfile/magic_defs/parrot +22 -0
- polyfile/magic_defs/pascal +39 -0
- polyfile/magic_defs/pbf +11 -0
- polyfile/magic_defs/pbm +8 -0
- polyfile/magic_defs/pc88 +24 -0
- polyfile/magic_defs/pc98 +77 -0
- polyfile/magic_defs/pci_ids +116 -0
- polyfile/magic_defs/pcjr +8 -0
- polyfile/magic_defs/pdf +51 -0
- polyfile/magic_defs/pdp +42 -0
- polyfile/magic_defs/perl +100 -0
- polyfile/magic_defs/pgf +52 -0
- polyfile/magic_defs/pgp +581 -0
- polyfile/magic_defs/pgp-binary-keys +388 -0
- polyfile/magic_defs/pkgadd +7 -0
- polyfile/magic_defs/plan9 +25 -0
- polyfile/magic_defs/playdate +57 -0
- polyfile/magic_defs/plus5 +18 -0
- polyfile/magic_defs/pmem +46 -0
- polyfile/magic_defs/polyfile_zip +5 -0
- polyfile/magic_defs/polyml +23 -0
- polyfile/magic_defs/printer +269 -0
- polyfile/magic_defs/project +10 -0
- polyfile/magic_defs/psdbms +14 -0
- polyfile/magic_defs/psl +14 -0
- polyfile/magic_defs/pulsar +13 -0
- polyfile/magic_defs/puzzle +17 -0
- polyfile/magic_defs/pwsafe +14 -0
- polyfile/magic_defs/pyramid +12 -0
- polyfile/magic_defs/python +305 -0
- polyfile/magic_defs/qt +30 -0
- polyfile/magic_defs/revision +66 -0
- polyfile/magic_defs/riff +840 -0
- polyfile/magic_defs/rinex +44 -0
- polyfile/magic_defs/ringdove +45 -0
- polyfile/magic_defs/rpi +52 -0
- polyfile/magic_defs/rpm +45 -0
- polyfile/magic_defs/rpmsg +7 -0
- polyfile/magic_defs/rst +11 -0
- polyfile/magic_defs/rtf +94 -0
- polyfile/magic_defs/ruby +55 -0
- polyfile/magic_defs/rust +21 -0
- polyfile/magic_defs/sc +7 -0
- polyfile/magic_defs/sccs +24 -0
- polyfile/magic_defs/scientific +144 -0
- polyfile/magic_defs/securitycerts +6 -0
- polyfile/magic_defs/selinux +24 -0
- polyfile/magic_defs/sendmail +37 -0
- polyfile/magic_defs/sequent +42 -0
- polyfile/magic_defs/sereal +35 -0
- polyfile/magic_defs/sgi +144 -0
- polyfile/magic_defs/sgml +161 -0
- polyfile/magic_defs/sharc +23 -0
- polyfile/magic_defs/sinclair +40 -0
- polyfile/magic_defs/sisu +18 -0
- polyfile/magic_defs/sketch +6 -0
- polyfile/magic_defs/smalltalk +25 -0
- polyfile/magic_defs/smile +34 -0
- polyfile/magic_defs/sniffer +482 -0
- polyfile/magic_defs/softquad +40 -0
- polyfile/magic_defs/sosi +40 -0
- polyfile/magic_defs/spec +21 -0
- polyfile/magic_defs/spectrum +184 -0
- polyfile/magic_defs/sql +288 -0
- polyfile/magic_defs/ssh +39 -0
- polyfile/magic_defs/ssl +20 -0
- polyfile/magic_defs/statistics +45 -0
- polyfile/magic_defs/subtitle +38 -0
- polyfile/magic_defs/sun +141 -0
- polyfile/magic_defs/svf +5 -0
- polyfile/magic_defs/sylk +36 -0
- polyfile/magic_defs/symbos +42 -0
- polyfile/magic_defs/sysex +429 -0
- polyfile/magic_defs/tcl +29 -0
- polyfile/magic_defs/teapot +6 -0
- polyfile/magic_defs/terminfo +63 -0
- polyfile/magic_defs/tex +141 -0
- polyfile/magic_defs/tgif +7 -0
- polyfile/magic_defs/ti-8x +239 -0
- polyfile/magic_defs/timezone +42 -0
- polyfile/magic_defs/tplink +95 -0
- polyfile/magic_defs/troff +38 -0
- polyfile/magic_defs/tuxedo +8 -0
- polyfile/magic_defs/typeset +8 -0
- polyfile/magic_defs/uf2 +72 -0
- polyfile/magic_defs/unicode +15 -0
- polyfile/magic_defs/unisig +12 -0
- polyfile/magic_defs/unknown +34 -0
- polyfile/magic_defs/usd +21 -0
- polyfile/magic_defs/uterus +16 -0
- polyfile/magic_defs/uuencode +28 -0
- polyfile/magic_defs/vacuum-cleaner +54 -0
- polyfile/magic_defs/varied.out +46 -0
- polyfile/magic_defs/varied.script +21 -0
- polyfile/magic_defs/vax +32 -0
- polyfile/magic_defs/vicar +17 -0
- polyfile/magic_defs/virtual +307 -0
- polyfile/magic_defs/virtutech +12 -0
- polyfile/magic_defs/visx +32 -0
- polyfile/magic_defs/vms +30 -0
- polyfile/magic_defs/vmware +6 -0
- polyfile/magic_defs/vorbis +155 -0
- polyfile/magic_defs/vxl +14 -0
- polyfile/magic_defs/warc +16 -0
- polyfile/magic_defs/weak +16 -0
- polyfile/magic_defs/web +18 -0
- polyfile/magic_defs/webassembly +17 -0
- polyfile/magic_defs/windows +1811 -0
- polyfile/magic_defs/wireless +7 -0
- polyfile/magic_defs/wordprocessors +630 -0
- polyfile/magic_defs/wsdl +23 -0
- polyfile/magic_defs/x68000 +25 -0
- polyfile/magic_defs/xdelta +13 -0
- polyfile/magic_defs/xenix +106 -0
- polyfile/magic_defs/xilinx +58 -0
- polyfile/magic_defs/xo65 +37 -0
- polyfile/magic_defs/xwindows +43 -0
- polyfile/magic_defs/yara +17 -0
- polyfile/magic_defs/zfs +96 -0
- polyfile/magic_defs/zilog +12 -0
- polyfile/magic_defs/zip +126 -0
- polyfile/magic_defs/zyxel +17 -0
- polyfile/nes.py +144 -0
- polyfile/nitf.py +15 -0
- polyfile/pdf.py +1264 -0
- polyfile/pickles.py +45 -0
- polyfile/polyfile.py +409 -0
- polyfile/profiling.py +115 -0
- polyfile/repl.py +624 -0
- polyfile/search.py +310 -0
- polyfile/serialization.py +323 -0
- polyfile/structmatcher.py +46 -0
- polyfile/structs.py +281 -0
- polyfile/templates/download.js +162 -0
- polyfile/templates/hexdump.css +268 -0
- polyfile/templates/hexdump.js +756 -0
- polyfile/templates/jquery-3.4.1.min.js +2 -0
- polyfile/templates/template.html +119 -0
- polyfile/wildcards.py +62 -0
- polyfile/zipmatcher.py +183 -0
- polyfile_weave-0.5.5.dist-info/METADATA +173 -0
- polyfile_weave-0.5.5.dist-info/RECORD +585 -0
- polyfile_weave-0.5.5.dist-info/WHEEL +5 -0
- polyfile_weave-0.5.5.dist-info/entry_points.txt +2 -0
- polyfile_weave-0.5.5.dist-info/licenses/LICENSE +202 -0
- polyfile_weave-0.5.5.dist-info/top_level.txt +2 -0
- polymerge/__init__.py +1 -0
- polymerge/__main__.py +296 -0
- polymerge/cfg.py +127 -0
- polymerge/polymerge.py +227 -0
- polymerge/polytracker.py +190 -0
|
@@ -0,0 +1,1213 @@
|
|
|
1
|
+
|
|
2
|
+
#------------------------------------------------------------------------------
|
|
3
|
+
# $File: console,v 1.71 2022/12/24 22:31:58 christos Exp $
|
|
4
|
+
# Console game magic
|
|
5
|
+
# Toby Deshane <hac@shoelace.digivill.net>
|
|
6
|
+
|
|
7
|
+
# ines: file(1) magic for Marat's iNES Nintendo Entertainment System ROM dump format
|
|
8
|
+
# Updated by David Korth <gerbilsoft@gerbilsoft.com>
|
|
9
|
+
# References:
|
|
10
|
+
# - https://wiki.nesdev.com/w/index.php/INES
|
|
11
|
+
# - https://wiki.nesdev.com/w/index.php/NES_2.0
|
|
12
|
+
|
|
13
|
+
# Common header for iNES, NES 2.0, and Wii U iNES.
|
|
14
|
+
0 name nes-rom-image-ines
|
|
15
|
+
>7 byte&0x0C =0x8 (NES 2.0)
|
|
16
|
+
>4 byte x \b: %ux16k PRG
|
|
17
|
+
>5 byte x \b, %ux8k CHR
|
|
18
|
+
>6 byte&0x08 =0x8 [4-Scr]
|
|
19
|
+
>6 byte&0x09 =0x0 [H-mirror]
|
|
20
|
+
>6 byte&0x09 =0x1 [V-mirror]
|
|
21
|
+
>6 byte&0x02 =0x2 [SRAM]
|
|
22
|
+
>6 byte&0x04 =0x4 [Trainer]
|
|
23
|
+
>7 byte&0x03 =0x2 [PC10]
|
|
24
|
+
>7 byte&0x03 =0x1 [VS]
|
|
25
|
+
>>7 byte&0x0C =0x8
|
|
26
|
+
# NES 2.0: VS PPU
|
|
27
|
+
>>>13 byte&0x0F =0x0 \b, RP2C03B
|
|
28
|
+
>>>13 byte&0x0F =0x1 \b, RP2C03G
|
|
29
|
+
>>>13 byte&0x0F =0x2 \b, RP2C04-0001
|
|
30
|
+
>>>13 byte&0x0F =0x3 \b, RP2C04-0002
|
|
31
|
+
>>>13 byte&0x0F =0x4 \b, RP2C04-0003
|
|
32
|
+
>>>13 byte&0x0F =0x5 \b, RP2C04-0004
|
|
33
|
+
>>>13 byte&0x0F =0x6 \b, RP2C03B
|
|
34
|
+
>>>13 byte&0x0F =0x7 \b, RP2C03C
|
|
35
|
+
>>>13 byte&0x0F =0x8 \b, RP2C05-01
|
|
36
|
+
>>>13 byte&0x0F =0x9 \b, RP2C05-02
|
|
37
|
+
>>>13 byte&0x0F =0xA \b, RP2C05-03
|
|
38
|
+
>>>13 byte&0x0F =0xB \b, RP2C05-04
|
|
39
|
+
>>>13 byte&0x0F =0xC \b, RP2C05-05
|
|
40
|
+
# TODO: VS protection hardware?
|
|
41
|
+
>>7 byte x \b]
|
|
42
|
+
# NES 2.0-specific flags.
|
|
43
|
+
>7 byte&0x0C =0x8
|
|
44
|
+
>>12 byte&0x03 =0x0 [NTSC]
|
|
45
|
+
>>12 byte&0x03 =0x1 [PAL]
|
|
46
|
+
>>12 byte&0x02 =0x2 [NTSC+PAL]
|
|
47
|
+
|
|
48
|
+
# Standard iNES ROM header.
|
|
49
|
+
0 string NES\x1A NES ROM image (iNES)
|
|
50
|
+
!:mime application/x-nes-rom
|
|
51
|
+
>0 use nes-rom-image-ines
|
|
52
|
+
|
|
53
|
+
# Wii U Virtual Console iNES ROM header.
|
|
54
|
+
0 belong 0x4E455300 NES ROM image (Wii U Virtual Console)
|
|
55
|
+
!:mime application/x-nes-rom
|
|
56
|
+
>0 use nes-rom-image-ines
|
|
57
|
+
|
|
58
|
+
#------------------------------------------------------------------------------
|
|
59
|
+
# unif: file(1) magic for UNIF-format Nintendo Entertainment System ROM images
|
|
60
|
+
# Reference: https://wiki.nesdev.com/w/index.php/UNIF
|
|
61
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
62
|
+
#
|
|
63
|
+
# NOTE: The UNIF format uses chunks instead of a fixed header,
|
|
64
|
+
# so most of the data isn't easily parseable.
|
|
65
|
+
#
|
|
66
|
+
0 string UNIF
|
|
67
|
+
>4 lelong <16 NES ROM image (UNIF v%d format)
|
|
68
|
+
!:mime application/x-nes-rom
|
|
69
|
+
|
|
70
|
+
#------------------------------------------------------------------------------
|
|
71
|
+
# fds: file(1) magic for Famicom Disk System disk images
|
|
72
|
+
# Reference: https://wiki.nesdev.com/w/index.php/Family_Computer_Disk_System#.FDS_format
|
|
73
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
74
|
+
# TODO: Check "Disk info block" and get info from that in addition to the optional header.
|
|
75
|
+
|
|
76
|
+
# Disk info block. (block 1)
|
|
77
|
+
0 name nintendo-fds-disk-info-block
|
|
78
|
+
>23 byte !1 FMC-
|
|
79
|
+
>23 byte 1 FSC-
|
|
80
|
+
>16 string x \b%.3s
|
|
81
|
+
>15 ubyte x \b, mfr %02X
|
|
82
|
+
>20 ubyte x (Rev.%02u)
|
|
83
|
+
|
|
84
|
+
# Headered version.
|
|
85
|
+
0 string FDS\x1A
|
|
86
|
+
>0x11 string *NINTENDO-HVC* Famicom Disk System disk image:
|
|
87
|
+
!:mime application/x-fds-disk
|
|
88
|
+
>>0x10 use nintendo-fds-disk-info-block
|
|
89
|
+
>4 byte 1 (%u side)
|
|
90
|
+
>4 byte !1 (%u sides)
|
|
91
|
+
|
|
92
|
+
# Unheadered version.
|
|
93
|
+
1 string *NINTENDO-HVC* Famicom Disk System disk image:
|
|
94
|
+
!:mime application/x-fds-disk
|
|
95
|
+
>0 use nintendo-fds-disk-info-block
|
|
96
|
+
|
|
97
|
+
#------------------------------------------------------------------------------
|
|
98
|
+
# tnes: file(1) magic for TNES-format Nintendo Entertainment System ROM images
|
|
99
|
+
# Used by Nintendo 3DS NES Virtual Console games.
|
|
100
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
101
|
+
#
|
|
102
|
+
0 string TNES NES ROM image (Nintendo 3DS Virtual Console)
|
|
103
|
+
!:mime application/x-nes-rom
|
|
104
|
+
>4 byte 100 \b: FDS,
|
|
105
|
+
>>0x2010 use nintendo-fds-disk-info-block
|
|
106
|
+
>4 byte !100 \b: TNES mapper %u
|
|
107
|
+
>>5 byte x \b, %ux8k PRG
|
|
108
|
+
>>6 byte x \b, %ux8k CHR
|
|
109
|
+
>>7 byte&0x08 =1 [WRAM]
|
|
110
|
+
>>8 byte&0x09 =1 [H-mirror]
|
|
111
|
+
>>8 byte&0x09 =2 [V-mirror]
|
|
112
|
+
>>8 byte&0x02 =3 [VRAM]
|
|
113
|
+
|
|
114
|
+
#------------------------------------------------------------------------------
|
|
115
|
+
# gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format
|
|
116
|
+
# Reference: http://gbdev.gg8.se/wiki/articles/The_Cartridge_Header
|
|
117
|
+
#
|
|
118
|
+
0x104 bequad 0xCEED6666CC0D000B Game Boy ROM image
|
|
119
|
+
# TODO: application/x-gameboy-color-rom for GBC.
|
|
120
|
+
!:mime application/x-gameboy-rom
|
|
121
|
+
>0x143 byte&0x80 0x80
|
|
122
|
+
>>0x134 string >\0 \b: "%.15s"
|
|
123
|
+
>0x143 byte&0x80 !0x80
|
|
124
|
+
>>0x134 string >\0 \b: "%.16s"
|
|
125
|
+
>0x14c byte x (Rev.%02u)
|
|
126
|
+
|
|
127
|
+
# Machine type. (SGB, CGB, SGB+CGB)
|
|
128
|
+
# Old licensee code 0x33 is required for SGB, but not CGB.
|
|
129
|
+
>0x14b byte 0x33
|
|
130
|
+
>>0x146 byte 0x03
|
|
131
|
+
>>>0x143 byte&0x80 0x80 [SGB+CGB]
|
|
132
|
+
>>>0x143 byte&0x80 !0x80 [SGB]
|
|
133
|
+
>>0x146 byte !0x03
|
|
134
|
+
>>>0x143 byte&0xC0 0x80 [CGB]
|
|
135
|
+
>>>0x143 byte&0xC0 0xC0 [CGB ONLY]
|
|
136
|
+
>0x14b byte !0x33
|
|
137
|
+
>>0x143 byte&0xC0 0x80 [CGB]
|
|
138
|
+
>>0x143 byte&0xC0 0xC0 [CGB ONLY]
|
|
139
|
+
|
|
140
|
+
# Mapper.
|
|
141
|
+
>0x147 byte 0x00 [ROM ONLY]
|
|
142
|
+
>0x147 byte 0x01 [MBC1]
|
|
143
|
+
>0x147 byte 0x02 [MBC1+RAM]
|
|
144
|
+
>0x147 byte 0x03 [MBC1+RAM+BATT]
|
|
145
|
+
>0x147 byte 0x05 [MBC2]
|
|
146
|
+
>0x147 byte 0x06 [MBC2+BATTERY]
|
|
147
|
+
>0x147 byte 0x08 [ROM+RAM]
|
|
148
|
+
>0x147 byte 0x09 [ROM+RAM+BATTERY]
|
|
149
|
+
>0x147 byte 0x0B [MMM01]
|
|
150
|
+
>0x147 byte 0x0C [MMM01+SRAM]
|
|
151
|
+
>0x147 byte 0x0D [MMM01+SRAM+BATT]
|
|
152
|
+
>0x147 byte 0x0F [MBC3+TIMER+BATT]
|
|
153
|
+
>0x147 byte 0x10 [MBC3+TIMER+RAM+BATT]
|
|
154
|
+
>0x147 byte 0x11 [MBC3]
|
|
155
|
+
>0x147 byte 0x12 [MBC3+RAM]
|
|
156
|
+
>0x147 byte 0x13 [MBC3+RAM+BATT]
|
|
157
|
+
>0x147 byte 0x19 [MBC5]
|
|
158
|
+
>0x147 byte 0x1A [MBC5+RAM]
|
|
159
|
+
>0x147 byte 0x1B [MBC5+RAM+BATT]
|
|
160
|
+
>0x147 byte 0x1C [MBC5+RUMBLE]
|
|
161
|
+
>0x147 byte 0x1D [MBC5+RUMBLE+SRAM]
|
|
162
|
+
>0x147 byte 0x1E [MBC5+RUMBLE+SRAM+BATT]
|
|
163
|
+
>0x147 byte 0xFC [Pocket Camera]
|
|
164
|
+
>0x147 byte 0xFD [Bandai TAMA5]
|
|
165
|
+
>0x147 byte 0xFE [Hudson HuC-3]
|
|
166
|
+
>0x147 byte 0xFF [Hudson HuC-1]
|
|
167
|
+
|
|
168
|
+
# ROM size.
|
|
169
|
+
>0x148 byte 0 \b, ROM: 256Kbit
|
|
170
|
+
>0x148 byte 1 \b, ROM: 512Kbit
|
|
171
|
+
>0x148 byte 2 \b, ROM: 1Mbit
|
|
172
|
+
>0x148 byte 3 \b, ROM: 2Mbit
|
|
173
|
+
>0x148 byte 4 \b, ROM: 4Mbit
|
|
174
|
+
>0x148 byte 5 \b, ROM: 8Mbit
|
|
175
|
+
>0x148 byte 6 \b, ROM: 16Mbit
|
|
176
|
+
>0x148 byte 7 \b, ROM: 32Mbit
|
|
177
|
+
>0x148 byte 0x52 \b, ROM: 9Mbit
|
|
178
|
+
>0x148 byte 0x53 \b, ROM: 10Mbit
|
|
179
|
+
>0x148 byte 0x54 \b, ROM: 12Mbit
|
|
180
|
+
|
|
181
|
+
# RAM size.
|
|
182
|
+
>0x149 byte 1 \b, RAM: 16Kbit
|
|
183
|
+
>0x149 byte 2 \b, RAM: 64Kbit
|
|
184
|
+
>0x149 byte 3 \b, RAM: 256Kbit
|
|
185
|
+
>0x149 byte 4 \b, RAM: 1Mbit
|
|
186
|
+
>0x149 byte 5 \b, RAM: 512Kbit
|
|
187
|
+
|
|
188
|
+
#------------------------------------------------------------------------------
|
|
189
|
+
# genesis: file(1) magic for various Sega Mega Drive / Genesis ROM image and disc formats
|
|
190
|
+
# Updated by David Korth <gerbilsoft@gerbilsoft.com>
|
|
191
|
+
# References:
|
|
192
|
+
# - https://www.retrodev.com/segacd.html
|
|
193
|
+
# - http://devster.monkeeh.com/sega/32xguide1.txt
|
|
194
|
+
#
|
|
195
|
+
|
|
196
|
+
# Common Sega Mega Drive header format.
|
|
197
|
+
# FIXME: Name fields are 48 bytes, but have spaces for padding instead of 00s.
|
|
198
|
+
0 name sega-mega-drive-header
|
|
199
|
+
# ROM title. (Use domestic if present; if not, use international.)
|
|
200
|
+
>0x120 byte >0x20
|
|
201
|
+
>>0x120 string >\0 \b: "%.16s"
|
|
202
|
+
>0x120 byte <0x21
|
|
203
|
+
>>0x150 string >\0 \b: "%.16s"
|
|
204
|
+
# Other information.
|
|
205
|
+
>0x180 string >\0 (%.14s
|
|
206
|
+
>>0x110 string >\0 \b, %.16s
|
|
207
|
+
>0x180 byte 0
|
|
208
|
+
>>0x110 string >\0 (%.16s
|
|
209
|
+
>0 byte x \b)
|
|
210
|
+
|
|
211
|
+
# TODO: Check for 32X CD?
|
|
212
|
+
# Sega Mega CD disc images: 2048-byte sectors.
|
|
213
|
+
0 string SEGADISCSYSTEM\ \ Sega Mega CD disc image
|
|
214
|
+
!:mime application/x-sega-cd-rom
|
|
215
|
+
>0 use sega-mega-drive-header
|
|
216
|
+
>0 byte x \b, 2048-byte sectors
|
|
217
|
+
0 string SEGABOOTDISC\ \ \ \ Sega Mega CD disc image
|
|
218
|
+
!:mime application/x-sega-cd-rom
|
|
219
|
+
>0 use sega-mega-drive-header
|
|
220
|
+
>0 byte x \b, 2048-byte sectors
|
|
221
|
+
# Sega Mega CD disc images: 2352-byte sectors.
|
|
222
|
+
0x10 string SEGADISCSYSTEM\ \ Sega Mega CD disc image
|
|
223
|
+
!:mime application/x-sega-cd-rom
|
|
224
|
+
>0x10 use sega-mega-drive-header
|
|
225
|
+
>0 byte x \b, 2352-byte sectors
|
|
226
|
+
0x10 string SEGABOOTDISC\ \ \ \ Sega Mega CD disc image
|
|
227
|
+
!:mime application/x-sega-cd-rom
|
|
228
|
+
>0x10 use sega-mega-drive-header
|
|
229
|
+
>0 byte x \b, 2352-byte sectors
|
|
230
|
+
|
|
231
|
+
# Sega Mega Drive: Identify the system ID.
|
|
232
|
+
0x100 string SEGA
|
|
233
|
+
>0x3C0 string MARS\ CHECK\ MODE Sega 32X ROM image
|
|
234
|
+
!:mime application/x-genesis-32x-rom
|
|
235
|
+
>>0 use sega-mega-drive-header
|
|
236
|
+
>0x104 string \ PICO Sega Pico ROM image
|
|
237
|
+
!:mime application/x-sega-pico-rom
|
|
238
|
+
>>0 use sega-mega-drive-header
|
|
239
|
+
>0x104 string TOYS\ PICO Sega Pico ROM image
|
|
240
|
+
!:mime application/x-sega-pico-rom
|
|
241
|
+
>>0 use sega-mega-drive-header
|
|
242
|
+
>0x104 string \ TOYS\ PICO Sega Pico ROM image
|
|
243
|
+
!:mime application/x-sega-pico-rom
|
|
244
|
+
>>0 use sega-mega-drive-header
|
|
245
|
+
>0x104 string \ IAC Sega Pico ROM image
|
|
246
|
+
!:mime application/x-sega-pico-rom
|
|
247
|
+
>>0 use sega-mega-drive-header
|
|
248
|
+
>0x104 string \ TERA68K Sega Teradrive (68K) ROM image
|
|
249
|
+
!:mime application/x-sega-teradrive-rom
|
|
250
|
+
>>0 use sega-mega-drive-header
|
|
251
|
+
>0x104 string \ TERA286 Sega Teradrive (286) ROM image
|
|
252
|
+
!:mime application/x-sega-teradrive-rom
|
|
253
|
+
>>0 use sega-mega-drive-header
|
|
254
|
+
>0x180 string BR Sega Mega CD Boot ROM image
|
|
255
|
+
!:mime application/x-genesis-rom
|
|
256
|
+
>>0 use sega-mega-drive-header
|
|
257
|
+
>0x104 default x Sega Mega Drive / Genesis ROM image
|
|
258
|
+
!:mime application/x-genesis-rom
|
|
259
|
+
>>0 use sega-mega-drive-header
|
|
260
|
+
|
|
261
|
+
# Sega Mega Drive: Some ROMs have "SEGA" at 0x101, not 0x100.
|
|
262
|
+
0x100 string \ SEGA Sega Mega Drive / Genesis ROM image
|
|
263
|
+
>0 use sega-mega-drive-header
|
|
264
|
+
|
|
265
|
+
# Sega Pico ROMs that don't start with "SEGA".
|
|
266
|
+
0x100 string SAMSUNG\ PICO Samsung Pico ROM image
|
|
267
|
+
!:mime application/x-sega-pico-rom
|
|
268
|
+
>0 use sega-mega-drive-header
|
|
269
|
+
0x100 string IMA\ IKUNOUJYUKU Samsung Pico ROM image
|
|
270
|
+
!:mime application/x-sega-pico-rom
|
|
271
|
+
>0 use sega-mega-drive-header
|
|
272
|
+
0x100 string IMA IKUNOJYUKU Samsung Pico ROM image
|
|
273
|
+
!:mime application/x-sega-pico-rom
|
|
274
|
+
>0 use sega-mega-drive-header
|
|
275
|
+
|
|
276
|
+
# Sega Picture Magic (modified 32X)
|
|
277
|
+
0x100 string Picture\ Magic
|
|
278
|
+
>0x3C0 string PICTURE MAGIC-01 Sega 32X ROM image
|
|
279
|
+
!:mime application/x-genesis-32x-rom
|
|
280
|
+
>>0 use sega-mega-drive-header
|
|
281
|
+
|
|
282
|
+
#------------------------------------------------------------------------------
|
|
283
|
+
# genesis: file(1) magic for the Super MegaDrive ROM dump format
|
|
284
|
+
#
|
|
285
|
+
|
|
286
|
+
# NOTE: Due to interleaving, we can't display anything
|
|
287
|
+
# other than the copier header information.
|
|
288
|
+
0 name sega-genesis-smd-header
|
|
289
|
+
>0 byte x %dx16k blocks
|
|
290
|
+
>2 byte 0 \b, last in series or standalone
|
|
291
|
+
>2 byte >0 \b, split ROM
|
|
292
|
+
|
|
293
|
+
# "Sega Genesis" header.
|
|
294
|
+
0x280 string EAGN
|
|
295
|
+
>8 beshort 0xAABB Sega Mega Drive / Genesis ROM image (SMD format):
|
|
296
|
+
!:mime application/x-genesis-rom
|
|
297
|
+
>>0 use sega-genesis-smd-header
|
|
298
|
+
|
|
299
|
+
# "Sega Mega Drive" header.
|
|
300
|
+
0x280 string EAMG
|
|
301
|
+
>8 beshort 0xAABB Sega Mega Drive / Genesis ROM image (SMD format):
|
|
302
|
+
!:mime application/x-genesis-rom
|
|
303
|
+
>>0 use sega-genesis-smd-header
|
|
304
|
+
|
|
305
|
+
#------------------------------------------------------------------------------
|
|
306
|
+
# smsgg: file(1) magic for Sega Master System and Game Gear ROM images
|
|
307
|
+
# Detects all Game Gear and export Sega Master System ROM images,
|
|
308
|
+
# and some Japanese Sega Master System ROM images.
|
|
309
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
310
|
+
# Reference: https://www.smspower.org/Development/ROMHeader
|
|
311
|
+
#
|
|
312
|
+
|
|
313
|
+
# General SMS header rule.
|
|
314
|
+
# The SMS boot ROM checks the header at three locations.
|
|
315
|
+
0 name sega-master-system-rom-header
|
|
316
|
+
# Machine type.
|
|
317
|
+
>0x0F byte&0xF0 0x30 Sega Master System
|
|
318
|
+
!:mime application/x-sms-rom
|
|
319
|
+
>0x0F byte&0xF0 0x40 Sega Master System
|
|
320
|
+
!:mime application/x-sms-rom
|
|
321
|
+
>0x0F byte&0xF0 0x50 Sega Game Gear
|
|
322
|
+
!:mime application/x-gamegear-rom
|
|
323
|
+
>0x0F byte&0xF0 0x60 Sega Game Gear
|
|
324
|
+
!:mime application/x-gamegear-rom
|
|
325
|
+
>0x0F byte&0xF0 0x70 Sega Game Gear
|
|
326
|
+
!:mime application/x-gamegear-rom
|
|
327
|
+
>0x0F default x Sega Master System / Game Gear
|
|
328
|
+
!:mime application/x-sms-rom
|
|
329
|
+
>0 byte x ROM image:
|
|
330
|
+
# Product code.
|
|
331
|
+
>0x0E byte&0xF0 0x10 1
|
|
332
|
+
>0x0E byte&0xF0 0x20 2
|
|
333
|
+
>0x0E byte&0xF0 0x30 3
|
|
334
|
+
>0x0E byte&0xF0 0x40 4
|
|
335
|
+
>0x0E byte&0xF0 0x50 5
|
|
336
|
+
>0x0E byte&0xF0 0x60 6
|
|
337
|
+
>0x0E byte&0xF0 0x70 7
|
|
338
|
+
>0x0E byte&0xF0 0x80 8
|
|
339
|
+
>0x0E byte&0xF0 0x90 9
|
|
340
|
+
>0x0E byte&0xF0 0xA0 10
|
|
341
|
+
>0x0E byte&0xF0 0xB0 11
|
|
342
|
+
>0x0E byte&0xF0 0xC0 12
|
|
343
|
+
>0x0E byte&0xF0 0xD0 13
|
|
344
|
+
>0x0E byte&0xF0 0xE0 14
|
|
345
|
+
>0x0E byte&0xF0 0xF0 15
|
|
346
|
+
# If the product code is 5 digits, we'll need to backspace here.
|
|
347
|
+
>0x0E byte&0xF0 !0
|
|
348
|
+
>>0x0C leshort x \b%04x
|
|
349
|
+
>0x0E byte&0xF0 0
|
|
350
|
+
>>0x0C leshort x %04x
|
|
351
|
+
# Revision.
|
|
352
|
+
>0x0E byte&0x0F x (Rev.%02d)
|
|
353
|
+
# ROM size. (Used for the boot ROM checksum routine.)
|
|
354
|
+
>0x0F byte&0x0F 0x0A (8 KB)
|
|
355
|
+
>0x0F byte&0x0F 0x0B (16 KB)
|
|
356
|
+
>0x0F byte&0x0F 0x0C (32 KB)
|
|
357
|
+
>0x0F byte&0x0F 0x0D (48 KB)
|
|
358
|
+
>0x0F byte&0x0F 0x0E (64 KB)
|
|
359
|
+
>0x0F byte&0x0F 0x0F (128 KB)
|
|
360
|
+
>0x0F byte&0x0F 0x00 (256 KB)
|
|
361
|
+
>0x0F byte&0x0F 0x01 (512 KB)
|
|
362
|
+
>0x0F byte&0x0F 0x02 (1 MB)
|
|
363
|
+
|
|
364
|
+
# SMS/GG header locations.
|
|
365
|
+
0x7FF0 string TMR\ SEGA
|
|
366
|
+
>0x7FF0 use sega-master-system-rom-header
|
|
367
|
+
0x3FF0 string TMR\ SEGA
|
|
368
|
+
>0x3FF0 use sega-master-system-rom-header
|
|
369
|
+
0x1FF0 string TMR\ SEGA
|
|
370
|
+
>0x1FF0 use sega-master-system-rom-header
|
|
371
|
+
|
|
372
|
+
#------------------------------------------------------------------------------
|
|
373
|
+
# saturn: file(1) magic for the Sega Saturn disc image format.
|
|
374
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
375
|
+
#
|
|
376
|
+
|
|
377
|
+
# Common Sega Saturn disc header format.
|
|
378
|
+
# NOTE: Title is 112 bytes, but we're only showing 32 due to space padding.
|
|
379
|
+
# TODO: Release date, device information, region code, others?
|
|
380
|
+
0 name sega-saturn-disc-header
|
|
381
|
+
>0x60 string >\0 \b: "%.32s"
|
|
382
|
+
>0x20 string >\0 (%.10s
|
|
383
|
+
>>0x2A string >\0 \b, %.6s)
|
|
384
|
+
>>0x2A byte 0 \b)
|
|
385
|
+
|
|
386
|
+
# 2048-byte sector version.
|
|
387
|
+
0 string SEGA\ SEGASATURN\ Sega Saturn disc image
|
|
388
|
+
!:mime application/x-saturn-rom
|
|
389
|
+
>0 use sega-saturn-disc-header
|
|
390
|
+
>0 byte x (2048-byte sectors)
|
|
391
|
+
# 2352-byte sector version.
|
|
392
|
+
0x10 string SEGA\ SEGASATURN\ Sega Saturn disc image
|
|
393
|
+
!:mime application/x-saturn-rom
|
|
394
|
+
>0x10 use sega-saturn-disc-header
|
|
395
|
+
>0 byte x (2352-byte sectors)
|
|
396
|
+
|
|
397
|
+
#------------------------------------------------------------------------------
|
|
398
|
+
# dreamcast: file(1) magic for the Sega Dreamcast disc image format.
|
|
399
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
400
|
+
# Reference: https://mc.pp.se/dc/ip0000.bin.html
|
|
401
|
+
#
|
|
402
|
+
|
|
403
|
+
# Common Sega Dreamcast disc header format.
|
|
404
|
+
# NOTE: Title is 128 bytes, but we're only showing 32 due to space padding.
|
|
405
|
+
# TODO: Release date, device information, region code, others?
|
|
406
|
+
0 name sega-dreamcast-disc-header
|
|
407
|
+
>0x80 string >\0 \b: "%.32s"
|
|
408
|
+
>0x40 string >\0 (%.10s
|
|
409
|
+
>>0x4A string >\0 \b, %.6s)
|
|
410
|
+
>>0x4A byte 0 \b)
|
|
411
|
+
|
|
412
|
+
# 2048-byte sector version.
|
|
413
|
+
0 string SEGA\ SEGAKATANA\ Sega Dreamcast disc image
|
|
414
|
+
!:mime application/x-dc-rom
|
|
415
|
+
>0 use sega-dreamcast-disc-header
|
|
416
|
+
>0 byte x (2048-byte sectors)
|
|
417
|
+
# 2352-byte sector version.
|
|
418
|
+
0x10 string SEGA\ SEGAKATANA\ Sega Dreamcast disc image
|
|
419
|
+
!:mime application/x-dc-rom
|
|
420
|
+
>0x10 use sega-dreamcast-disc-header
|
|
421
|
+
>0 byte x (2352-byte sectors)
|
|
422
|
+
|
|
423
|
+
#------------------------------------------------------------------------------
|
|
424
|
+
# dreamcast: file(1) uncertain magic for the Sega Dreamcast VMU image format
|
|
425
|
+
#
|
|
426
|
+
0 belong 0x21068028 Sega Dreamcast VMU game image
|
|
427
|
+
0 string LCDi Dream Animator file
|
|
428
|
+
|
|
429
|
+
#------------------------------------------------------------------------------
|
|
430
|
+
# z64: file(1) magic for the Z64 format N64 ROM dumps
|
|
431
|
+
# Reference: http://forum.pj64-emu.com/showthread.php?t=2239
|
|
432
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
433
|
+
#
|
|
434
|
+
0 bequad 0x803712400000000F Nintendo 64 ROM image
|
|
435
|
+
!:mime application/x-n64-rom
|
|
436
|
+
>0x20 string >\0 \b: "%.20s"
|
|
437
|
+
>0x3B string x (%.4s
|
|
438
|
+
>0x3F byte x \b, Rev.%02u)
|
|
439
|
+
|
|
440
|
+
#------------------------------------------------------------------------------
|
|
441
|
+
# v64: file(1) magic for the V64 format N64 ROM dumps
|
|
442
|
+
# Same as z64 format, but with 16-bit byteswapping.
|
|
443
|
+
#
|
|
444
|
+
0 bequad 0x3780401200000F00 Nintendo 64 ROM image (V64)
|
|
445
|
+
!:mime application/x-n64-rom
|
|
446
|
+
|
|
447
|
+
#------------------------------------------------------------------------------
|
|
448
|
+
# n64-swap2: file(1) magic for the swap2 format N64 ROM dumps
|
|
449
|
+
# Same as z64 format, but with swapped 16-bit words.
|
|
450
|
+
#
|
|
451
|
+
0 bequad 0x12408037000F0000 Nintendo 64 ROM image (wordswapped)
|
|
452
|
+
!:mime application/x-n64-rom
|
|
453
|
+
|
|
454
|
+
#------------------------------------------------------------------------------
|
|
455
|
+
# n64-le32: file(1) magic for the 32-bit byteswapped format N64 ROM dumps
|
|
456
|
+
# Same as z64 format, but with 32-bit byteswapping.
|
|
457
|
+
#
|
|
458
|
+
0 bequad 0x401237800F000000 Nintendo 64 ROM image (32-bit byteswapped)
|
|
459
|
+
!:mime application/x-n64-rom
|
|
460
|
+
|
|
461
|
+
#------------------------------------------------------------------------------
|
|
462
|
+
# gba: file(1) magic for the Nintendo Game Boy Advance raw ROM format
|
|
463
|
+
# Reference: https://problemkaputt.de/gbatek.htm#gbacartridgeheader
|
|
464
|
+
#
|
|
465
|
+
# Original version from: "Nelson A. de Oliveira" <naoliv@gmail.com>
|
|
466
|
+
# Updated version from: David Korth <gerbilsoft@gerbilsoft.com>
|
|
467
|
+
#
|
|
468
|
+
4 bequad 0x24FFAE51699AA221 Game Boy Advance ROM image
|
|
469
|
+
!:mime application/x-gba-rom
|
|
470
|
+
>0xA0 string >\0 \b: "%.12s"
|
|
471
|
+
>0xAC string x (%.6s
|
|
472
|
+
>0xBC byte x \b, Rev.%02u)
|
|
473
|
+
|
|
474
|
+
#------------------------------------------------------------------------------
|
|
475
|
+
# nds: file(1) magic for the Nintendo DS(i) raw ROM format
|
|
476
|
+
# Reference: https://problemkaputt.de/gbatek.htm#dscartridgeheader
|
|
477
|
+
#
|
|
478
|
+
# Original version from: "Nelson A. de Oliveira" <naoliv@gmail.com>
|
|
479
|
+
# Updated version from: David Korth <gerbilsoft@gerbilsoft.com>
|
|
480
|
+
#
|
|
481
|
+
0xC0 bequad 0x24FFAE51699AA221 Nintendo DS ROM image
|
|
482
|
+
!:mime application/x-nintendo-ds-rom
|
|
483
|
+
>0x00 string >\0 \b: "%.12s"
|
|
484
|
+
>0x0C string x (%.6s
|
|
485
|
+
>0x1E byte x \b, Rev.%02u)
|
|
486
|
+
>0x12 byte 2 (DSi enhanced)
|
|
487
|
+
>0x12 byte 3 (DSi only)
|
|
488
|
+
# Secure Area check.
|
|
489
|
+
>0x20 lelong <0x4000 (homebrew)
|
|
490
|
+
>0x20 lelong >0x3FFF
|
|
491
|
+
>>0x4000 lequad 0x0000000000000000 (multiboot)
|
|
492
|
+
>>0x4000 lequad !0x0000000000000000
|
|
493
|
+
>>>0x4000 lequad 0xE7FFDEFFE7FFDEFF (decrypted)
|
|
494
|
+
>>>0x4000 lequad !0xE7FFDEFFE7FFDEFF
|
|
495
|
+
>>>>0x1000 lequad 0x0000000000000000 (encrypted)
|
|
496
|
+
>>>>0x1000 lequad !0x0000000000000000 (mask ROM)
|
|
497
|
+
|
|
498
|
+
#------------------------------------------------------------------------------
|
|
499
|
+
# nds_passme: file(1) magic for Nintendo DS ROM images for GBA cartridge boot.
|
|
500
|
+
# This is also used for loading .nds files using the MSET exploit on 3DS.
|
|
501
|
+
# Reference: https://github.com/devkitPro/ndstool/blob/master/source/ndscreate.cpp
|
|
502
|
+
0xC0 bequad 0xC8604FE201708FE2 Nintendo DS Slot-2 ROM image (PassMe)
|
|
503
|
+
!:mime application/x-nintendo-ds-rom
|
|
504
|
+
|
|
505
|
+
#------------------------------------------------------------------------------
|
|
506
|
+
# ngp: file(1) magic for the Neo Geo Pocket (Color) raw ROM format.
|
|
507
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
508
|
+
# References:
|
|
509
|
+
# - https://neogpc.googlecode.com/svn-history/r10/trunk/src/core/neogpc.cpp
|
|
510
|
+
# - https://www.devrs.com/ngp/files/ngpctech.txt
|
|
511
|
+
#
|
|
512
|
+
0x0A string BY\ SNK\ CORPORATION Neo Geo Pocket
|
|
513
|
+
!:mime application/x-neo-geo-pocket-rom
|
|
514
|
+
>0x23 byte 0x10 Color
|
|
515
|
+
>0 byte x ROM image
|
|
516
|
+
>0x24 string >\0 \b: "%.12s"
|
|
517
|
+
>0x21 uleshort x \b, NEOP%04X
|
|
518
|
+
>0x1F ubyte 0xFF (debug mode enabled)
|
|
519
|
+
|
|
520
|
+
#------------------------------------------------------------------------------
|
|
521
|
+
# msx: file(1) magic for MSX game cartridge dumps
|
|
522
|
+
# Too simple - MPi
|
|
523
|
+
#0 beshort 0x4142 MSX game cartridge dump
|
|
524
|
+
|
|
525
|
+
#------------------------------------------------------------------------------
|
|
526
|
+
# Sony Playstation executables (Adam Sjoegren <asjo@diku.dk>) :
|
|
527
|
+
0 string PS-X\ EXE Sony Playstation executable
|
|
528
|
+
>16 lelong x PC=%#08x,
|
|
529
|
+
>20 lelong !0 GP=%#08x,
|
|
530
|
+
>24 lelong !0 .text=[%#08x,
|
|
531
|
+
>>28 lelong x \b%#x],
|
|
532
|
+
>32 lelong !0 .data=[%#08x,
|
|
533
|
+
>>36 lelong x \b%#x],
|
|
534
|
+
>40 lelong !0 .bss=[%#08x,
|
|
535
|
+
>>44 lelong x \b%#x],
|
|
536
|
+
>48 lelong !0 Stack=%#08x,
|
|
537
|
+
>48 lelong =0 No Stack!,
|
|
538
|
+
>52 lelong !0 StackSize=%#x,
|
|
539
|
+
#>76 string >\0 (%s)
|
|
540
|
+
# Area:
|
|
541
|
+
>113 string x (%s)
|
|
542
|
+
|
|
543
|
+
# CPE executables
|
|
544
|
+
0 string CPE CPE executable
|
|
545
|
+
>3 byte x (version %d)
|
|
546
|
+
|
|
547
|
+
# Sony PlayStation archive (PSARC)
|
|
548
|
+
# From: Alexandre Iooss <erdnaxe@crans.org>
|
|
549
|
+
# URL: https://www.psdevwiki.com/ps3/PlayStation_archive_(PSARC)
|
|
550
|
+
0 string PSAR Sony PlayStation Archive
|
|
551
|
+
!:ext psarc
|
|
552
|
+
>4 ubeshort x \b, version %d.
|
|
553
|
+
>6 ubeshort x \b%d
|
|
554
|
+
>8 string zlib \b, zlib compression
|
|
555
|
+
>8 string lzma \b, LZMA compression
|
|
556
|
+
>28 ubeshort&2 0 \b, relative paths
|
|
557
|
+
>28 ubeshort&2 2 \b, absolute paths
|
|
558
|
+
>28 ubeshort&1 1 \b, ignore case
|
|
559
|
+
|
|
560
|
+
#------------------------------------------------------------------------------
|
|
561
|
+
# Microsoft Xbox executables .xbe (Esa Hyytia <ehyytia@cc.hut.fi>)
|
|
562
|
+
0 string XBEH Microsoft Xbox executable
|
|
563
|
+
!:mime audio/x-xbox-executable
|
|
564
|
+
!:ext xbe
|
|
565
|
+
# expect base address of 0x10000
|
|
566
|
+
>0x0104 ulelong =0x10000
|
|
567
|
+
>>(0x0118.l-0x0FFF4) lestring16 x \b: "%.40s"
|
|
568
|
+
>>(0x0118.l-0x0FFF5) byte x (%c
|
|
569
|
+
>>(0x0118.l-0x0FFF6) byte x \b%c-
|
|
570
|
+
>>(0x0118.l-0x0FFF8) uleshort x \b%03u)
|
|
571
|
+
>>(0x0118.l-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions
|
|
572
|
+
>>(0x0118.l-0x0FF60) ulelong&0x80000007 !0x80000007
|
|
573
|
+
>>>(0x0118.l-0x0FF60) ulelong >0 (regions:
|
|
574
|
+
>>>>(0x0118.l-0x0FF60) ulelong &0x00000001 NA
|
|
575
|
+
>>>>(0x0118.l-0x0FF60) ulelong &0x00000002 Japan
|
|
576
|
+
>>>>(0x0118.l-0x0FF60) ulelong &0x00000004 Rest_of_World
|
|
577
|
+
>>>>(0x0118.l-0x0FF60) ulelong &0x80000000 Manufacturer
|
|
578
|
+
>>>(0x0118.l-0x0FF60) ulelong >0 \b)
|
|
579
|
+
# probabilistic checks whether signed or not
|
|
580
|
+
>0x0004 ulelong =0x0
|
|
581
|
+
>>&2 ulelong =0x0
|
|
582
|
+
>>>&2 ulelong =0x0 \b, not signed
|
|
583
|
+
>0x0004 ulelong >0
|
|
584
|
+
>>&2 ulelong >0
|
|
585
|
+
>>>&2 ulelong >0 \b, signed
|
|
586
|
+
|
|
587
|
+
# --------------------------------
|
|
588
|
+
# Microsoft Xbox data file formats
|
|
589
|
+
0 string XIP0 XIP, Microsoft Xbox data
|
|
590
|
+
0 string XTF0 XTF, Microsoft Xbox data
|
|
591
|
+
|
|
592
|
+
#------------------------------------------------------------------------------
|
|
593
|
+
# Microsoft Xbox 360 executables (.xex)
|
|
594
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
595
|
+
# References:
|
|
596
|
+
# - https://free60project.github.io/wiki/XEX.html
|
|
597
|
+
# - https://github.com/xenia-project/xenia/blob/HEAD/src/xenia/kernel/util/xex2_info.h
|
|
598
|
+
|
|
599
|
+
# Title ID (part of Execution ID section)
|
|
600
|
+
0 name xbox-360-xex-execution-id
|
|
601
|
+
>(0.L+0xC) byte x (%c
|
|
602
|
+
>(0.L+0xD) byte x \b%c
|
|
603
|
+
>(0.L+0xE) beshort x \b-%04u, media ID:
|
|
604
|
+
>(0.L) belong x %08X)
|
|
605
|
+
|
|
606
|
+
# Region code (part of Security Info)
|
|
607
|
+
0 name xbox-360-xex-region-code
|
|
608
|
+
>0 ubelong 0xFFFFFFFF \b, all regions
|
|
609
|
+
>0 ubelong !0xFFFFFFFF
|
|
610
|
+
>>0 ubelong >0 (regions:
|
|
611
|
+
>>0 ubelong&0x000000FF 0x000000FF USA
|
|
612
|
+
>>0 ubelong&0x00000100 0x00000100 Japan
|
|
613
|
+
>>0 ubelong&0x00000200 0x00000200 China
|
|
614
|
+
>>0 ubelong&0x0000FC00 0x0000FC00 Asia
|
|
615
|
+
>>0 ubelong&0x00FF0000 0x00FF0000 PAL
|
|
616
|
+
>>0 ubelong&0x00FF0000 0x00FE0000 PAL [except AU/NZ]
|
|
617
|
+
>>0 ubelong&0x00FF0000 0x00010000 AU/NZ
|
|
618
|
+
>>0 ubelong&0xFF000000 0xFF000000 Other
|
|
619
|
+
>>0 ubelong >0 \b)
|
|
620
|
+
|
|
621
|
+
0 string XEX2 Microsoft Xbox 360 executable
|
|
622
|
+
!:mime audio/x-xbox360-executable
|
|
623
|
+
!:ext xex
|
|
624
|
+
>0x18 search/0x100 \x00\x04\x00\x06
|
|
625
|
+
>>&0 use xbox-360-xex-execution-id
|
|
626
|
+
>(0x010.L+0x178) use xbox-360-xex-region-code
|
|
627
|
+
|
|
628
|
+
0 string XEX1 Microsoft Xbox 360 executable (XEX1)
|
|
629
|
+
!:mime audio/x-xbox360-executable
|
|
630
|
+
!:ext xex
|
|
631
|
+
>0x18 search/0x100 \x00\x04\x00\x06
|
|
632
|
+
>>&0 use xbox-360-xex-execution-id
|
|
633
|
+
>(0x010.L+0x154) use xbox-360-xex-region-code
|
|
634
|
+
|
|
635
|
+
#------------------------------------------------------------------------------
|
|
636
|
+
# Microsoft Xbox 360 packages
|
|
637
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
638
|
+
# References:
|
|
639
|
+
# - https://free60project.github.io/wiki/STFS.html
|
|
640
|
+
# - https://github.com/xenia-project/xenia/blob/HEAD/src/xenia/kernel/util/xex2_info.h
|
|
641
|
+
|
|
642
|
+
# TODO: More information for console-signed packages.
|
|
643
|
+
|
|
644
|
+
0 name xbox-360-package
|
|
645
|
+
>0x360 byte x (%c
|
|
646
|
+
>0x361 byte x \b%c
|
|
647
|
+
>0x362 beshort x \b-%04u, media ID:
|
|
648
|
+
>0x354 belong x %08X)
|
|
649
|
+
>0x344 belong x \b, content type:
|
|
650
|
+
>>0x344 belong 0x1 Saved Game
|
|
651
|
+
>>0x344 belong 0x2 Marketplace Content
|
|
652
|
+
>>0x344 belong 0x3 Publisher
|
|
653
|
+
>>0x344 belong 0x1000 Xbox 360 Title
|
|
654
|
+
>>0x344 belong 0x2000 IPTV Pause Buffer
|
|
655
|
+
>>0x344 belong 0x4000 Installed Game
|
|
656
|
+
>>0x344 belong 0x5000 Original Xbox Game
|
|
657
|
+
>>0x344 belong 0x9000 Avatar Item
|
|
658
|
+
>>0x344 belong 0x10000 Profile
|
|
659
|
+
>>0x344 belong 0x20000 Gamer Picture
|
|
660
|
+
>>0x344 belong 0x30000 Theme
|
|
661
|
+
>>0x344 belong 0x40000 Cache File
|
|
662
|
+
>>0x344 belong 0x50000 Storage Download
|
|
663
|
+
>>0x344 belong 0x60000 Xbox Saved Game
|
|
664
|
+
>>0x344 belong 0x70000 Xbox Download
|
|
665
|
+
>>0x344 belong 0x80000 Game Demo
|
|
666
|
+
>>0x344 belong 0x90000 Video
|
|
667
|
+
>>0x344 belong 0xA0000 Game
|
|
668
|
+
>>0x344 belong 0xB0000 Installer
|
|
669
|
+
>>0x344 belong 0xC0000 Game Trailer
|
|
670
|
+
>>0x344 belong 0xD0000 Arcade Title
|
|
671
|
+
>>0x344 belong 0xE0000 XNA
|
|
672
|
+
>>0x344 belong 0xF0000 License Store
|
|
673
|
+
>>0x344 belong 0x100000 Movie
|
|
674
|
+
>>0x344 belong 0x200000 TV
|
|
675
|
+
>>0x344 belong 0x300000 Music Video
|
|
676
|
+
>>0x344 belong 0x400000 Game Video
|
|
677
|
+
>>0x344 belong 0x500000 Podcast Video
|
|
678
|
+
>>0x344 belong 0x600000 Viral Video
|
|
679
|
+
>>0x344 belong 0x2000000 Community Game
|
|
680
|
+
|
|
681
|
+
0 string CON\x20 Microsoft Xbox 360 package (console-signed)
|
|
682
|
+
>0 use xbox-360-package
|
|
683
|
+
0 string PIRS
|
|
684
|
+
>0 belong 0 Microsoft Xbox 360 package (non-Xbox Live)
|
|
685
|
+
>>0 use xbox-360-package
|
|
686
|
+
0 string LIVE
|
|
687
|
+
>0x104 belong 0 Microsoft Xbox 360 package (Xbox Live)
|
|
688
|
+
>>0 use xbox-360-package
|
|
689
|
+
|
|
690
|
+
# Atari Lynx cartridge dump (EXE/BLL header)
|
|
691
|
+
# From: "Stefan A. Haubenthal" <polluks@sdf.lonestar.org>
|
|
692
|
+
# Reference:
|
|
693
|
+
# https://raw.githubusercontent.com/cc65/cc65/master/libsrc/lynx/exehdr.s
|
|
694
|
+
# Double-check that the image type matches too, 0x8008 conflicts with
|
|
695
|
+
# 8 character OMF-86 object file headers.
|
|
696
|
+
0 beshort 0x8008
|
|
697
|
+
>6 string BS93 Lynx homebrew cartridge
|
|
698
|
+
!:mime application/x-atari-lynx-rom
|
|
699
|
+
>>2 beshort x \b, RAM start $%04x
|
|
700
|
+
0 string LYNX Lynx cartridge
|
|
701
|
+
!:mime application/x-atari-lynx-rom
|
|
702
|
+
>4 leshort/4 >0 \b, bank 0 %dk
|
|
703
|
+
>6 leshort/4 >0 \b, bank 1 %dk
|
|
704
|
+
>10 string >\0 \b, "%.32s"
|
|
705
|
+
>42 string >\0 \b, "%.16s"
|
|
706
|
+
|
|
707
|
+
# Opera file system that is used on the 3DO console
|
|
708
|
+
# From: Serge van den Boom <svdb@stack.nl>
|
|
709
|
+
0 string \x01ZZZZZ\x01 3DO "Opera" file system
|
|
710
|
+
|
|
711
|
+
# From: Alex Myczko <alex@aiei.ch>
|
|
712
|
+
# From: David Pflug <david@pflug.email>
|
|
713
|
+
# is the offset 12 or the offset 16 correct?
|
|
714
|
+
# GBS (Game Boy Sound) magic
|
|
715
|
+
# ftp://ftp.modland.com/pub/documents/format_documentation/\
|
|
716
|
+
# Gameboy%20Sound%20System%20(.gbs).txt
|
|
717
|
+
0 string GBS Nintendo Gameboy Music/Audio Data
|
|
718
|
+
#12 string GameBoy\ Music\ Module Nintendo Gameboy Music Module
|
|
719
|
+
>16 string >\0 ("%.32s" by
|
|
720
|
+
>48 string >\0 %.32s, copyright
|
|
721
|
+
>80 string >\0 %.32s),
|
|
722
|
+
>3 byte x version %u,
|
|
723
|
+
>4 byte x %u tracks
|
|
724
|
+
|
|
725
|
+
# IPS Patch Files from: From: Thomas Klausner <tk@giga.or.at>
|
|
726
|
+
# see https://zerosoft.zophar.net/ips.php
|
|
727
|
+
0 string PATCH IPS patch file
|
|
728
|
+
!:ext ips
|
|
729
|
+
|
|
730
|
+
# BPS Patch Files - from: David Korth <gerbilsoft@gerbilsoft.com>
|
|
731
|
+
# Reference: https://www.romhacking.net/documents/746/
|
|
732
|
+
0 string BPS1 BPS patch file
|
|
733
|
+
!:ext bps
|
|
734
|
+
|
|
735
|
+
# APS Patch Files - from: David Korth <gerbilsoft@gerbilsoft.com>
|
|
736
|
+
# Reference: https://github.com/btimofeev/UniPatcher/wiki/APS-(N64)
|
|
737
|
+
0 string APS10 APS patch file
|
|
738
|
+
!:ext aps
|
|
739
|
+
>5 byte 0 \b, simple patch
|
|
740
|
+
>5 byte 1 \b, N64-specific patch for
|
|
741
|
+
>>58 byte x N%c
|
|
742
|
+
>>59 byte x \b%c
|
|
743
|
+
>>60 byte x \b%c
|
|
744
|
+
>7 byte !0x20
|
|
745
|
+
# FIXME: /T specifier isn't working with a fixed-length string.
|
|
746
|
+
>>7 string x \b: "%.50s"
|
|
747
|
+
|
|
748
|
+
# UPS Patch Files - from: David Korth <gerbilsoft@gerbilsoft.com>
|
|
749
|
+
# Reference: http://fileformats.archiveteam.org/wiki/UPS_(binary_patch_format)
|
|
750
|
+
0 string UPS1 UPS patch file
|
|
751
|
+
!:ext ups
|
|
752
|
+
|
|
753
|
+
# Playstations Patch Files from: From: Thomas Klausner <tk@giga.or.at>
|
|
754
|
+
0 string PPF30 Playstation Patch File version 3.0
|
|
755
|
+
>5 byte 0 \b, PPF 1.0 patch
|
|
756
|
+
>5 byte 1 \b, PPF 2.0 patch
|
|
757
|
+
>5 byte 2 \b, PPF 3.0 patch
|
|
758
|
+
>>56 byte 0 \b, Imagetype BIN (any)
|
|
759
|
+
>>56 byte 1 \b, Imagetype GI (PrimoDVD)
|
|
760
|
+
>>57 byte 0 \b, Blockcheck disabled
|
|
761
|
+
>>57 byte 1 \b, Blockcheck enabled
|
|
762
|
+
>>58 byte 0 \b, Undo data not available
|
|
763
|
+
>>58 byte 1 \b, Undo data available
|
|
764
|
+
>6 string x \b, description: %s
|
|
765
|
+
|
|
766
|
+
0 string PPF20 Playstation Patch File version 2.0
|
|
767
|
+
>5 byte 0 \b, PPF 1.0 patch
|
|
768
|
+
>5 byte 1 \b, PPF 2.0 patch
|
|
769
|
+
>>56 lelong >0 \b, size of file to patch %d
|
|
770
|
+
>6 string x \b, description: %s
|
|
771
|
+
|
|
772
|
+
0 string PPF10 Playstation Patch File version 1.0
|
|
773
|
+
>5 byte 0 \b, Simple Encoding
|
|
774
|
+
>6 string x \b, description: %s
|
|
775
|
+
|
|
776
|
+
# Compressed ISO disc image (used mostly by PSP, PS2 and MegaDrive)
|
|
777
|
+
# From: Alexandre Iooss <erdnaxe@crans.org>
|
|
778
|
+
# URL: https://en.wikipedia.org/wiki/.CSO
|
|
779
|
+
# NOTE: This is NOT the same as Compact ISO or GameCube/Wii disc image,
|
|
780
|
+
# though it has the same magic number.
|
|
781
|
+
0 string CISO
|
|
782
|
+
# Match CISO version 1 with ISO-9660 sector size
|
|
783
|
+
>20 ubyte <2
|
|
784
|
+
>>16 ulelong =2048 CSO v1 disk image
|
|
785
|
+
!:mime application/x-compressed-iso
|
|
786
|
+
!:ext ciso/cso
|
|
787
|
+
>>>8 ulequad x \b, original size %llu bytes
|
|
788
|
+
>>>16 ulelong x \b, datablock size %u bytes
|
|
789
|
+
# Match CISO version 2
|
|
790
|
+
>20 ubyte =2
|
|
791
|
+
>>22 uleshort =0
|
|
792
|
+
>>>4 ulelong =24 CSO v2 disk image
|
|
793
|
+
!:mime application/x-compressed-iso
|
|
794
|
+
!:ext ciso/cso
|
|
795
|
+
>>>>8 ulequad x \b, original size %llu bytes
|
|
796
|
+
>>>>16 ulelong x \b, datablock size %u bytes
|
|
797
|
+
|
|
798
|
+
# From: Daniel Dawson <ddawson@icehouse.net>
|
|
799
|
+
# SNES9x .smv "movie" file format.
|
|
800
|
+
0 string SMV\x1A SNES9x input recording
|
|
801
|
+
>0x4 lelong x \b, version %d
|
|
802
|
+
# version 4 is latest so far
|
|
803
|
+
>0x4 lelong <5
|
|
804
|
+
>>0x8 ledate x \b, recorded at %s
|
|
805
|
+
>>0xc lelong >0 \b, rerecorded %d times
|
|
806
|
+
>>0x10 lelong x \b, %d frames long
|
|
807
|
+
>>0x14 byte >0 \b, data for controller(s):
|
|
808
|
+
>>>0x14 byte &0x1 #1
|
|
809
|
+
>>>0x14 byte &0x2 #2
|
|
810
|
+
>>>0x14 byte &0x4 #3
|
|
811
|
+
>>>0x14 byte &0x8 #4
|
|
812
|
+
>>>0x14 byte &0x10 #5
|
|
813
|
+
>>0x15 byte ^0x1 \b, begins from snapshot
|
|
814
|
+
>>0x15 byte &0x1 \b, begins from reset
|
|
815
|
+
>>0x15 byte ^0x2 \b, NTSC standard
|
|
816
|
+
>>0x15 byte &0x2 \b, PAL standard
|
|
817
|
+
>>0x17 byte &0x1 \b, settings:
|
|
818
|
+
# WIP1Timing not used as of version 4
|
|
819
|
+
>>>0x4 lelong <4
|
|
820
|
+
>>>>0x17 byte &0x2 WIP1Timing
|
|
821
|
+
>>>0x17 byte &0x4 Left+Right
|
|
822
|
+
>>>0x17 byte &0x8 VolumeEnvX
|
|
823
|
+
>>>0x17 byte &0x10 FakeMute
|
|
824
|
+
>>>0x17 byte &0x20 SyncSound
|
|
825
|
+
# New flag as of version 4
|
|
826
|
+
>>>0x4 lelong >3
|
|
827
|
+
>>>>0x17 byte &0x80 NoCPUShutdown
|
|
828
|
+
>>0x4 lelong <4
|
|
829
|
+
>>>0x18 lelong >0x23
|
|
830
|
+
>>>>0x20 leshort !0
|
|
831
|
+
>>>>>0x20 lestring16 x \b, metadata: "%s"
|
|
832
|
+
>>0x4 lelong >3
|
|
833
|
+
>>>0x24 byte >0 \b, port 1:
|
|
834
|
+
>>>>0x24 byte 1 joypad
|
|
835
|
+
>>>>0x24 byte 2 mouse
|
|
836
|
+
>>>>0x24 byte 3 SuperScope
|
|
837
|
+
>>>>0x24 byte 4 Justifier
|
|
838
|
+
>>>>0x24 byte 5 multitap
|
|
839
|
+
>>>0x24 byte >0 \b, port 2:
|
|
840
|
+
>>>>0x25 byte 1 joypad
|
|
841
|
+
>>>>0x25 byte 2 mouse
|
|
842
|
+
>>>>0x25 byte 3 SuperScope
|
|
843
|
+
>>>>0x25 byte 4 Justifier
|
|
844
|
+
>>>>0x25 byte 5 multitap
|
|
845
|
+
>>>0x18 lelong >0x43
|
|
846
|
+
>>>>0x40 leshort !0
|
|
847
|
+
>>>>>0x40 lestring16 x \b, metadata: "%s"
|
|
848
|
+
>>0x17 byte &0x40 \b, ROM:
|
|
849
|
+
>>>(0x18.l-26) lelong x CRC32 %#08x
|
|
850
|
+
>>>(0x18.l-23) string x "%s"
|
|
851
|
+
|
|
852
|
+
# Type: scummVM savegame files
|
|
853
|
+
# From: Sven Hartge <debian@ds9.argh.org>
|
|
854
|
+
0 string SCVM ScummVM savegame
|
|
855
|
+
>12 string >\0 "%s"
|
|
856
|
+
|
|
857
|
+
#------------------------------------------------------------------------------
|
|
858
|
+
# Nintendo GameCube / Wii file formats.
|
|
859
|
+
#
|
|
860
|
+
|
|
861
|
+
# Type: Nintendo GameCube/Wii common disc header data.
|
|
862
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
863
|
+
# Reference: https://wiibrew.org/wiki/Wii_Disc
|
|
864
|
+
0 name nintendo-gcn-disc-common
|
|
865
|
+
>0x20 string x "%.64s"
|
|
866
|
+
>0x00 string x (%.6s
|
|
867
|
+
>0x06 byte >0
|
|
868
|
+
>>0x06 byte 1 \b, Disc 2
|
|
869
|
+
>>0x06 byte 2 \b, Disc 3
|
|
870
|
+
>>0x06 byte 3 \b, Disc 4
|
|
871
|
+
>0x07 byte x \b, Rev.%02u)
|
|
872
|
+
>0x18 belong 0x5D1C9EA3
|
|
873
|
+
>>0x60 beshort 0x0101 \b (Unencrypted)
|
|
874
|
+
>0x200 string NKIT \b (NKit compressed)
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
# Type: Nintendo GameCube disc image
|
|
878
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
879
|
+
# Reference: https://wiibrew.org/wiki/Wii_Disc
|
|
880
|
+
0x1C belong 0xC2339F3D Nintendo GameCube disc image:
|
|
881
|
+
!:mime application/x-gamecube-rom
|
|
882
|
+
>0 use nintendo-gcn-disc-common
|
|
883
|
+
|
|
884
|
+
# Type: Nintendo GameCube embedded disc image
|
|
885
|
+
# Commonly found on demo discs.
|
|
886
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
887
|
+
# Reference: http://hitmen.c02.at/files/yagcd/yagcd/index.html#idx14.8
|
|
888
|
+
0 belong 0xAE0F38A2
|
|
889
|
+
>0x0C belong 0x00100000
|
|
890
|
+
>>(8.L+0x1C) belong 0xC2339F3D Nintendo GameCube embedded disc image:
|
|
891
|
+
!:mime application/x-gamecube-rom
|
|
892
|
+
>>>(8.L) use nintendo-gcn-disc-common
|
|
893
|
+
|
|
894
|
+
# Type: Nintendo Wii disc image
|
|
895
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
896
|
+
# Reference: https://wiibrew.org/wiki/Wii_Disc
|
|
897
|
+
0x18 belong 0x5D1C9EA3 Nintendo Wii disc image:
|
|
898
|
+
>0 use nintendo-gcn-disc-common
|
|
899
|
+
|
|
900
|
+
# Type: Nintendo Wii disc image (WBFS format)
|
|
901
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
902
|
+
# Reference: https://wiibrew.org/wiki/Wii_Disc
|
|
903
|
+
0 string WBFS
|
|
904
|
+
>0x218 belong 0x5D1C9EA3 Nintendo Wii disc image (WBFS format):
|
|
905
|
+
!:mime application/x-wii-rom
|
|
906
|
+
>>0x200 use nintendo-gcn-disc-common
|
|
907
|
+
|
|
908
|
+
# Type: Nintendo GameCube/Wii disc image (CISO format)
|
|
909
|
+
# NOTE: This is NOT the same as Compact ISO or PSP CISO,
|
|
910
|
+
# though it has the same magic number.
|
|
911
|
+
0 string CISO
|
|
912
|
+
# Other fields are used to determine what type of CISO this is:
|
|
913
|
+
# - 0x04 == 0x00200000: GameCube/Wii CISO (block_size)
|
|
914
|
+
# - 0x10 == 0x00000800: PSP CISO (ISO-9660 sector size)
|
|
915
|
+
# - None of the above: Compact ISO.
|
|
916
|
+
>4 lelong 0x200000
|
|
917
|
+
>>8 byte 1
|
|
918
|
+
>>>0x801C belong 0xC2339F3D Nintendo GameCube disc image (CISO format):
|
|
919
|
+
!:mime application/x-wii-rom
|
|
920
|
+
>>>>0x8000 use nintendo-gcn-disc-common
|
|
921
|
+
>>>0x8018 belong 0x5D1C9EA3 Nintendo Wii disc image (CISO format):
|
|
922
|
+
!:mime application/x-wii-rom
|
|
923
|
+
>>>>0x8000 use nintendo-gcn-disc-common
|
|
924
|
+
|
|
925
|
+
# Type: Nintendo GameCube/Wii disc image (GCZ format)
|
|
926
|
+
# Due to zlib compression, we can't get the actual disc information.
|
|
927
|
+
0 lelong 0xB10BC001
|
|
928
|
+
>4 lelong 0 Nintendo GameCube disc image (GCZ format)
|
|
929
|
+
!:mime application/x-gamecube-rom
|
|
930
|
+
>4 lelong 1 Nintendo Wii disc image (GCZ format)
|
|
931
|
+
!:mime application/x-wii-rom
|
|
932
|
+
>4 default x Nintendo GameCube/Wii disc image (GCZ format)
|
|
933
|
+
|
|
934
|
+
# Type: Nintendo GameCube/Wii disc image (WDF format)
|
|
935
|
+
0 string WII\001DISC
|
|
936
|
+
>8 belong 1
|
|
937
|
+
# WDFv1
|
|
938
|
+
>>0x54 belong 0xC2339F3D Nintendo GameCube disc image (WDFv1 format):
|
|
939
|
+
!:mime application/x-gamecube-rom
|
|
940
|
+
>>>0x38 use nintendo-gcn-disc-common
|
|
941
|
+
>>0x58 belong 0x5D1C9EA3 Nintendo Wii disc image (WDFv1 format):
|
|
942
|
+
!:mime application/x-wii-rom
|
|
943
|
+
>>>0x38 use nintendo-gcn-disc-common
|
|
944
|
+
>8 belong 2
|
|
945
|
+
# WDFv2
|
|
946
|
+
>>(12.L+0x1C) belong 0xC2339F3D Nintendo GameCube disc image (WDFv2 format):
|
|
947
|
+
!:mime application/x-gamecube-rom
|
|
948
|
+
>>>(12.L) use nintendo-gcn-disc-common
|
|
949
|
+
>>(12.L+0x18) belong 0x5D1C9EA3 Nintendo Wii disc image (WDFv2 format):
|
|
950
|
+
!:mime application/x-wii-rom
|
|
951
|
+
>>>(12.L) use nintendo-gcn-disc-common
|
|
952
|
+
|
|
953
|
+
# Type: Nintendo GameCube/Wii disc image (WIA format)
|
|
954
|
+
0 string WIA\001 Nintendo
|
|
955
|
+
>0x48 belong 1 GameCube
|
|
956
|
+
!:mime application/x-gamecube-rom
|
|
957
|
+
>0x48 belong 2 Wii
|
|
958
|
+
!:mime application/x-wii-rom
|
|
959
|
+
>0x48 default x GameCube/Wii
|
|
960
|
+
>0x48 belong x disc image (WIA format):
|
|
961
|
+
>>0x58 use nintendo-gcn-disc-common
|
|
962
|
+
|
|
963
|
+
# Type: Nintendo GameCube/Wii disc image (with SDK header)
|
|
964
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
965
|
+
# Reference: https://wiibrew.org/wiki/Wii_Disc
|
|
966
|
+
0 belong 0xFFFF0000
|
|
967
|
+
>0x18 belong 0x00000000
|
|
968
|
+
>>0x1C belong 0x00000000
|
|
969
|
+
>>>0x8018 belong 0x5D1C9EA3 Nintendo Wii SDK disc image:
|
|
970
|
+
!:mime application/x-wii-rom
|
|
971
|
+
>>>>0x8000 use nintendo-gcn-disc-common
|
|
972
|
+
>>>0x801C belong 0xC2339F3D Nintendo GameCube SDK disc image:
|
|
973
|
+
!:mime application/x-gamecube-rom
|
|
974
|
+
>>>>0x8000 use nintendo-gcn-disc-common
|
|
975
|
+
|
|
976
|
+
# Type: Nintendo GameCube/Wii disc image (RVZ format)
|
|
977
|
+
0 string RVZ\001 Nintendo
|
|
978
|
+
>0x48 belong 1 GameCube
|
|
979
|
+
!:mime application/x-gamecube-rom
|
|
980
|
+
>0x48 belong 2 Wii
|
|
981
|
+
!:mime application/x-wii-rom
|
|
982
|
+
>0x48 default x GameCube/Wii
|
|
983
|
+
>0x48 belong x disc image (RVZ format):
|
|
984
|
+
>>0x58 use nintendo-gcn-disc-common
|
|
985
|
+
|
|
986
|
+
#------------------------------------------------------------------------------
|
|
987
|
+
# Nintendo 3DS file formats.
|
|
988
|
+
#
|
|
989
|
+
|
|
990
|
+
# Type: Nintendo 3DS "NCSD" image. (game cards and eMMC)
|
|
991
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
992
|
+
# Reference: https://www.3dbrew.org/wiki/NCSD
|
|
993
|
+
0x100 string NCSD
|
|
994
|
+
>0x118 lequad 0 Nintendo 3DS Game Card image
|
|
995
|
+
# NCCH header for partition 0. (game data)
|
|
996
|
+
>>0x1150 string >\0 \b: "%.16s"
|
|
997
|
+
>>0x312 byte x (Rev.%02u)
|
|
998
|
+
>>0x118C byte 2 (New3DS only)
|
|
999
|
+
>>0x18D byte 0 (inner device)
|
|
1000
|
+
>>0x18D byte 1 (Card1)
|
|
1001
|
+
>>0x18D byte 2 (Card2)
|
|
1002
|
+
>>0x18D byte 3 (extended device)
|
|
1003
|
+
>0x118 bequad 0x0102020202000000 Nintendo 3DS eMMC dump (Old3DS)
|
|
1004
|
+
>0x118 bequad 0x0102020203000000 Nintendo 3DS eMMC dump (New3DS)
|
|
1005
|
+
|
|
1006
|
+
# Nintendo 3DS version code.
|
|
1007
|
+
# Reference: https://www.3dbrew.org/wiki/Titles
|
|
1008
|
+
# Format: leshort containing three fields:
|
|
1009
|
+
# - 6-bit: Major
|
|
1010
|
+
# - 6-bit: Minor
|
|
1011
|
+
# - 4-bit: Revision
|
|
1012
|
+
# NOTE: Only supporting major/minor versions from 0-15 right now.
|
|
1013
|
+
# NOTE: Should be prefixed with "v".
|
|
1014
|
+
0 name nintendo-3ds-version-code
|
|
1015
|
+
# Raw version.
|
|
1016
|
+
>0 leshort x \b%u,
|
|
1017
|
+
# Major version.
|
|
1018
|
+
>0 leshort&0xFC00 0x0000 0
|
|
1019
|
+
>0 leshort&0xFC00 0x0400 1
|
|
1020
|
+
>0 leshort&0xFC00 0x0800 2
|
|
1021
|
+
>0 leshort&0xFC00 0x0C00 3
|
|
1022
|
+
>0 leshort&0xFC00 0x1000 4
|
|
1023
|
+
>0 leshort&0xFC00 0x1400 5
|
|
1024
|
+
>0 leshort&0xFC00 0x1800 6
|
|
1025
|
+
>0 leshort&0xFC00 0x1C00 7
|
|
1026
|
+
>0 leshort&0xFC00 0x2000 8
|
|
1027
|
+
>0 leshort&0xFC00 0x2400 9
|
|
1028
|
+
>0 leshort&0xFC00 0x2800 10
|
|
1029
|
+
>0 leshort&0xFC00 0x2C00 11
|
|
1030
|
+
>0 leshort&0xFC00 0x3000 12
|
|
1031
|
+
>0 leshort&0xFC00 0x3400 13
|
|
1032
|
+
>0 leshort&0xFC00 0x3800 14
|
|
1033
|
+
>0 leshort&0xFC00 0x3C00 15
|
|
1034
|
+
# Minor version.
|
|
1035
|
+
>0 leshort&0x03F0 0x0000 \b.0
|
|
1036
|
+
>0 leshort&0x03F0 0x0010 \b.1
|
|
1037
|
+
>0 leshort&0x03F0 0x0020 \b.2
|
|
1038
|
+
>0 leshort&0x03F0 0x0030 \b.3
|
|
1039
|
+
>0 leshort&0x03F0 0x0040 \b.4
|
|
1040
|
+
>0 leshort&0x03F0 0x0050 \b.5
|
|
1041
|
+
>0 leshort&0x03F0 0x0060 \b.6
|
|
1042
|
+
>0 leshort&0x03F0 0x0070 \b.7
|
|
1043
|
+
>0 leshort&0x03F0 0x0080 \b.8
|
|
1044
|
+
>0 leshort&0x03F0 0x0090 \b.9
|
|
1045
|
+
>0 leshort&0x03F0 0x00A0 \b.10
|
|
1046
|
+
>0 leshort&0x03F0 0x00B0 \b.11
|
|
1047
|
+
>0 leshort&0x03F0 0x00C0 \b.12
|
|
1048
|
+
>0 leshort&0x03F0 0x00D0 \b.13
|
|
1049
|
+
>0 leshort&0x03F0 0x00E0 \b.14
|
|
1050
|
+
>0 leshort&0x03F0 0x00F0 \b.15
|
|
1051
|
+
# Revision.
|
|
1052
|
+
>0 leshort&0x000F x \b.%u
|
|
1053
|
+
|
|
1054
|
+
# Type: Nintendo 3DS "NCCH" container.
|
|
1055
|
+
# https://www.3dbrew.org/wiki/NCCH
|
|
1056
|
+
0x100 string NCCH Nintendo 3DS
|
|
1057
|
+
>0x18D byte&2 0 File Archive (CFA)
|
|
1058
|
+
>0x18D byte&2 2 Executable Image (CXI)
|
|
1059
|
+
>0x150 string >\0 \b: "%.16s"
|
|
1060
|
+
>0x18D byte 0x05
|
|
1061
|
+
>>0x10E leshort x (Old3DS System Update v
|
|
1062
|
+
>>0x10E use nintendo-3ds-version-code
|
|
1063
|
+
>>0x10E leshort x \b)
|
|
1064
|
+
>0x18D byte 0x15
|
|
1065
|
+
>>0x10E leshort x (New3DS System Update v
|
|
1066
|
+
>>0x10E use nintendo-3ds-version-code
|
|
1067
|
+
>>0x10E leshort x \b)
|
|
1068
|
+
>0x18D byte !0x05
|
|
1069
|
+
>>0x18D byte !0x15
|
|
1070
|
+
>>>0x112 byte x (v
|
|
1071
|
+
>>>0x112 use nintendo-3ds-version-code
|
|
1072
|
+
>>>0x112 byte x \b)
|
|
1073
|
+
>0x18C byte 2 (New3DS only)
|
|
1074
|
+
|
|
1075
|
+
# Type: Nintendo 3DS "SMDH" file. (application description)
|
|
1076
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
1077
|
+
# Reference: https://3dbrew.org/wiki/SMDH
|
|
1078
|
+
0 string SMDH Nintendo 3DS SMDH file
|
|
1079
|
+
>0x208 leshort !0
|
|
1080
|
+
>>0x208 lestring16 x \b: "%.128s"
|
|
1081
|
+
>>0x388 leshort !0
|
|
1082
|
+
>>>0x388 lestring16 x by %.128s
|
|
1083
|
+
>0x208 leshort 0
|
|
1084
|
+
>>0x008 leshort !0
|
|
1085
|
+
>>>0x008 lestring16 x \b: "%.128s"
|
|
1086
|
+
>>>0x188 leshort !0
|
|
1087
|
+
>>>>0x188 lestring16 x by %.128s
|
|
1088
|
+
|
|
1089
|
+
# Type: Nintendo 3DS Homebrew Application.
|
|
1090
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
1091
|
+
# Reference: https://3dbrew.org/wiki/3DSX_Format
|
|
1092
|
+
0 string 3DSX Nintendo 3DS Homebrew Application (3DSX)
|
|
1093
|
+
|
|
1094
|
+
# Type: Nintendo 3DS Banner Model Data.
|
|
1095
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
1096
|
+
# Reference: https://3dbrew.org/wiki/CBMD
|
|
1097
|
+
0 string CBMD\0\0\0\0 Nintendo 3DS Banner Model Data
|
|
1098
|
+
|
|
1099
|
+
#------------------------------------------------------------------------------
|
|
1100
|
+
# a7800: file(1) magic for the Atari 7800 raw ROM format.
|
|
1101
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
1102
|
+
# Reference: https://sites.google.com/site/atari7800wiki/a78-header
|
|
1103
|
+
|
|
1104
|
+
0 byte >0
|
|
1105
|
+
>0 byte <3
|
|
1106
|
+
>>1 string ATARI7800 Atari 7800 ROM image
|
|
1107
|
+
!:mime application/x-atari-7800-rom
|
|
1108
|
+
>>>0x11 string >\0 \b: "%.32s"
|
|
1109
|
+
# Display type.
|
|
1110
|
+
>>>0x39 byte 0 (NTSC)
|
|
1111
|
+
>>>0x39 byte 1 (PAL)
|
|
1112
|
+
>>>0x36 byte&1 1 (POKEY)
|
|
1113
|
+
|
|
1114
|
+
#------------------------------------------------------------------------------
|
|
1115
|
+
# vectrex: file(1) magic for the GCE Vectrex raw ROM format.
|
|
1116
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
1117
|
+
# Reference: http://www.playvectrex.com/designit/chrissalo/hello1.htm
|
|
1118
|
+
#
|
|
1119
|
+
# NOTE: Title is terminated with 0x80, not 0.
|
|
1120
|
+
# The header is terminated with a 0, so that will
|
|
1121
|
+
# terminate the title as well.
|
|
1122
|
+
#
|
|
1123
|
+
0 string g\ GCE Vectrex ROM image
|
|
1124
|
+
>0x11 string >\0 \b: "%.16s"
|
|
1125
|
+
|
|
1126
|
+
#------------------------------------------------------------------------------
|
|
1127
|
+
# amiibo: file(1) magic for Nintendo amiibo NFC dumps.
|
|
1128
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
1129
|
+
# Reference: https://www.3dbrew.org/wiki/Amiibo
|
|
1130
|
+
0x00 byte 0x04
|
|
1131
|
+
>0x0A beshort 0x0FE0
|
|
1132
|
+
>>0x0C belong 0xF110FFEE
|
|
1133
|
+
>>>0x208 beshort 0x0100
|
|
1134
|
+
>>>>0x020A byte 0x0F
|
|
1135
|
+
>>>>>0x020C bequad 0x000000045F000000
|
|
1136
|
+
>>>>>>0x5B byte 0x02
|
|
1137
|
+
>>>>>>>0x54 belong x Nintendo amiibo NFC dump - amiibo ID: %08X-
|
|
1138
|
+
>>>>>>>0x58 belong x \b%08X
|
|
1139
|
+
|
|
1140
|
+
#------------------------------------------------------------------------------
|
|
1141
|
+
# Type: Nintendo Switch XCI (Game Cartridge Image)
|
|
1142
|
+
# From: Benjamin Lowry <ben@ben.gmbh>
|
|
1143
|
+
# Reference: https://switchbrew.org/wiki/Gamecard_Format
|
|
1144
|
+
0x100 string HEAD
|
|
1145
|
+
>0x10D byte 0xFA Nintendo Switch cartridge image (XCI), 1GB
|
|
1146
|
+
>0x10D byte 0xF8 Nintendo Switch cartridge image (XCI), 2GB
|
|
1147
|
+
>0x10D byte 0xF0 Nintendo Switch cartridge image (XCI), 4GB
|
|
1148
|
+
>0x10D byte 0xE0 Nintendo Switch cartridge image (XCI), 8GB
|
|
1149
|
+
>0x10D byte 0xE1 Nintendo Switch cartridge image (XCI), 16GB
|
|
1150
|
+
>0x10D byte 0xE2 Nintendo Switch cartridge image (XCI), 32GB
|
|
1151
|
+
|
|
1152
|
+
#------------------------------------------------------------------------------
|
|
1153
|
+
# Type: Nintendo Switch Executable
|
|
1154
|
+
# From: Benjamin Lowry <ben@ben.gmbh>
|
|
1155
|
+
# Reference: https://switchbrew.org/wiki/NSO
|
|
1156
|
+
0x00 string NSO0 Nintendo Switch executable (NSO)
|
|
1157
|
+
|
|
1158
|
+
#------------------------------------------------------------------------------
|
|
1159
|
+
# Type: Nintendo Switch PFS0
|
|
1160
|
+
# From: Benjamin Lowry <ben@ben.gmbh>
|
|
1161
|
+
# Reference: https://switchbrew.org/wiki/NCA_Format#PFS0
|
|
1162
|
+
0x00 string PFS0 Nintendo Switch partition filesystem (PFS0)
|
|
1163
|
+
>0x04 ulelong x \b, %d files
|
|
1164
|
+
|
|
1165
|
+
#------------------------------------------------------------------------------
|
|
1166
|
+
# amiibo: file(1) magic for Nintendo Badge Arcade files.
|
|
1167
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
1168
|
+
# References:
|
|
1169
|
+
# - https://github.com/GerbilSoft/rom-properties/issues/92
|
|
1170
|
+
# - https://github.com/CaitSith2/BadgeArcadeTool
|
|
1171
|
+
# - https://github.com/TheMachinumps/Advanced-badge-editor
|
|
1172
|
+
|
|
1173
|
+
# PRBS: Individual badge and/or mega badge.
|
|
1174
|
+
0 string PRBS
|
|
1175
|
+
>0x44 byte >0x20 Nintendo Badge Arcade
|
|
1176
|
+
>>0xB8 ulelong <2
|
|
1177
|
+
>>>0xBC ulelong <2 badge:
|
|
1178
|
+
>>>0xBC ulelong >1 Mega Badge
|
|
1179
|
+
>>>>0xB8 ulelong x (%ux
|
|
1180
|
+
>>>>0xBC ulelong x \b%u):
|
|
1181
|
+
>>0xB8 ulelong >1 Mega Badge
|
|
1182
|
+
>>>0xB8 ulelong x (%ux
|
|
1183
|
+
>>>0xBC ulelong x \b%u):
|
|
1184
|
+
>0x44 string x "%s"
|
|
1185
|
+
>0x3C ulelong x \b, badge ID: %u
|
|
1186
|
+
>0x74 byte >0x20
|
|
1187
|
+
>>0x74 string x \b, set: "%s"
|
|
1188
|
+
>0xA8 ulelong !0xFFFFFFFF
|
|
1189
|
+
>>0xA8 ulelong x \b, launch title ID: %08X
|
|
1190
|
+
>>0xA4 ulelong x \b-%08X
|
|
1191
|
+
|
|
1192
|
+
# CABS: Badge set.
|
|
1193
|
+
0 string CABS
|
|
1194
|
+
>0x2C byte >0x20 Nintendo Badge Arcade badge set:
|
|
1195
|
+
>>0x2C string x "%.48s"
|
|
1196
|
+
>>0x24 ulelong x \b, set ID: %u
|
|
1197
|
+
|
|
1198
|
+
#------------------------------------------------------------------------------
|
|
1199
|
+
# sufami: file(1) magic for Sufami Turbo ROM images.
|
|
1200
|
+
# From: David Korth <gerbilsoft@gerbilsoft.com>
|
|
1201
|
+
# References:
|
|
1202
|
+
# - https://problemkaputt.de/fullsnes.htm#snescartsufamiturbominicartridgeadaptor
|
|
1203
|
+
0 string BANDAI\ SFC-ADX
|
|
1204
|
+
>0x10 string !SFC-ADX\ BACKUP Sufami Turbo ROM image:
|
|
1205
|
+
>>0x10 string/T x "%.14s"
|
|
1206
|
+
>>0x30 byte x \b, ID %02X
|
|
1207
|
+
>>0x31 byte x \b%02X
|
|
1208
|
+
>>0x32 byte x \b%02X
|
|
1209
|
+
>>0x33 ubyte >0 \b, series index %u
|
|
1210
|
+
>>0x34 ubyte 0 [SlowROM]
|
|
1211
|
+
>>0x34 ubyte 1 [FastROM]
|
|
1212
|
+
>>0x35 ubyte 1 [SRAM]
|
|
1213
|
+
>>0x35 ubyte 3 [Special]
|