lib/src/mappers/nes_mapper_nrom.cpp
//
// Called when mapper is loaded into memory
// Useful when all you need is a one-time memcpy
//
Called when mapper is loaded into memory
Useful when all you need is a one-time memcpy
Called when mapper is loaded into memory Useful when all you need is a one - time memcpy
void nes_mapper_nrom::on_load_ram(nes_memory &mem)
{
    mem.set_bytes(0x8000, _prg_rom->data(), _prg_rom->size());
    if (_prg_rom->size() == 0x4000)
    {
        mem.set_bytes(0xc000, _prg_rom->data(), _prg_rom->size());
    }
}
void nes_mapper_nrom :: on_load_ram ( nes_memory & mem ) { mem . set_bytes ( 0x8000 , _prg_rom -> data ( ) , _prg_rom -> size ( ) ) ; if ( _prg_rom -> size ( ) == 0x4000 ) { mem . set_bytes ( 0xc000 , _prg_rom -> data ( ) , _prg_rom -> size ( ) ) ; } }
Called when mapper is loaded into memory
Useful when all you need is a one-time memcpy
Called when mapper is loaded into memory Useful when all you need is a one - time memcpy
// memcpy // "map" 0xC000 to 0x8000