summaryrefslogtreecommitdiff
path: root/src/sdd1.c
diff options
context:
space:
mode:
authortwinaphex2018-12-28 00:32:13 +0100
committertwinaphex2018-12-28 00:32:13 +0100
commitc007afe6fd51827fade7aa15a0a798be8bd97839 (patch)
tree3b8aca538bec3b42ef9bd33549a15110c3a20e37 /src/sdd1.c
parent29db3cf00f552808b3f1dc5d11fcdbbefc659ec4 (diff)
downloadsnes9x2002-c007afe6fd51827fade7aa15a0a798be8bd97839.tar.gz
snes9x2002-c007afe6fd51827fade7aa15a0a798be8bd97839.tar.bz2
snes9x2002-c007afe6fd51827fade7aa15a0a798be8bd97839.zip
Start significantly refactoring this codebase so we can get it
to work with MSVC
Diffstat (limited to 'src/sdd1.c')
-rw-r--r--src/sdd1.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/sdd1.c b/src/sdd1.c
index e02172e..c6e7f57 100644
--- a/src/sdd1.c
+++ b/src/sdd1.c
@@ -53,11 +53,11 @@
void S9xSetSDD1MemoryMap(uint32 bank, uint32 value)
{
+ int c;
+
bank = 0xc00 + bank * 0x100;
value = value * 1024 * 1024;
- int c;
-
for (c = 0; c < 0x100; c += 16)
{
uint8* block = &Memory.ROM [value + (c << 12)];
@@ -68,10 +68,12 @@ void S9xSetSDD1MemoryMap(uint32 bank, uint32 value)
}
}
-void S9xResetSDD1()
+void S9xResetSDD1(void)
{
- memset(&Memory.FillRAM [0x4800], 0, 4);
int i;
+
+ memset(&Memory.FillRAM [0x4800], 0, 4);
+
for (i = 0; i < 4; i++)
{
Memory.FillRAM [0x4804 + i] = i;
@@ -79,7 +81,7 @@ void S9xResetSDD1()
}
}
-void S9xSDD1PostLoadState()
+void S9xSDD1PostLoadState(void)
{
int i;
for (i = 0; i < 4; i++)
@@ -100,10 +102,12 @@ void S9xSDD1SaveLoggedData()
{
if (Memory.SDD1LoggedDataCount != Memory.SDD1LoggedDataCountPrev)
{
+ FILE *fs;
+
qsort(Memory.SDD1LoggedData, Memory.SDD1LoggedDataCount, 8,
S9xCompareSDD1LoggedDataEntries);
- FILE* fs = fopen(S9xGetFilename(".dat"), "wb");
+ fs = fopen(S9xGetFilename(".dat"), "wb");
if (fs)
{