Mega Man 3's Graphical Glitches, the MMC3 Mapper, and a Bad Development Timeline - Behind the Code

preview_player
Показать описание
Why is there a flashing line above Shadow Man on the Stage Select screen? Why does the pause menu flicker? How do these NES graphics work, anyway? Let's find out!

Music by:

#NES #Programming #megaman
Рекомендации по теме
Комментарии
Автор

Thanks for watching, everyone!

Here are a few notes:

1: The code changes were unoptimized in order to showcase how the order of PPU register writes on a single line can alter the results. I mentioned this in the video, but I didn't mention how the location of the Nametable used for the menu will change ($2600 instead of $2800) depending on the area of a stage/mirroring type used.

Fire up Spark Man's stage for an example of this. You'll start with vertical mirroring, so the menu has to be rendered on the "right side" of the Nametable viewer and is pulled from $26C0.

2: I originally had detailed information regarding what the PPU does after it hits dot 256 on a rendered scanline included in this video. I cut it for time. If you're a dev and already know the details, you already know the details. If you are new to the whole PPU timing thing, definitely review this on the nesdev wiki. I highly recommend starting with Mega Man 3 as a case study!

3: Regarding the highest bit being set to zero with the first write to Address register $2006, let me quote the current wiki entry (6/26/2024) from the Explanation section of the PPU Scrolling page for further elaboration as to why I said, "We don't know":

"$2006 is simply to set the VRAM address register. This is why the second write will immediately set v; it is expected you will immediately use this address to send data to the PPU via $2007. The PPU memory space is only 14 bits wide, but v has an extra bit that is used for scrolling only. The first write to $2006 will clear this extra bit (for reasons not known)."

DisplacedGamers
Автор

There's so much that goes into all those random glitchy graphics in old NES games. At the time it just felt like the console being pushed to its limits, but it's interesting to see now that they could have been avoided with better understanding of the platform and time to fix all these weird issues.

Patashu
Автор

I like the description of polling vs. interrupts as "Are we there yet?" vs. "Excuse me for a moment."

Lemon_Inspector
Автор

there's something so beautiful about seeing the stage select scroll in perfectly

davidthecommenter
Автор

It's funny - I always noticed how, in MM3-6, when going through the pre-boss corridors, the left door was always cut off halfway, whereas in MM1 and 2 the left door was fully visible. Now I know why that is.

Learn something new every day.

MisterVercetti
Автор

Holy craps. As a kid I tried so hard to understand everything that was happening on screen, reasoning out game logic and whatnot, but somethings were just impossible to understand.
I love videos like these where I finally get answers to some of the really bizarre edge cases. Thank you for posting this.

etansivad
Автор

24:55 - I wonder how satisfying it was to see the fix you implemented on real hardware at that moment. Fine work

EndlessLands
Автор

“You’ll notice the leftmost column in Mega Man 3 is always solid black.”

No, I truly did not notice. Thank you. 😂😐

GreigaBeastDS
Автор

The stage select screen glitchy graphics always upset me as a kid because I thought my NES was malfunctioning. That said I didn't even notice the pause menu glitch until this video.... nor the other things you apologized for pointing out. Another excellent video and another quality explanation of how to fix things through thinking outside of the box.

EDIT: Come to think of it, some of the quirks of the CPU-PPU bridging are quite strange. I wonder just why it is that there's stuff like the "fine-y" top bit always being set to 0. Might be worth looking into at some point.

CodeIndigo
Автор

I love how this demystifies old games quirks. It's nice to see it working, only took 35 years to debug!

TalynWuff
Автор

are you a ppu register? cuz this video is a W

zephryn
Автор

All Master System games that scroll horizontally mask off that left side.

GameSack
Автор

Your video actually helped me fix a bug on my game! Thank you so much 😊

GustavoValdiviesso
Автор

I love that the love letter to the franchise created that franchise. I had Megaman 2 as a kid but only played MM3 a few times when my friends brought it over. So needless to say, I never exactly noticed the gliches. Flickering graphics was kind of the norm for NES games.
Still it's nice to see a video like this highlighting bugs I never knew existed and showing how they look fixed. It's very satisfying.

kri
Автор

Really awesome to have someone fill some of the void of assembly programming content here on youtube!

JoaoVictor-xinh
Автор

I am so thankful that you even corrected the sprite positions for the lower faces, I've seen a few hacks fix the overscan, but leave the face sprites the same... And it looks a bit off

LD__
Автор

Wow, that interleaved Address/Scroll write is batshit insane, but makes sense with your explanation of v/t (and considering the MMC3). This video is ostensibly about Mega Man 3, but really, it's an amazing overview of the PPU internal Registers! (And also about the debug features of Mesen. Developers would've killed for modern day tooling in the 80's, one can imagine what would've been possible)

menhirmike
Автор

Great video! ❤

Has me wondering what the original devs think of these breakdowns and bug fixes. From what I understand, they didn’t have fancy emulators to debug their code and I can’t help but imagine how much better some things would be if they did have tools like what you use.

Love your content dude ❤❤❤

atomicnoexcept
Автор

I like to think MMC means, Mega Man Chip.

MrClawt
Автор

Thanks for pointing out several graphical oddities that I won't ever be able to unsee

(and great video)

SBDWolf