mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-01 10:43:06 +02:00
Properly setting MBC RAM
This commit is contained in:
@@ -109,6 +109,7 @@ void GB_configure_cart(GB_gameboy_t *gb)
|
||||
static const int ram_sizes[256] = {0, 0x800, 0x2000, 0x8000, 0x20000, 0x10000};
|
||||
gb->mbc_ram_size = ram_sizes[gb->rom[0x149]];
|
||||
gb->mbc_ram = malloc(gb->mbc_ram_size);
|
||||
memset(gb->mbc_ram, 0xFF, gb->mbc_ram_size);
|
||||
}
|
||||
|
||||
/* MBC1 has at least 3 types of wiring (We currently support two (Standard and 4bit-MBC1M) of these).
|
||||
|
Reference in New Issue
Block a user