Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
vbam-libretro
Commits
4700a2c1
Commit
4700a2c1
authored
Jan 29, 2019
by
retro-wertz
Committed by
Rafael Kitover
Jan 29, 2019
Browse files
libretro: Enable mirroring for classic/famicom games for GBA and update
parent
f2b34962
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libretro/libretro.cpp
View file @
4700a2c1
...
...
@@ -745,7 +745,7 @@ static void load_image_preferences(void)
buffer
[
3
]
=
rom
[
0xaf
];
buffer
[
4
]
=
0
;
cpuSaveType
=
0
;
cpuSaveType
=
GBA_SAVE_AUTO
;
flashSize
=
0x10000
;
eepromSize
=
512
;
rtcEnabled
=
false
;
...
...
@@ -768,25 +768,36 @@ static void load_image_preferences(void)
log
(
"Found ROM in vba-over list.
\n
"
);
log
(
"Name : %s
\n
"
,
gbaover
[
found_no
].
romtitle
);
cpuSaveType
=
gbaover
[
found_no
].
saveType
;
if
(
gbaover
[
found_no
].
saveSize
!=
0
)
{
unsigned
size
=
gbaover
[
found_no
].
saveSize
;
if
((
cpuSaveType
==
3
)
&&
((
size
==
65536
)
||
(
size
==
131072
)))
flashSize
=
size
;
else
if
((
cpuSaveType
==
1
)
&&
(
size
==
8192
))
eepromSize
=
0x2000
;
}
rtcEnabled
=
gbaover
[
found_no
].
rtcEnabled
;
cpuSaveType
=
gbaover
[
found_no
].
saveType
;
mirroringEnable
=
gbaover
[
found_no
].
mirroringEnabled
;
unsigned
size
=
gbaover
[
found_no
].
saveSize
;
if
(
cpuSaveType
==
GBA_SAVE_SRAM
)
flashSize
=
32768
;
else
if
(
cpuSaveType
==
GBA_SAVE_FLASH
)
flashSize
=
size
?
size
:
65536
;
else
if
((
cpuSaveType
==
GBA_SAVE_EEPROM
)
||
(
cpuSaveType
==
GBA_SAVE_EEPROM_SENSOR
))
eepromSize
=
size
?
size
:
512
;
}
// gameID that starts with 'F' are classic/famicom games
mirroringEnable
=
(
buffer
[
0
]
==
0x46
)
?
true
:
false
;
if
(
!
cpuSaveType
)
{
log
(
"Scrapping ROM for save type.
\n
"
);
utilGBAFindSave
(
romSize
);
}
saveType
=
cpuSaveType
;
if
(
flashSize
==
0x10000
||
flashSize
==
0x20000
)
flashSetSize
(
flashSize
);
rtcEnable
(
rtcEnabled
);
rtcEnableRumble
(
!
rtcEnabled
);
doMirroring
(
mirroringEnable
);
log
(
"romSize : %dKB
\n
"
,
(
romSize
+
1023
)
/
1024
);
log
(
"has RTC : %s.
\n
"
,
rtcEnabled
?
"Yes"
:
"No"
);
log
(
"cpuSaveType : %s.
\n
"
,
savetype
[
cpuSaveType
]);
...
...
@@ -794,7 +805,7 @@ static void load_image_preferences(void)
log
(
"flashSize : %d.
\n
"
,
flashSize
);
if
(
cpuSaveType
==
1
)
log
(
"eepromSize : %d.
\n
"
,
eepromSize
);
log
(
"mirroringEnable : %
d
.
\n
"
,
mirroringEnable
);
log
(
"mirroringEnable : %
s
.
\n
"
,
mirroringEnable
?
"Yes"
:
"No"
);
}
static
void
update_colormaps
(
void
)
...
...
@@ -827,16 +838,6 @@ static void gba_init(void)
log
(
"Loading VBA-M Core (GBA)...
\n
"
);
load_image_preferences
();
saveType
=
cpuSaveType
;
if
(
flashSize
==
0x10000
||
flashSize
==
0x20000
)
flashSetSize
(
flashSize
);
rtcEnable
(
rtcEnabled
);
rtcEnableRumble
(
!
rtcEnabled
);
doMirroring
(
mirroringEnable
);
soundSetSampleRate
(
SampleRate
);
if
(
usebios
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment