aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hw/gpu.h
diff options
context:
space:
mode:
authorGravatar Tony Wasserka <NeoBrainX@gmail.com>2014-08-03 01:46:47 +0200
committerGravatar Tony Wasserka <NeoBrainX@gmail.com>2014-08-12 13:32:56 +0200
commit7b6a7d7dfb92d7a6d3537ea8b0339c2170d7eb84 (patch)
tree2b005f3358a228136e7711ddac790ed54bb67b1f /src/core/hw/gpu.h
parentbd798390d5c3d1bf9084abe9839597162608f575 (diff)
Pica/GPU: Change hardware registers to use physical addresses rather than virtual ones.
This cleans up the mess that address reading/writing had become and makes the code a *lot* more sensible. This adds a physical<->virtual address converter to mem_map.h. For further accuracy, we will want to properly extend this to support a wider range of address regions. For now, this makes simply homebrew applications work in a good manner though.
Diffstat (limited to 'src/core/hw/gpu.h')
-rw-r--r--src/core/hw/gpu.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h
index 3065da89..d20311a0 100644
--- a/src/core/hw/gpu.h
+++ b/src/core/hw/gpu.h
@@ -249,72 +249,6 @@ static_assert(sizeof(Regs) == 0x1000 * sizeof(u32), "Invalid total size of regis
extern Regs g_regs;
-enum {
- TOP_ASPECT_X = 0x5,
- TOP_ASPECT_Y = 0x3,
-
- TOP_HEIGHT = 240,
- TOP_WIDTH = 400,
- BOTTOM_WIDTH = 320,
-
- // Physical addresses in FCRAM (chosen arbitrarily)
- PADDR_TOP_LEFT_FRAME1 = 0x201D4C00,
- PADDR_TOP_LEFT_FRAME2 = 0x202D4C00,
- PADDR_TOP_RIGHT_FRAME1 = 0x203D4C00,
- PADDR_TOP_RIGHT_FRAME2 = 0x204D4C00,
- PADDR_SUB_FRAME1 = 0x205D4C00,
- PADDR_SUB_FRAME2 = 0x206D4C00,
- // Physical addresses in FCRAM used by ARM9 applications
-/* PADDR_TOP_LEFT_FRAME1 = 0x20184E60,
- PADDR_TOP_LEFT_FRAME2 = 0x201CB370,
- PADDR_TOP_RIGHT_FRAME1 = 0x20282160,
- PADDR_TOP_RIGHT_FRAME2 = 0x202C8670,
- PADDR_SUB_FRAME1 = 0x202118E0,
- PADDR_SUB_FRAME2 = 0x20249CF0,*/
-
- // Physical addresses in VRAM
- // TODO: These should just be deduced from the ones above
- PADDR_VRAM_TOP_LEFT_FRAME1 = 0x181D4C00,
- PADDR_VRAM_TOP_LEFT_FRAME2 = 0x182D4C00,
- PADDR_VRAM_TOP_RIGHT_FRAME1 = 0x183D4C00,
- PADDR_VRAM_TOP_RIGHT_FRAME2 = 0x184D4C00,
- PADDR_VRAM_SUB_FRAME1 = 0x185D4C00,
- PADDR_VRAM_SUB_FRAME2 = 0x186D4C00,
- // Physical addresses in VRAM used by ARM9 applications
-/* PADDR_VRAM_TOP_LEFT_FRAME2 = 0x181CB370,
- PADDR_VRAM_TOP_RIGHT_FRAME1 = 0x18282160,
- PADDR_VRAM_TOP_RIGHT_FRAME2 = 0x182C8670,
- PADDR_VRAM_SUB_FRAME1 = 0x182118E0,
- PADDR_VRAM_SUB_FRAME2 = 0x18249CF0,*/
-};
-
-/// Framebuffer location
-enum FramebufferLocation {
- FRAMEBUFFER_LOCATION_UNKNOWN, ///< Framebuffer location is unknown
- FRAMEBUFFER_LOCATION_FCRAM, ///< Framebuffer is in the GSP heap
- FRAMEBUFFER_LOCATION_VRAM, ///< Framebuffer is in VRAM
-};
-
-/**
- * Sets whether the framebuffers are in the GSP heap (FCRAM) or VRAM
- * @param
- */
-void SetFramebufferLocation(const FramebufferLocation mode);
-
-/**
- * Gets a read-only pointer to a framebuffer in memory
- * @param address Physical address of framebuffer
- * @return Returns const pointer to raw framebuffer
- */
-const u8* GetFramebufferPointer(const u32 address);
-
-u32 GetFramebufferAddr(const u32 address);
-
-/**
- * Gets the location of the framebuffers
- */
-FramebufferLocation GetFramebufferLocation(u32 address);
-
template <typename T>
void Read(T &var, const u32 addr);