Update ines-correct based on latest tests, update m36...

- Update exiting game database based on latest changes and testing (reference nesdev for one)
- Update mapper 36, supports F-15 City War (Spain) (Gluk Video) (Unl)
- add Reset function to m177, fixes games freezing when reset is pressed (might not be a hardware behavior, but its annoying for emulators :D)
This commit is contained in:
retro-wertz
2019-06-16 16:39:52 +08:00
parent 27a71cc3fb
commit 650bc4579a
4 changed files with 76 additions and 31 deletions

View File

@@ -59,6 +59,11 @@ static void M177Close(void) {
WRAM = NULL;
}
static void M177Reset(void) {
reg = 0;
Sync();
}
static void StateRestore(int version) {
Sync();
}
@@ -66,6 +71,7 @@ static void StateRestore(int version) {
void Mapper177_Init(CartInfo *info) {
info->Power = M177Power;
info->Close = M177Close;
info->Reset = M177Reset;
GameStateRestore = StateRestore;
WRAMSIZE = 8192;

View File

@@ -1,7 +1,8 @@
/* FCE Ultra - NES/Famicom Emulator
/* FCEUmm - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2012 CaH4e3
* Copyright (C) 2019 Libretro Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,38 +19,65 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* TXC/Micro Genius simplified mapper
* updated 06-2019 http://wiki.nesdev.com/w/index.php/INES_Mapper_036
*
* Known games:
* - Strike Wolf (Asia) (Unl)
* - Policeman (Gluk Video) (unl)
* - F-15 City War (Spain) (Gluk Video) (Unl)
*/
#include "mapinc.h"
static uint8 latche;
static uint8 regs[5];
static SFORMAT StateRegs[] =
{
{ &latche, 1, "LATC" },
{ regs, 5, "REGS" },
{ 0 }
};
static void Sync(void) {
setprg32(0x8000, latche >> 4);
setchr8(latche & 0xf);
setprg32(0x8000, regs[0] >> 4);
setchr8(regs[4] & 0x0F);
}
static DECLFW(M36Write) {
latche = V;
static DECLFW(M36Write4100) {
switch(A & 0xE103) {
case 0x4100:
if(regs[3] & 0x10)
regs[0]++;
else
regs[0] = regs[2];
break;
case 0x4101:
case 0x4102:
case 0x4103:
regs[A & 0x03] = V;
break;
}
}
static DECLFW(M36Write4200) {
regs[4] = V;
Sync();
}
static DECLFW(M36WriteHi) {
Sync();
}
static DECLFR(M36Read) {
return latche; /* Need by Strike Wolf, being simplified mapper, this cart still uses some TCX mapper features andrely on it */
return ((X.DB & 0xCF) | (regs[0] & 0x30));
}
static void M36Power(void) {
latche = 0;
Sync();
SetReadHandler(0x4100, 0x4100, M36Read);
SetReadHandler(0x8000, 0xFFFF, CartBR);
SetWriteHandler(0x8000, 0xFFFE, M36Write); /* Actually, BUS conflict there preventing from triggering the wrong banks */
SetWriteHandler(0x4100, 0x4103, M36Write4100);
SetWriteHandler(0x4200, 0x4200, M36Write4200);
SetWriteHandler(0x8000, 0xFFFF, M36WriteHi);
}
static void M36Restore(int version) {