parent
e5b34983a9
commit
ec07d6bd55
|
@ -46,6 +46,9 @@ public:
|
|||
if ((memcmp(gameInfo.header.gameCode, "UBR", 3) == 0) // Opera Browser
|
||||
)
|
||||
selection = NDS_SLOT2_EXPMEMORY;
|
||||
else
|
||||
if (gameInfo.isHomebrew())
|
||||
selection = NDS_SLOT2_PASSME;
|
||||
|
||||
mSelectedImplementation = slot2_List[selection];
|
||||
mSelectedImplementation->connect();
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
along with the this software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../NDSSystem.h"
|
||||
#include "../types.h"
|
||||
#include "../slot2.h"
|
||||
|
||||
class Slot2_PassME : public ISlot2Interface
|
||||
|
@ -25,6 +27,31 @@ public:
|
|||
static Slot2InfoSimple info("PassME", "PassME in GBA slot");
|
||||
return &info;
|
||||
}
|
||||
|
||||
virtual u8 readByte(u8 PROCNUM, u32 addr)
|
||||
{
|
||||
u32 tmp_addr = (addr & 0x07FFFFFF);
|
||||
if (tmp_addr < gameInfo.romsize)
|
||||
return (u8)gameInfo.readROM(tmp_addr);
|
||||
|
||||
return (0xFF);
|
||||
}
|
||||
virtual u16 readWord(u8 PROCNUM, u32 addr)
|
||||
{
|
||||
u32 tmp_addr = (addr & 0x07FFFFFF);
|
||||
if (tmp_addr < gameInfo.romsize)
|
||||
return (u16)gameInfo.readROM(tmp_addr);
|
||||
|
||||
return (0xFFFF);
|
||||
}
|
||||
virtual u32 readLong(u8 PROCNUM, u32 addr)
|
||||
{
|
||||
u32 tmp_addr = (addr & 0x07FFFFFF);
|
||||
if (tmp_addr < gameInfo.romsize)
|
||||
return (u32)gameInfo.readROM(tmp_addr);
|
||||
|
||||
return (0xFFFFFFFF);
|
||||
}
|
||||
};
|
||||
|
||||
ISlot2Interface* construct_Slot2_PassME() { return new Slot2_PassME(); }
|
||||
|
|
Loading…
Reference in New Issue