src/memory.c
static void gb_memory_change_ram_bank(gb_memory *mem, int bank)
{
    if (mem->current_ram_bank == bank)
        return;

    if (!mem->rtc_access) {
        gb_memory_ram_flush(mem);
    }
    memcpy(mem->mem + 0xa000, mem->ram_banks + bank * 0x2000, 0x2000);
    mem->rtc_access = false;

    mem->current_ram_bank = bank;
}
/* change RAM bank to bank if supported */
change RAM bank to bank if supported
change RAM bank to bank if supported
static void gb_memory_change_ram_bank(gb_memory *mem, int bank)
{
    if (mem->current_ram_bank == bank)
        return;
    if (!mem->rtc_access) {
        gb_memory_ram_flush(mem);
    }
    memcpy(mem->mem + 0xa000, mem->ram_banks + bank * 0x2000, 0x2000);
    mem->rtc_access = false;
    mem->current_ram_bank = bank;
}
static void gb_memory_change_ram_bank ( gb_memory * mem , int bank ) { if ( mem -> current_ram_bank == bank ) return ; if ( ! mem -> rtc_access ) { gb_memory_ram_flush ( mem ) ; } memcpy ( mem -> mem + 0xa000 , mem -> ram_banks + bank * 0x2000 , 0x2000 ) ; mem -> rtc_access = false ; mem -> current_ram_bank = bank ; }
change RAM bank to bank if supported
change RAM bank to bank if supported