1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 01:31:42 +00:00

Merge branch 'master' into 68000

This commit is contained in:
Thomas Harte 2019-04-16 14:07:23 -04:00
commit 6076b8df69

View File

@ -209,7 +209,9 @@ class ConcreteMachine:
// Fetch the necessary ROMs; try the region-specific ROM first, // Fetch the necessary ROMs; try the region-specific ROM first,
// but failing that fall back on patching the main one. // but failing that fall back on patching the main one.
size_t disk_index = 0;
if(target.has_disk_drive) { if(target.has_disk_drive) {
disk_index = rom_names.size();
rom_names.push_back("disk.rom"); rom_names.push_back("disk.rom");
} }
const auto roms = rom_fetcher("MSX", rom_names); const auto roms = rom_fetcher("MSX", rom_names);
@ -227,7 +229,6 @@ class ConcreteMachine:
memory_slots_[0].source = std::move(*roms[0]); memory_slots_[0].source = std::move(*roms[0]);
memory_slots_[0].source.resize(32768); memory_slots_[0].source.resize(32768);
memory_slots_[0].source[0x2b] = uint8_t( memory_slots_[0].source[0x2b] = uint8_t(
(is_ntsc ? 0x00 : 0x80) | (is_ntsc ? 0x00 : 0x80) |
(date_format << 4) | (date_format << 4) |
@ -252,7 +253,7 @@ class ConcreteMachine:
// Add a disk cartridge if any disks were supplied. // Add a disk cartridge if any disks were supplied.
if(target.has_disk_drive) { if(target.has_disk_drive) {
memory_slots_[2].set_handler(new DiskROM(memory_slots_[2].source)); memory_slots_[2].set_handler(new DiskROM(memory_slots_[2].source));
memory_slots_[2].source = std::move(*roms[1]); memory_slots_[2].source = std::move(*roms[disk_index]);
memory_slots_[2].source.resize(16384); memory_slots_[2].source.resize(16384);
map(2, 0, 0x4000, 0x2000); map(2, 0, 0x4000, 0x2000);