mirror of https://github.com/mgba-emu/mgba.git
DS Video: Fix size of VRAM zeroes buffer and const correctness
This commit is contained in:
parent
e6fd4f5e7a
commit
4fd170ac38
1
CHANGES
1
CHANGES
|
@ -20,6 +20,7 @@ Bugfixes:
|
||||||
- DS Video: Properly deinitialize
|
- DS Video: Properly deinitialize
|
||||||
- DS GX: Mask off invalid bits of the palette base
|
- DS GX: Mask off invalid bits of the palette base
|
||||||
- DS: Properly close save file on close
|
- DS: Properly close save file on close
|
||||||
|
- DS Video: Fix size of VRAM zeroes buffer
|
||||||
Misc:
|
Misc:
|
||||||
- DS GX: Clean up and unify texture mapping
|
- DS GX: Clean up and unify texture mapping
|
||||||
- DS Core: Add symbol loading
|
- DS Core: Add symbol loading
|
||||||
|
|
|
@ -145,8 +145,8 @@ struct DSGXRenderer {
|
||||||
void (*getScanline)(struct DSGXRenderer* renderer, int y, const color_t** output);
|
void (*getScanline)(struct DSGXRenderer* renderer, int y, const color_t** output);
|
||||||
void (*writeRegister)(struct DSGXRenderer* renderer, uint32_t address, uint16_t value);
|
void (*writeRegister)(struct DSGXRenderer* renderer, uint32_t address, uint16_t value);
|
||||||
|
|
||||||
uint16_t* tex[4];
|
const uint16_t* tex[4];
|
||||||
uint16_t* texPal[6];
|
const uint16_t* texPal[6];
|
||||||
|
|
||||||
uint16_t* toonTable;
|
uint16_t* toonTable;
|
||||||
};
|
};
|
||||||
|
@ -187,8 +187,8 @@ struct DSGX {
|
||||||
int pendingVertexIds[8];
|
int pendingVertexIds[8];
|
||||||
bool reverseWinding;
|
bool reverseWinding;
|
||||||
|
|
||||||
uint16_t* tex[4];
|
const uint16_t* tex[4];
|
||||||
uint16_t* texPal[6];
|
const uint16_t* texPal[6];
|
||||||
|
|
||||||
int mtxMode;
|
int mtxMode;
|
||||||
int pvMatrixPointer;
|
int pvMatrixPointer;
|
||||||
|
|
|
@ -20,8 +20,8 @@ struct DSGXSoftwarePolygon {
|
||||||
unsigned polyId;
|
unsigned polyId;
|
||||||
DSGXPolygonAttrs polyParams;
|
DSGXPolygonAttrs polyParams;
|
||||||
DSGXTexParams texParams;
|
DSGXTexParams texParams;
|
||||||
uint16_t* texBase;
|
const uint16_t* texBase;
|
||||||
uint16_t* palBase;
|
const uint16_t* palBase;
|
||||||
int texFormat;
|
int texFormat;
|
||||||
int blendFormat;
|
int blendFormat;
|
||||||
int texW;
|
int texW;
|
||||||
|
|
|
@ -104,13 +104,13 @@ struct DSVideoRenderer {
|
||||||
|
|
||||||
uint16_t* palette;
|
uint16_t* palette;
|
||||||
uint16_t* vram;
|
uint16_t* vram;
|
||||||
uint16_t* vramABG[32];
|
const uint16_t* vramABG[32];
|
||||||
uint16_t* vramAOBJ[32];
|
const uint16_t* vramAOBJ[32];
|
||||||
uint16_t* vramABGExtPal[4];
|
const uint16_t* vramABGExtPal[4];
|
||||||
uint16_t* vramAOBJExtPal;
|
uint16_t* vramAOBJExtPal;
|
||||||
uint16_t* vramBBG[32];
|
const uint16_t* vramBBG[32];
|
||||||
uint16_t* vramBOBJ[32];
|
const uint16_t* vramBOBJ[32];
|
||||||
uint16_t* vramBBGExtPal[4];
|
const uint16_t* vramBBGExtPal[4];
|
||||||
uint16_t* vramBOBJExtPal;
|
uint16_t* vramBOBJExtPal;
|
||||||
|
|
||||||
bool disableABG[4];
|
bool disableABG[4];
|
||||||
|
@ -134,12 +134,12 @@ struct DSVideo {
|
||||||
|
|
||||||
uint16_t palette[1024];
|
uint16_t palette[1024];
|
||||||
uint16_t* vram;
|
uint16_t* vram;
|
||||||
uint16_t* vramABG[32];
|
const uint16_t* vramABG[32];
|
||||||
uint16_t* vramAOBJ[32];
|
const uint16_t* vramAOBJ[32];
|
||||||
uint16_t* vramABGExtPal[4];
|
uint16_t* vramABGExtPal[4];
|
||||||
uint16_t* vramAOBJExtPal;
|
uint16_t* vramAOBJExtPal;
|
||||||
uint16_t* vramBBG[32];
|
const uint16_t* vramBBG[32];
|
||||||
uint16_t* vramBOBJ[32];
|
const uint16_t* vramBOBJ[32];
|
||||||
uint16_t* vramBBGExtPal[4];
|
uint16_t* vramBBGExtPal[4];
|
||||||
uint16_t* vramBOBJExtPal;
|
uint16_t* vramBOBJExtPal;
|
||||||
union DSOAM oam;
|
union DSOAM oam;
|
||||||
|
|
|
@ -45,7 +45,7 @@ static const uint32_t _vramSize[9] = {
|
||||||
0x04000
|
0x04000
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint16_t _zeroes[0x2000] = {0};
|
static const uint16_t _zeroes[0x10000] = {0};
|
||||||
|
|
||||||
enum DSVRAMBankMode {
|
enum DSVRAMBankMode {
|
||||||
MODE_A_BG = 0,
|
MODE_A_BG = 0,
|
||||||
|
|
Loading…
Reference in New Issue