| |||
Views: 88,442,778 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 04-20-24 03:52 PM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 5 guests |
Main - ROM Hacking - MMC1 Input Addresses | New thread | New reply |
Trax |
| ||
Yellow Stalfos Level: 71 Posts: 944/1145 EXP: 3034363 Next: 132751 Since: 07-06-07 From: Québec Last post: 3621 days Last view: 2873 days |
The MMC1 mapper (or simply Mapper 1) has 4 input ports that are written to for various reasons, like bank switching. I read somewhere that the registers have weak decoding capabilities, and that's why there are ranges of addresses instead of just one address. For information on mappers, I usually go to this site. The registers are listed like this:
So whether you write to $8000 or $91DC, it doesn't matter, it's still Register 0. Right? So, why do I see this kind of code?
Why use $C004 specifically, and how is the Y index supposed to change anything? Any insight will be appreciated... |
Matrixz |
| ||
Ninji Level: 35 Posts: 84/225 EXP: 266250 Next: 13686 Since: 04-07-07 From: Norway Last post: 3100 days Last view: 1778 days |
I belive that kind of programming is to counter a phenomena called "bus conflict".
It only happens in NES hardware, not any emulators i think. (Perhaps Nintendulator emulates it.) Its to prevent the MMC1 mapper from changing to the wrong bank. Maybe in that example, the value at address $C004 contains the value 04. Or maybe its 00. More likely that.. Anyway, in order to make sure the mapper uses the right value, it writes to a memory address containing the same value as the bank number you want. Not sure if it helps.. Here, i found a better explanation: http://www.nesdev.com/NESTechFAQ.htm#busconflicts |
smkdan |
| ||
Ninji Level: 36 Posts: 224/238 EXP: 288513 Next: 19597 Since: 05-26-07 Last post: 4057 days Last view: 4006 days |
That's true of simpler mappers but MMC1 doesn't suffer from bus conflicts (neither do most/all ASIC mappers). It doesn't enable the ROM when during writes so there's no issue there. That's wierd code Trax, only A13 and A14 actually reach the MMC1 so yes the entire $C000-$DFFF range is the same. Only D0 and D7 matter on top of that so that's odd of the program to read a table when it should just be shifting and writing directly to mapper register.. If this really is MMC1, they were either being obtuse for the sake of it or they assumed bus conflicts when it wasn't an issue to begin with. Also, considering only bit0 is used for data, I don't know why they bothered with AND #$0F when only the LSB matters to the MMC1. The only other used bit is bit7 and that's for resetting the chip. This is really an MMC1 game? What game is this? That's something you'd normally see in a game that uses discrete h/w for a mapper.. |
never-obsolete |
| ||
Rat Level: 24 Posts: 60/96 EXP: 74461 Next: 3664 Since: 02-22-07 From: Phoenix, AZ Last post: 2590 days Last view: 2590 days |
What values are at $E9EA? And does it loop? |
Main - ROM Hacking - MMC1 Input Addresses | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 52, rows: 75/76, time: 0.042 seconds. |