1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-25 16:31:42 +00:00

Increase notes for future self.

This commit is contained in:
Thomas Harte 2023-01-15 23:12:36 -05:00
parent 183cb519e7
commit 1a58ddaa67

View File

@ -855,12 +855,18 @@ class ConcreteMachine:
/// Optionally attaches non-default logic to any of the four things selectable /// Optionally attaches non-default logic to any of the four things selectable
/// via the primary slot register. /// via the primary slot register.
///
/// In principle one might want to attach a handler to a secondary slot rather
/// than a primary, but in practice that isn't required in the slot allocation used
/// by this emulator.
struct PrimarySlot: public MSX::PrimarySlot { struct PrimarySlot: public MSX::PrimarySlot {
using MSX::PrimarySlot::PrimarySlot; using MSX::PrimarySlot::PrimarySlot;
HalfCycles cycles_since_update;
/// Storage for a slot-specialised handler. /// Storage for a slot-specialised handler.
std::unique_ptr<MemorySlotHandler> handler; std::unique_ptr<MemorySlotHandler> handler;
/// The handler is updated just-in-time.
HalfCycles cycles_since_update;
}; };
PrimarySlot memory_slots_[4]; PrimarySlot memory_slots_[4];
PrimarySlot *final_slot_ = nullptr; PrimarySlot *final_slot_ = nullptr;
@ -883,6 +889,23 @@ class ConcreteMachine:
// //
// Various helpers that dictate the slot arrangement used by this emulator. // Various helpers that dictate the slot arrangement used by this emulator.
// //
// That arrangement is:
//
// Slot 0 is the BIOS, and does not support secondary paging.
// Slot 1 holds a [game, probably] cartridge, if inserted. No secondary paging.
// Slot 2 holds the disk cartridge, if inserted.
//
// On an MSX 1, Slot 3 holds 64kb of RAM.
//
// On an MSX 2:
//
// Slot 3-0 holds a larger amount of RAM (cf. RAMSize) that is subject to the
// FC-FF paging selections.
//
// Slot 3-1 holds the BIOS extension ROM.
//
// [Slot 3-2 will likely hold MSX-MUSIC, but that's TODO]
//
MemorySlot &bios_slot() { MemorySlot &bios_slot() {
return memory_slots_[0].subslot(0); return memory_slots_[0].subslot(0);
} }