Implement GPUSTAT and update IOPort design
This commit is contained in:
@@ -40,37 +40,37 @@ namespace SPU {
|
||||
__io_port_inherit_complex_bit_map(SweepVolume);
|
||||
|
||||
// For Volume Mode
|
||||
static constexpr Bit<int16_t> SweepEnable = 15; // 0 Volume Mode; 1 Sweep Mode
|
||||
static constexpr auto VolumeEnable = !SweepEnable;
|
||||
static constexpr BitRange<int16_t> Volume = BitRange<int16_t>::from_to(0, 14);
|
||||
static constexpr auto SweepEnable = Bit<int16_t>(15);
|
||||
static constexpr auto VolumeEnable = !SweepEnable;
|
||||
static constexpr auto Volume = BitRange<int16_t>::from_to(0, 14);
|
||||
|
||||
// For Sweep Mode
|
||||
static constexpr Bit<Mode> SweepMode = 14;
|
||||
static constexpr Bit<Direction> SweepDirection = 13;
|
||||
static constexpr Bit<Phase> SweepPhase = 12;
|
||||
static constexpr BitRange<Shift> SweepShift = BitRange<Shift>::from_to(2, 6);
|
||||
static constexpr BitRange<Step> SweepStep = BitRange<Step>::from_to(0, 1);
|
||||
static constexpr auto SweepMode = Bit<Mode>(14);
|
||||
static constexpr auto SweepDirection = Bit<Direction>(13);
|
||||
static constexpr auto SweepPhase = Bit<Phase>(12);
|
||||
static constexpr auto SweepShift = BitRange<Shift>::from_to(2, 6);
|
||||
static constexpr auto SweepStep = BitRange<Step>::from_to(0, 1);
|
||||
};
|
||||
|
||||
struct __no_align SR : public ComplexBitMap<uint16_t> {
|
||||
__io_port_inherit_complex_bit_map(SR);
|
||||
|
||||
static constexpr Bit<Mode> SustainMode = (31 - 16);
|
||||
static constexpr Bit<Direction> SustainDirection = (30 - 16);
|
||||
static constexpr BitRange<Shift> SustainShift = BitRange<Shift>::from_to((24 - 16), (28 - 16));
|
||||
static constexpr BitRange<Step> SustainStep = BitRange<Step>::from_to((22 - 16), (23 - 16));
|
||||
static constexpr Bit<Mode> ReleaseMode = (21 - 16);
|
||||
static constexpr BitRange<Shift> ReleaseShift = BitRange<Shift>::from_to((16 - 16), (20 - 16));
|
||||
static constexpr auto SustainMode = Bit<Mode>(31 - 16);
|
||||
static constexpr auto SustainDirection = Bit<Direction>(30 - 16);
|
||||
static constexpr auto SustainShift = BitRange<Shift>::from_to((24 - 16), (28 - 16));
|
||||
static constexpr auto SustainStep = BitRange<Step>::from_to((22 - 16), (23 - 16));
|
||||
static constexpr auto ReleaseMode = Bit<Mode>(21 - 16);
|
||||
static constexpr auto ReleaseShift = BitRange<Shift>::from_to((16 - 16), (20 - 16));
|
||||
};
|
||||
|
||||
struct __no_align AD : public ComplexBitMap<uint16_t> {
|
||||
__io_port_inherit_complex_bit_map(AD);
|
||||
|
||||
static constexpr Bit<Mode> AttackMode = 15;
|
||||
static constexpr BitRange<Shift> AttackShift = BitRange<Shift>::from_to(10, 14);
|
||||
static constexpr BitRange<Step> AttackStep = BitRange<Step>::from_to(8, 9);
|
||||
static constexpr BitRange<Shift> DecayShift = BitRange<Shift>::from_to(4, 7);
|
||||
static constexpr BitRange<uint16_t> SustainLevel = BitRange<uint16_t>::from_to(0, 3);
|
||||
static constexpr auto AttackMode = Bit<Mode>(15);
|
||||
static constexpr auto AttackShift = BitRange<Shift>::from_to(10, 14);
|
||||
static constexpr auto AttackStep = BitRange<Step>::from_to(8, 9);
|
||||
static constexpr auto DecayShift = BitRange<Shift>::from_to(4, 7);
|
||||
static constexpr auto SustainLevel = BitRange<uint16_t>::from_to(0, 3);
|
||||
};
|
||||
|
||||
struct __no_align Voice {
|
||||
@@ -94,17 +94,17 @@ namespace SPU {
|
||||
DMARead = 3
|
||||
};
|
||||
|
||||
static constexpr Bit<uint16_t> Enable = 15;
|
||||
static constexpr Bit<uint16_t> Unmute = 14;
|
||||
static constexpr BitRange<Shift> NoiseFrequcenyShift = BitRange<Shift>::from_to(10, 13);
|
||||
static constexpr BitRange<Step> NoiseFrequcenyStep = BitRange<Step>::from_to(8, 9);
|
||||
static constexpr Bit<uint16_t> ReverbMasterEnable = 7;
|
||||
static constexpr Bit<uint16_t> IRQ9Enable = 6;
|
||||
static constexpr BitRange<RAMTransferMode> TransferMode = BitRange<RAMTransferMode>::from_to(4, 5);
|
||||
static constexpr Bit<uint16_t> ExternalAudioReverb = 3;
|
||||
static constexpr Bit<uint16_t> CDAudioReverb = 2;
|
||||
static constexpr Bit<uint16_t> ExternalAudioEnable = 1;
|
||||
static constexpr Bit<uint16_t> CDAudioEnable = 0;
|
||||
static constexpr auto Enable = Bit<uint16_t>(15);
|
||||
static constexpr auto Unmute = Bit<uint16_t>(14);
|
||||
static constexpr auto NoiseFrequcenyShift = BitRange<Shift>::from_to(10, 13);
|
||||
static constexpr auto NoiseFrequcenyStep = BitRange<Step>::from_to(8, 9);
|
||||
static constexpr auto ReverbMasterEnable = Bit<uint16_t>(7);
|
||||
static constexpr auto IRQ9Enable = Bit<uint16_t>(6);
|
||||
static constexpr auto TransferMode = BitRange<RAMTransferMode>::from_to(4, 5);
|
||||
static constexpr auto ExternalAudioReverb = Bit<uint16_t>(3);
|
||||
static constexpr auto CDAudioReverb = Bit<uint16_t>(2);
|
||||
static constexpr auto ExternalAudioEnable = Bit<uint16_t>(1);
|
||||
static constexpr auto CDAudioEnable = Bit<uint16_t>(0);
|
||||
};
|
||||
|
||||
struct __no_align PitchModFlags : public ComplexBitMap<uint16_t> {
|
||||
|
||||
Reference in New Issue
Block a user