mirror of
https://github.com/gbdev/rgbds.git
synced 2025-12-31 05:31:52 +00:00
Rewrite RGBFIX
- Make it work inside pipelines - Add RGBFIX tests to the suite - Be more flexible in accepted MBC names - Add warnings for dangerous or nonsensical input params - Improve man page
This commit is contained in:
2
Makefile
2
Makefile
@@ -203,7 +203,7 @@ develop:
|
||||
$Qenv $(MAKE) -j WARNFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-type-limits \
|
||||
-Wno-sign-compare -Wvla -Wformat -Wformat-security -Wformat-overflow=2 \
|
||||
-Wformat-truncation=1 -Wformat-y2k -Wswitch-enum -Wunused \
|
||||
-Wuninitialized -Wunknown-pragmas -Wstrict-overflow=5 \
|
||||
-Wuninitialized -Wunknown-pragmas -Wstrict-overflow=4 \
|
||||
-Wstringop-overflow=4 -Walloc-zero -Wduplicated-cond \
|
||||
-Wfloat-equal -Wshadow -Wcast-qual -Wcast-align -Wlogical-op \
|
||||
-Wnested-externs -Wno-aggressive-loop-optimizations -Winline \
|
||||
|
||||
@@ -32,6 +32,58 @@
|
||||
static inline _Noreturn unreachable_(void) {}
|
||||
#endif
|
||||
|
||||
// Use builtins whenever possible, and shim them otherwise
|
||||
#ifdef __GNUC__ // GCC or compatible
|
||||
#define ctz __builtin_ctz
|
||||
#define clz __builtin_clz
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#include <assert.h>
|
||||
#include <intrin.h>
|
||||
#pragma intrinsic(_BitScanReverse, _BitScanForward)
|
||||
static inline int ctz(unsigned int x)
|
||||
{
|
||||
unsigned long cnt;
|
||||
|
||||
assert(x != 0);
|
||||
_BitScanForward(&cnt, x);
|
||||
return cnt;
|
||||
}
|
||||
static inline int clz(unsigned int x)
|
||||
{
|
||||
unsigned long cnt;
|
||||
|
||||
assert(x != 0);
|
||||
_BitScanReverse(&cnt, x);
|
||||
return 31 - cnt;
|
||||
}
|
||||
|
||||
#else
|
||||
// FIXME: these are rarely used, and need testing...
|
||||
#include <limits.h>
|
||||
static inline int ctz(unsigned int x)
|
||||
{
|
||||
int cnt = 0;
|
||||
|
||||
while (!(x & 1)) {
|
||||
x >>= 1;
|
||||
cnt++;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
static inline int clz(unsigned int x)
|
||||
{
|
||||
int cnt = 0;
|
||||
|
||||
while (x <= UINT_MAX / 2) {
|
||||
x <<= 1;
|
||||
cnt++;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Macros for stringification
|
||||
#define STR(x) #x
|
||||
#define EXPAND_AND_STR(x) STR(x)
|
||||
|
||||
@@ -34,9 +34,15 @@
|
||||
|
||||
/* MSVC doesn't use POSIX types or defines for `read` */
|
||||
#ifdef _MSC_VER
|
||||
# include <io.h>
|
||||
# define STDIN_FILENO 0
|
||||
# define STDOUT_FILENO 1
|
||||
# define STDERR_FILENO 2
|
||||
# define ssize_t int
|
||||
# define SSIZE_MAX INT_MAX
|
||||
#else
|
||||
# include <fcntl.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* MSVC doesn't support `[static N]` for array arguments from C99 */
|
||||
@@ -46,4 +52,22 @@
|
||||
# define MIN_NB_ELMS(N) static (N)
|
||||
#endif
|
||||
|
||||
// MSVC uses a different name for O_RDWR, and needs an additional _O_BINARY flag
|
||||
#ifdef _MSC_VER
|
||||
# include <fcntl.h>
|
||||
# define O_RDWR _O_RDWR
|
||||
# define S_ISREG(field) ((field) & _S_IFREG)
|
||||
# define O_BINARY _O_BINARY
|
||||
#elif !defined(O_BINARY) // Cross-compilers define O_BINARY
|
||||
# define O_BINARY 0 // POSIX says we shouldn't care!
|
||||
#endif // _MSC_VER
|
||||
|
||||
// Windows has stdin and stdout open as text by default, which we may not want
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
# include <io.h>
|
||||
# define setmode(fd, mode) _setmode(fd, mode)
|
||||
#else
|
||||
# define setmode(fd, mode) ((void)0)
|
||||
#endif
|
||||
|
||||
#endif /* RGBDS_PLATFORM_H */
|
||||
|
||||
1554
src/fix/main.c
1554
src/fix/main.c
File diff suppressed because it is too large
Load Diff
114
src/fix/rgbfix.1
114
src/fix/rgbfix.1
@@ -24,39 +24,48 @@
|
||||
.Op Fl p Ar pad_value
|
||||
.Op Fl r Ar ram_size
|
||||
.Op Fl t Ar title_str
|
||||
.Ar file
|
||||
.Op Ar
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
program changes headers of Game Boy ROM images.
|
||||
program changes headers of Game Boy ROM images, typically generated by
|
||||
.Xr rgblink 1 ,
|
||||
though it will work with
|
||||
.Em any
|
||||
Game Boy ROM.
|
||||
It also performs other correctness operations, such as padding.
|
||||
.Nm
|
||||
only changes the fields for which it has values specified.
|
||||
Developers are advised to fill those fields with 0x00 bytes in their source code before running
|
||||
.Nm ,
|
||||
and to have already populated whichever fields they don't specify using
|
||||
.Nm .
|
||||
.Pp
|
||||
Note that options can be abbreviated as long as the abbreviation is unambiguous:
|
||||
.Fl Fl verb
|
||||
.Fl Fl color-o
|
||||
is
|
||||
.Fl Fl verbose ,
|
||||
.Fl Fl color-only ,
|
||||
but
|
||||
.Fl Fl ver
|
||||
.Fl Fl color
|
||||
is invalid because it could also be
|
||||
.Fl Fl version .
|
||||
The arguments are as follows:
|
||||
.Fl Fl color-compatible .
|
||||
Options later in the command line override those set earlier.
|
||||
Accepted options are as follows:
|
||||
.Bl -tag -width Ds
|
||||
.It Fl C , Fl Fl color-only
|
||||
Set the Game Boy Color\(enonly flag:
|
||||
.Ad 0x143
|
||||
= 0xC0.
|
||||
If both this and the
|
||||
Set the Game Boy Color\(enonly flag
|
||||
.Pq Ad 0x143
|
||||
to 0xC0.
|
||||
This overrides
|
||||
.Fl c
|
||||
flag are set, this takes precedence.
|
||||
if it was set prior.
|
||||
.It Fl c , Fl Fl color-compatible
|
||||
Set the Game Boy Color\(encompatible flag:
|
||||
.Ad 0x143
|
||||
= 0x80.
|
||||
If both this and the
|
||||
.Fl C
|
||||
flag are set,
|
||||
.Fl C
|
||||
takes precedence.
|
||||
.Pq Ad 0x143
|
||||
to 0x80.
|
||||
This overrides
|
||||
.Fl c
|
||||
if it was set prior.
|
||||
.It Fl f Ar fix_spec , Fl Fl fix-spec Ar fix_spec
|
||||
Fix certain header values that the Game Boy checks for correctness.
|
||||
Alternatively, intentionally trash these values by writing their binary inverse instead.
|
||||
@@ -83,55 +92,63 @@ Trash the global checksum.
|
||||
.It Fl i Ar game_id , Fl Fl game-id Ar game_id
|
||||
Set the game ID string
|
||||
.Pq Ad 0x13F Ns \(en Ns Ad 0x142
|
||||
to a given string of exactly 4 characters.
|
||||
If both this and the title are set, the game ID will overwrite the overlapping portion of the title.
|
||||
to a given string.
|
||||
If it's longer than 4 chars, it will be truncated, and a warning emitted.
|
||||
.It Fl j , Fl Fl non-japanese
|
||||
Set the non-Japanese region flag:
|
||||
.Ad 0x14A
|
||||
= 1.
|
||||
Set the non-Japanese region flag
|
||||
.Pq Ad 0x14A
|
||||
to 0x01.
|
||||
.It Fl k Ar licensee_str , Fl Fl new-licensee Ar licensee_str
|
||||
Set the new licensee string
|
||||
.Pq Ad 0x144 Ns \(en Ns Ad 0x145
|
||||
to a given string, truncated to at most two characters.
|
||||
to a given string.
|
||||
If it's longer than 2 chars, it will be truncated, and a warning emitted.
|
||||
.It Fl l Ar licensee_id , Fl Fl old-licensee Ar licensee_id
|
||||
Set the old licensee code,
|
||||
.Ad 0x14B ,
|
||||
Set the old licensee code
|
||||
.Pq Ad 0x14B
|
||||
to a given value from 0 to 0xFF.
|
||||
This value is deprecated and should be set to 0x33 in all new software.
|
||||
.It Fl m Ar mbc_type , Fl Fl mbc-type Ar mbc_type
|
||||
Set the MBC type,
|
||||
.Ad 0x147 ,
|
||||
Set the MBC type
|
||||
.Pq Ad 0x147
|
||||
to a given value from 0 to 0xFF.
|
||||
This value may also be an MBC name from the Pan Docs.
|
||||
.It Fl n Ar rom_version , Fl Fl rom-version Ar rom_version
|
||||
Set the ROM version,
|
||||
.Ad 0x14C ,
|
||||
Set the ROM version
|
||||
.Pq Ad 0x14C
|
||||
to a given value from 0 to 0xFF.
|
||||
.It Fl p Ar pad_value , Fl Fl pad-value Ar pad_value
|
||||
Pad the image to a valid size with a given pad value from 0 to 0xFF.
|
||||
Pad the ROM image to a valid size with a given pad value from 0 to 255 (0xFF).
|
||||
.Nm
|
||||
will automatically pick a size from 32 KiB, 64 KiB, 128 KiB, ..., 8192 KiB.
|
||||
The cartridge size byte
|
||||
.Pq Ad 0x148
|
||||
will be changed to reflect this new size.
|
||||
The recommended padding value is 0xFF, to speed up writing the ROM to flash chips, and to avoid "nop slides" into VRAM.
|
||||
.It Fl r Ar ram_size , Fl Fl ram-size Ar ram_size
|
||||
Set the RAM size,
|
||||
.Ad 0x149 ,
|
||||
Set the RAM size
|
||||
.Pq Ad 0x149
|
||||
to a given value from 0 to 0xFF.
|
||||
.It Fl s , Fl Fl sgb-compatible
|
||||
Set the SGB flag:
|
||||
.Ad 0x146
|
||||
= 3. This flag will be ignored by the SGB unless the old licensee code is 0x33!
|
||||
Set the SGB flag
|
||||
.Pq Ad 0x146
|
||||
to 0x03.
|
||||
This flag will be ignored by the SGB unless the old licensee code is 0x33!
|
||||
If this is given as well as
|
||||
.Fl l ,
|
||||
but is not set to 0x33, a warning will be printed.
|
||||
.It Fl t Ar title , Fl Fl title Ar title
|
||||
Set the title string
|
||||
.Pq Ad 0x134 Ns \(en Ns Ad 0x143
|
||||
to a given string, truncated to at most 16 characters.
|
||||
It is recommended to use 15 characters instead, to avoid clashing with the CGB flag
|
||||
.Po Fl c
|
||||
to a given string.
|
||||
If the title is longer than the max length, it will be truncated, and a warning emitted.
|
||||
The max length is 11 characters if the game ID
|
||||
.Pq Fl i
|
||||
is specified, 15 characters if the CGB flag
|
||||
.Fl ( c
|
||||
or
|
||||
.Fl C
|
||||
.Pc .
|
||||
If both this and the game ID are set, the game ID will overwrite the overlapping portion of the title.
|
||||
.Fl C )
|
||||
is specified but the game ID is not, and 16 characters otherwise.
|
||||
.It Fl V , Fl Fl version
|
||||
Print the version of the program and exit.
|
||||
.It Fl v , Fl Fl validate
|
||||
@@ -139,7 +156,7 @@ Equivalent to
|
||||
.Fl f Cm lhg .
|
||||
.El
|
||||
.Sh EXAMPLES
|
||||
Most values in the ROM header are only cosmetic.
|
||||
Most values in the ROM header do not matter to the actual console, and most are seldom useful anyway.
|
||||
The bare minimum requirements for a workable program are the header checksum, the Nintendo logo, and (if needed) the CGB/SGB flags.
|
||||
It is a good idea to pad the image to a valid size as well
|
||||
.Pq Do valid Dc meaning a power of 2, times 32 KiB .
|
||||
@@ -152,14 +169,13 @@ a valid size:
|
||||
The following will make a SGB-enabled, color-enabled game with a title of
|
||||
.Dq foobar ,
|
||||
and pad it to a valid size.
|
||||
.Po
|
||||
The Game Boy itself does not use the title, but some emulators or ROM managers do.
|
||||
.Pc
|
||||
.Pq The Game Boy itself does not use the title, but some emulators or ROM managers do.
|
||||
.Pp
|
||||
.D1 $ rgbfix -vcs -l 0x33 -p 255 -t foobar baz.gb
|
||||
.Pp
|
||||
The following will duplicate the header (sans global checksum) of the game
|
||||
.Dq Survival Kids :
|
||||
The following will duplicate the header of the game
|
||||
.Dq Survival Kids ,
|
||||
sans global checksum:
|
||||
.Pp
|
||||
.D1 $ rgbfix -cjsv -k A4 -l 0x33 -m 0x1B -p 0xFF -r 3 -t SURVIVALKIDAVKE \
|
||||
SurvivalKids.gbc
|
||||
|
||||
1
test/fix/.gitignore
vendored
Normal file
1
test/fix/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/padding*_*
|
||||
16
test/fix/README.md
Normal file
16
test/fix/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# RGBFIX tests
|
||||
|
||||
These tests check that RGBFIX behaves properly.
|
||||
|
||||
## Structure of a test
|
||||
|
||||
- `test.bin`: The file passed as input to RGBFIX.
|
||||
- `test.flags`: The command-line flags passed to RGBFIX's invocation.
|
||||
Actually, only the first line is considered; the rest of the file may contain comments about the test.
|
||||
- `test.gb`: The expected output.
|
||||
May not exist, generally when the test expects an error, in which case the comparison is skipped.
|
||||
- `test.err`: The expected error output.
|
||||
|
||||
## Special tests
|
||||
|
||||
- `noexist.err` is the expected error output when RGBFIX is given a non-existent input file.
|
||||
3
test/fix/bad-fix-char.bin
Normal file
3
test/fix/bad-fix-char.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
‡Ýà!H0‡;<ýNË—ñãí=ÌÊÏç^{KC}b“Q¤&<14>3ð ñ/]¿—¹”d<E2809D>ÙZ=ÃÀ¢bÄaËi:öeSŸ>ñ›U@¼Ay<aeš‰¹$vfÅåˆâ”šý¬gŒ VC†ò~>•‘¨þ©† ³s_CÓ›Úç&nWFoKÚšíX`'ñêÁ§ë·blƒ{‡›Œ¿
|
||||
‹¯çÎ8îù†<$:VÍ"ã³™Ú<E284A2>h™ÑD©¤Ð¶ñQcµïØÐ㸺Zû§T†ž©ø½¨ºVÛ¼ÝtÅ’ªÏ4ªBèÐdT“« ÄI<1A>‡
|
||||
Ô(/×»ç¿{hÝ:ƒ<>QmÓ$*|
|
||||
3
test/fix/bad-fix-char.err
Normal file
3
test/fix/bad-fix-char.err
Normal file
@@ -0,0 +1,3 @@
|
||||
warning: Ignoring 'm' in fix spec
|
||||
warning: Ignoring 'a' in fix spec
|
||||
warning: Ignoring 'o' in fix spec
|
||||
1
test/fix/bad-fix-char.flags
Normal file
1
test/fix/bad-fix-char.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f lmao
|
||||
2
test/fix/color.bin
Normal file
2
test/fix/color.bin
Normal file
@@ -0,0 +1,2 @@
|
||||
╧ы+2l}~Ч╨я╕├Ж}╧Я1xЙаШЩ&)Y├q*▀ОТ═и▓┌г^ H─p@v6}Юг[┬╙&оЧ┘hё▒лBn~пT┘0Ьнuf┬\╗8╫≥÷жуЗ■ВЖц▒ЬW╫╬Ф╥ 5^Bq<░K╫"S%╤ВU!▓╦r,7┌Нg┘4х╗┴▌╔╖╜А░ЗhL╟жь²У)√÷┘У6U@Ёв█`щ▒TзT├М╕·Dи╕▓8zс5╡·~AбИ╠╫э°Щ|
|
||||
╕>Т]Е/╧K╠▄Ыd~ис"gF*AU╩"W▌7]}≈ы/Ц}<▀─s[lx■э■}п╚[МлО8Ё█≥╛А═
|
||||
0
test/fix/color.err
Normal file
0
test/fix/color.err
Normal file
1
test/fix/color.flags
Normal file
1
test/fix/color.flags
Normal file
@@ -0,0 +1 @@
|
||||
-C
|
||||
2
test/fix/color.gb
Normal file
2
test/fix/color.gb
Normal file
@@ -0,0 +1,2 @@
|
||||
╧ы+2l}~Ч╨я╕├Ж}╧Я1xЙаШЩ&)Y├q*▀ОТ═и▓┌г^ H─p@v6}Юг[┬╙&оЧ┘hё▒лBn~пT┘0Ьнuf┬\╗8╫≥÷жуЗ■ВЖц▒ЬW╫╬Ф╥ 5^Bq<░K╫"S%╤ВU!▓╦r,7┌Нg┘4х╗┴▌╔╖╜А░ЗhL╟жь²У)√÷┘У6U@Ёв█`щ▒TзT├М╕·Dи╕▓8zс5╡·~AбИ╠╫э°Щ|
|
||||
╕>Т]Е/╧K╠▄Ыd~ис"gF*AU╩"W▌7]}≈ы/Ц}<▀─s[lx■э■}п╚[МлО8Ё█≥╛А═
|
||||
BIN
test/fix/compatible.bin
Normal file
BIN
test/fix/compatible.bin
Normal file
Binary file not shown.
0
test/fix/compatible.err
Normal file
0
test/fix/compatible.err
Normal file
1
test/fix/compatible.flags
Normal file
1
test/fix/compatible.flags
Normal file
@@ -0,0 +1 @@
|
||||
-c
|
||||
BIN
test/fix/compatible.gb
Normal file
BIN
test/fix/compatible.gb
Normal file
Binary file not shown.
0
test/fix/empty.bin
Normal file
0
test/fix/empty.bin
Normal file
2
test/fix/empty.err
Normal file
2
test/fix/empty.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: "<filename>" too short, expected at least 336 ($150) bytes, got only 0
|
||||
Fixing "<filename>" failed with 1 error
|
||||
0
test/fix/empty.flags
Normal file
0
test/fix/empty.flags
Normal file
0
test/fix/empty.gb
Normal file
0
test/fix/empty.gb
Normal file
BIN
test/fix/fix-override.bin
Normal file
BIN
test/fix/fix-override.bin
Normal file
Binary file not shown.
1
test/fix/fix-override.err
Normal file
1
test/fix/fix-override.err
Normal file
@@ -0,0 +1 @@
|
||||
warning: 'l' overriding 'L' in fix spec
|
||||
1
test/fix/fix-override.flags
Normal file
1
test/fix/fix-override.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f Ll
|
||||
BIN
test/fix/fix-override.gb
Normal file
BIN
test/fix/fix-override.gb
Normal file
Binary file not shown.
BIN
test/fix/gameid-trunc.bin
Normal file
BIN
test/fix/gameid-trunc.bin
Normal file
Binary file not shown.
1
test/fix/gameid-trunc.err
Normal file
1
test/fix/gameid-trunc.err
Normal file
@@ -0,0 +1 @@
|
||||
warning: Truncating game ID "FOUR!" to 4 chars
|
||||
1
test/fix/gameid-trunc.flags
Normal file
1
test/fix/gameid-trunc.flags
Normal file
@@ -0,0 +1 @@
|
||||
-i 'FOUR!'
|
||||
BIN
test/fix/gameid-trunc.gb
Normal file
BIN
test/fix/gameid-trunc.gb
Normal file
Binary file not shown.
BIN
test/fix/gameid.bin
Normal file
BIN
test/fix/gameid.bin
Normal file
Binary file not shown.
0
test/fix/gameid.err
Normal file
0
test/fix/gameid.err
Normal file
1
test/fix/gameid.flags
Normal file
1
test/fix/gameid.flags
Normal file
@@ -0,0 +1 @@
|
||||
-i RGBD
|
||||
BIN
test/fix/gameid.gb
Normal file
BIN
test/fix/gameid.gb
Normal file
Binary file not shown.
BIN
test/fix/global-large.bin
Normal file
BIN
test/fix/global-large.bin
Normal file
Binary file not shown.
0
test/fix/global-large.err
Normal file
0
test/fix/global-large.err
Normal file
1
test/fix/global-large.flags
Normal file
1
test/fix/global-large.flags
Normal file
@@ -0,0 +1 @@
|
||||
-fg
|
||||
BIN
test/fix/global-large.gb
Normal file
BIN
test/fix/global-large.gb
Normal file
Binary file not shown.
BIN
test/fix/global-larger.bin
Normal file
BIN
test/fix/global-larger.bin
Normal file
Binary file not shown.
0
test/fix/global-larger.err
Normal file
0
test/fix/global-larger.err
Normal file
1
test/fix/global-larger.flags
Normal file
1
test/fix/global-larger.flags
Normal file
@@ -0,0 +1 @@
|
||||
-fg
|
||||
BIN
test/fix/global-larger.gb
Normal file
BIN
test/fix/global-larger.gb
Normal file
Binary file not shown.
BIN
test/fix/global-trash.bin
Normal file
BIN
test/fix/global-trash.bin
Normal file
Binary file not shown.
0
test/fix/global-trash.err
Normal file
0
test/fix/global-trash.err
Normal file
1
test/fix/global-trash.flags
Normal file
1
test/fix/global-trash.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f G
|
||||
BIN
test/fix/global-trash.gb
Normal file
BIN
test/fix/global-trash.gb
Normal file
Binary file not shown.
BIN
test/fix/global.bin
Normal file
BIN
test/fix/global.bin
Normal file
Binary file not shown.
0
test/fix/global.err
Normal file
0
test/fix/global.err
Normal file
1
test/fix/global.flags
Normal file
1
test/fix/global.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f g
|
||||
BIN
test/fix/global.gb
Normal file
BIN
test/fix/global.gb
Normal file
Binary file not shown.
BIN
test/fix/header-edit.bin
Normal file
BIN
test/fix/header-edit.bin
Normal file
Binary file not shown.
0
test/fix/header-edit.err
Normal file
0
test/fix/header-edit.err
Normal file
2
test/fix/header-edit.flags
Normal file
2
test/fix/header-edit.flags
Normal file
@@ -0,0 +1,2 @@
|
||||
-Cf h
|
||||
Checks that the header checksum properly accounts for header modifications
|
||||
BIN
test/fix/header-edit.gb
Normal file
BIN
test/fix/header-edit.gb
Normal file
Binary file not shown.
BIN
test/fix/header-trash.bin
Normal file
BIN
test/fix/header-trash.bin
Normal file
Binary file not shown.
0
test/fix/header-trash.err
Normal file
0
test/fix/header-trash.err
Normal file
1
test/fix/header-trash.flags
Normal file
1
test/fix/header-trash.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f H
|
||||
BIN
test/fix/header-trash.gb
Normal file
BIN
test/fix/header-trash.gb
Normal file
Binary file not shown.
BIN
test/fix/header.bin
Normal file
BIN
test/fix/header.bin
Normal file
Binary file not shown.
0
test/fix/header.err
Normal file
0
test/fix/header.err
Normal file
1
test/fix/header.flags
Normal file
1
test/fix/header.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f h
|
||||
BIN
test/fix/header.gb
Normal file
BIN
test/fix/header.gb
Normal file
Binary file not shown.
BIN
test/fix/jp.bin
Normal file
BIN
test/fix/jp.bin
Normal file
Binary file not shown.
0
test/fix/jp.err
Normal file
0
test/fix/jp.err
Normal file
1
test/fix/jp.flags
Normal file
1
test/fix/jp.flags
Normal file
@@ -0,0 +1 @@
|
||||
-j
|
||||
BIN
test/fix/jp.gb
Normal file
BIN
test/fix/jp.gb
Normal file
Binary file not shown.
BIN
test/fix/logo-trash.bin
Normal file
BIN
test/fix/logo-trash.bin
Normal file
Binary file not shown.
0
test/fix/logo-trash.err
Normal file
0
test/fix/logo-trash.err
Normal file
1
test/fix/logo-trash.flags
Normal file
1
test/fix/logo-trash.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f L
|
||||
BIN
test/fix/logo-trash.gb
Normal file
BIN
test/fix/logo-trash.gb
Normal file
Binary file not shown.
BIN
test/fix/logo.bin
Normal file
BIN
test/fix/logo.bin
Normal file
Binary file not shown.
0
test/fix/logo.err
Normal file
0
test/fix/logo.err
Normal file
1
test/fix/logo.flags
Normal file
1
test/fix/logo.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f l
|
||||
BIN
test/fix/logo.gb
Normal file
BIN
test/fix/logo.gb
Normal file
Binary file not shown.
BIN
test/fix/mbc.bin
Normal file
BIN
test/fix/mbc.bin
Normal file
Binary file not shown.
0
test/fix/mbc.err
Normal file
0
test/fix/mbc.err
Normal file
1
test/fix/mbc.flags
Normal file
1
test/fix/mbc.flags
Normal file
@@ -0,0 +1 @@
|
||||
-m 177
|
||||
BIN
test/fix/mbc.gb
Normal file
BIN
test/fix/mbc.gb
Normal file
Binary file not shown.
BIN
test/fix/mbcless-ram.bin
Normal file
BIN
test/fix/mbcless-ram.bin
Normal file
Binary file not shown.
1
test/fix/mbcless-ram.err
Normal file
1
test/fix/mbcless-ram.err
Normal file
@@ -0,0 +1 @@
|
||||
warning: MBC "ROM" has no RAM, but RAM size was set to 2
|
||||
1
test/fix/mbcless-ram.flags
Normal file
1
test/fix/mbcless-ram.flags
Normal file
@@ -0,0 +1 @@
|
||||
-m ROM -r 2
|
||||
BIN
test/fix/mbcless-ram.gb
Normal file
BIN
test/fix/mbcless-ram.gb
Normal file
Binary file not shown.
3
test/fix/new-lic-trunc.bin
Normal file
3
test/fix/new-lic-trunc.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
€ÁÓi& š˙ĹyŕĺSĐěäŇaJ¨ň‘'ZDÉyşč§1nź
|
||||
¬íŮ9µQńHĽpçąyF›ź”»ŃŐß<C590>ĐÖ8^ŞŠ]Ŕbł˘ F‰§mĹ“š
|
||||
ױьM–‡FíîWóŐwţk÷°± O`ŘÚíčUě0ńär©íşĆΙܥâ±7"®”"fęŕ<C499>ďfw– Xë<58>:Đ޸ň˝XpéVËÄŞ\-¶`xť˛ř*NđŐy†a4ÄJĹç´ÄëˇăÜŠĽp—„ľ.7öc+ÝQ<C39D>řŐŽ·B÷He<48>zĽ–§1ĘO<n_&KHhŁ´‹v‘Žűx榢Y˘—ČAŮÇćĚ;Cęożlý :ü®Ą®żĚ’ýÜ©!–fřěľ<>PĄ`@¸:‡z‰v‰˝ädéŁZÓ"±a*m*.:?¤ŁďżĎYË›c3”Č >#`çí\_Úw<C39A>™Ď
|
||||
1
test/fix/new-lic-trunc.err
Normal file
1
test/fix/new-lic-trunc.err
Normal file
@@ -0,0 +1 @@
|
||||
warning: Truncating new licensee "HOMEBREW" to 2 chars
|
||||
1
test/fix/new-lic-trunc.flags
Normal file
1
test/fix/new-lic-trunc.flags
Normal file
@@ -0,0 +1 @@
|
||||
-k HOMEBREW
|
||||
3
test/fix/new-lic-trunc.gb
Normal file
3
test/fix/new-lic-trunc.gb
Normal file
@@ -0,0 +1,3 @@
|
||||
€ÁÓi& šÿÅyàåSÐìäÒaJ¨ò‘'ZDÉyºè§1nŸ
|
||||
¬íÙ9µQñH¼pç¹yF›Ÿ”»ÑÕߘÐÖ8^ªŠ]Àb³¢ F‰§mÅ“š
|
||||
ױьM–‡FíîWóÕwþk÷°± O`ØÚíèUì0ñär©íºÆÎ™Ü¥â±7"®”"fêàˆïfw– Xë<58>:ÐÞ¸ò½XpéVËĪ\-¶`x<>²ø*NðÕy†a4ÄJÅç´Äë¡ãÜŠ¼p—„¾.7öc+ÝQ<C39D>øÕŽ·B÷He<48>z¼–§1ÊO<n_&KHh£´‹v‘Žûx榢Y¢—ÈAÙÇæÌ;Cêo¿lý :ü®¥®¿Ì’ýÜ©!–føì¾<>P¥`@¸:‡z‰v‰½ädé£ZÓ"±a*m*.:?¤£ï¿ÏYHOc3”È >#`çí\_Úw<C39A>™Ï
|
||||
3
test/fix/new-lic.bin
Normal file
3
test/fix/new-lic.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
€ÁÓi& š˙ĹyŕĺSĐěäŇaJ¨ň‘'ZDÉyşč§1nź
|
||||
¬íŮ9µQńHĽpçąyF›ź”»ŃŐß<C590>ĐÖ8^ŞŠ]Ŕbł˘ F‰§mĹ“š
|
||||
ױьM–‡FíîWóŐwţk÷°± O`ŘÚíčUě0ńär©íşĆΙܥâ±7"®”"fęŕ<C499>ďfw– Xë<58>:Đ޸ň˝XpéVËÄŞ\-¶`xť˛ř*NđŐy†a4ÄJĹç´ÄëˇăÜŠĽp—„ľ.7öc+ÝQ<C39D>řŐŽ·B÷He<48>zĽ–§1ĘO<n_&KHhŁ´‹v‘Žűx榢Y˘—ČAŮÇćĚ;Cęożlý :ü®Ą®żĚ’ýÜ©!–fřěľ<>PĄ`@¸:‡z‰v‰˝ädéŁZÓ"±a*m*.:?¤ŁďżĎYË›c3”Č >#`çí\_Úw<C39A>™Ď
|
||||
0
test/fix/new-lic.err
Normal file
0
test/fix/new-lic.err
Normal file
1
test/fix/new-lic.flags
Normal file
1
test/fix/new-lic.flags
Normal file
@@ -0,0 +1 @@
|
||||
-k HB
|
||||
3
test/fix/new-lic.gb
Normal file
3
test/fix/new-lic.gb
Normal file
@@ -0,0 +1,3 @@
|
||||
€ÁÓi& š˙ĹyŕĺSĐěäŇaJ¨ň‘'ZDÉyşč§1nź
|
||||
¬íŮ9µQńHĽpçąyF›ź”»ŃŐß<C590>ĐÖ8^ŞŠ]Ŕbł˘ F‰§mĹ“š
|
||||
ױьM–‡FíîWóŐwţk÷°± O`ŘÚíčUě0ńär©íşĆΙܥâ±7"®”"fęŕ<C499>ďfw– Xë<58>:Đ޸ň˝XpéVËÄŞ\-¶`xť˛ř*NđŐy†a4ÄJĹç´ÄëˇăÜŠĽp—„ľ.7öc+ÝQ<C39D>řŐŽ·B÷He<48>zĽ–§1ĘO<n_&KHhŁ´‹v‘Žűx榢Y˘—ČAŮÇćĚ;Cęożlý :ü®Ą®żĚ’ýÜ©!–fřěľ<>PĄ`@¸:‡z‰v‰˝ädéŁZÓ"±a*m*.:?¤ŁďżĎYHBc3”Č >#`çí\_Úw<C39A>™Ď
|
||||
2
test/fix/noexist.err
Normal file
2
test/fix/noexist.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: Failed to open "noexist" for reading+writing: No such file or directory
|
||||
Fixing "noexist" failed with 1 error
|
||||
BIN
test/fix/old-lic-hex.bin
Normal file
BIN
test/fix/old-lic-hex.bin
Normal file
Binary file not shown.
0
test/fix/old-lic-hex.err
Normal file
0
test/fix/old-lic-hex.err
Normal file
1
test/fix/old-lic-hex.flags
Normal file
1
test/fix/old-lic-hex.flags
Normal file
@@ -0,0 +1 @@
|
||||
-l 0x2a
|
||||
BIN
test/fix/old-lic-hex.gb
Normal file
BIN
test/fix/old-lic-hex.gb
Normal file
Binary file not shown.
2
test/fix/old-lic.bin
Normal file
2
test/fix/old-lic.bin
Normal file
@@ -0,0 +1,2 @@
|
||||
”EZ/:ÂÔÎ øÐ€šÜJ/ŒÝõÊ_<ð&ÑA¢Ž˜ÃXgAP
|
||||
`°1@Wh<>õ||ø»e뻬e^"7(*YV<59>ÍTõœ‘OY!Þâ Ì”]‚ˆ’=ÎðÈy–V~xæaÛ]á;Ÿúý¡ÀzUmòüz:d@ÖªØb¸ 'vʆqËWŒÚ_ÂæºÓì2)G<05>v(k¨ª”g,<2C>p*@ùÚ!¶Dõ„0kãÿ§á<C2A7>eË%ÇšodÛñÎ$r‰ÚÊ<è:”æcgiŒ"aF'=f䳚ºEcVcL.03"w),æ HQi‚DŸfÝ3<C39D>s(-$?a0ó@†¦.O¡B{yÍz‰Ê«½ hØ/\šSŠ]óoúåm'2D#/grÕW3¸Î§<C38E>°&UÓÌ÷EgMhÚ-A¾6ƒ…²ÿ…4M|1âq0Oì*$²Où/n²ú•gžš2R»æQˆXú_½¬“[숔ÔpÒÚ\°)ƧTS±T”aP*'[ïx÷Ò>ß…¤Ub[Ô¦ã9sÎçI‰ÊP
|
||||
0
test/fix/old-lic.err
Normal file
0
test/fix/old-lic.err
Normal file
1
test/fix/old-lic.flags
Normal file
1
test/fix/old-lic.flags
Normal file
@@ -0,0 +1 @@
|
||||
-l 42
|
||||
2
test/fix/old-lic.gb
Normal file
2
test/fix/old-lic.gb
Normal file
@@ -0,0 +1,2 @@
|
||||
”EZ/:ÂÔÎ øÐ€šÜJ/ŒÝõÊ_<ð&ÑA¢Ž˜ÃXgAP
|
||||
`°1@Wh<>õ||ø»e뻬e^"7(*YV<59>ÍTõœ‘OY!Þâ Ì”]‚ˆ’=ÎðÈy–V~xæaÛ]á;Ÿúý¡ÀzUmòüz:d@ÖªØb¸ 'vʆqËWŒÚ_ÂæºÓì2)G<05>v(k¨ª”g,<2C>p*@ùÚ!¶Dõ„0kãÿ§á<C2A7>eË%ÇšodÛñÎ$r‰ÚÊ<è:”æcgiŒ"aF'=f䳚ºEcVcL.03"w),æ HQi‚DŸfÝ3<C39D>s(-$?a0ó@†¦.O¡B{yÍz‰Ê«½ hØ/\šSŠ]óoúåm'2D#/grÕW3¸Î§<C38E>°&UÓÌ÷EgMhÚ-A¾*6ƒ…²ÿ…4M|1âq0Oì*$²Où/n²ú•gžš2R»æQˆXú_½¬“[숔ÔpÒÚ\°)ƧTS±T”aP*'[ïx÷Ò>ß…¤Ub[Ô¦ã9sÎçI‰ÊP
|
||||
BIN
test/fix/padding-bigperfect.bin
Normal file
BIN
test/fix/padding-bigperfect.bin
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user