Skip to content

Commit

Permalink
Adding missing setting for forcing sram
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioMartin86 committed Apr 10, 2024
1 parent e8318e6 commit 79564a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/cart_hw/sram.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "../scrc32.h"

T_SRAM sram;
extern int cinterface_force_sram;

/****************************************************************************
* A quick guide to external RAM on the Genesis
Expand Down Expand Up @@ -210,11 +211,11 @@ void sram_init(void)
/* this prevents backup RAM from being mapped in place of mirrored ROM when using S&K LOCK-ON feature */
sram.on = 0;
}

/* by default, enable backup RAM for ROM smaller than 2MB */
else if (cart.romsize <= 0x200000)
else if (cinterface_force_sram && cart.romsize <= 0x200000)
{
/* 64KB static RAM mapped to $200000-$20ffff */
// by default, gpgx enables saveram for all rom no bigger than 2MB
// we don't do that because it confuses ram searches and debugging, and adds extra baggage to savestates
// but some games do need it, so allow that to be hacked in here
sram.start = 0x200000;
sram.end = 0x20ffff;
sram.on = 1;
Expand Down

0 comments on commit 79564a7

Please sign in to comment.