openMSX
RomTypes.hh
Go to the documentation of this file.
1 #ifndef ROMTYPES_HH
2 #define ROMTYPES_HH
3 
4 namespace openmsx {
5 
6 enum RomType {
7  // Order doesn't matter (I sorted them alphabetically)
68 
69  ROM_END_OF_UNORDERED_LIST, // not an actual romtype
70 
71  // For these the numeric value does matter
72  ROM_PAGE0 = 128 + 1, // value of lower 4 bits matters
73  ROM_PAGE1 = 128 + 2,
74  ROM_PAGE01 = 128 + 3,
75  ROM_PAGE2 = 128 + 4,
76  ROM_PAGE12 = 128 + 6,
77  ROM_PAGE012 = 128 + 7,
78  ROM_PAGE3 = 128 + 8,
79  ROM_PAGE23 = 128 + 12,
80  ROM_PAGE123 = 128 + 14,
81  ROM_PAGE0123 = 128 + 15,
82  ROM_MIRRORED0000 = 144 + 0, // value of lower 3 bits matters
83  ROM_MIRRORED4000 = 144 + 2,
84  ROM_MIRRORED8000 = 144 + 4,
85  ROM_MIRROREDC000 = 144 + 6,
86  ROM_NORMAL0000 = 152 + 0, // value of lower 3 bits matters
87  ROM_NORMAL4000 = 152 + 2,
88  ROM_NORMAL8000 = 152 + 4,
89  ROM_NORMALC000 = 152 + 6,
90 
91  ROM_UNKNOWN = 256,
92  ROM_ALIAS = 512, // no other enum value can have this bit set
93 };
94 
95 // Make sure there is no overlap in numeric enum values between the unordered
96 // and ordered part of the enum list.
97 static_assert(int(ROM_END_OF_UNORDERED_LIST) < int(ROM_PAGE0), "renumber romtypes");
98 
99 } // namespace openmsx
100 
101 #endif
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5