NES - support some junk via the game db, remove some disch doc comments and replace with wiki link, remove exception thrown for qboy, as the investigation has been done
This commit is contained in:
parent
0c31b782c3
commit
508bc7e1cc
|
@ -2,107 +2,9 @@
|
|||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||
{
|
||||
// http://wiki.nesdev.com/w/index.php/INES_Mapper_096
|
||||
public sealed class BANDAI_74_161_02_74 : NES.NESBoardBase
|
||||
{
|
||||
/*
|
||||
Here are Disch's original notes:
|
||||
========================
|
||||
= Mapper 096 =
|
||||
========================
|
||||
|
||||
|
||||
Example Games:
|
||||
--------------------------
|
||||
Oeka Kids - Anpanman no Hiragana Daisuki
|
||||
Oeka Kids - Anpanman to Oekaki Shiyou!!
|
||||
|
||||
|
||||
Notes:
|
||||
---------------------------
|
||||
These games use the Oeka Kids tablet -- so you'll need to add support for that if you really want to test
|
||||
these.
|
||||
|
||||
These games use 32k of CHR-RAM, which is swappable in a very unique fashion. Be sure to read the CHR Setup
|
||||
section in detail.
|
||||
|
||||
|
||||
Registers:
|
||||
---------------------------
|
||||
I'm unsure whether or not this mapper suffers from bus conflicts. Use caution!
|
||||
|
||||
|
||||
$8000-FFFF: [.... .CPP]
|
||||
C = CHR Block select (see CHR Setup)
|
||||
P = PRG Page select (32k @ $8000)
|
||||
|
||||
|
||||
|
||||
CHR Setup:
|
||||
---------------------------
|
||||
|
||||
This mapper is tricky!!!
|
||||
|
||||
Firstly, this mapper divides the 32k CHR-RAM into two 16k blocks (above 'C' bit selects which block is used).
|
||||
The selected pages (including the fixed page) are taken from only the currently selected 16k block.
|
||||
|
||||
$0000 $0400 $0800 $0C00 $1000 $1400 $1800 $1C00
|
||||
+-------------------------------+-------------------------------+
|
||||
| **See below** | { 3 } |
|
||||
+-------------------------------+-------------------------------+
|
||||
|
||||
|
||||
But that's the easy part. This mapper does a very, very cool trick which watches the PPU address lines to
|
||||
effectively "split" the nametable into 4 smaller sections -- thereby assigning a different CHR-RAM page to
|
||||
each section. This allows **every single tile in the NT** to have a unique tile graphic!
|
||||
|
||||
Long story short:
|
||||
|
||||
A nametable spans from $2000-$23BF ($23C0-$23FF are the attribute table).
|
||||
The mapper breaks the NT up like so:
|
||||
|
||||
$2000-20FF = use CHR page 0
|
||||
$2100-21FF = use CHR page 1
|
||||
$2200-22FF = use CHR page 2
|
||||
$2300-23BF = use CHR page 3
|
||||
|
||||
the other nametables at $2400, $2800, $2C00 are broken up in the same fashion.
|
||||
|
||||
|
||||
|
||||
|
||||
Long story long:
|
||||
|
||||
PPU Address lines are modified as the PPU fetches tiles, and also when the game manually changes the PPU
|
||||
address (via the second write to $2006 --- or by the increment after read/writing $2007). The mapper
|
||||
monitors every change to the PPU Address lines, and when it lies within a certain range, it swaps the
|
||||
appropriate CHR page in.
|
||||
|
||||
It will only swap CHR when the address falls between $2000-2FFF (or mirrored regions like $6000-6FFF,
|
||||
$A000-AFFF, $E000-EFFF). $3xxx will not trigger a swap.
|
||||
|
||||
When in that range, it checks to make sure the address is not attribute tables ((Addr AND $03FF) < $03C0).
|
||||
Note I'm not 100% sure if the mapper really does this or not. It's very possible that attribute fetches will
|
||||
also swap CHR... this would not really disrupt anything other than making the game be more careful about its
|
||||
PPU writes.
|
||||
|
||||
When all that checks out, bits 8 and 9 (Addr AND $0300) select the 4k CHR page to swap in to $0000.
|
||||
|
||||
|
||||
Note that the mapper does not distinguish between PPU driven line changes and game driven line changes.
|
||||
This means that games can manually swap the CHR page by doing specific writes to $2006:
|
||||
|
||||
|
||||
LDA #$20
|
||||
STA $2006
|
||||
STA $2006 ; Addr set to $20xx -- CHR page 0 selected
|
||||
|
||||
LDA #$21
|
||||
STA $2006
|
||||
STA $2006 ; Addr set to $21xx -- CHR page 1 selected
|
||||
|
||||
And in fact, games would HAVE to do that to select CHR, since that's the only way to fill CHR RAM with the
|
||||
desired data. So make sure your emu supports this.
|
||||
*/
|
||||
int chr_block;
|
||||
int chr_pos = 0;
|
||||
int prg_bank_mask_32k;
|
||||
|
|
|
@ -21,9 +21,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
BaseSetup();
|
||||
|
||||
//theres a possibly bogus Q Boy rom using this mapper but I have no idea what emulator its supposed to boot in, for proof
|
||||
throw new InvalidOperationException("THIS MAPPER ISNT TESTED! WHAT GAME USES IT? PLEASE REPORT!");
|
||||
//throw new InvalidOperationException("THIS MAPPER ISNT TESTED! WHAT GAME USES IT? PLEASE REPORT!");
|
||||
|
||||
//return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override byte ReadPPU(int addr)
|
||||
|
|
|
@ -4,39 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
{
|
||||
public sealed class Mapper164 : NES.NESBoardBase
|
||||
{
|
||||
/*
|
||||
* Here are Disch's original notes:
|
||||
========================
|
||||
= Mapper 164 =
|
||||
========================
|
||||
|
||||
Example Game:
|
||||
--------------------------
|
||||
Final Fantasy V
|
||||
|
||||
|
||||
|
||||
Registers:
|
||||
---------------------------
|
||||
|
||||
Range,Mask: $5000-FFFF, $F300
|
||||
|
||||
$5000, $D000: PRG reg (32k @ $8000)
|
||||
|
||||
$6000-7FFF may have SRAM (not sure)
|
||||
|
||||
|
||||
On Reset
|
||||
---------------------------
|
||||
Reg seems to contain $FF on powerup/reset
|
||||
|
||||
|
||||
Notes:
|
||||
---------------------------
|
||||
|
||||
Swapping is really simple -- the thing that is funky is the register range/mask. $5000 and $D000 will access
|
||||
the register, however $5100, $5200, etc will not.
|
||||
*/
|
||||
// http://wiki.nesdev.com/w/index.php/INES_Mapper_164
|
||||
|
||||
int prg_bank;
|
||||
int prg_bank_mask_32k;
|
||||
|
|
|
@ -37,16 +37,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
return 0x50;
|
||||
}
|
||||
|
||||
public override void WritePPU(int addr, byte value)
|
||||
{
|
||||
base.WritePPU(addr, value);
|
||||
}
|
||||
|
||||
public override byte ReadPPU(int addr)
|
||||
{
|
||||
return base.ReadPPU(addr);
|
||||
}
|
||||
|
||||
public override void WritePRG(int addr, byte value)
|
||||
{
|
||||
prg_banks_32k[0] = value;
|
||||
|
|
|
@ -4,27 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
{
|
||||
public sealed class Mapper60 : NES.NESBoardBase
|
||||
{
|
||||
/*
|
||||
Here are Disch's original notes:
|
||||
========================
|
||||
= Mapper 060 =
|
||||
========================
|
||||
|
||||
Example Game:
|
||||
--------------------------
|
||||
Reset Based 4-in-1
|
||||
|
||||
|
||||
Notes:
|
||||
---------------------------
|
||||
This mapper is very, very unique.
|
||||
|
||||
It's a multicart that consists of four NROM games, each with 16k PRG (put at $8000 and $C000) and 8k CHR.
|
||||
The current block that is selected is determined by an internal register that can only be incremented by a
|
||||
soft reset!
|
||||
|
||||
I would assume the register is 2 bits wide? Don't know for sure.
|
||||
*/
|
||||
// http://wiki.nesdev.com/w/index.php/INES_Mapper_060
|
||||
|
||||
int reg = 0;
|
||||
public override bool Configure(NES.EDetectionOrigin origin)
|
||||
|
|
|
@ -3,21 +3,7 @@ using BizHawk.Common.NumberExtensions;
|
|||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||
{
|
||||
/*
|
||||
Example Games:
|
||||
--------------------------
|
||||
Devil Man
|
||||
|
||||
Similar to Mapper 88 except for mirroring
|
||||
|
||||
$8000-$FFFF: [.Mxx xxxx]
|
||||
x = See mapper 206 documentation
|
||||
M = Mirroring
|
||||
0 = 1ScA
|
||||
1 = 1ScB
|
||||
*/
|
||||
|
||||
|
||||
// http://wiki.nesdev.com/w/index.php/INES_Mapper_154
|
||||
public sealed class Mapper154 : Namcot108Board_Base
|
||||
{
|
||||
//configuration
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||
{
|
||||
// http://wiki.nesdev.com/w/index.php/INES_Mapper_163
|
||||
public sealed class NanJing : NES.NESBoardBase
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -65,6 +65,8 @@ sha1:4EF2C4DAD0897F326E2991D351903A98483BC3C0 B Banana (J) [hM03] NES board=HVC
|
|||
sha1:15E04F1BF83D8FE34ECD2B29894C9CF034E6D257 B Banana (J) [hM03] NES board=HVC-CNROM;PRG=32;CHR=32
|
||||
sha1:C6C6228B16AECB35B0C52467071E04DB3B34C77F B Banana (J) [hM03] NES board=HVC-CNROM;PRG=32;CHR=8
|
||||
sha1:2801CDE6D10D67889E01161476D80CF5CCC3263E O Ball Hack v.2 2001-03-21 [o1] NES board=HVC-NROM-256;PRG=32;CHR=8
|
||||
sha1:A6E7DB47B9C39E2A5B0A77F34B9AA3BEFDB70D1C O Dr. Mario (JU) (PRG0) NES board=MAPPER001;CHR=32
|
||||
sha1:2BDBD70C1E3EEF115F640B91B22A97BFCDF18B2D B Castlevania III - Dracula's Curse (U) NES board=MAPPER005;CHR=128
|
||||
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
|
||||
|
@ -79,6 +81,9 @@ sha1:A1D674D1C7C633A317CFD516EFB9A0350CD0E45E H Arkanoid II (J) NES board=TAITO
|
|||
sha1:4D6117577CE301BB987C5C32FEEF7B132A21B046 H Afro Man (Mega Man 3 Hack) (UNL) NES board=TXROM-HOMEBREW;PRG=256;CHR=128;WRAM=8
|
||||
sha1:7BD102770FE7766BF8430ACDB3C17EE51E30478C H Mike Tyson's Punch-Out!! (Hacked) (U) NES board=NES-PNROM;PRG=128;CHR=128;WRAM=0
|
||||
sha1:536D623BA02A622BDE8E2D7D514AE9785B5E0357 H Punch Out!! Kirby (Hack) (U) NES board=NES-PNROM;PRG=128;CHR=128;WRAM=0
|
||||
sha1:F2A8BC888B888FA65DFB303126B130422E34942E G Kunio 8-in-1 [p1] NES board=MAPPER045
|
||||
sha1:27AA5F60474600FEE5C1623D4A0985421680C9FE H Mario + Toad (Nuts & Milk Hack) NES board=MAPPER000
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
|
||||
|
@ -86,6 +91,8 @@ sha1:536D623BA02A622BDE8E2D7D514AE9785B5E0357 H Punch Out!! Kirby (Hack) (U) NES
|
|||
sha1:98B71119294DA59D1B22723D2D2955D80EADABF4 World Hero (Unl) [!] NES board=MAPPER027
|
||||
sha1:17AC56723F99A646BD44F8C999B23B8A972A3EF2 B World Hero (Unl) [b1] NES board=MAPPER027
|
||||
sha1:5227195D5DB2030758BF67704150E8C5FAF056B1 B World Hero (Unl) [b2] NES board=MAPPER027
|
||||
sha1:AD350F001DB2E3C640B2BD9107B86A8F29B68AC0 G Commandos (Ch) NES board=MAPPER163;
|
||||
sha1:5A91F54A6FF44762D98FC8D8974909D298EB52A8 G Somari (NT-616) (Unl) NES board=MAPPER116;
|
||||
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
|
||||
|
@ -100,7 +107,7 @@ sha1:C87E7E6A68DD9C7E24652CD2C7D390A14E8ADF04 Lagrange Point NES board=KONAMI-
|
|||
sha1:2E0889131DA5BA9505A15B94887113F4360D98CD Shin Samurai Spirits 2 - Haoumaru Jigoku Hen (Unl) NES board=MAPPER209;PRG=128;CHR=512;WRAM=8
|
||||
sha1:EB35202CC4E9C2FAC320B04F36F3A6858B8916F2 Super Bros. 8 NES board=MAPPER048;
|
||||
sha1:F949FC16932808C426074AB1628F246B0435C52C Flintstones, The Rescue of Dino & Hoppy (J) NES board=MAPPER048;
|
||||
|
||||
sha1:9C801071D1AAC7B280468C38BF1B61FDE99B5FD0 Yong Zhe Dou E Long - Dragon Quest VII (Ch) NES board=MAPPER245;
|
||||
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue