Use enum SLOTS and remove pre-processor SLOTn defines

This commit is contained in:
tomcw 2021-05-19 21:26:23 +01:00
parent de7f35e6bd
commit 05b9668f72
5 changed files with 3 additions and 8 deletions

View File

@ -23,7 +23,7 @@ enum SS_CARDTYPE
CT_Saturn128K, // Saturn 128K (but may be populated with less RAM, in multiples of 16K)
};
enum SLOTS { SLOT0=0, SLOT1, SLOT2, SLOT3, SLOT4, SLOT5, SLOT6, SLOT7 };
enum SLOTS { SLOT0=0, SLOT1, SLOT2, SLOT3, SLOT4, SLOT5, SLOT6, SLOT7, NUM_SLOTS };
class Card
{

View File

@ -6,8 +6,6 @@ const double CLK_6502_NTSC = (_14M_NTSC * 65.0) / (65.0*14.0+2.0); // 65 cycles
const double CLK_6502_PAL = (_14M_PAL * 65.0) / (65.0*14.0+2.0);
//const double CLK_6502 = 23 * 44100; // 1014300
#define NUM_SLOTS 8
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))

View File

@ -175,7 +175,7 @@ static BYTE g_nHD_Command;
static HDD g_HardDisk[NUM_HARDDISKS];
static bool g_bSaveDiskImage = true; // Save the DiskImage name to Registry
static UINT g_uSlot = 7;
static UINT g_uSlot = SLOT7;
//===========================================================================

View File

@ -29,7 +29,7 @@ public:
static BYTE __stdcall IO(WORD PC, WORD uAddr, BYTE bWrite, BYTE uValue, ULONG nExecutedCycles);
static const UINT kMemModeInitialState;
static const UINT kSlot0 = 0;
static const UINT kSlot0 = SLOT0;
private:
UINT m_uLastRamWrite;

View File

@ -98,9 +98,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define SY6522_DEVICE_A 0
#define SY6522_DEVICE_B 1
#define SLOT4 4
#define SLOT5 5
#define NUM_MB 2
#define NUM_DEVS_PER_MB 2
#define NUM_AY8910 (NUM_MB*NUM_DEVS_PER_MB)