loading roms

This commit is contained in:
Jairinho 2022-02-28 13:21:39 -03:00
parent 3598fd199e
commit 5fc8106870
No known key found for this signature in database
GPG Key ID: 954589B18A21D5B6

View File

@ -55,6 +55,12 @@ func (emulator *Emulator) Reset() {
// clean display
emulator.ClearScreen()
// reload ROM
emulator.LoadROM(emulator.ROM)
}
func (emulator *Emulator) LoadROM(rom []uint8) {
emulator.ROM = rom
// load rom on memory
copy(emulator.Memory[ProgramAddress:], emulator.ROM)
}