Menu

[r1335]: / mappers / trunk / src / iNES / mapper229.cpp  Maximize  Restore  History

Download this file

57 lines (52 with data), 854 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* Nintendulator Mapper DLLs
* Copyright (C) 2002-2011 QMT Productions
*
* $URL$
* $Id$
*/
#include "..\DLL\d_iNES.h"
#include "..\Hardware\h_Latch.h"
namespace
{
void Sync (void)
{
if (Latch::Addr.b0 & 0x1E)
{
EMU->SetPRG_ROM16(0x8, Latch::Addr.b0 & 0x1F);
EMU->SetPRG_ROM16(0xC, Latch::Addr.b0 & 0x1F);
}
else EMU->SetPRG_ROM32(0x8, 0);
EMU->SetCHR_ROM8(0, Latch::Addr.b0 & 0x1F);
if (Latch::Addr.b0 & 0x20)
EMU->Mirror_H();
else EMU->Mirror_V();
}
BOOL MAPINT Load (void)
{
Latch::Load(Sync, FALSE);
return TRUE;
}
void MAPINT Reset (RESET_TYPE ResetType)
{
Latch::Reset(ResetType);
}
void MAPINT Unload (void)
{
Latch::Unload();
}
uint16 MapperNum = 229;
} // namespace
const MapperInfo MapperInfo_229 =
{
&MapperNum,
_T("31-in-1"),
COMPAT_FULL,
Load,
Reset,
Unload,
NULL,
NULL,
Latch::SaveLoad_AL,
NULL,
NULL
};