RockNES - beta testing anyone? [UP: April 3rd]

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
zeroone
Posts: 933
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: RockNES - beta testing anyone?

Post by zeroone »

Zepper wrote:Uh... what? I didn't get it.
The latches are potentially set based on the read VRAM address. But, a modified latch should only affect subsequent reads. Your emulator appears to modify the latches based on the address and then it applies the modified latches to the current VRAM read.
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: RockNES - beta testing anyone?

Post by Zepper »

No clue. Here's some source code. Well, ppu->refresh is loopy_v, ppu->inc is the increment (1 or 32).

Code: Select all

(...)
      case 0x2007:
        tempaddr = ppu->refresh & 0x3FFF;
        if( ppu_is_rendering() ) {
           _clock_y();
           _clock_x();
        } else {
           ppu->refresh = (ppu->refresh + ppu->inc) & 0x7FFF;
        }
        if(tempaddr >= 0x3F00)
        {
           ppu->ReadLatch2007 = _ppubank_name_read((tempaddr>>10)&3,tempaddr&0x3FF);
           return (*(ram_color+(tempaddr & 0x1F)) & ppu->set_bw_mode) | (ppu->Latch & 0xC0);
        }
        else
        {
           ppu->Latch = ppu->ReadLatch2007;
           if(tempaddr < 0x2000) { 
              ppu->ReadLatch2007 = read_ppu(tempaddr>>10,tempaddr&0x3FF);
           } else {
              ppu->ReadLatch2007 = _ppubank_name_read((tempaddr>>10)&3,tempaddr&0x3FF);
           }
        }
   } return ppu->Latch;
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: RockNES - beta testing anyone?

Post by tepples »

For MMC2/MMC4, read_ppu() should first read the current bank and then examine the address for trigger addresses ($0FD8-$0FDF, $0FE8-$0FEF, $1FD8-$1FDF, or $1FE8-$1FEF).

Why are read_ppu() and _ppubank_name_read() separate functions? Sunsoft Mapper 4 (#68, After Burner) and Konami VRC6 (#24 and #26, Akumajou Densetsu aka CV3J) can map CHR ROM into nametables ($2000-$2FFF), and Namco 163 (#19) and the Magic Floor mapper (#218) can map the nametable RAM in the Control Deck into pattern table space ($0000-$1FFF).
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: RockNES - beta testing anyone?

Post by Zepper »

tepples wrote:For MMC2/MMC4, read_ppu() should first read the current bank and then examine the address for trigger addresses ($0FD8-$0FDF, $0FE8-$0FEF, $1FD8-$1FDF, or $1FE8-$1FEF).

Why are read_ppu() and _ppubank_name_read() separate functions? Sunsoft Mapper 4 (#68, After Burner) and Konami VRC6 (#24 and #26, Akumajou Densetsu aka CV3J) can map CHR ROM into nametables ($2000-$2FFF), and Namco 163 (#19) and the Magic Floor mapper (#218) can map the nametable RAM in the Control Deck into pattern table space ($0000-$1FFF).
Because of my way of coding. 8-) All those games you mentioned are supported & playable. So, the bug report relies in the mapper code, not the PPU code directly.
User avatar
zeroone
Posts: 933
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: RockNES - beta testing anyone?

Post by zeroone »

Problem with RAMBO-1 interrupts. See Klax (U) below.

Image

The blue region shakes.
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: RockNES - beta testing anyone?

Post by Zepper »

@zeroone
I didn't notice any shaking with Klax.
Mind you to share your PPU $2007 reads source?

EDIT: hmm... I fixed mapper 9 and PunchOut works fine. I can notice the difference of swapping banks before/after the tile fetching, but nothing regarding mapper 10. Yup, I fixed it based on the wiki info... but still glitched at right in dialog boxes. :cry:
User avatar
zeroone
Posts: 933
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: RockNES - beta testing anyone?

Post by zeroone »

Zepper wrote:@zeroone
I didn't notice any shaking with Klax.
Mind you to share your PPU $2007 reads source?
I'm not sure what you are asking for exactly. Unfortunately, I'm not able to capture a video of the issue, but there appears to be an issue with the mapper.
User avatar
zeroone
Posts: 933
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: RockNES - beta testing anyone?

Post by zeroone »

In Skull & Crossbones (RAMBO-1), the player appears to float above the platforms (the feet should be in contact with the ground) and there are occasional horizontal lines that appear in various parts of the screen (such as the black line that passes through the clock and status bar at the bottom):

Image
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: RockNES - beta testing anyone?

Post by Zepper »

New version. Thanks a lot for the feedback! 8-)

Unfortunately, I couldn't fix mapper 10 (MMC4). :shock: The method of latching/bankswitching seems to be different. PunchOut is much sensible if I do a certain change in the code; Fire Emblem no.

EDIT: found the problem with Fire Emblem. It's a limitation in my gfx engine. The bankswitching should occur only when PPU cycle AND 7 is 7 (at cycles 7, 14, 21, 28...). Otherwise, it occurs at every pixel.
User avatar
zeroone
Posts: 933
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: RockNES - beta testing anyone?

Post by zeroone »

Problem with mapper 079. See Double Strike below:

Image

Also, I think either the wiki for mapper 079 omits information or the rom files that I am testing with specify the wrong nametable mirroring. Just like mapper 113, I found that 0 = Horz and 1 = Vert. I'll do further testing to find out.

Edit: For the nametable mirroring, it looks like more recent dumps fix the issue. But, neither rom works properly in your emulator (see screenshot above).
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: RockNES - beta testing anyone?

Post by Zepper »

Press F12 to take a screenshot. :shock: :wink:
Looks like another outdated mapper info... from the same source: Disch' docs. :| Actually, the info I had is from mapper 113.
I fixed the mapper.
Last edited by Zepper on Tue Mar 31, 2015 5:13 pm, edited 1 time in total.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: RockNES - beta testing anyone?

Post by lidnariq »

zeroone wrote:Just like mapper 113, I found that 0 = Horz and 1 = Vert.
Double Strike's PCB does not support switchable mirroring: http://bootgod.dyndns.org:7777/profile.php?id=1044
User avatar
cpow
NESICIDE developer
Posts: 1097
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: RockNES - beta testing anyone?

Post by cpow »

If you don't want to have to distribute those libraries you'll need to compile it with: -static-libgcc -static-libstdc++
User avatar
cpow
NESICIDE developer
Posts: 1097
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: RockNES - beta testing anyone?

Post by cpow »

Zepper wrote:
- often when I pause with Esc and switch to other windows, the NES image ends up disappearing (just becomes black), so it's hard to tell what I was paused on
The program title bar brings such state info.
I think he means it's hard to tell what he was paused on in game. In other words, had Mario just landed right next to a Koopa, or is he safe?
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: RockNES - beta testing anyone?

Post by Zepper »

cpow wrote:
If you don't want to have to distribute those libraries you'll need to compile it with: -static-libgcc -static-libstdc++
Any other OS than Windows XP for such "special" version?
Post Reply