[GPU] DMA
This commit is contained in:
@@ -47,9 +47,11 @@ class GPU {
|
||||
u32 index = paddr - PhysicalAddrs::FCRAM;
|
||||
|
||||
return (T*)&fcram[index];
|
||||
}
|
||||
else {
|
||||
Helpers::panic("[PICA] Pointer to unimplemented paddr %08X", paddr);
|
||||
} else if (paddr >= PhysicalAddrs::VRAM && paddr <= PhysicalAddrs::VRAMEnd) {
|
||||
u32 index = paddr - PhysicalAddrs::VRAM;
|
||||
return (T*)&vram[index];
|
||||
} else [[unlikely]] {
|
||||
Helpers::panic("[GPU] Tried to access unknown physical address: %08X", paddr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +104,7 @@ public:
|
||||
void getGraphicsContext(); // Set up the graphics context for rendering
|
||||
void display(); // Display the screen contents onto our window
|
||||
|
||||
void fireDMA(u32 dest, u32 source, u32 size);
|
||||
void clearBuffer(u32 startAddress, u32 endAddress, u32 value, u32 control);
|
||||
void reset();
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
namespace PhysicalAddrs {
|
||||
enum : u32 {
|
||||
VRAM = 0x18000000,
|
||||
VRAMEnd = VRAM + 0x005FFFFF,
|
||||
FCRAM = 0x20000000,
|
||||
FCRAMEnd = FCRAM + 0x07FFFFFF
|
||||
};
|
||||
@@ -38,6 +40,7 @@ namespace VirtualAddrs {
|
||||
|
||||
VramStart = 0x1F000000,
|
||||
VramSize = 0x00600000,
|
||||
FcramTotalSize = 128_MB,
|
||||
DSPMemStart = 0x1FF00000
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user