aboutsummaryrefslogtreecommitdiff
path: root/source/spc7110.c
diff options
context:
space:
mode:
authoraliaspider2014-10-29 06:47:46 +0100
committeraliaspider2014-10-29 06:47:46 +0100
commit761d752569b9bad6bdb755e91ca9e345cfb2788d (patch)
tree5eaa11c172c08039757d6bee1a3641e051462d3a /source/spc7110.c
parenta6dc7abc9b8cc3986eda5a84141da7dc9e4e8f1a (diff)
downloadsnes9x2005-761d752569b9bad6bdb755e91ca9e345cfb2788d.tar.gz
snes9x2005-761d752569b9bad6bdb755e91ca9e345cfb2788d.tar.bz2
snes9x2005-761d752569b9bad6bdb755e91ca9e345cfb2788d.zip
C++ cleanups. (in progress)
Diffstat (limited to 'source/spc7110.c')
-rw-r--r--source/spc7110.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/spc7110.c b/source/spc7110.c
index 3ae0cfd..f296fc2 100644
--- a/source/spc7110.c
+++ b/source/spc7110.c
@@ -109,8 +109,8 @@
#define FREEZEFOLDER S9xGetSnapshotDirectory ()
#endif
-extern "C" const char *S9xGetFilename (const char *);
-extern "C" char *osd_GetPackDir();
+const char *S9xGetFilename (const char *);
+char *osd_GetPackDir();
//really not needed, but usually MS adds the _ to POSIX functions,
//while *nix doesn't, so this was to "un-M$" the function.
#define splitpath _splitpath
@@ -522,7 +522,6 @@ void GetPackData()
}
}
-extern "C"{
//reads SPC7110 and RTC registers.
uint8 S9xGetSPC7110(uint16 Address)
{
@@ -898,7 +897,7 @@ uint8 S9xGetSPC7110(uint16 Address)
return 0x00;
}
}
-}
+
void S9xSetSPC7110 (uint8 data, uint16 Address)
{
switch(Address)
@@ -1399,7 +1398,7 @@ void S9xSetSPC7110 (uint8 data, uint16 Address)
//16 BIT MULTIPLIER: ($FF00) high byte, defval:00
}
}
-extern "C"{
+
//emulate the SPC7110's ability to remap banks Dx, Ex, and Fx.
uint8 S9xGetSPC7110Byte(uint32 Address)
{
@@ -1421,7 +1420,7 @@ uint8 S9xGetSPC7110Byte(uint32 Address)
i+=s7r.DataRomOffset;
return ROM[i];
}
-}
+
/**********************************************************************************************/
/* S9xSRTCDaysInMonth() */
/* Return the number of days in a specific month for a certain year */
@@ -1603,7 +1602,6 @@ void S9xUpdateRTC ()
}
}
}
-extern "C"{
//allows DMA from the ROM (is this even possible on the SPC7110?
uint8* Get7110BasePtr(uint32 Address)
@@ -1625,8 +1623,6 @@ uint8* Get7110BasePtr(uint32 Address)
i+=Address&0x000F0000;
return &ROM[i];
}
-//end extern
-}
//loads the index into memory.
//index.bin is little-endian