Primary Zelda Hacking
April 21, 2014, 10:02:32 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Current Zelda Oracles Hacking Suite beta version: 0.05
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Dungeon Titles & Interactions  (Read 520 times)
Marky
Newcomer
*
Offline Offline

Posts: 20


View Profile
« on: July 14, 2012, 05:29:46 PM »

I've been playing around a little more with dungeon maps, whereas I was previously doing most of my experimentation with the overworld maps.  Something I've noticed is that the first room of each dungeon contains the same 3 interactions, though some have an extra one or two.  They are...

A type 2 interaction with the ID 1200.  I'm pretty sure this is what causes the pop-up text box with the dungeon name on it.
A no-value interaction with ID E201.  I have absolutely no idea what this does, but I am very curious to know.
Another no-value interaction, 7E00.  This one I'm pretty sure is responsible for the warp that appears when the mini-boss of the dungeon has been defeated, because of the type 2 interaction in the miniboss room which also has the value 7E00.

One thing I'm curious about, is that if every dungeon has the same type 2 interaction ID 1200, how does it know which dungeon you're in?
Secondly, how does the E201 no-value interaction function?  What does it do?  Never mind, figured this one out - it's the eye statues that follow you.
« Last Edit: July 14, 2012, 06:22:04 PM by Marky » Logged
Fatories
LALE Creator
Administrator
Full Member
*****
Offline Offline

Posts: 223



View Profile
« Reply #1 on: July 14, 2012, 06:41:03 PM »

One thing I'm curious about, is that if every dungeon has the same type 2 interaction ID 1200, how does it know which dungeon you're in?

I'd imagine it just reads a value from the RAM (most likely the map group and map, which gets set from some other procedure) and then just offsets a base address to get the location of the text. This is where it'd be handily dandily if you knew GB ASM so you could debug to see how it is done.
Logged

The force of a true man can penetrate all. Nothing is safe.
Marky
Newcomer
*
Offline Offline

Posts: 20


View Profile
« Reply #2 on: July 14, 2012, 06:56:24 PM »

Absolutely it would!  Unfortunately it's greek to me.  I am a pretty quick learner, though, when I can reverse-engineer things myself, so maybe if there is enough documentation out there I'll be able to find out more about it.
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #3 on: July 14, 2012, 08:56:45 PM »

One thing I'm curious about, is that if every dungeon has the same type 2 interaction ID 1200, how does it know which dungeon you're in?
All interactions are are pointers to assembly (Well, types 0, 1, and Cool that gets executed. The assembly simply reads the currently dungeon from the RAM (CC39) and loads text accordingly.
Logged
Marky
Newcomer
*
Offline Offline

Posts: 20


View Profile
« Reply #4 on: July 14, 2012, 10:01:23 PM »

I see.  I had a feeling that was broadly how it worked, I just wasn't sure of the particulars.  I've printed off a bunch of stuff while I was at work, so I'm gonna do some reading to hopefully be able to understand all of this better.  You guys are a big help too. Smiley
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #5 on: July 14, 2012, 10:58:19 PM »

Use BGB for debugging and the "gbcpuman.pdf" file for a list of how instructions work. The debug window is really simple - it just takes some getting used to.
Logged
Marky
Newcomer
*
Offline Offline

Posts: 20


View Profile
« Reply #6 on: July 15, 2012, 07:14:12 PM »

Okay, so I've read through a lot of that PDF file, and I was referring to it quite a bit back and forth with the BGB debugger (very helpful because of the additional details, though I hate how it jumps to the green arrow every time I select the window if I'm looking at something else).

I tried searching for this string: (CC39) to see if I could find anywhere that would pluck the value from CC39 and use it somewhere, but that wasn't very helpful for me.  I got a number of other addresses; 1204, 364B, 457E and 4597 which all use 'ld a,(33C9)' which as far as I can tell from the PDF writes the value at CC39 into 'A', but I couldn't figure out then what pulled that information out of 'A' to determine which dungeon I was in, and thus which text string to show.
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #7 on: July 15, 2012, 08:36:25 PM »

You're approaching it the wrong way. You want to debug - as in set some break points. There are things called "access breakpoints", which will break on an instruction if the specified memory address is written to or read from. So, you'd enter CC39 as a value and just enter a dungeon, and follow the procedure.
Logged
Marky
Newcomer
*
Offline Offline

Posts: 20


View Profile
« Reply #8 on: July 15, 2012, 09:38:56 PM »

Sweet, thanks Lin.  More than wanting to know how to do these things, I wanna figure out more about how the game executes its functions, because the more I know, the more I can find out and potentially be of assistance to others.  So I appreciate that you and Fatories are so patient with my being a noob. Cheesy
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #9 on: July 15, 2012, 10:30:02 PM »

No problem. By all means, please, join the IRC (irc.caffie.net #ZOLE) so I can help you much easier and answer your questions immediately. Fatories is actually gone for a 1 month trip, but I'll be there.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!