- pretty much done commenting... might have a chance to start cleanup tonight

- had to change the name of the 'brk' variable name again... please don't change it back... brk is a reserved word in *nix.
This commit is contained in:
gimmedonutnow 2006-08-03 00:31:31 +00:00
parent 8d2dfca52c
commit c39de3f8a8
4 changed files with 650 additions and 422 deletions

View File

@ -21,13 +21,14 @@
#include "mapinc.h" #include "mapinc.h"
#include "mmc3.h" #include "mmc3.h"
static uint8 chrcmd[8], prg0, prg1, brk, latc, mirr; // brk is a system call in *nix, and is an illegal variable name - soules
static uint8 chrcmd[8], prg0, prg1, bbrk, latc, mirr;
static SFORMAT StateRegs[]= static SFORMAT StateRegs[]=
{ {
{chrcmd, 8, "CHRCMD"}, {chrcmd, 8, "CHRCMD"},
{&prg0, 1, "PRG0"}, {&prg0, 1, "PRG0"},
{&prg1, 1, "PRG1"}, {&prg1, 1, "PRG1"},
{&brk, 1, "BRK"}, {&bbrk, 1, "BRK"},
{&mirr, 1, "MIRR"}, {&mirr, 1, "MIRR"},
{0} {0}
}; };
@ -47,9 +48,9 @@ static void Sync(void)
static void UNLSL1632CW(uint32 A, uint8 V) static void UNLSL1632CW(uint32 A, uint8 V)
{ {
int cbase=(MMC3_cmd&0x80)<<5; int cbase=(MMC3_cmd&0x80)<<5;
int page0=(brk&0x08)<<5; int page0=(bbrk&0x08)<<5;
int page1=(brk&0x20)<<3; int page1=(bbrk&0x20)<<3;
int page2=(brk&0x80)<<1; int page2=(bbrk&0x80)<<1;
setchr1(cbase^0x0000,page0|(DRegBuf[0]&(~1))); setchr1(cbase^0x0000,page0|(DRegBuf[0]&(~1)));
setchr1(cbase^0x0400,page0|DRegBuf[0]|1); setchr1(cbase^0x0400,page0|DRegBuf[0]|1);
setchr1(cbase^0x0800,page0|(DRegBuf[1]&(~1))); setchr1(cbase^0x0800,page0|(DRegBuf[1]&(~1)));
@ -64,10 +65,10 @@ static DECLFW(UNLSL1632CMDWrite)
{ {
if((A&0xA131)==0xA131) if((A&0xA131)==0xA131)
{ {
brk=V; bbrk=V;
latc = brk; latc = bbrk;
} }
if(brk&2) if(bbrk&2)
{ {
FixMMC3PRG(MMC3_cmd); FixMMC3PRG(MMC3_cmd);
FixMMC3CHR(MMC3_cmd); FixMMC3CHR(MMC3_cmd);
@ -99,7 +100,7 @@ static DECLFW(UNLSL1632CMDWrite)
static void StateRestore(int version) static void StateRestore(int version)
{ {
if(brk&2) if(bbrk&2)
{ {
FixMMC3PRG(MMC3_cmd); FixMMC3PRG(MMC3_cmd);
FixMMC3CHR(MMC3_cmd); FixMMC3CHR(MMC3_cmd);

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/// \file
/// \brief A set of functions for dealing with the main execution loop. Much of this code will likely be dispersed to sdl.cpp and other files since we no longer support non-SDL and non-Windows builds.
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <signal.h> #include <signal.h>

View File

@ -33,8 +33,7 @@
static SDL_Joystick *Joysticks[MAX_JOYSTICKS] = {NULL}; static SDL_Joystick *Joysticks[MAX_JOYSTICKS] = {NULL};
/** /**
* Updates a single input button configuration on the joystick. Note: * Updates a single input button configuration on the joystick?
* I'm not fully sure that this is what the function does - soules.
*/ */
int int
DTestButtonJoy(ButtConfig *bc) DTestButtonJoy(ButtConfig *bc)