RanAS' Random RAM & ROM Hacking Errands
Users browsing this thread: 1 Guest(s)

Weird title aside, I thought of making a thread were I dump all my random findings that I happen to stumble upon from time to time. I'm not very experienced with this, but I figured I might as well help where I can, right?

How normal items work in Paper Mario (Memory)

Items get displayed in order from lowest to highest address/slot. The following are available item slots in the US version. I assume other versions have similar if not identical behaviour, but keep in mind that the addresses are different. Each address stores a 4-byte value (0x0000):

Slot 01: 0x0010F444
Slot 02: 0x0010F446
Slot 03: 0x0010F448
Slot 04: 0x0010F44A
Slot 05: 0x0010F44C
Slot 06: 0x0010F44E
Slot 07: 0x0010F450
Slot 08: 0x0010F452
Slot 09: 0x0010F454
Slot 10: 0x0010F456

When buying or getting an item while in the field, the game will store the current item being bought in slot 1 and it'll move the item currently in slot 1 (if there is one) to slot 10. If slot 10 isn't available, it'll go to slot 9, then 8, then 7 and so forth. If all of the slots 2 through 10 are unavailable, the game will say that you can't buy any more items. Selling items will sell the item in the slot selected. For example, if an item in slot 8 is selected, it'll just empty that specific slot.

Using an item will move all of the items before that slot. For example, if an item in slot 7 is consumed, all slots before it will be moved towards slot 7 by one, even slot 1. Slots 8-10 should be intact unless there's an empty spot in them, in that case the empty spot will be filled with an item.

If there are random empty slots after slot 1 when buying an item, the game will move all of the items forward until they're organzied. For example, if all slots are empty except for slot 5, when you buy an item, slot 5's item will be moved to slot 10, even if the item currently being bought will only occupy slot 1. When you get an item while in the field and your inventory is full you'll have to throw away an item in order to make room for it. When this happens, the new item will get written to slot 1 regardless and all other item slots will be shuffled right in order to make room for it.

There are also 32 more slots available after slot 10, those are reserved for the claim/check system. The selected item will simply get moved to the first slot available when checking, no rearrangment happens. Like before, the first slot is displayed first on the menu. When claiming an item, the item will get transfered to slot 1 and the same thing that happens when you normally buy an item applies. Again, the slots reserved for the claim/check system do not get rearranged.

There are 48 item slots before slot 1 but I still need to figure out how they're used, if they're even used. Their behaviour seems somewhat glitchy so far.

Area Data Stuff

WARNING: I use the .v64 .z64 US version of the ROM file. You may or may not get different results with different versions.

Let's use the Toad Town Central Plaza as an example:

On the ROM, its area data goes from 0x800880 to 0x8232BF. Area names seem to be stored near the end of the room data and may not refer to the room itself, but instead where it connects to.

Area/room data is loaded at Memory address 0x240000. It seems like it can load data up to address 0x264AC0, but I haven't tested it yet. While loading the next room, the game will overwrite data from the old room with the new one. However, if the new room does not have enough data to fully overwrite all data from the old room, then some of that old data will stay there, intact. This may be the reason why one of the Debug Rooms (Room 0178) crashes normaly, but doesn't if you visit the Debug Hub before going to it.

The test/debug room addresses begin at, respectively (on the ROM):

Debug Hub: 7E73A0
Room 0175: B1A900
Room 0176: B1AC30
Room 0177: B1AF80
Room 0178: B1B570 (has a bunch of weird data?)
Room 0179: B1C540
Room 017A: B1CA50
Room 017C: B1D760
Room 017D: B34BD0
Room 0183: E1E380 (right after room "mgm_00", which might explain why it has that room's tattle information)

This may or may not be 100% accurate, since a few of the rooms were more difficult to find in the ROM and had a lot of similar entries throughout the ROM. The easier to find rooms have relatively few data, which should make it somewhat easier to figure out how room data works.

Other random stuff

At memory address 0x743E0 the following raw text is loaded: 0123456789abcdefghijklmnopqrstuvwxyz............

There seems to be a list of room abbreviations at address 0x73E2C on the ROM. It is mostly similar to Luigi1er's room list (in fact, now that I looked it up, it seems like he already knows about these), but it has a few more rooms. It's nothing too exciting, really, but it's something. I included this list as an attachment file, exactly in the order they appear in the game:
Size: 3.42 KB / Downloads: 87 .txt   Paper Mario Room List.txt



Do you like lists? I like lists. Here's a few that might be very useful. Mainly, the list of items, badges, key items and the music list. I'm still going to investigate a few more stuff at some point in the future.

And that's it for now. I'm still new to this so I wouldn't be surprised if I got something wrong here. Any questions? Just ask. I will try my best to answer then. Just remember that I also don't know that much about Paper Mario's code. Also, I would really appreciate any help I could get with this.
(This post was last modified: 20-03-2016, 11:51 AM by RanAS. Edit Reason: .z64 )

Interesting... Btw also ive got something... Warp 0078... Try it for yourself irs creepy
(This post was last modified: 29-03-2016, 08:27 PM by RobiNERD.)
Gone for good.

(19-03-2016, 10:03 PM)RanAS Wrote: Weird title aside, I thought of making a thread were I dump all my random findings that I happen to stumble upon from time to time. I'm not very experienced with this, but I figured I might as well help where I can, right?

How normal items work in Paper Mario (Memory)

Items get displayed in order from lowest to highest address/slot. The following are available item slots in the US version. I assume other versions have similar if not identical behaviour, but keep in mind that the addresses are different. Each address stores a 4-byte value (0x0000):

Slot 01: 0x0010F444
Slot 02: 0x0010F446
Slot 03: 0x0010F448
Slot 04: 0x0010F44A
Slot 05: 0x0010F44C
Slot 06: 0x0010F44E
Slot 07: 0x0010F450
Slot 08: 0x0010F452
Slot 09: 0x0010F454
Slot 10: 0x0010F456

When buying or getting an item while in the field, the game will store the current item being bought in slot 1 and it'll move the item currently in slot 1 (if there is one) to slot 10. If slot 10 isn't available, it'll go to slot 9, then 8, then 7 and so forth. If all of the slots 2 through 10 are unavailable, the game will say that you can't buy any more items. Selling items will sell the item in the slot selected. For example, if an item in slot 8 is selected, it'll just empty that specific slot.

Using an item will move all of the items before that slot. For example, if an item in slot 7 is consumed, all slots before it will be moved towards slot 7 by one, even slot 1. Slots 8-10 should be intact unless there's an empty spot in them, in that case the empty spot will be filled with an item.

If there are random empty slots after slot 1 when buying an item, the game will move all of the items forward until they're organzied. For example, if all slots are empty except for slot 5, when you buy an item, slot 5's item will be moved to slot 10, even if the item currently being bought will only occupy slot 1. When you get an item while in the field and your inventory is full you'll have to throw away an item in order to make room for it. When this happens, the new item will get written to slot 1 regardless and all other item slots will be shuffled right in order to make room for it.

There are also 32 more slots available after slot 10, those are reserved for the claim/check system. The selected item will simply get moved to the first slot available when checking, no rearrangment happens. Like before, the first slot is displayed first on the menu. When claiming an item, the item will get transfered to slot 1 and the same thing that happens when you normally buy an item applies. Again, the slots reserved for the claim/check system do not get rearranged.

There are 48 item slots before slot 1 but I still need to figure out how they're used, if they're even used. Their behaviour seems somewhat glitchy so far.

Area Data Stuff

WARNING: I use the .v64 .z64 US version of the ROM file. You may or may not get different results with different versions.

Let's use the Toad Town Central Plaza as an example:

On the ROM, its area data goes from 0x800880 to 0x8232BF. Area names seem to be stored near the end of the room data and may not refer to the room itself, but instead where it connects to.

Area/room data is loaded at Memory address 0x240000. It seems like it can load data up to address 0x264AC0, but I haven't tested it yet. While loading the next room, the game will overwrite data from the old room with the new one. However, if the new room does not have enough data to fully overwrite all data from the old room, then some of that old data will stay there, intact. This may be the reason why one of the Debug Rooms (Room 0178) crashes normaly, but doesn't if you visit the Debug Hub before going to it.

The test/debug room addresses begin at, respectively (on the ROM):

Debug Hub: 7E73A0
Room 0175: B1A900
Room 0176: B1AC30
Room 0177: B1AF80
Room 0178: B1B570 (has a bunch of weird data?)
Room 0179: B1C540
Room 017A: B1CA50
Room 017C: B1D760
Room 017D: B34BD0
Room 0183: E1E380 (right after room "mgm_00", which might explain why it has that room's tattle information)

This may or may not be 100% accurate, since a few of the rooms were more difficult to find in the ROM and had a lot of similar entries throughout the ROM. The easier to find rooms have relatively few data, which should make it somewhat easier to figure out how room data works.

Other random stuff

At memory address 0x743E0 the following raw text is loaded: 0123456789abcdefghijklmnopqrstuvwxyz............

There seems to be a list of room abbreviations at address 0x73E2C on the ROM. It is mostly similar to Luigi1er's room list (in fact, now that I looked it up, it seems like he already knows about these), but it has a few more rooms. It's nothing too exciting, really, but it's something. I included this list as an attachment file, exactly in the order they appear in the game:

Do you like lists? I like lists. Here's a few that might be very useful. Mainly, the list of items, badges, key items and the music list. I'm still going to investigate a few more stuff at some point in the future.

And that's it for now. I'm still new to this so I wouldn't be surprised if I got something wrong here. Any questions? Just ask. I will try my best to answer then. Just remember that I also don't know that much about Paper Mario's code. Also, I would really appreciate any help I could get with this.

At memory address 0x743E0 the following raw text is loaded: 0123456789abcdefghijklmnopqrstuvwxyz
I saw this too, and immediately after this was the game's RNG. Once I get home, I'll edit my post to contain the RNG address
RNG: 0x74410 in the RAM
Apparently this is calculated as such: X * 0x5D588B65 + 1 every frame
(This post was last modified: 07-04-2016, 03:15 PM by Rain. Edit Reason: Included location of RNG in RAM )

RanAS' Random RAM & ROM Hacking Errands
Users browsing this thread: 1 Guest(s)