sync to fceux 2818

This commit is contained in:
dborth 2013-01-12 23:10:18 +00:00
parent 50372e3236
commit 55e23b0867
2 changed files with 48 additions and 26 deletions

View File

@ -733,13 +733,15 @@ void Mapper114_Init(CartInfo *info) {
// ---------------------------- Mapper 115 KN-658 board ------------------------------
static void M115PW(uint32 A, uint8 V) {
setprg8(A, V);
if (EXPREGS[0] & 0x80) {
if (EXPREGS[0] & 0x40)
setprg32(0x8000, (EXPREGS[0] & 0x0F) >> 1); // looks like another 2-in-1, Thunderbolt need it
else
if (EXPREGS[0] & 0x20)
setprg32(0x8000, (EXPREGS[0] & 0x0F) >> 1); // real hardware tests, info 100% now lol
else {
setprg16(0x8000, (EXPREGS[0] & 0x0F));
}
setprg16(0xC000, (EXPREGS[0] & 0x0F));
}
} else
setprg8(A, V);
}
static void M115CW(uint32 A, uint8 V) {
@ -747,7 +749,6 @@ static void M115CW(uint32 A, uint8 V) {
}
static DECLFW(M115Write) {
// FCEU_printf("%04x:%04x\n",A,V);
if (A == 0x5080) EXPREGS[2] = V;
if (A == 0x6000)
EXPREGS[0] = V;

View File

@ -126,14 +126,25 @@ static void MooMirroring(void) {
}
static int DoMirroring(FCEUFILE *fp) {
uint8 t;
t = FCEU_fgetc(fp);
mirrortodo = t;
{
static char *stuffo[6] = { "Horizontal", "Vertical", "$2000", "$2400", "\"Four-screen\"", "Controlled by Mapper Hardware" };
if (t < 6)
FCEU_printf(" Name/Attribute Table Mirroring: %s\n", stuffo[t]);
uint8 t, i;
if(uchead.info == 1) {
if ((t = FCEU_fgetc(fp)) == EOF)
return(0);
mirrortodo = t;
{
static char *stuffo[6] = { "Horizontal", "Vertical", "$2000", "$2400", "\"Four-screen\"", "Controlled by Mapper Hardware" };
if (t < 6)
FCEU_printf(" Name/Attribute Table Mirroring: %s\n", stuffo[t]);
}
} else {
FCEU_printf(" Incorrect Mirroring Chunk Size (%d). Data is:", uchead.info);
for(i = 0; i < uchead.info; i++) {
if ((t = FCEU_fgetc(fp)) == EOF)
return(0);
FCEU_printf(" %02x", t);
}
FCEU_printf("\n Default Name/Attribute Table Mirroring: Horizontal\n", uchead.info);
mirrortodo = 0;
}
return(1);
}
@ -192,19 +203,29 @@ static int DINF(FCEUFILE *fp) {
}
static int CTRL(FCEUFILE *fp) {
int t;
if ((t = FCEU_fgetc(fp)) == EOF)
return(0);
/* The information stored in this byte isn't very helpful, but it's
better than nothing...maybe.
*/
if (t & 1) GameInfo->input[0] = GameInfo->input[1] = SI_GAMEPAD;
else GameInfo->input[0] = GameInfo->input[1] = SI_NONE;
if (t & 2) GameInfo->input[1] = SI_ZAPPER;
int t, i;
if(uchead.info == 1) {
if ((t = FCEU_fgetc(fp)) == EOF)
return(0);
/* The information stored in this byte isn't very helpful, but it's
better than nothing...maybe.
*/
if (t & 1)
GameInfo->input[0] = GameInfo->input[1] = SI_GAMEPAD;
else
GameInfo->input[0] = GameInfo->input[1] = SI_NONE;
if (t & 2)
GameInfo->input[1] = SI_ZAPPER;
} else {
FCEU_printf(" Incorrect Control Chunk Size (%d). Data is:", uchead.info);
for(i = 0; i < uchead.info; i++) {
t = FCEU_fgetc(fp);
FCEU_printf(" %02x", t);
}
FCEU_printf("\n");
GameInfo->input[0] = GameInfo->input[1] = SI_GAMEPAD;
}
return(1);
}