nes-sunsoft reorg yet again. think we've got it under control this time though. i even added a doc specially for sunsoft to describe whats going on

This commit is contained in:
zeromus 2011-09-26 08:05:17 +00:00
parent 17e0b48a2a
commit 58738c1af3
9 changed files with 77 additions and 41 deletions

View File

@ -107,8 +107,6 @@
<Compile Include="Consoles\Nintendo\NES\Boards\JALECO_JF_13.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\JALECO_JF_17.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper069.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper089.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper093.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper107.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper164.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper180.cs" />
@ -134,6 +132,9 @@
</Compile>
<Compile Include="Consoles\Nintendo\NES\Boards\PxROM_FxROM.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Sunsoft1.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Sunsoft2_m89.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Sunsoft2_m93.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Sunsoft3.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Sunsoft4.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\SxROM.cs">
<SubType>Code</SubType>

View File

@ -54,8 +54,8 @@ Open bus and bus conflict emulation is not considered complete or thorough in an
064 Tengen Good
065 Misc (J) Nothing
066 GxROM Complete
067 Misc (J) Nothing
068 Sunsoft4 Complete
067 Sunsoft-3 Nothing
068 Sunsoft-4 Complete
069 FME7 Minimal
070 Misc Complete
071 Camerica Complete
@ -73,11 +73,11 @@ Open bus and bus conflict emulation is not considered complete or thorough in an
086 Misc (J) Decent (no sound)
087 Misc (J) Complete
088 Misc (J) Nothing
089 Sunsoft (J) Complete
089 Sunsoft-2 Complete
090 Garbage Junk (+209)
091 Pirate Junk
092 Misc (J) Nothing (similar to 072)
093 Misc (J) Minimal (Implemented but untested (easy); hard to test, since the only test rom [shanghai] has been hacked to UNROM everywhere)
093 Sunsoft-2 Good
094 Misc (J) Complete
095 MMC3Variant Complete
096 Misc (J) Nothing

View File

@ -0,0 +1,25 @@
sunsoft games are confusing with the names of the boards and chips. here is some information.
date name map class board
23-jul-1986 kanshakudama nage.. 184 SUNSOFT-1 SUNSOFT-K
17-apr-1986 atlantis no kazo 184 SUNSOFT-1 UNAMED-SUNSOFT-ATL
18-dec-1986 wing of madoola 184 SUNSOFT-1 SUNSOFT-K
20-jul-1987 fantasy zone 184 SUNSOFT-1 SUNSOFT-4 *must be emulated as mapper 93
11-aug-1987 mito koumon 89 SUNSOFT-2 SUNSOFT-3
04-dec-1987 shanghai 93 SUNSOFT-2 SUNSOFT-3R
11-aug-1988 mito koumon II 67 SUNSOFT-3 LROG080-01
20-dec-1988 fantasy zone II 67 SUNSOFT-3 UNAMED-SUNSOFT-FZII
30-mar-1989 after burner 68 SUNSOFT-4 UNAMED-SUNSOFT-AFB
29-sep-1989 maharaja 68 SUNSOFT-4 UNAMED-SUNSOFT-MHA
26-oct-1990 nantettatte.. 68 SUNSOFT-4 NTB-ROM-PCB
* notes on fantasy zone
one theory:
due to having sunsoft-1 chip it was miscategorized against the advice of the elder mapper-making gods as 184
along with the other sunsoft-1 chips, but this pcb is wired differently, in a way they liked, and so sunsoft-2
which was released soon thereafter worked the same way
nestopia calls mapper 89 sunsoft-2
nestopia calls mapper 93 sunsoft 2 (a), including fantasy zone

View File

@ -4,24 +4,9 @@ using System.Diagnostics;
namespace BizHawk.Emulation.Consoles.Nintendo
{
/*
* Life Span: April 1986 - July 1986
PCB Class: SUNSOFT-1
iNES Mapper 184
PRG-ROM: 32KB
PRG-RAM: None
CHR-ROM: 16KB
CHR-RAM: None
Battery is not available
Uses vertical mirroring
No CIC present
Other chips used: Sunsoft-1
*
* Games:
* Atlantis no Nazo
* The Wing of Madoola
*/
//AKA mapper 184
//Sunsoft-1 chips, EXCEPT for fantasy zone.
//this is confusing. see docs/sunsoft.txt
class Sunsoft1 : NES.NESBoardBase
{
int chr_mask;
@ -34,6 +19,9 @@ Other chips used: Sunsoft-1
switch (Cart.board_type)
{
case "SUNSOFT-1":
//this will catch fantasy zone, which isn't emulated the same as the other SUNSOFT-1 boards
if (Cart.pcb == "SUNSOFT-4")
return false;
break;
default:
return false;
@ -43,6 +31,8 @@ Other chips used: Sunsoft-1
return true;
}
public override byte ReadPPU(int addr)
{

View File

@ -4,8 +4,10 @@ using System.Diagnostics;
namespace BizHawk.Emulation.Consoles.Nintendo
{
//AKA Tenka no Goikenban: Mito Koumon
class MAPPER89 : NES.NESBoardBase
//AKA Sunsoft-2 chip (SUNSOFT-3 pcb)
//game=Tenka no Goikenban: Mito Koumon ; chip=sunsoft-2 ; pcb = SUNSOFT-3
//this is confusing. see docs/sunsoft.txt
class Mapper89 : NES.NESBoardBase
{
int chr;
int prg_bank_mask_16k;
@ -17,16 +19,12 @@ namespace BizHawk.Emulation.Consoles.Nintendo
switch (Cart.board_type)
{
case "SUNSOFT-2":
if (Cart.pcb != "SUNSOFT-3") return false;
break;
default:
return false;
}
//yes, the board type SUNSOFT-2 has a pcb type of SUNSOFT-3
//(the pcb SUNSOFT-3R has a different revision of SUNSOFT-2 chip which works differently)
//and all these are different than the SUNSOFT-3 chip
if (Cart.pcb != "SUNSOFT-3") return false;
SetMirrorType(Cart.pad_h, Cart.pad_v);
prg_bank_mask_16k = (Cart.prg_size / 16) - 1;
prg_banks_16k[1] = 0xFF;
@ -56,8 +54,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo
public override void WritePRG(int addr, byte value)
{
prg_bank_16k = (byte)((value >> 4) & 7);
SyncPRG();
SyncPRG();
if (value.Bit(3) == false)
SetMirrorType(EMirrorType.OneScreenA);
else

View File

@ -4,8 +4,10 @@ using System.Diagnostics;
namespace BizHawk.Emulation.Consoles.Nintendo
{
//AKA shanghai (although a lot of shanghais have been hacked to use a different mapper, so....
class MAPPER93 : NES.NESBoardBase
//game=shanghai ; chip=sunsoft-2 ; pcb=SUNSOFT-3R
//game=fantasy zone ; chip=sunsoft-1 ; pcb = SUNSOFT-4
//this is confusing. see docs/sunsoft.txt
class Sunsoft2_Mapper93 : NES.NESBoardBase
{
int prg_bank_mask_16k;
byte prg_bank_16k;
@ -16,16 +18,15 @@ namespace BizHawk.Emulation.Consoles.Nintendo
switch (Cart.board_type)
{
case "SUNSOFT-2":
if (Cart.pcb != "SUNSOFT-3R") return false;
break;
case "SUNSOFT-1":
if (Cart.pcb != "SUNSOFT-4") return false;
break;
default:
return false;
}
//yes, the board type SUNSOFT-2 has a pcb type of SUNSOFT-3R
//(the pcb SUNSOFT-3 has a different revision of SUNSOFT-2 chip which works differently)
//and all these are different than the SUNSOFT-3 chip
if (Cart.pcb != "SUNSOFT-3R") return false;
SetMirrorType(Cart.pad_h, Cart.pad_v);
prg_bank_mask_16k = (Cart.prg_size / 16) - 1;
prg_banks_16k[1] = 0xFF;
@ -72,4 +73,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo
return ROM[addr];
}
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.IO;
using System.Diagnostics;
namespace BizHawk.Emulation.Consoles.Nintendo
{
//AKA mapper 67
//this may be confusing due to general chaos with the early subnsoft mappers. see docs/sunsoft.txt
class Sunsoft3 : NES.NESBoardBase
{
public override bool Configure(NES.EDetectionOrigin origin)
{
//TBD
return false;
return true;
}
}
}

View File

@ -44,7 +44,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
switch (Cart.board_type)
{
case "SUNSOFT-4":
AssertPrg(128); AssertChr(128,256); AssertVram(0); AssertWram(8);
AssertPrg(128); AssertChr(128,256); AssertVram(0); AssertWram(0,8);
break;
default:
return false;

View File

@ -59,6 +59,7 @@ sha1:B6F6BD9D78CDD264A117D4B647AEE3309993E9A9 Mike Tyson's Punch-Out!! (U) NES
sha1:A0C4D4172A0037B7D9BA729A93E809978D0F10D2 Punch-Out!! (U) NES board=NES-PNROM;PRG=128;CHR=128;WRAM=0
sha1:D7E199373162966F3971D4C02EF2A03A13FE82D3 Tetris (U) NES board=SxROM-JUNK;PRG=32;CHR=128;WRAM=0;VRAM=0
sha1:3F406EA2E41B5E725BB8DF31481D23F3CF6F1DBE Famicom Wars (J) NES board=HVC-FJROM;PRG=128;CHR=64;WRAM=8;VRAM=0
sha1:977286FDC76C34A618E2A2D0270641BC36CFE89C Nintendo World Championships 1990 NES board=NES-EVENT;PRG=256;CHR=0;WRAM=8;VRAM=8
;and these are even labeled as bad in goodNES
sha1:984ADAEB85403EEF1BA85CDCF310FAAECEB409A0 B Adventures of Captain Comic, The (Bad Dump) (U) NES board=COLORDREAMS-74*377;PRG=64;CHR=64;WRAM=0;VRAM=0