GBA: Fix maximum tile ID in caching for 256-color modes

This commit is contained in:
Vicki Pfau 2021-11-09 15:51:31 -08:00
parent 53c7f6f50a
commit 71b616a9c2
2 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,7 @@ Other fixes:
- FFmpeg: Don't attempt to use YUV 4:2:0 for lossless videos (fixes mgba.io/i/2084)
- GB Video: Fix memory leak when reseting SGB games
- GBA: Fix out of bounds ROM accesses on patched ROMs smaller than 32 MiB
- GBA: Fix maximum tile ID in caching for 256-color modes
- Libretro: Fix crash when using Game Boy codes (fixes mgba.io/i/2281)
- Qt: Fix corrupted savestate and fatal error text
Misc:

View File

@ -25,10 +25,10 @@ void GBAVideoCacheInit(struct mCacheSet* cache) {
sysconfig = mTileCacheSystemInfoSetPaletteBPP(sysconfig, 3); // 2^(2^3) = 256 entries
sysconfig = mTileCacheSystemInfoSetPaletteCount(sysconfig, 0); // 1 palettes
sysconfig = mTileCacheSystemInfoSetMaxTiles(sysconfig, 2048);
sysconfig = mTileCacheSystemInfoSetMaxTiles(sysconfig, 1024);
mTileCacheConfigureSystem(mTileCacheSetGetPointer(&cache->tiles, 1), sysconfig, 0, 0);
mTileCacheConfigure(mTileCacheSetGetPointer(&cache->tiles, 1), config);
sysconfig = mTileCacheSystemInfoSetMaxTiles(sysconfig, 1024);
sysconfig = mTileCacheSystemInfoSetMaxTiles(sysconfig, 512);
mTileCacheConfigureSystem(mTileCacheSetGetPointer(&cache->tiles, 3), sysconfig, 0x10000, 0x100);
mTileCacheConfigure(mTileCacheSetGetPointer(&cache->tiles, 3), config);