TsundereStation/dep/openbios/convert.sh
Clownacy 7bd9645251 Make OpenBIOS a built-in fallback.
Previously, the emulator would mysteriously fail if the user did not
know beforehand to provide a copy of the BIOS. This avoids that
problem, silently and automatically loading a built-in copy of
OpenBIOS, so that the emulator will always do what the user wants:
boot the game.

Closes #153. Requested in #158.
2026-03-28 10:43:30 +00:00

10 lines
323 B
Bash
Executable file

#!/usr/bin/env sh
# Convert to C array.
xxd -i -n openbios openbios.bin > openbios.bin.h
# Make safer to include in multiple places.
sed -i 's/unsigned char openbios/inline constexpr unsigned char openbios/g' openbios.bin.h
# Discard the useless size specifier.
sed -i 's/unsigned int openbios_len.*$//g' openbios.bin.h