1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-11-02 18:16:08 +00:00

Export memory size into traits.

This commit is contained in:
Thomas Harte
2023-01-08 21:37:20 -05:00
parent ef67205ce8
commit a0a835cf10
2 changed files with 12 additions and 13 deletions

View File

@@ -30,6 +30,18 @@ constexpr bool is_classic_vdp(Personality p) {
p == Personality::GGVDP;
}
constexpr size_t memory_size(Personality p) {
switch(p) {
case TI::TMS::TMS9918A:
case TI::TMS::SMSVDP:
case TI::TMS::SMS2VDP:
case TI::TMS::GGVDP: return 16 * 1024;
case TI::TMS::MDVDP: return 64 * 1024;
case TI::TMS::V9938: return 128 * 1024;
case TI::TMS::V9958: return 192 * 1024;
}
}
}
}