Skip to content

Commit

Permalink
Warn when loading ROMs with RAM sizes less than a bank
Browse files Browse the repository at this point in the history
  • Loading branch information
LIJI32 committed Nov 16, 2024
1 parent 101e894 commit 3bee0de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Core/mbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ void GB_configure_cart(GB_gameboy_t *gb)
}
}

if (gb->mbc_ram_size && gb->mbc_ram_size < 0x2000) {
GB_log(gb, "This ROM requests a RAM size smaller than a bank, it may misbehave if this was not done intentionally.\n");
}

if (gb->mbc_ram && old_mbc_ram_size != gb->mbc_ram_size) {
free(gb->mbc_ram);
gb->mbc_ram = NULL;
Expand Down

0 comments on commit 3bee0de

Please sign in to comment.