Patterntable #1 and FCEUX

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
oRBIT2002
Posts: 643
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Patterntable #1 and FCEUX

Post by oRBIT2002 »

FCEUX refuses to use patterntable #1 as background for my little .nes (MMC1) experiment and I haven't got a clue why. I clearly specify the correct(I hope) bit in $2000 (bit 4 = 1) but it keeps using patterntable 0. Other emulators (Nestopia, Nintendulator) seems to work properly but not FCEUX (latest build).
Is there a feature I am not aware of?

Thanks in advance
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Re: Patterntable #1 and FCEUX

Post by Shiru »

MMC1 can control mirroring with the control register, have you set it up correctly?
User avatar
qbradq
Posts: 952
Joined: Wed Oct 15, 2008 11:50 am

Re: Patterntable #1 and FCEUX

Post by qbradq »

To elaborate a little more, if you haven't initialized all of the MMC1 internal registers, especially those having to do with CHR banking, then you'll have undefined behavior. On the hardware this usually means random behavior. On emulators it means you get their default behavior which may be different between various emulators.

Pop open FCEUX's pattern table viewer and ensure that pattern table #1 contains the patterns you expect it to. If not, you may have this issue. And as always, fully initialize your mapper.

Best of luck!
User avatar
oRBIT2002
Posts: 643
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Patterntable #1 and FCEUX

Post by oRBIT2002 »

FCEUX pattern/PPU viewer just shows nothing no matter which ROM i try. :( That bug has been there for a few versions..

I'll check out my MMC1 code, I didn't think it had anything to do with which patterntable to use. But I'll check it out..
User avatar
Hamtaro126
Posts: 783
Joined: Thu Jan 19, 2006 5:08 pm

Re: Patterntable #1 and FCEUX

Post by Hamtaro126 »

How about adjusting the ''Refresh'' ramp to refresh more instead of less?
AKA SmilyMZX/AtariHacker.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Patterntable #1 and FCEUX

Post by tepples »

I still have FCEUX 2.2.0 installed, and its PPU Viewer works. Sometimes you have to close and reopen it to get it to refresh though, especially if you're stepping through with the debugger.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Patterntable #1 and FCEUX

Post by rainwarrior »

Posting the ROM would help us diagnose the problem.
User avatar
oRBIT2002
Posts: 643
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Patterntable #1 and FCEUX

Post by oRBIT2002 »

Fixing the MMC1 code fixed the problem, thanks.

PPU & Nametable viewer all goes black no matter what setting I've tried in FCEUX. I am not sure why. Anyone else have this problem?
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Patterntable #1 and FCEUX

Post by tokumaru »

oRBIT2002 wrote:PPU & Nametable viewer all goes black no matter what setting I've tried in FCEUX. I am not sure why.
FCEUX shows the data for specific scanlines. If I'm not mistaken, the default scanline is 0 (you can change this to whatever you want), so it will show whatever is mapped when that scanline is rendered. In games that swap CHR mid-frame, you might have to change this value in order to see the tiles you're looking for. In the pattern table viewer you can also change the palette used to display the tiles, and an all black palette could make all tiles show up black.
User avatar
oRBIT2002
Posts: 643
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Patterntable #1 and FCEUX

Post by oRBIT2002 »

All black, no matter what settings I change/use. :/
Post Reply