Remove the ComplexBitMap

This commit is contained in:
2023-03-22 20:46:08 +01:00
parent 550d657478
commit 94c078dc9f
13 changed files with 307 additions and 489 deletions

View File

@@ -42,33 +42,33 @@ namespace JabyEngine {
__declare_io_type(SweepVolume, int16_t,
// For Volume Mode
static constexpr auto SweepEnable = IOBitSet(15);
static constexpr auto SweepEnable = Bit(15);
static constexpr auto VolumeEnable = !SweepEnable;
static constexpr auto Volume = IOValueSet::from_to(0, 14);
static constexpr auto Volume = BitRange::from_to(0, 14);
// For Sweep Mode
static constexpr auto SweepMode = IOBitSet(14);
static constexpr auto SweepDirection = IOBitSet(13);
static constexpr auto SweepPhase = IOBitSet(12);
static constexpr auto SweepShift = IOValueSet::from_to(2, 6);
static constexpr auto SweepStep = IOValueSet::from_to(0, 1);
static constexpr auto SweepMode = Bit(14);
static constexpr auto SweepDirection = Bit(13);
static constexpr auto SweepPhase = Bit(12);
static constexpr auto SweepShift = BitRange::from_to(2, 6);
static constexpr auto SweepStep = BitRange::from_to(0, 1);
);
__declare_io_type(SR, uint16_t,
static constexpr auto SustainMode = IOBitSet(31 - 16);
static constexpr auto SustainDirection = IOBitSet(30 - 16);
static constexpr auto SustainShift = IOValueSet::from_to((24 - 16), (28 - 16));
static constexpr auto SustainStep = IOValueSet::from_to((22 - 16), (23 - 16));
static constexpr auto ReleaseMode = IOBitSet(21 - 16);
static constexpr auto ReleaseShift = IOValueSet::from_to((16 - 16), (20 - 16));
static constexpr auto SustainMode = Bit(31 - 16);
static constexpr auto SustainDirection = Bit(30 - 16);
static constexpr auto SustainShift = BitRange::from_to((24 - 16), (28 - 16));
static constexpr auto SustainStep = BitRange::from_to((22 - 16), (23 - 16));
static constexpr auto ReleaseMode = Bit(21 - 16);
static constexpr auto ReleaseShift = BitRange::from_to((16 - 16), (20 - 16));
);
__declare_io_type(AD, uint16_t,
static constexpr auto AttackMode = IOBitSet(15);
static constexpr auto AttackShift = IOValueSet::from_to(10, 14);
static constexpr auto AttackStep = IOValueSet::from_to(8, 9);
static constexpr auto DecayShift = IOValueSet::from_to(4, 7);
static constexpr auto SustainLevel = IOValueSet::from_to(0, 3);
static constexpr auto AttackMode = Bit(15);
static constexpr auto AttackShift = BitRange::from_to(10, 14);
static constexpr auto AttackStep = BitRange::from_to(8, 9);
static constexpr auto DecayShift = BitRange::from_to(4, 7);
static constexpr auto SustainLevel = BitRange::from_to(0, 3);
);
struct __no_align Voice_v {
@@ -90,29 +90,29 @@ namespace JabyEngine {
DMARead = 3
};
static constexpr auto Enable = IOBitSet(15);
static constexpr auto Unmute = IOBitSet(14);
static constexpr auto NoiseFrequcenyShift = IOValueSet::from_to(10, 13);
static constexpr auto NoiseFrequcenyStep = IOValueSet::from_to(8, 9);
static constexpr auto ReverbMasterEnable = IOBitSet(7);
static constexpr auto IRQ9Enable = IOBitSet(6);
static constexpr auto TransferMode = IOValueSet::from_to(4, 5);
static constexpr auto ExternalAudioReverb = IOBitSet(3);
static constexpr auto CDAudioReverb = IOBitSet(2);
static constexpr auto ExternalAudioEnable = IOBitSet(1);
static constexpr auto CDAudioEnable = IOBitSet(0);
static constexpr auto Enable = Bit(15);
static constexpr auto Unmute = Bit(14);
static constexpr auto NoiseFrequcenyShift = BitRange::from_to(10, 13);
static constexpr auto NoiseFrequcenyStep = BitRange::from_to(8, 9);
static constexpr auto ReverbMasterEnable = Bit(7);
static constexpr auto IRQ9Enable = Bit(6);
static constexpr auto TransferMode = BitRange::from_to(4, 5);
static constexpr auto ExternalAudioReverb = Bit(3);
static constexpr auto CDAudioReverb = Bit(2);
static constexpr auto ExternalAudioEnable = Bit(1);
static constexpr auto CDAudioEnable = Bit(0);
);
__declare_io_type(PMON, uint16_t,
static constexpr auto EnableBits = IOValueSet::from_to(1, 23);
static constexpr auto EnableBits = BitRange::from_to(1, 23);
);
__declare_io_type(NON, uint16_t,
static constexpr auto NoiseBits = IOValueSet::from_to(0, 23);
static constexpr auto NoiseBits = BitRange::from_to(0, 23);
);
__declare_io_type(EON, uint16_t,
static constexpr auto EchoBits = IOValueSet::from_to(0, 23);
static constexpr auto EchoBits = BitRange::from_to(0, 23);
);
static constexpr size_t VoiceCount = 24;