Cleanup unused code and variables

This commit is contained in:
negativeExponent
2020-02-22 06:00:06 +08:00
parent 1b01730dda
commit 473ec3a8aa
3 changed files with 0 additions and 105 deletions

View File

@@ -21,9 +21,6 @@
#include "mapinc.h"
#include "../ines.h"
static uint8 mirror;
static uint8 mask;
static void M218Power(void) {
setchr8(0);
setprg32(0x8000, 0);

View File

@@ -78,8 +78,6 @@ static void M534Reset(void) {
FCEU_printf("dipswitch = %d\n", EXPREGS[4]);
MMC3RegReset();
}
static void M534Close(void) {
}
void Mapper534_Init(CartInfo *info) {
GenMMC3_Init(info, 512, 512, 0, 0);
@@ -87,6 +85,5 @@ void Mapper534_Init(CartInfo *info) {
cwrap = M534CW;
info->Power = M534Power;
info->Reset = M534Reset;
info->Close = M534Close;
AddExState(EXPREGS, 5, 0, "EXPR");
}

View File

@@ -36,105 +36,6 @@ static void S74LS374MSync(uint8 mirr) {
}
}
/* old mapper 150 and 243 */
/* static void S74LS374NSynco(void) {
setprg32(0x8000, latch[0]);
setchr8(latch[1] | latch[3] | latch[4]);
S74LS374MSync(latch[2]);
}
static DECLFW(S74LS374NWrite) {
A &= 0x4101;
if (A == 0x4100)
cmd = V & 7;
else {
switch (cmd) {
case 2: latch[0] = V & 1; latch[3] = (V & 1) << 3; break;
case 4: latch[4] = (V & 1) << 2; break;
case 5: latch[0] = V & 7; break;
case 6: latch[1] = V & 3; break;
case 7: latch[2] = V >> 1; break;
}
S74LS374NSynco();
}
}
static DECLFR(S74LS374NRead) {
uint8 ret;
if ((A & 0x4100) == 0x4100)
// ret=(X.DB&0xC0)|((~cmd)&0x3F);
ret = ((~cmd) & 0x3F) ^ dip;
else
ret = X.DB;
return ret;
}
static void S74LS374NPower(void) {
dip = 0;
latch[0] = latch[1] = latch[2] = latch[3] = latch[4] = 0;
S74LS374NSynco();
SetReadHandler(0x8000, 0xFFFF, CartBR);
SetWriteHandler(0x4100, 0x7FFF, S74LS374NWrite);
SetReadHandler(0x4100, 0x5fff, S74LS374NRead);
}
static void S74LS374NReset(void) {
dip ^= 1;
latch[0] = latch[1] = latch[2] = latch[3] = latch[4] = 0;
S74LS374NSynco();
}
static void S74LS374NRestore(int version) {
S74LS374NSynco();
}
void S74LS374N_Init(CartInfo *info) {
info->Power = S74LS374NPower;
info->Reset = S74LS374NReset;
GameStateRestore = S74LS374NRestore;
AddExState(latch, 5, 0, "LATC");
AddExState(&cmd, 1, 0, "CMD");
AddExState(&dip, 1, 0, "DIP");
}
static void S74LS374NASynco(void) {
setprg32(0x8000, latch[0]);
setchr8(latch[1]);
S74LS374MSync(latch[2]);
}
static DECLFW(S74LS374NAWrite) {
A &= 0x4101;
if (A == 0x4100)
cmd = V & 7;
else {
switch (cmd) {
case 0: latch[0] = 0; latch[1] = 3; break;
case 2: latch[3] = (V & 1) << 3; break;
case 4: latch[1] = (latch[1] & 6) | (V & 3); break;
case 5: latch[0] = V & 1; break;
case 6: latch[1] = (latch[1] & 1) | latch[3] | ((V & 3) << 1); break;
case 7: latch[2] = V & 1; break;
}
S74LS374NASynco();
}
}
static void S74LS374NAPower(void) {
latch[0] = latch[2] = latch[3] = latch[4] = 0;
latch[1] = 3;
S74LS374NASynco();
SetReadHandler(0x8000, 0xFFFF, CartBR);
SetWriteHandler(0x4100, 0x7FFF, S74LS374NAWrite);
}
void S74LS374NA_Init(CartInfo *info) {
info->Power = S74LS374NAPower;
GameStateRestore = S74LS374NRestore;
AddExState(latch, 5, 0, "LATC");
AddExState(&cmd, 1, 0, "CMD");
}*/
static int type;
static void S8259Synco(void) {
int x;