Skip to content

Commit

Permalink
Fixed the management of ROMs with less than 16KB of PRGROM (#190).
Browse files Browse the repository at this point in the history
  • Loading branch information
punesemu committed Nov 11, 2023
1 parent 82b1285 commit 70bf93f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -4122,9 +4122,9 @@ static const _dbelement dblist[] = {
/* Stroke & Match Golf (VS) [!].nes */
{"8b0ea39aa9b3cfde4dcd376959dade1d79618c4d", 99, DEFAULT, DEFAULT, DEFAULT, RP2C03B, DEFAULT, NOEXTRA},
/* Tetris (VS) [a1].nes */
{"83f26eb28474806561a3e5b7c1266c6f138f801b", 99, DEFAULT, DEFAULT, DEFAULT, RP2C03B, DEFAULT, NOEXTRA},
{"83f26eb28474806561a3e5b7c1266c6f138f801b", 99, DEFAULT, DEFAULT, DEFAULT, RP2C04, DEFAULT, NOEXTRA},
/* Tetris (VS).nes */
{"810442b860bcef2fd54f9c76f3b8058c9a769b15", 99, DEFAULT, DEFAULT, DEFAULT, RP2C03B, DEFAULT, NOEXTRA},
{"810442b860bcef2fd54f9c76f3b8058c9a769b15", 99, DEFAULT, DEFAULT, DEFAULT, RP2C04, DEFAULT, NOEXTRA},
/* Vs. Battle Shitty by Jackass (Hack).nes */
{"6be8870249d8b1a80388352bbf8c7a46dccc40ff", 99, DEFAULT, DEFAULT, DEFAULT, RP2C04, DEFAULT, NOEXTRA},
/* VS. Blink (SMB1 VS Hack) [o1].nes */
Expand Down
5 changes: 4 additions & 1 deletion src/core/ines.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,10 @@ BYTE ines_load_rom(void) {
return (EXIT_ERROR);
}

if (rom_mem_ctrl_memcpy_truncated(prgrom_pnt(), &rom, info.mapper.prgrom_size) == EXIT_ERROR) {
if (rom_mem_ctrl_memcpy_truncated(
// "Galaxian (J) (REV0) [!].nes" ha solo 8k di prgrom
prgrom_pnt() + (info.mapper.prgrom_size < S16K ? prgrom_size() - info.mapper.prgrom_size : 0),
&rom, info.mapper.prgrom_size) == EXIT_ERROR) {
info.prg_truncated = TRUE;
}

Expand Down

0 comments on commit 70bf93f

Please sign in to comment.