diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-02-07 22:23:46 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-02-07 22:23:46 +0100 |
commit | 0562410de25266f70d16045987c9b39fd8366057 (patch) | |
tree | 73faccb584295ad32bb0bb044c634877a758619d /GPU.cpp | |
parent | 86cdf283231fd4485c4731f6cbbe08e5cb4ae731 (diff) |
* lay base for 3D engine
* add failure reporting to Init functions, and DeInit functions
* GPU-related notes
* readme update
Diffstat (limited to 'GPU.cpp')
-rw-r--r-- | GPU.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -68,10 +68,20 @@ GPU2D* GPU2D_A; GPU2D* GPU2D_B; -void Init() +bool Init() { GPU2D_A = new GPU2D(0); GPU2D_B = new GPU2D(1); + if (!GPU3D::Init()) return false; + + return true; +} + +void DeInit() +{ + delete GPU2D_A; + delete GPU2D_B; + GPU3D::DeInit(); } void Reset() @@ -118,6 +128,7 @@ void Reset() GPU2D_A->Reset(); GPU2D_B->Reset(); + GPU3D::Reset(); GPU2D_A->SetFramebuffer(&Framebuffer[256*192]); GPU2D_B->SetFramebuffer(&Framebuffer[256*0]); @@ -147,6 +158,8 @@ void Reset() // ARM7 (TODO) // extended palette (mirroring doesn't apply) // texture/texpal (does mirroring apply?) +// -> trying to use extpal/texture/texpal with no VRAM mapped. +// would likely read all black, but has to be tested. // // overlap: // when reading: values are read from each bank and ORed together |