Golden Sun Hacking Community
October 17, 2017, 01:25:34 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
  Home   Forum   DC Wiki Help Search Calendar Downloads Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Tret OOB Weirdness  (Read 6888 times)
0 Members and 1 Guest are viewing this topic.

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« on: January 22, 2015, 03:50:50 PM »

Using the retreat glitch you can get out of bounds in a number of locations in the game. Generally speaking, the game is reasonably well behaved aside from various junk data lying around. There is one particular out of bounds (OOB) area which does not behave well - you may guess from the topic title that it is tret. Unlike other dungeons, tret has certain areas which will soft lock the game if you walk to them and even a location which will crash the game if you walk there. We in the speedrunning community have no idea why the game is crashing or soft locking, and we strongly suspect there are some other things at play here. I was watching the memory as I moved through tret and it constantly seems like Isaac was running near doors because of how the memory was changing.

I'm including a goodie-pack so that you can mess around with this yourself and hopefully help us understand exactly what the hell is going on here.

1) Here are a bunch of save files while I am out of bounds in Tret: the save states work with VBA-RR v24, there is also a battery file if those fail: https://www.dropbox.com/s/07j7r0ju1z5r4pb/tret%20oob.rar?dl=0
2) Here is a nifty lua script to help explore out of bounds
Code:
local AD1 = 0x0200053a --Isaac Cur PP
local AD1Value = 5
local AD2 = 0x0200047a -- Step Counter
local AD2Value = 1

while true do
memory.writeword(AD1, AD1Value)
memory.writebyte(AD2, AD2Value)

gui.text(0,00,"Area: " .. memory.readword(0x02000400))
gui.text(0,10,"Door: " .. memory.readword(0x02000402))


gui.text(40,00,"Actual: " .. memory.readword(0x02000408))
gui.text(40,10,"Actual: " .. memory.readword(0x0200040A))

gui.text(0,20,"X: " .. memory.readdword(0x02030ec4)/1000000)
gui.text(0,30,"Y: " .. memory.readdword(0x02030ecc)/1000000)
gui.text(0,40,"Z: " .. memory.readdword(0x02030ec8)/1000000)

    vba.frameadvance();
end
And here are some codes to lock the camera on isaac (but it's really not that useful)
Code:
02030DB8:00000000
02030DBC:00000000
02030DC0:7FFFFFFF
02030DC4:7FFFFFFF
(Incidentally, if you know how to make these codes lock when the X/Y coordinates underflow to 4298 that'd be fantastic!)
3) In tret here are some "bad" locations (X,Y):
- (4283,4241) = game crashes and reset
- (4292,4242) = game crashes, no reset (tries to access door 32 from that area)
4) In the 0x02000410-0x02000420 range of the memory you'll notice that there are some changes as you wander around. e.g. load up the battery file and just hold up and see how it changes. This reminds me of what happens when Isaac walks past a door .. what is going on here?
Logged
View Profile
Luna_blade
The last member of the Luna clan
Luna Clan

Great Member
*

Coins: 0
Offline Offline

I am: Timeless. As in, i don't have much free time.
Posts: 533

« Reply #1 on: January 22, 2015, 04:30:47 PM »

Highly interesting.

I'm no expert but does it matter that there are two cutscenes in trets room?
Logged

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
View Profile

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« Reply #2 on: January 22, 2015, 04:57:57 PM »

Highly interesting.

I'm no expert but does it matter that there are two cutscenes in trets room?
I'm not 100% sure, but I don't think so. Tret's "room" is connected to the entire interior, so you're able to trigger the tret fight by wandering out of bounds in the right direction. The second cutscene has no overworld/in dungeon trigger (as far as I'm aware) and that only plays after you defeat tret.

The doors I've been able to trigger (32 and 22 but I didn't record the coordinates for a 22 door, there's a few 32 doors) correspond to falling down certain breakable leaves.
Logged
View Profile
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2376

« Reply #3 on: January 23, 2015, 12:19:11 AM »

Quote
4) In the 0x02000410-0x02000420 range of the memory you'll notice that there are some changes as you wander around. e.g. load up the battery file and just hold up and see how it changes. This reminds me of what happens when Isaac walks past a door .. what is going on here?
Same stuff +0x20 on GS2.. so..

Quote from: From my page: http://gsdata.wikia.com/wiki/RAM_Map
02000420 = Map and door number (Different in battle)
02000424 = Sanctum map and door number
02000428 = Current map and door number
0200042C = Area?
0200042E = Map and door number when you win or flee a battle. FFFF to use current map and door number instead.
02000432 = Map and door number when you lose a battle. FFFF to use sanctum map and door number instead.
02000436 = Battle Background
0200043A = Graphic Map Index. (For file index table on map/pal/tilesets; see 0802F380)
0200043C = X
02000440 = Z
02000444 = Y
02000448 = Direction

I wonder if this helps any?
Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...
*Cross my fingers and hope we have Big Brother All-Stars next year... with Paulie & Cody Califorie(sp?)... and Vanessa & Tiffany Rousso.... Would be fun? :P Especially if one of the boys got evicted early since there's usually some all-guy alliance in there, right?
View Profile

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« Reply #4 on: January 23, 2015, 04:15:20 AM »

Quote
4) In the 0x02000410-0x02000420 range of the memory you'll notice that there are some changes as you wander around. e.g. load up the battery file and just hold up and see how it changes. This reminds me of what happens when Isaac walks past a door .. what is going on here?
Same stuff +0x20 on GS2.. so..

Quote from: From my page: http://gsdata.wikia.com/wiki/RAM_Map
02000420 = Map and door number (Different in battle)
02000424 = Sanctum map and door number
02000428 = Current map and door number
0200042C = Area?
0200042E = Map and door number when you win or flee a battle. FFFF to use current map and door number instead.
02000432 = Map and door number when you lose a battle. FFFF to use sanctum map and door number instead.
02000436 = Battle Background
0200043A = Graphic Map Index. (For file index table on map/pal/tilesets; see 0802F380)
0200043C = X
02000440 = Z
02000444 = Y
02000448 = Direction

I wonder if this helps any?
Not quite, theres no XZY coordinate that I can see for GS1 in this range and those addresses that you list would correspond to the mystery area. I'll post some images to help illustrate what is going on.

1) http://i.imgur.com/Fp9oMX1.png Just moving straight up from where the battery file puts you gives you a change in these two addresses only
2) http://i.imgur.com/8Xh99qd.png moving around a bit you start to see changes in these addresses
3) http://i.imgur.com/Jb6wbWu.png more changes in the same addresses!
4) http://i.imgur.com/1nIpcCM.jpg If you try to enter a door anywhere, the same addresses change (interestingly, I only ever see C and 4 walking towards/away from doors in that last changing byte from my limited testing I just did)
5) If you walk around tret a lot more you can actually get this to happen


At this place the 11 has cropped up in the 02000448 range
Logged
View Profile
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2376

« Reply #5 on: January 23, 2015, 04:30:05 AM »

Quote
theres no XZY coordinate that I can see for GS1 in this range and those addresses that you list would correspond to the mystery area. I'll post some images to help illustrate what is going on.
I think it's the player coordinates, and that it ocasionally gets placed here.... (Like the "Return coords"? I guess?)
-Editing it during battle will have your camera be at another location when you get out of battle... I tested this on the world map, got the snowy tileset, and the camera moved toward Isaac.
-Perhaps it is also read when you continue from a save file, but I haven't checked this. (Only 02000000-02002FEF get saved, which doesn't include the addresses at 02030ec4+...)
So yeah, your images still make it look like the player position/direction. @4: C000 is for facing north. (Since 0000 is facing east.) ; The X, Z, and Y is 32-bit; and direction is 16-bit.

Anyway, that isn't the only thing copied to this save game area... as GS2 copies NPC data to 02001004+ as well.... (But during saving, if I remember correctly?) Which makes it obvious that there is support for 32 sprite objects. (And maybe more for unsaveable ones?)
« Last Edit: January 23, 2015, 05:47:43 AM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...
*Cross my fingers and hope we have Big Brother All-Stars next year... with Paulie & Cody Califorie(sp?)... and Vanessa & Tiffany Rousso.... Would be fun? :P Especially if one of the boys got evicted early since there's usually some all-guy alliance in there, right?
View Profile

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« Reply #6 on: January 23, 2015, 05:58:59 AM »

Ah yes, the 4000/C000 thing is definitely Isaac's direction. Looks like if you're approaching a transition screen the game records Isaac's direction when transitioning to maintain that after the transition. Although, some transitions fix Isaac's direction (e.g. world map doors) and that data gets overwritten.

Looks like other highlighted areas are related to the position of the camera. I tested it in a dungeon (because sometimes world map/dungeons behave differently) and got the camera to lock somewhere else. I'm guessing that near transition zones like doors there is an area around them which takes control of the camera as you move through the area, as opposed to locking the camera on Isaac. That way you can control the camera movement as Isaac goes through a door (which is slightly irregular).

I bet that camera lock in tret is to do with the number of breakable leaves in the dungeon.
Logged
View Profile
Pages: [1]   Go Up
  Print  
 
Jump to:  

Cbox
Yesterday at 09:57:26 AM
AZVRE: Im pretty okay, what about you?
Yesterday at 01:17:14 AM
Fox: I think the nine is doing a cirno on me, though... Anyway, how is everyone doing today?
Yesterday at 01:12:20 AM
Fox: onesixtwo*
Yesterday at 01:12:00 AM
Fox: Okay... Meanwhile... ah... 162 being a number that has made itself known to me.... I look at the relationships of the numbers.... 162  1+6+2 = 9 ; onesizetwo = alphabetical order = 9 characters ; Distance apart analysis: os = 4 = 1[6][2] , st = 1 = [1]6[2] , ot = 5 = [1][6]2 ; ost = original sound track?
October 15, 2017, 06:31:17 PM
AZVRE: ah okay :D i thought i caused some trouble
October 14, 2017, 07:49:16 AM
Fox: Oh i know... You were messing with yours, and the description says mine. It's kind of a funny bug. :P
October 13, 2017, 08:18:31 PM
AZVRE: I did not edit your profile tho. Just to erase that confusion ^^"
October 12, 2017, 04:49:56 AM
Fox: e.g. this art = http://forum.goldensunhacking.net/Themes/Jupiter/images/catbg.gif (etc.)
October 12, 2017, 04:48:58 AM
Fox: I have a question: Where did the art for the headers come from? (Like the backgrounds to each of these things... "Affiliates", etc... Asking just incase it inspires me to do something... but if Charon made it, then that's cool too.
October 11, 2017, 04:23:02 AM
FoxWas thinking about having something for the editor anniversary, but I believe I had to change my mind....
October 10, 2017, 12:58:36 PM
Fox: That's alright. ;       @AZVRE's profile: "Current Activity:  Editing the profile of Fox." ...Eh... That looks weird.
October 07, 2017, 11:45:16 PM
Atrius: Sorry about that, the auto bot detection is still working, but it also requires an admin to visit the site regularly.
October 04, 2017, 04:17:40 AM
Fox: Yeah, it does bring a small amount of activity. Not good quality activity, but it's still activity, nonetheless.  Now if we can get them to randomly post pictures and vdeios!
October 04, 2017, 02:10:48 AM
Majora: If nothing else, I like how they're copying the content of real posts at random. Interesting to see how they adapt to seem more authentic
October 03, 2017, 08:29:38 PM
Fox: medico6601 = Most likely another bot. :(
September 26, 2017, 03:32:24 PM
Fox: by ten* Excuse me.
September 26, 2017, 03:32:12 PM
Fox: Oh yes... Also multiply all levels by two. (So actually, an adept will have levels of 54, 3, 2, and 1, rather than 5, 0, 0, 0.... if going by those.)
September 26, 2017, 03:29:07 PM
Fox: ...I mean the theory also saves space on the Status Screen.
September 26, 2017, 03:26:11 PM
Fox: Random/fun concept theory: What if we got rid of ePow/eRest, and just made eLevel do everything. :P (A process of cleaning stuff up... Though, could make things less versatile. - Like, if a Djinni add 1 eLevel = Okay, that's understood... by why specifically +5 on the ePow/eRes (Rhetorical))
September 23, 2017, 04:42:08 AM
Fox: Oh nevermind, it does... but I swear I saw that a minute ago.

Affiliates
Temple of Kraden Golden Sunrise
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.056 seconds with 22 queries.