- use shorter strings for state names
- make variables static
- turn C++ comments to C comments
- cleanup dead code in boards
This commit is contained in:
negativeExponent
2020-01-24 19:43:40 +08:00
parent fb516c853a
commit dc85a40951
9 changed files with 115 additions and 144 deletions

View File

@@ -22,40 +22,36 @@
#include "mapinc.h"
#include "mmc3.h"
static uint8 *WRAM;
static uint32 WRAMSIZE;
extern uint8 *WRAM;
extern uint32 WRAMSIZE;
//extern uint8 *CHRRAM;
//extern uint32 CHRRAMSIZE;
uint8 mmc3_reg[8];
uint8 exRegs[8];
uint8 pointer;
uint8 locked;
uint8 readDIP;
uint16 prgAND;
uint16 chrAND;
uint16 prgOR;
uint16 chrOR;
uint8 nrom;
uint8 nrom128;
uint8 dipswitch;
static uint8 mmc3_reg[8];
static uint8 exRegs[8];
static uint8 pointer;
static uint8 locked;
static uint8 readDIP;
static uint16 prgAND;
static uint16 chrAND;
static uint16 prgOR;
static uint16 chrOR;
static uint8 nrom;
static uint8 nrom128;
static uint8 dipswitch;
static SFORMAT BS110_StateRegs[] =
{
{ exRegs, 8, "REGS" },
{ mmc3_reg, 8, "MMC3R" },
{ &pointer, 1, "POINT" },
{ mmc3_reg, 8, "MREG" },
{ &pointer, 1, "PNT0" },
{ &readDIP, 1, "RDIP" },
{ &prgAND, 2 | FCEUSTATE_RLSB, "PRGAND" },
{ &chrAND, 2 | FCEUSTATE_RLSB, "CHRAND" },
{ &prgOR, 2 | FCEUSTATE_RLSB, "PRGOR" },
{ &chrOR, 2 | FCEUSTATE_RLSB, "CHROR" },
{ &prgAND, 2 | FCEUSTATE_RLSB, "PAND" },
{ &chrAND, 2 | FCEUSTATE_RLSB, "CAND" },
{ &prgOR, 2 | FCEUSTATE_RLSB, "PROR" },
{ &chrOR, 2 | FCEUSTATE_RLSB, "CHOR" },
{ &nrom, 1, "NROM" },
{ &nrom128, 1, "N128" },
{ &dipswitch, 1, "DIP" },
{ &dipswitch, 1, "DIP0" },
{ 0 }
};
@@ -180,9 +176,6 @@ static void BS110Reset(void)
MMC3RegReset();
}
static void BS110Close(void) {
if (WRAM)
FCEU_gfree(WRAM);
WRAM = NULL;
}
void BS110_Init(CartInfo *info) {
@@ -198,11 +191,6 @@ void BS110_Init(CartInfo *info) {
SetupCartPRGMapping(0x10, WRAM, WRAMSIZE, 1);
AddExState(WRAM, WRAMSIZE, 0, "WRAM");
//CHRRAMSIZE = 8192;
//CHRRAM = (uint8*)FCEU_gmalloc(CHRRAMSIZE);
//SetupCartCHRMapping(0x10, CHRRAM, CHRRAMSIZE, 1);
//AddExState(CHRRAM, CHRRAMSIZE, 0, "CHRR");
AddExState(EXPREGS, 3, 0, "EXPR");
AddExState(BS110_StateRegs, ~0, 0, 0);
}