mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-08-03 18:57:27 -04:00
3DS: allow write access to VRAM
This commit is contained in:
parent
99830141db
commit
027c6a8fb7
@ -76,7 +76,7 @@ AccessControlInfo:
|
||||
- 1ff50000-1ff57fff # DSP memory
|
||||
- 1ff70000-1ff77fff
|
||||
MemoryMapping:
|
||||
- 1f000000-1f5fffff:r # VRAM
|
||||
- 1f000000-1f5fffff # VRAM
|
||||
|
||||
SystemCallAccess:
|
||||
ArbitrateAddress: 34
|
||||
|
@ -464,7 +464,7 @@ GfxResourceID Gfx_AllocTexture(struct Bitmap* bmp, int rowWidth, cc_uint8 flags,
|
||||
tex->pal_index = pal_index;
|
||||
ConvertTexture_Palette((cc_uint8*)tex->pixels, bmp, rowWidth, palette, pal_count);
|
||||
|
||||
int size = VRAM_Size(1 << tex->log2_w, max(32, 1 << tex->log2_h), GS_PSM_4HH);
|
||||
int size = VRAM_Size(tex->width, max(32, 1 << tex->log2_h), GS_PSM_4HH);
|
||||
// TODO fix properly. alignup instead
|
||||
int blocks = SIZE_TO_BLOCKS(size, TEXMEM_BLOCK_SIZE);
|
||||
tex->blocks = blocks;
|
||||
@ -495,6 +495,11 @@ GfxResourceID Gfx_AllocTexture(struct Bitmap* bmp, int rowWidth, cc_uint8 flags,
|
||||
CopyPixels(tex->pixels, bmp->width * BITMAPCOLOR_SIZE,
|
||||
bmp->scan0, rowWidth * BITMAPCOLOR_SIZE,
|
||||
bmp->width, bmp->height);
|
||||
|
||||
//int size = VRAM_Size(1 << tex->log2_w, max(32, 1 << tex->log2_h), GS_PSM_4HH);
|
||||
// TODO fix properly. alignup instead
|
||||
//int blocks = SIZE_TO_BLOCKS(size, TEXMEM_BLOCK_SIZE); size = blocks / (2048 / 64);
|
||||
//Platform_Log4("32BPP: b %i / p %i (%i X %i)", &size, &blocks, &bmp->width, &bmp->height);
|
||||
}
|
||||
return tex;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user