Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,431,833
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-18-24 05:33 AM
Guest: Register | Login

Main - Posts by RetroRain

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

RetroRain
Posted on 05-08-12 07:31 AM, in MMC3 Mapper Question (rev. 3 of 05-08-12 07:58 AM) Link | Quote | ID: 150844


Fuzz Ball
Level: 66

Posts: 590/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
Okay, two games that have MMC3, Super Mario Bros. 3 and Mega Man 3.

The length of both games is 0x6000F.

Taken from FireBug's Mapper Document, the Notes Section of MMC3:

"Two of the 8K ROM banks in the PRG area are switchable. The other two are "hard-wired" to the last two banks in the cart. The default setting is switchable banks at $8000 and $A000, with banks 0 and 1 being swapped in at reset. Through bit 6 of $8000, the hard-wiring can be made to affect $8000 and $E000 instead of $C000 and $E000. The switchable banks, whatever their addresses, can be swapped through commands 6 and 7."

Okay, so at the default setting, banks 0 and 1 are loaded into $8000 and $A000 respectively. I get that.

That means that at first, 0x10 - 0x400F is loaded into $8000, and 0x4010 - 800F is loaded into $A000.

What I don't get, is which banks are hardwired to $C000 and $E000?

I opened up Super Mario Bros. 3 and Megaman 3, and being that they are both 0x6000F in lengh, I've noticed that the very last bank $E000, 0x3E010 - 0x4000F is loaded in.

Now, being that the MMC3 mapper loads the PRG in 8k chunks (2000 bytes), if you divide 0x6000F by 0x2000, you get 0x30. Yet, the last bank that is hard-wired (0x3E010 - 0x4000F) is at 0x1F (divide 0x3E010 by 0x2000). It doesn't make sense to me, because I can't figure out the logic behind it. 0x3E010 is more than halfway through the ROM. What if a game is less than 6000F, like 4000F?

While I suppose it is possible, are the last two banks the ones that are two-thirds into the ROM?

What I'm getting at, is if a game uses a MMC3 mapper, which 8K PRG banks are thrown into the last two banks of the ROM? How do you determine those banks based on the size of the ROM?

____________________
My YouTube Channel

RetroRain
Posted on 05-09-12 05:28 PM, in MMC3 Mapper Question (rev. 5 of 05-09-12 07:23 PM) Link | Quote | ID: 150861


Fuzz Ball
Level: 66

Posts: 591/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
Posted by never-obsolete
The mmc3 always maps the last 8K of prg into $E000-$FFFF.
Since SMB3 is 0x6000F in length, wouldn't the last 8K bank that is loaded into $E000-$FFFF be 0x5E010 - 0x6000F? Instead it is 0x3E010 - 0x4000F. Unless of course that it is truly loading 0x5E010 - 0x6000F into the last bank, and then it is quickly switched. But I am lead to believe that the last two banks are hardwired the moment the game is turned on, so no switching in the hardwired banks is allowed.

Posted by never-obsolete
So for SMB3, the math would be:

((2 * 0x10) - 1) * 8K
(0x1F) * 0x2000 = 0x3E000

0x3C000 will be mapped to $C000-$DFFF (mode0) or $8000-$9FFF (mode1).
I understand the logic of the math, but why is it that we are multiplying 2 by 0x10 and then subtracting 1? And then multiplying that by 8K?

In other words, I did the math you put there in the calculator, and it worked out perfectly. But I'm trying to understand why it is that way, you know what I mean? Why multiply 2 and then subtract 1? I understand that the game has 0x10 in PRG banks, I'm just trying to figure out why that math is the way it is.

Posted by never-obsolete
On start-up, you can't really assume what prg bank mode the mapper will be set to or what will be mapped into $8000, $A000, or $C000. You'll want to point your vector to somewhere in $E000 and initialize the mapper from there.
Are you saying, that the "hardwiring" effect is not immediate on start-up because the mapper registers have to be set up via code? If so, then I guess that would answer my question, and I feel stupid for asking.

EDIT - Now another thing is bothering me.

SMB3 has 0x10 16K PRG ROM banks. If 2000 bytes is 8K, and 4000 bytes is 16K, then why is 0x10 * 4000 getting me 0x40000 and not 0x60000? SMB3 is definitely 0x6000F. Unless of course because 4000 is a little more than 16K.

This is one of those things I hate about numbers.

EDIT 2 - Duh, because it has CHR-ROM I forgot to acknowledge the CHR-ROM in the game. Damn. The game is really 0x40000 of PRG-ROM, and 0x20000 of CHR-ROM. That is what was throwing me off! How could I forget about that? I was counting every byte in the ROM file as PRG-ROM.

____________________
My YouTube Channel

RetroRain
Posted on 05-10-12 08:08 PM, in MMC3 Mapper Question Link | Quote | ID: 150875


Fuzz Ball
Level: 66

Posts: 592/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
Thank you never-obsolete! I appreciate your help!

____________________
My YouTube Channel

RetroRain
Posted on 06-04-12 01:05 AM, in How do you assign graphics to numbers? Link | Quote | ID: 151217


Fuzz Ball
Level: 66

Posts: 593/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
Let's say you program a new routine for a game, and you use a free RAM address. Now you want display the number of that RAM address using the graphics for the numbers in the game. How would you go about doing that? It is something I always wondered about, since I never wound up doing that before. Now obviously with the NES it is going to involve the PPU. I know how to write graphics using the PPU, but I don't know how I would have the number in RAM be converted to graphics.

____________________
My YouTube Channel

RetroRain
Posted on 06-04-12 10:36 PM, in How do you assign graphics to numbers? Link | Quote | ID: 151231


Fuzz Ball
Level: 66

Posts: 594/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
No. For instance, you know how you programmed in Zelda, for arrows to have their own RAM address? How do you make the game display the number for the arrows? In other words, how do you make the game use the font for numbers and display it?

It would be impractical and I assume it wouldn't work to have a compare for each number.

If Arrows = 1, then LDA #$56 (Tile $56, lets say it is the number 0)
STA $2007
LDA #$57 (Tile $57, lets say it is the number 1)
STA $2007

So, if Arrows = 1, then it will show the graphics "01".

Do you get what I'm saying? How do you display the contents of the RAM address visually?

____________________
My YouTube Channel

RetroRain
Posted on 06-05-12 03:35 PM, in How do you assign graphics to numbers? Link | Quote | ID: 151241


Fuzz Ball
Level: 66

Posts: 595/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
Wait, so you're telling me you can simply call the RAM address, and write it to $2007 itself, without writing an actual tile? And writing the RAM address will automatically translate that into the graphics from the PPU?

____________________
My YouTube Channel

RetroRain
Posted on 07-16-12 08:08 PM, in Mario Adventure 3 - Demo 2 is out! Link | Quote | ID: 151641


Fuzz Ball
Level: 66

Posts: 596/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
It's good to see you back. I'm looking forward to seeing what new things you can do with SMB3.

I remember two of the powerups you did a long time ago which I really liked, Bat Mario and Ice Mario.

Have fun with your hacking.

____________________
My YouTube Channel

RetroRain
Posted on 07-28-12 08:56 PM, in Mario Adventure 3 - Demo 2 is out! Link | Quote | ID: 151753


Fuzz Ball
Level: 66

Posts: 597/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
As Googie said, I would've loved to see Bat Mario back. I'm actually incorporating a Bat Suit in the game I'm currently working on (it's not a Mario game, soon to be announced).

Honestly, right now, I can't think of any other powerup ideas that would be good.

The toll idea is good. Here is an idea on how you can expand on it.

Since you need 3 Hammer coins, once the Hammer brother has given his message, give the player a choice selection.

- PAY
- DON'T PAY

If you select Pay, if you have at least 3 coins, you can then pass with no problem.

If you select Pay and don't have the 3 coins, the Hammer Brother says you can't pass.

If you choose Don't Pay, then the Hammer Brother says you can't pass.

In any selection you choose, Mario can freely move on that screen.

However, if he doesn't pay because he doesn't have the coins, or simply doesn't want to, and he chooses to freely move toward the Hammer Brother, then the Hammer Brother will choose to fight Mario.

You can choose to kill the Hammer Brother or run past him, thus progressing on the world map without paying the Hammer Coins.

However, the Hammer Brother toll sprite is still there on the map. The next time you come back on the toll screen, there will be 3 Giant Hammer Brothers. And this time, you have to pay triple the amount because they know what you did.

If not, you fighting 3 at a time could prove to be a challenge.

Just an idea to consider.

____________________
My YouTube Channel

RetroRain
Posted on 07-29-12 02:28 AM, in Mario Adventure 3 - Demo 2 is out! Link | Quote | ID: 151757


Fuzz Ball
Level: 66

Posts: 598/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
The Hammer Brother toll level is fine, but I wouldn't make it push you out. If you don't have the money, you simply have to walk off the screen to leave the level. That way, if the player wishes to test the Hammer Brother, he can all he wants. I like that you made him invincible, so that means you can throw my idea out the window. But if you boot the player out automatically, the player can't test him. It's more fun if you can test it without being booted out. I'm assuming Mario dies if he touches the invincible hammer brother?

____________________
My YouTube Channel

RetroRain
Posted on 08-06-12 10:02 PM, in Seriously, what the fuck? Link | Quote | ID: 151829


Fuzz Ball
Level: 66

Posts: 599/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
Everytime I need this board, it happens to be down. But when I don't need it, and just want to observe, it is up all the time.

I needed to check my PMs yesterday, for important information, and the fucking board was down all day. Even a huge part of today.

What happened, the fucking server? If I was the board owner I'd call them up and tell them to get the damn thing straightened out immediately.

I'm sorry, I just had to vent. That was bullshit, how long this board was down for.

____________________
My YouTube Channel

RetroRain
Posted on 08-06-12 10:24 PM, in CHR-RAM Writing/Swapping Thread Link | Quote | ID: 151830


Fuzz Ball
Level: 66

Posts: 600/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
I had a painful day yesterday. I spent literally the whole day trying to figure out how to deal with CHR-RAM. I have had tons of trouble with CHR-RAM in the past, really getting turned off with games that have it, and not CHR-ROM, since CHR-ROM is easier to deal with. But after all of my trouble yesterday, I finally figured out how to deal with CHR-RAM. A couple of years of mystery has now been unveiled. And yes, it has been a couple of years, but bear in mind, that I haven't hacked in a long time. So, it simply was a question that I never got an answer to, until yesterday when I was finally determined to get to the bottom of this once and for all.

Now, why am I making this thread? Very simple.

Through ALL of the searching I have done on the Internet, and you can search too if you want, there is not one decent document that covers how to deal with CHR-RAM, AT ALL.

Which is bullshit considering how long the ROM hacking scene has been around.

So, I will unveil the mystery, and post it here, for anyone who needs to deal with CHR-RAM, but doesn't know how to.

So, here it goes:

1. Put the wait for Vblank code:

wait_vblank:
LDA $2002
BPL wait_vblank

2. Set $2006 to where you want to write to. So if tile $00 on the left side of the PPU, then

LDA #$00
STA $2006
STA $2006

If $00 on the right side of the PPU, then

LDA #$10
STA $2006
LDA #$00
STA $2006

You have to write to $2006 twice. If it is tile $20 on the right side, you want to write to, it's:

LDA #$12
STA $2006
LDA #$00
STA $2006

The numbers are different when it comes to PPU tiles, because of the size.

3. Run a loop 16 times, since 16 bytes make up one 8x8 tile.

During that loop, write your tiles from a table close-by, to $2007. That's it! See below.


$B758:AD 02 20 LDA $2002 = #$10 ; Wait for vblank
$B75B:10 FB BPL $B758

$B75D:A9 00 LDA #$00 ; Set $2006 to tile $00 on the left side of the PPU, we're writing to that tile
$B75F:8D 06 20 STA $2006 = #$C1
$B762:A9 00 LDA #$00
$B764:8D 06 20 STA $2006 = #$C1

; Loop code
$B767:A2 00 LDX #$00
$B769: BD 78 B7 LDA $B778,X @ $B779 = #$10
$B76C:8D 07 20 STA $2007 = #$00
$B76F:E8 INX
$B770:E0 10 CPX #$10
$B772: D0 F5 BNE $B769

; Graphics table. 16 bytes make up one 8x8 tile.
$B778:00 BRK
$B779:10 1B BPL $B796
$B77B:1F UNDEFINED
$B77C:1F UNDEFINED
$B77D:1F UNDEFINED
$B77E:1F UNDEFINED
$B77F:0F UNDEFINED
$B780:00 BRK
$B781:00 BRK
$B782:00 BRK
$B783:00 BRK
$B784:00 BRK
$B785:00 BRK
$B786:00 BRK
$B787:00 BRK
So, whenever you need to write one tile to the PPU for a game that uses CHR-RAM, you can copy this code, and use it for your own purposes.

For multiple tiles, just use another loop for multiple cycles.

Note: I was able to write $90 bytes without problems. If you try to write too much, this will create problems in the PPU and on the screen. I believe it is because you are trying to write too much during vblank. It can only take so much.

I believe the way around that, is to wait for vblank, then shut the screen off, write everything you need to write, and then turn the screen back on. I haven't tested that yet, but I will soon. If anyone can confirm that this works, feel free to reply.

____________________
My YouTube Channel

RetroRain
Posted on 08-08-12 08:43 AM, in The General Project Screenshot/Videos Thread... (rev. 2 of 08-09-12 06:12 AM) Link | Quote | ID: 151873


Fuzz Ball
Level: 66

Posts: 601/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
The Dark Knight Rises was a good movie. So, I am making a mod of Zelda that was influenced by the movie. Not sure how far I'm going to get on it, but it has a little special something for Batman fans!

The Hylian Elf Rises



____________________
My YouTube Channel

RetroRain
Posted on 08-13-12 04:23 AM, in The General Project Screenshot/Videos Thread... Link | Quote | ID: 152036


Fuzz Ball
Level: 66

Posts: 602/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days










____________________
My YouTube Channel

RetroRain
Posted on 08-13-12 07:38 PM, in Mario Adventure 3 - Demo 2 is out! Link | Quote | ID: 152045


Fuzz Ball
Level: 66

Posts: 603/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
You got all of the levels of World 1 done already? Not bad. I can tell you are working on this around the clock. It is fun, but it sucks at the same time when you have to go to work, or when you don't actually have the time to do the amount of hacking you want to do. Well, as long as you are having fun, that is important. I like that World 2 map.

____________________
My YouTube Channel

RetroRain
Posted on 08-15-12 08:53 AM, in Zelda - The Legend of Link (v3-12-20) Released (rev. 2 of 08-15-12 08:55 AM) Link | Quote | ID: 152062


Fuzz Ball
Level: 66

Posts: 604/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
I'm hacking Zelda 1 now myself. I find it odd that the game actually has code in RAM. How is that even possible? Does it write all of that code to RAM from PRG on startup? And if it does, then what is the point? Wouldn't that mean you have code in two places, in the PRG banks and in RAM? I'm confused, because I've never seen code in RAM before.

Anyway, glad to see you got past those problems. It can be depressing when you are doing so good, and then all of sudden you hit road blocks.

____________________
My YouTube Channel

RetroRain
Posted on 08-16-12 03:09 PM, in Zelda - The Legend of Link (v3-12-20) Released (rev. 4 of 08-16-12 03:15 PM) Link | Quote | ID: 152071


Fuzz Ball
Level: 66

Posts: 605/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
But by placing code in RAM, the only way to do that is to literally write that code to RAM from PRG. You're essentially reading and storing bytes in those RAM locations, which translates into code. But, the table that is read is located in PRG, so essentially you have the same code in 2 places. You can't remove code in PRG during game execution, right? So, in other words, does Zelda write to that RAM, and then swap out that bank that wrote that code to RAM, and then simply never re-visits that PRG bank ever again, and lets the RAM code handle the bankswitching?

Am I correct in believing that the code that is in $6000-$7FFF is also located in PRG somewhere, but the PRG bank that holds that code is simply never bothered with once it loads it into RAM?

I hope that made sense.

____________________
My YouTube Channel

RetroRain
Posted on 08-21-12 05:12 AM, in The General Project Screenshot/Videos Thread... Link | Quote | ID: 152121


Fuzz Ball
Level: 66

Posts: 606/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days


____________________
My YouTube Channel

RetroRain
Posted on 09-22-12 12:30 AM, in Zelda - The Legend of Link (v3-12-20) Released Link | Quote | ID: 152423


Fuzz Ball
Level: 66

Posts: 607/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
Posted by snarfblam
I had been thinking all along that the Link graphics form LA might better suit the rest of the tileset, but it occurs to me now that there might be one possible issue: the uncanny valley.

Basically, you're adding all these features, like falling off ledges, charging the sword, and the Pegasus boots, to the original Zelda game. This is, of course, completely awesome. You're using graphics from LA too, which is pretty sweet. But if your game looks too much like Link's Awakening (especially the character), the player's mind might start to notice and pick out everything that isn't exactly like Link's Awakening. There's no flip animation when you jump off a ledge, and you can't walk around with a charged sword, and so on.

Don't get me wrong. I'm not complaining about these things, but when you look at a game that so closely resembles LA, it might be a little jarring at first when it doesn't feel just like LA. Your souped up Zelda 1 might feel more like a Link's Awakening knock off. Generally, the uncanny valley is a subconscious effect, so you may not even be able to put your finger on what that "off" feeling is.

I don't really know if that will actually be the case. I know I'm probably putting way too much thought into this, and the best way to find out is to try it anyways, but it's food for thought.
That, and when you put all of those features in, one can simply ask - Why not simply hack Link's Awakening instead?

It's impressive everything you are doing, don't get me wrong. I encourage you to keep it up. It's just that if you keep adding more and more like Link's Awakening, you'd be better off simply hacking Link's Awakening, since everything is already there.

____________________
My YouTube Channel

RetroRain
Posted on 09-23-12 06:00 AM, in Zelda - The Legend of Link (v3-12-20) Released Link | Quote | ID: 152437


Fuzz Ball
Level: 66

Posts: 608/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days
Posted by infidelity
Im thinking of going back to the original Zelda 1 gfx, and come up with enhancement ideas for them. The sprites will be staying the same. Im feeling confident about this idea/concept. I have more freedom designing since i rewrote the entire engine.
You don't have to go backwards in your hack. The graphics are great. Simply add some new things that set this game apart from Link's Awakening, that's all!

____________________
My YouTube Channel

RetroRain
Posted on 10-02-12 12:25 AM, in The General Project Screenshot/Videos Thread... (rev. 2 of 10-02-12 12:25 AM) Link | Quote | ID: 152567


Fuzz Ball
Level: 66

Posts: 609/994
EXP: 2436532
Next: 25319

Since: 09-30-07

Last post: 1927 days
Last view: 949 days


More information about the hack, in the video description.

____________________
My YouTube Channel
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50


Main - Posts by RetroRain

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.243 seconds. (338KB of memory used)
MySQL - queries: 132, rows: 164/164, time: 0.233 seconds.