openMSX
YMF278B.hh
Go to the documentation of this file.
1#ifndef YMF278B_HH
2#define YMF278B_HH
3
4#include "YMF262.hh"
5#include "YMF278.hh"
6
7#include "serialize.hh"
8
9namespace openmsx {
10
11// This combines the FM-part (YMF262) and the Wave-part (YMF278) into a single chip.
13{
14public:
15 YMF278B(const std::string& name, size_t ramSize, const DeviceConfig& config,
16 YMF278::SetupMemPtrFunc setupMemPtrs, EmuTime::param time);
17
18 void powerUp(EmuTime::param time);
19 void reset(EmuTime::param time);
20 [[nodiscard]] byte readIO(word port, EmuTime::param time);
21 [[nodiscard]] byte peekIO(word port, EmuTime::param time) const;
22 void writeIO(word port, byte value, EmuTime::param time);
24
25 void serialize_bw_compat(XmlInputArchive& ar, unsigned version, EmuTime::param time);
26
27 template<typename Archive>
28 void serialize(Archive& ar, unsigned version);
29
30private:
31 [[nodiscard]] bool getNew2() const;
32 [[nodiscard]] byte readYMF278Status(EmuTime::param time) const;
33
34private:
35 YMF262 ymf262;
36 YMF278 ymf278;
37
39 EmuTime ymf278LoadTime;
41 EmuTime ymf278BusyTime;
42
43 int opl3latch = 0;
44 byte opl4latch = 0;
45};
46
47} // namespace openmsx
48
49#endif
void serialize(Archive &ar, unsigned version)
Definition YMF278B.cc:245
void setupMemoryPointers()
Definition YMF278B.cc:214
void writeIO(word port, byte value, EmuTime::param time)
Definition YMF278B.cc:138
void powerUp(EmuTime::param time)
Definition YMF278B.cc:51
void serialize_bw_compat(XmlInputArchive &ar, unsigned version, EmuTime::param time)
Definition YMF278B.cc:224
byte readIO(word port, EmuTime::param time)
Definition YMF278B.cc:69
byte peekIO(word port, EmuTime::param time) const
Definition YMF278B.cc:111
void reset(EmuTime::param time)
Definition YMF278B.cc:57
std::function< void(bool, std::span< const uint8_t >, std::span< const uint8_t >, std::span< YMF278::Block128, 32 >)> SetupMemPtrFunc
Definition YMF278.hh:34
This file implemented 3 utility functions:
Definition Autofire.cc:11
uint16_t word
16 bit unsigned integer
Definition openmsx.hh:29