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

Login with username, password and session length
News: The website has switched hosts and now has the domain zeldahacking.net!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Bug in level 3  (Read 389 times)
Jigglysaint
Hacking Guru
Full Member
*****
Offline Offline

Posts: 150


View Profile
« on: July 10, 2010, 06:18:32 PM »

I was looking at level 3's turnstile data, and there are two parts.  One part is what's responcible for the actual object and when it appears.  The other controls the map script and what changes are made when the 4 crystals are dropped.  The problem is that when I triggered the event, the room that's map 52(Monlight Grotto) becames one of the rooms from Present Maku Path.  I went and checked the script and there is nothing wrong with it.  What I did notice is that the game accepted from 00 to 5D regularily, but from 5E and onward, it repeats itself stating from 01 again.  This event is set so that map 60 replaces map 52 when the switches are broken.  Basically, somthing is happening that is making the game not read rooms greater than 5D and instead making it repeat.

The other thing is that the new room is offset by 16.  That is to say that the lowest 15 tiles are first, then the rest of the room so it looks like the bottom is up at the top and the bottom is missing.
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #1 on: July 10, 2010, 11:48:29 PM »

Probably another ASM code I forgot about. The dungeon loading code is at 3949 if you want to look at it before I have the time.
Logged
Jigglysaint
Hacking Guru
Full Member
*****
Offline Offline

Posts: 150


View Profile
« Reply #2 on: July 11, 2010, 12:52:54 AM »

Well I discovered why the game uses 2 room index ram locations.  One is purely for level data, and one is for objects/warps and stuff.  When I altered the value so it read off of 30 CC, it didn't have that 5D limit that it does when it reads from 2F CC.  I am really not sure what's going on, but can you recall at any point where you might have AND'ed 2F CC for any reason?  How about how you stored the level data?  Did you store it in 256 k pages, or did you bunch them all together wihtout leaving any extra space?

Edit:  Okay I think I know the problem.  From what it looks like, your level data pointers cross banks, that is room 52 is in the high end of one bank, and room 60 is the low bank of the second.  The way you have it it works fine exept any time the game wants to swap one room for another, it reads the room data, but doesn't shift the bank.  This I believe, is why the game was programmed using relative pointers and if you notice, the level data often spans multiple banks.
« Last Edit: July 11, 2010, 12:59:44 AM by Jigglysaint » 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!