Minor update: convert a define to C++ constexpr.

This commit is contained in:
Stephen Anthony 2022-02-24 16:55:05 -03:30
parent 1e72dcfbcd
commit 1920d761ea
2 changed files with 5 additions and 7 deletions

View File

@ -28,9 +28,6 @@
#include "TIA.hxx"
#include "exception/FatalEmulationError.hxx"
static constexpr uInt8 COMMSTREAM = 0x20,
JUMPSTREAM_BASE = 0x21;
static constexpr bool FAST_FETCH_ON(uInt8 mode) { return (mode & 0x0F) == 0; }
static constexpr bool DIGITAL_AUDIO_ON(uInt8 mode) { return (mode & 0xF0) == 0; }

View File

@ -43,7 +43,7 @@ class System;
used. There are 2 versions of the driver, with minor changes due to hardware.
1) 32K ROM and 8K RAM - compatible with 48-Pin LPC210X Family (Harmony, Harmony Encore, Melody)
2) 64/128/256/512K ROM and16/32K RAM - compatible with 64-Pin LPC213X Family
The CDFJ+ driver can be modified to also override LDX # and LDY # for fast fetcher use. Additionally
an offset can be set for the Fast Fetchers - if the offset was set to $80 then LDA #$85 would do a fast fetch
of datastream 5. As implemented Stella's CDFJ+ support expects these to have been set in the driver ahead
@ -59,8 +59,6 @@ class System;
Thomas Jentzsch, Stephen Anthony, Bradford W. Mott
*/
#define LDAXY_OVERRIDE_INACTIVE 0xFFFF
class CartridgeCDF : public CartridgeARM
{
friend class CartridgeCDFWidget;
@ -274,6 +272,9 @@ class CartridgeCDF : public CartridgeARM
bool isPlusROM() const override { return myPlusROM->isValid(); }
private:
static constexpr uInt8 COMMSTREAM = 0x20, JUMPSTREAM_BASE = 0x21;
static constexpr uInt16 LDAXY_OVERRIDE_INACTIVE = 0xFFFF;
// The ROM image of the cartridge
ByteBuffer myImage{nullptr};
@ -345,7 +346,7 @@ class CartridgeCDF : public CartridgeARM
// set to address of #value if last byte peeked was A9 (LDA #),
// or for CDFJ+ variations if A0 (LDY #) or A2 (LDX #)
uInt16 myLDAXYimmediateOperandAddress{LDAXY_OVERRIDE_INACTIVE};
// Some CDFJ+ drivers also override LDX # and/or LDY # for fast fetcher
// use. These flag if this has been done.
bool myLDXenabled{false};