Skip to content

Commit c00db02

Browse files
committed
GBA: Moved memory map to internal memory
Very modest performance improvement.
1 parent a5ee1ad commit c00db02

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

components/retro-go/rg_system.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ static void system_monitor_task(void *arg)
275275
(int)roundf((battery.volts * 1000) ?: battery.level));
276276

277277
// Auto frameskip
278+
// TODO: Use a rolling average of frameTimes instead of this mess
278279
if (statistics.ticks > app.tickRate * 2)
279280
{
280281
float speed = ((float)statistics.totalFPS / app.tickRate) * 100.f / app.speed;

gbsp/components/gbsp-libretro/cpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,8 +1457,8 @@ u16 palette_ram_converted[512];
14571457
u8 ewram[(1024 * 256) << SMC_DETECTION];
14581458
u8 iwram[(1024 * 32) << SMC_DETECTION];
14591459
u8 vram[1024 * 96];
1460-
u8 *memory_map_read[8 * 1024];
14611460
#endif
1461+
u8 *memory_map_read[8 * 1024];
14621462
u16 io_registers[512];
14631463
#endif
14641464

gbsp/components/gbsp-libretro/gba_memory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ typedef struct
345345
u8 vram[1024 * 96];
346346
u8 ewram[(1024 * 256) << SMC_DETECTION];
347347
u8 iwram[(1024 * 32) << SMC_DETECTION];
348-
u8 *memory_map_read[8 * 1024];
348+
// u8 *memory_map_read[8 * 1024];
349349
u8 gamepak_backup[1024 * 128];
350350
// There's also stuff from video.cpp to consider:
351351
// u8 obj_priority_list[5][160][128];
@@ -357,7 +357,7 @@ extern gbsp_memory_t *gbsp_memory;
357357
#define vram gbsp_memory->vram
358358
#define ewram gbsp_memory->ewram
359359
#define iwram gbsp_memory->iwram
360-
#define memory_map_read gbsp_memory->memory_map_read
360+
// #define memory_map_read gbsp_memory->memory_map_read
361361
#define gamepak_backup gbsp_memory->gamepak_backup
362362
#endif
363363

0 commit comments

Comments
 (0)