Fetch and verify the four MAME indy_4610 PROM dumps, wrap the newest dump in an ELF32 BE MIPS image for Ghidra/REA, and record the resulting structural map: image layout, exception vector table, boot flow, function anchors and firmware feature clusters.
40 lines
1.2 KiB
Bash
Executable File
40 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Fetch the MAME 0.236 SGI Indy (IP24) PROM set and verify every dump.
|
|
#
|
|
# The four images are the complete ROM set for MAME's indy_4610 machine.
|
|
# SHA-1 values come from MAME's src/mame/sgi/indy_indigo2.cpp ROM definitions.
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
DEST="${ROOT}/roms"
|
|
WORK="$(mktemp -d)"
|
|
trap 'rm -rf "${WORK}"' EXIT
|
|
|
|
URL="https://archive.org/download/mame-0.236-roms-split/MAME%200.236%20ROMs%20%28split%29/indy_4610.zip"
|
|
|
|
mkdir -p "${DEST}"
|
|
|
|
echo "Downloading ${URL}"
|
|
curl -fSL --retry 3 -o "${WORK}/indy_4610.zip" "${URL}"
|
|
unzip -q -o "${WORK}/indy_4610.zip" -d "${DEST}"
|
|
|
|
declare -A SHA1=(
|
|
[ip24prom.070-9101-005.bin]=28b769b28218a1fcd0400dceef9a284dcfbdda5b
|
|
[ip24prom.070-9101-007.bin]=ade54cd2ecb7064957f8602894f05685e2f4e8fb
|
|
[ip24prom.070-9101-008.bin]=a752a4aef7e2c6086b8b0244e9f064861a11870f
|
|
[ip24prom.070-9101-011.bin]=ac663a4db68528e400487e98cbf901f620fb30ce
|
|
)
|
|
|
|
status=0
|
|
for name in "${!SHA1[@]}"; do
|
|
got="$(sha1sum "${DEST}/${name}" | cut -d' ' -f1)"
|
|
if [[ "${got}" == "${SHA1[${name}]}" ]]; then
|
|
printf 'ok %s %s\n' "${got}" "${name}"
|
|
else
|
|
printf 'FAIL %s %s (expected %s)\n' "${got}" "${name}" "${SHA1[${name}]}" >&2
|
|
status=1
|
|
fi
|
|
done
|
|
|
|
exit "${status}"
|