Remove the ComplexBitMap
This commit is contained in:
@@ -5,18 +5,18 @@
|
||||
namespace JabyEngine {
|
||||
namespace DMA_IO {
|
||||
__declare_io_type(MADR, uint32_t,
|
||||
static constexpr auto MemoryAdr = IOValueSet::from_to(0, 23);
|
||||
static constexpr auto MemoryAdr = BitRange::from_to(0, 23);
|
||||
);
|
||||
|
||||
__declare_io_type(BCR, uint32_t,
|
||||
struct __no_align SyncMode0 {
|
||||
static constexpr auto NumberOfWords = IOValueSet::from_to(0, 15);
|
||||
static constexpr auto CD_OneBlock = IOBitSet(16);
|
||||
struct SyncMode0 {
|
||||
static constexpr auto NumberOfWords = BitRange::from_to(0, 15);
|
||||
static constexpr auto CD_OneBlock = Bit(16);
|
||||
};
|
||||
|
||||
struct SyncMode1 : public ComplexBitMap<uint32_t> {
|
||||
static constexpr auto BlockSize = IOValueSet::from_to(0, 15);
|
||||
static constexpr auto BlockAmount = IOValueSet::from_to(16, 31);
|
||||
struct SyncMode1 {
|
||||
static constexpr auto BlockSize = BitRange::from_to(0, 15);
|
||||
static constexpr auto BlockAmount = BitRange::from_to(16, 31);
|
||||
};
|
||||
|
||||
struct SyncMode2 {
|
||||
@@ -30,25 +30,25 @@ namespace JabyEngine {
|
||||
Sync2 = 2, //Linked List
|
||||
};
|
||||
|
||||
static constexpr auto ManualStart = IOBitSet(28);
|
||||
static constexpr auto ManualStart = Bit(28);
|
||||
|
||||
static constexpr auto Start = IOBitSet(24);
|
||||
static constexpr auto Start = Bit(24);
|
||||
static constexpr auto Busy = Start;
|
||||
|
||||
static constexpr auto ChoppingCPUWindowSize = IOValueSet::from_to(20, 22);
|
||||
static constexpr auto ChoppingDMAWindowSize = IOValueSet::from_to(16, 18);
|
||||
static constexpr auto ChoppingCPUWindowSize = BitRange::from_to(20, 22);
|
||||
static constexpr auto ChoppingDMAWindowSize = BitRange::from_to(16, 18);
|
||||
|
||||
static constexpr auto SyncMode = IOValueSet::from_to(9, 10);
|
||||
static constexpr auto SyncMode = BitRange::from_to(9, 10);
|
||||
static constexpr auto UseSyncMode0 = SyncMode.with(Sync0);
|
||||
static constexpr auto UseSyncMode1 = SyncMode.with(Sync1);
|
||||
static constexpr auto UseSyncMode2 = SyncMode.with(Sync2);
|
||||
|
||||
static constexpr auto UseChopping = IOBitSet(8);
|
||||
static constexpr auto UseChopping = Bit(8);
|
||||
|
||||
static constexpr auto MemoryAdrDecreaseBy4 = IOBitSet(1);
|
||||
static constexpr auto MemoryAdrDecreaseBy4 = Bit(1);
|
||||
static constexpr auto MemoryAdrIncreaseBy4 = !MemoryAdrDecreaseBy4;
|
||||
|
||||
static constexpr auto FromMainRAM = IOBitSet(0);
|
||||
static constexpr auto FromMainRAM = Bit(0);
|
||||
static constexpr auto ToMainRAM = !FromMainRAM;
|
||||
|
||||
static constexpr Self StartMDECin() {
|
||||
@@ -105,34 +105,34 @@ namespace JabyEngine {
|
||||
static constexpr Priority LowestPriority = 7;
|
||||
|
||||
__declare_io_type(DPCR, uint32_t,
|
||||
static constexpr auto OTCEnable = IOBitSet(27);
|
||||
static constexpr auto OTCPriority = IOValueSet::from_to(24, 26);
|
||||
static constexpr auto OTCEnable = Bit(27);
|
||||
static constexpr auto OTCPriority = BitRange::from_to(24, 26);
|
||||
|
||||
static constexpr auto PIOEnable = IOBitSet(23);
|
||||
static constexpr auto PIOPriority = IOValueSet::from_to(20, 22);
|
||||
static constexpr auto PIOEnable = Bit(23);
|
||||
static constexpr auto PIOPriority = BitRange::from_to(20, 22);
|
||||
|
||||
static constexpr auto SPUEnable = IOBitSet(19);
|
||||
static constexpr auto SPUPriority = IOValueSet::from_to(16, 18);
|
||||
static constexpr auto SPUEnable = Bit(19);
|
||||
static constexpr auto SPUPriority = BitRange::from_to(16, 18);
|
||||
|
||||
static constexpr auto CDROMEnable = IOBitSet(15);
|
||||
static constexpr auto CDROMPriority = IOValueSet::from_to(12, 14);
|
||||
static constexpr auto CDROMEnable = Bit(15);
|
||||
static constexpr auto CDROMPriority = BitRange::from_to(12, 14);
|
||||
|
||||
static constexpr auto GPUEnable = IOBitSet(11);
|
||||
static constexpr auto GPUPriority = IOValueSet::from_to(8, 10);
|
||||
static constexpr auto GPUEnable = Bit(11);
|
||||
static constexpr auto GPUPriority = BitRange::from_to(8, 10);
|
||||
|
||||
static constexpr auto MDECoutEnable = IOBitSet(7);
|
||||
static constexpr auto MDECoutPriority = IOValueSet::from_to(4, 6);
|
||||
static constexpr auto MDECoutEnable = Bit(7);
|
||||
static constexpr auto MDECoutPriority = BitRange::from_to(4, 6);
|
||||
|
||||
static constexpr auto MDECinEnable = IOBitSet(3);
|
||||
static constexpr auto MDECinPriority = IOValueSet::from_to(0, 2);
|
||||
static constexpr auto MDECinEnable = Bit(3);
|
||||
static constexpr auto MDECinPriority = BitRange::from_to(0, 2);
|
||||
);
|
||||
|
||||
__declare_io_type(DICR, uint32_t,
|
||||
static constexpr auto MasterEnable = IOBitSet(31);
|
||||
static constexpr auto Flags = IOValueSet::from_to(24, 30);
|
||||
static constexpr auto MasterEnableDPCR = IOBitSet(23);
|
||||
static constexpr auto EnableDPCR = IOValueSet::from_to(16, 22);
|
||||
static constexpr auto ForceIRQ = IOBitSet(15);
|
||||
static constexpr auto MasterEnable = Bit(31);
|
||||
static constexpr auto Flags = BitRange::from_to(24, 30);
|
||||
static constexpr auto MasterEnableDPCR = Bit(23);
|
||||
static constexpr auto EnableDPCR = BitRange::from_to(16, 22);
|
||||
static constexpr auto ForceIRQ = Bit(15);
|
||||
);
|
||||
|
||||
__declare_new_io_port(MDECin, 0x1F801080);
|
||||
|
Reference in New Issue
Block a user