Use DMA for GPU
This commit is contained in:
@@ -32,7 +32,7 @@ namespace GPU {
|
||||
|
||||
enum struct DMADirection {
|
||||
Off = 0,
|
||||
Unknown = 1,
|
||||
Fifo = 1,
|
||||
CPU2GPU = 2,
|
||||
GPU2CPU = 3,
|
||||
};
|
||||
@@ -50,6 +50,10 @@ namespace GPU {
|
||||
return ComplexBitMap{(0x02 << 24) | color.raw()};
|
||||
}
|
||||
|
||||
static constexpr GP0 CPU2VRAM_Blitting() {
|
||||
return ComplexBitMap{(0b101u << 29)};
|
||||
}
|
||||
|
||||
static constexpr GP0 TopLeftPosition(uint16_t x, uint16_t y) {
|
||||
return ComplexBitMap{static_cast<uint32_t>((y << 16u) | x)};
|
||||
}
|
||||
@@ -70,9 +74,17 @@ namespace GPU {
|
||||
return ComplexBitMap{0};
|
||||
}
|
||||
|
||||
static constexpr GP1 ResetCMDBufer() {
|
||||
return ComplexBitMap{construct_cmd(0x01, 0)};
|
||||
}
|
||||
|
||||
static constexpr GP1 SetDisplayState(DisplayState state) {
|
||||
return ComplexBitMap{construct_cmd(0x03, static_cast<uint32_t>(state))};
|
||||
}
|
||||
|
||||
static constexpr GP1 DMADirection(DMADirection dir) {
|
||||
return ComplexBitMap{construct_cmd(0x04, static_cast<uint32_t>(dir))};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user