Nestopia Mirroring Question for mapper 156

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Nestopia Mirroring Question for mapper 156

Post by *Spitfire_NES* »

Hi all, was looking through some of nestopia's source for mapper 156 and came across this page:

https://wiki.nesdev.com/w/index.php/INES_Mapper_156

It seems general's son does not work correctly on nestopia so upon looking at Undead Edition I see that it's close to what the nesdev page says. There is actually not much to this mapper it seems:

Code: Select all

#include "NstBoard.hpp"
#include "NstBoardOpenCorp.hpp"

namespace Nes
{
	namespace Core
	{
		namespace Boards
		{
			namespace OpenCorp
			{
				#ifdef NST_MSVC_OPTIMIZE
				#pragma optimize("s", on)
				#endif

				void Daou306::SubReset(bool)
				{
					Map( 0xC000U, CHR_SWAP_1K_0  );
					Map( 0xC001U, CHR_SWAP_1K_1  );
					Map( 0xC002U, CHR_SWAP_1K_2  );
					Map( 0xC003U, CHR_SWAP_1K_3  );
					Map( 0xC008U, CHR_SWAP_1K_4  );
					Map( 0xC009U, CHR_SWAP_1K_5  );
					Map( 0xC00AU, CHR_SWAP_1K_6  );
					Map( 0xC00BU, CHR_SWAP_1K_7  );
					Map( 0xC010U, PRG_SWAP_16K_0 );
				}

				#ifdef NST_MSVC_OPTIMIZE
				#pragma optimize("", on)
				#endif
			}
		}
	}
}
I tried adding a line for $C014 mirroring but it still exhibits the mirroring issue right before a match starts on general's son. FWIW I am not 100 percent sure if this is mirroring switching but anyone see anything else I can try. The line I added is:

Map( 0xC014U, NMT_SWAP_VH01 );
MLX
Posts: 110
Joined: Tue Feb 14, 2017 9:50 am

Re: Nestopia Mirroring Question for mapper 156

Post by MLX »

Is the wiki information up to date compared to the fceumm source? I believe CaH4e3 was the last person to update this mapper when he dumped General's Son in 2012.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Nestopia Mirroring Question for mapper 156

Post by lidnariq »

General's Son requires support for the second (upper) byte of CHR banking; currently nestopia only supports the lower byte and can't support games with more than 256 KiB of CHR.
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: Nestopia Mirroring Question for mapper 156

Post by *Spitfire_NES* »

Thanks for the responses. I reached out to you Lidnariq btw :beer: . So is this a "needs to be added to the core" issue or mapper specific in this case?

The reason why i ask is because i was looking through the code and found hi bank code for $5130 in MMC5.cpp. So it seems like it might be in there already or am in incorrect?
Post Reply