Differentiate the ROM from cartridges.
This commit is contained in:
1 parent
671d831f84
commit
d2090c5b8d
2 files changed
+11
-4
No files matched your search
@@ -94,7 +94,7 @@ struct ConcreteMachine:
|
||||
{
|
||||
auto rom = roms.find(BasicROM)->second;
|
||||
memory_.set_monitor(rom.end() - 0x1000, rom.end());
|
||||
memory_.set_rom(std::vector<uint8_t>(rom.begin(), rom.end() - 0x1000));
|
||||
memory_.set_rom(rom.begin(), rom.end() - 0x1000);
|
||||
}
|
||||
|
||||
if(has_floppy) {
|
||||
@@ -605,7 +605,7 @@ private:
|
||||
if(rom.size() < 16384) {
|
||||
rom.resize(16384);
|
||||
}
|
||||
memory_.set_rom(rom);
|
||||
memory_.set_cartridge(rom);
|
||||
}
|
||||
|
||||
if(has_floppy) {
|
||||
|
||||
@@ -43,11 +43,18 @@ public:
|
||||
std::copy(begin, end, monitor_.begin());
|
||||
}
|
||||
|
||||
void set_rom(const std::vector<uint8_t> &rom) {
|
||||
rom_ = rom;
|
||||
template <typename IteratorT>
|
||||
void set_rom(const IteratorT begin, const IteratorT end) {
|
||||
rom_ = std::vector<uint8_t>(begin, end);
|
||||
update_commutable_rom();
|
||||
}
|
||||
|
||||
void set_cartridge(const std::vector<uint8_t> &cartridge) {
|
||||
if constexpr (!is_mo6) {
|
||||
set_rom(cartridge.begin(), cartridge.end());
|
||||
}
|
||||
}
|
||||
|
||||
void set_floppy_rom(const std::vector<uint8_t> &rom) {
|
||||
std::copy_n(rom.begin(), std::min(rom.size(), floppy_rom_.size()), floppy_rom_.begin());
|
||||
set_read(0xa, floppy_rom_.data());
|
||||
|
||||
Reference in new issue
Block a user