SMB Title does not render on title screen

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
guarts
Posts: 2
Joined: Sat Sep 12, 2020 9:32 pm

SMB Title does not render on title screen

Post by guarts » Sun Sep 13, 2020 5:24 pm

My emulator seems to play SMB correctly with the exception that the title does not appear on the title screen. See the screenshot below:
Image
I have read in other threads that a likely cause is failing to buffer reads from $2007 on the PPU bus. However, I'm fairly confident I have properly implemented the buffered read, but I still see the error. See my code pasted below:

Code: Select all

    case 0x2007: // PPU data
        // Most data reads are one cycle behind. Return the previous value and fetch the next.
        result = mReadBuffer;
        mReadBuffer = read(mVRAMAddress.value);

        // If the address is in the palette range, however, the read is immediate. For reference
        // on the palette address range, see:
        // https://wiki.nesdev.com/w/index.php/PPU_registers#The_PPUDATA_read_buffer_.28post-fetch.29
        if (0x3F00 <= mVRAMAddress.value && mVRAMAddress.value <= 0x3FFF) {
            result = mReadBuffer;
        }

        // Reads and writes automatically increment the video memory address either by 1 or by
        // 32, depending on the control register.
        mVRAMAddress.value += mCtrlRegister.incrementMode == 0 ? 1 : 32;
        break;
Incidentally (I'm not sure it's related), I also find it difficult to select 2-players on the title screen. I have to press the select key repeatedly to get it to register.
Any ideas of what else I can try?
Last edited by guarts on Sun Sep 13, 2020 6:44 pm, edited 1 time in total.

Myself086
Posts: 35
Joined: Sat Nov 10, 2018 2:49 pm

Re: SMB Title does not render on title screen

Post by Myself086 » Sun Sep 13, 2020 6:43 pm

In my experience, the palette for score was wrong until I added reading $2007 so you're doing at least something correctly.

Is mReadBuffer only used for $2007? I'm guessing something else is rewriting it when it shouldn't. The cached read value from $2007 should only be modified by reading $2007 (as far as I know at least).

User avatar
Quietust
Posts: 1596
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: SMB Title does not render on title screen

Post by Quietust » Sun Sep 13, 2020 7:09 pm

The last 20 or so CHR tiles don't look right - I suspect you're using a pirated version of SMB1 that was hacked to remove the titlescreen logo (and the copyright notice).
guarts wrote:
Sun Sep 13, 2020 5:24 pm
Incidentally (I'm not sure it's related), I also find it difficult to select 2-players on the title screen. I have to press the select key repeatedly to get it to register.
From that, I can 100% guarantee that you're using a hacked version - most pirated versions of SMB1 are well-known for having that problem.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.

guarts
Posts: 2
Joined: Sat Sep 12, 2020 9:32 pm

Re: SMB Title does not render on title screen

Post by guarts » Sun Sep 13, 2020 7:16 pm

Quietust wrote:
Sun Sep 13, 2020 7:09 pm
The last 20 or so CHR tiles don't look right - I suspect you're using a pirated version of SMB1 that was hacked to remove the titlescreen logo (and the copyright notice).
guarts wrote:
Sun Sep 13, 2020 5:24 pm
Incidentally (I'm not sure it's related), I also find it difficult to select 2-players on the title screen. I have to press the select key repeatedly to get it to register.
From that, I can 100% guarantee that you're using a hacked version - most pirated versions of SMB1 are well-known for having that problem.
Brilliant! That was exactly the problem. Thanks, @Quietust!

Post Reply