Author Topic: Memory MAP  (Read 72040 times)

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Memory MAP
« Reply #75 on: November 15, 2008, 02:01:54 pm »
Per Vehek:

Quote
The game seems to load a value from variables starting at 7E967C to determine what sprite assembly size to use in battle. 7E967C seems to represent the sprite assembly size for all three PCs in battle.


In a related matter, we've discovered that it's currently impossible to have characters with Size 1 sprite assembly in the party without serious sprite glitching -- details are in this thread.

Anyone think a remedy for this type of sprite glitching is possible? I think the Size 1 sprite's extra tiles are overlapping the second character's tiles in VRAM. Several times per second (possibly whenever the tiles are refreshed in memory), the situation becomes the reverse -- the second character's tiles become dominant, and the game engine is pulling from the second character to construct the lead (Size 1) character. CT is apparently hard-coded to handle only Size 0 sprites in the party -- all the original player characters have Size 0 sprites after all.

This memory management issue doesn't crop up in battle though, I suppose because the game engine uses some address other than 7E967C to handle Field sprites.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Memory MAP
« Reply #76 on: April 01, 2009, 06:16:00 pm »
Character byte 26 - Set to 80 to make a character always have berserk status.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: Memory MAP
« Reply #77 on: April 01, 2009, 06:42:54 pm »
Isn't there an item that does that? Maybe when you have that item equipped it sets that bit?

--JP

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Memory MAP
« Reply #78 on: April 01, 2009, 06:50:06 pm »
The Berserker does that, but while equipped it does not set that bit.

Edit: I've examined character byte 26 further, and this is what I've found:

80 - Berserk
40 - Magic Defense
20 - Haste
10 - ???
8 - ???
4 - Protect
2 - ???
1 - ???
« Last Edit: April 02, 2009, 01:16:32 pm by Mauron »

Schala Zeal

  • Radical Dreamer (+2000)
  • *
  • Posts: 2127
  • 7th Elemental Innate, and vtuber
    • View Profile
Re: Memory MAP
« Reply #79 on: February 19, 2017, 09:45:08 pm »
Hmm... are the addresses relative to an offset in RAM or is this for battery save files I can open with a hex editor?

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Memory MAP
« Reply #80 on: February 20, 2017, 12:18:20 am »
Most of these are RAM addresses. My last one is for the 0x50 bytes starting at 7E2600 for each character.

Schala Zeal

  • Radical Dreamer (+2000)
  • *
  • Posts: 2127
  • 7th Elemental Innate, and vtuber
    • View Profile
Re: Memory MAP
« Reply #81 on: February 20, 2017, 01:36:20 am »
I was hoping to do a CT-specific rom corruptor using this info.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Memory MAP
« Reply #82 on: February 20, 2017, 02:20:45 pm »
The most this would be useful for is a save stat corrupter. Geiger's Offsets would be a much better start on a ROM corrupter.

Schala Zeal

  • Radical Dreamer (+2000)
  • *
  • Posts: 2127
  • 7th Elemental Innate, and vtuber
    • View Profile
Re: Memory MAP
« Reply #83 on: February 20, 2017, 08:48:26 pm »
Darn. I was hoping to make one that can like... swap character graphics in real time.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Memory MAP
« Reply #84 on: February 21, 2017, 02:30:16 pm »
Real time character graphics swapping might be possible with RAM manipulation, but you'd need to target a specific emulator and palettes would screw up in battle and certain menus, because those load them based on character index, not palette index.

Schala Zeal

  • Radical Dreamer (+2000)
  • *
  • Posts: 2127
  • 7th Elemental Innate, and vtuber
    • View Profile
Re: Memory MAP
« Reply #85 on: February 22, 2017, 07:35:45 am »
Yeah. I doubt the debugger has source code available. Tried it out and it would seem interesting as a corruption engine.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Memory MAP
« Reply #86 on: September 17, 2017, 11:46:45 pm »
7F01CD - Two byte value for adjusting shop prices. Value/0x100 is the percentage of the final price. Medina Market sets 7F01CE to a random value of 5 or higher at first, and later sets 7F01CD to 00BF, resulting in a 25% reduction.

Technical: The game actually multiplies item prices by the value, then takes the two highest result bytes as the new price.

JonIIDX

  • Iokan (+1)
  • *
  • Posts: 1
    • View Profile
Re: Memory MAP
« Reply #87 on: March 22, 2020, 12:40:16 am »
Hey everyone, just wanted to say thanks so much for the great info about RAM Addresses! Thanks to the Screen Scrolling address, I was able to start making some full animated GIF maps of areas.

https://puu.sh/FnqDi/05abfa0ac1.gif

It's kind of confusing how to get it working, so I am going to explain how to utilize it in the text below.

Code: [Select]
7E1D00                          Activate Screen Scrolling
Activate = 1
Deactivate = 0
*Note - Activating the screen scroll will make it so you can no longer go through any screen transitions.
Make sure to make a savestate before you activate this, otherwise you'll be stuck in the room.

7E1D01                          Screen Scrolling X-Axis
X-Axis Scroll (2-Byte Signed)
Full screen changes every 8200, accurate to the pixel

Screen 1 = 0
Screen 2 = 8200
Screen 3 = 16400
Screen 4 = 24600

7E1D02                          Screen Scrolling (Do not use)

7E1D03                          Screen Scrolling Y-Axis
Y-Axis Scroll (2-Byte Signed)
The tops of the screens have a 3 pixel overlap with the previous screen

Screen 1 - 0
Screen 2 = 26
Screen 3 = 52
Screen 4 = 78
Screen 5 = 104

Something I noticed is that if you transition screens, they don't always mesh up perfectly with the screen you came from. In the gif example that I posted above, there was a 17 pixel discrepancy which I had to use 16x16 pallets to re-build the best I could. I used one extra Y-pixel from other pallets as necessary. This can get kind of annoying when animations are in this gap...

Anyway, I just wanted to document this just in case someone else is interested in getting full screen caps. Hope this is useful to someone, someday!

Edit: Also, there are a lot more Memory Addresses that aren't mentioned here on a Japanese wiki as well. Most notably, ones that can move each of the main characters to any designated location on the map.

https://wikiwiki.jp/snes007/クロノ・トリガー

Code: [Select]
Crono X-Pos: 7E1802, 7E1803
Crono Y-Pos: 7E1882, 7E1883

Marle X-Pos: 7E1804, 7E1805
Marle Y-Pos: 7E1884, 7E1885

Lucca X-Pos: 7E1806, 7E1807
Lucca Y-Pos: 7E1886, 7E1887

Frog X-Pos: 7E1808, 7E1809
Frog Y-Pos: 7E1888, 7E1889

Robo X-Pos: 7E180A, 7E180B
Robo Y-Pos: 7E188A, 7E188B

Ayla X-Pos: 7E180C, 7E180D
Ayla Y-Pos: 7E188C, 7E188D

Magus X-Pos: 7E180E, 7E180F
Magus Y-Pos: 7E188E, 7E188F
*Note: The screen will not scroll with you, so this would only be useful for minor adjustments (e.g. - accessing areas that are blocked by an NPC). If you move within the same screen, the screen will begin to scroll again when you take control of your character - if it can.

There are so many that I don't have time to translate it at the moment... But if you all are interested, I can hack away at it bit by bit.
« Last Edit: March 22, 2020, 01:04:18 am by JonIIDX »

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Memory MAP
« Reply #88 on: March 22, 2020, 03:13:38 pm »
We have for information in the Chrono Trigger Database. In addition to that, I've mapped out all character data in the 7E26xx area.

The PC X/Y position there isn't 100% accurate. That data is set by object number, and in some locations the PCs will be pushed down one, so Crono would be at 7E1804 instead.

Kodokami

  • Entity
  • Dimension Crosser (+1000)
  • *
  • Posts: 1110
  • Enjoy the moment!
    • View Profile
Re: Memory MAP
« Reply #89 on: March 23, 2020, 12:42:28 pm »
Oh wow. I don't understand it all, but that gif is neat.