1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-02 20:30:00 +00:00

Ensured the 1540 ROM gets installed, at least.

This commit is contained in:
Thomas Harte 2016-07-05 16:54:25 -04:00
parent 47548dcedc
commit d1eea6943d
4 changed files with 7 additions and 2 deletions

View File

@ -29,7 +29,7 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin
return 1;
}
void Machine::set_rom(uint8_t *rom)
void Machine::set_rom(const uint8_t *rom)
{
memcpy(_rom, rom, sizeof(_rom));
}

View File

@ -21,7 +21,7 @@ class Machine:
public:
unsigned int perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value);
void set_rom(uint8_t *rom);
void set_rom(const uint8_t *rom);
private:
uint8_t _ram[0x800];

View File

@ -158,6 +158,7 @@ void Machine::set_rom(ROMSlot slot, size_t length, const uint8_t *data)
case Characters: target = _characterROM; max_length = 0x1000; break;
case BASIC: target = _basicROM; break;
case Drive:
if(_c1540) _c1540->set_rom(data);
return;
}

View File

@ -31,6 +31,10 @@ class Vic20Document: MachineDocument {
vic20.setBASICROM(basic)
vic20.setCharactersROM(characters)
}
if let drive = dataForResource("1540", ofType: "bin", inDirectory: "ROMImages/Commodore1540") {
vic20.setDriveROM(drive)
}
}
override class func autosavesInPlace() -> Bool {