34 inline void sync(EmuTime::param time) {
35 cmdEngine->
sync(time);
38 [[nodiscard]]
static inline unsigned transformBx(
unsigned address) {
39 return ((address & 1) << 18) | ((address & 0x7FFFE) >> 1);
41 [[nodiscard]]
static inline unsigned transformP1(
unsigned address) {
44 [[nodiscard]]
static inline unsigned transformP2(
unsigned address) {
46 if (address < 0x78000) {
48 }
else if (address < 0x7C000) {
49 return address - 0x3C000;
55 [[nodiscard]]
inline byte readVRAMBx(
unsigned address)
const {
58 [[nodiscard]]
inline byte readVRAMP1(
unsigned address)
const {
61 [[nodiscard]]
inline byte readVRAMP2(
unsigned address)
const {
79 data.
write(address, value);
82 [[nodiscard]]
byte readVRAMCPU(
unsigned address, EmuTime::param time);
83 void writeVRAMCPU(
unsigned address,
byte val, EmuTime::param time);
87 template<
typename Archive>
88 void serialize(Archive& ar,
unsigned version);
91 unsigned mapAddress(
unsigned address)
const;
void write(size_t addr, byte value)
void sync(EmuTime::param time)
Synchronizes the command engine with the V9990.
void writeVRAMCPU(unsigned address, byte val, EmuTime::param time)
void writeVRAMP2(unsigned address, byte value)
byte readVRAMDirect(unsigned address) const
void writeVRAMP1(unsigned address, byte value)
byte readVRAMP2(unsigned address) const
void serialize(Archive &ar, unsigned version)
byte readVRAMBx(unsigned address) const
void sync(EmuTime::param time)
Update VRAM state to specified moment in time.
static constexpr unsigned VRAM_SIZE
VRAM Size.
byte readVRAMCPU(unsigned address, EmuTime::param time)
void writeVRAMDirect(unsigned address, byte value)
void setCmdEngine(V9990CmdEngine &cmdEngine_)
byte readVRAMP1(unsigned address) const
static unsigned transformP2(unsigned address)
void writeVRAMBx(unsigned address, byte value)
static unsigned transformBx(unsigned address)
static unsigned transformP1(unsigned address)
Implementation of the Yamaha V9990 VDP as used in the GFX9000 cartridge by Sunrise.
This file implemented 3 utility functions: