mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-27 06:35:04 +00:00
Made an initial, very naive attempt to recognise two types of expanded cartridge: those with a superchip and those with a CBS RAM+, in both cases by looking for instructions that appear to write into cartridge space.
This commit is contained in:
parent
153525f23d
commit
8b1ec827e0
@ -27,9 +27,10 @@ void StaticAnalyser::Atari::AddTargets(
|
||||
target.tapes = tapes;
|
||||
target.cartridges = cartridges;
|
||||
target.atari.paging_model = Atari2600PagingModel::None;
|
||||
target.atari.uses_superchip = false;
|
||||
|
||||
// try to figure out the paging scheme
|
||||
/* if(!cartridges.empty())
|
||||
if(!cartridges.empty())
|
||||
{
|
||||
const std::list<Storage::Cartridge::Cartridge::Segment> &segments = cartridges.front()->get_segments();
|
||||
if(segments.size() == 1)
|
||||
@ -48,9 +49,23 @@ void StaticAnalyser::Atari::AddTargets(
|
||||
}
|
||||
StaticAnalyser::MOS6502::Disassembly disassembly =
|
||||
StaticAnalyser::MOS6502::Disassemble(segment.data, 0x1000, {entry_address, break_address}, 0x1fff);
|
||||
printf("%p", &disassembly);
|
||||
|
||||
// check for any sort of on-cartridge RAM; that might imply a Super Chip or else immediately tip the
|
||||
// hat that this is a CBS RAM+ cartridge
|
||||
if(!disassembly.internal_stores.empty())
|
||||
{
|
||||
bool writes_above_128 = false;
|
||||
for(uint16_t address : disassembly.internal_stores)
|
||||
{
|
||||
writes_above_128 |= ((address & 0x1fff) > 0x10ff) && ((address & 0x1fff) < 0x1200);
|
||||
}
|
||||
if(writes_above_128)
|
||||
target.atari.paging_model = Atari2600PagingModel::CBSRamPlus;
|
||||
else
|
||||
target.atari.uses_superchip = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
destination.push_back(target);
|
||||
}
|
||||
|
@ -32,7 +32,8 @@ enum class Atari2600PagingModel {
|
||||
Atari32k,
|
||||
ActivisionStack,
|
||||
ParkerBros,
|
||||
Tigervision
|
||||
Tigervision,
|
||||
CBSRamPlus
|
||||
};
|
||||
|
||||
/*!
|
||||
@ -57,6 +58,7 @@ struct Target {
|
||||
|
||||
struct {
|
||||
Atari2600PagingModel paging_model;
|
||||
bool uses_superchip;
|
||||
} atari;
|
||||
|
||||
struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user