+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Tracking unused bytes...
Pages: [1]
Author Topic: Tracking unused bytes...  (Read 2 times)
DanteRules
Guest
« on: June 18, 2009, 01:42:43 am »

I think I've found several bytes in the rom that aren't used, but I want to be absolutely sure.  I was wondering two things:

1.  I thought there was a way to track a range of bytes in fceuxdsp v1.07, but I can't remember how.  Does anyone else know?

2.  What would you say is the quickest and easiest way to look for unused bytes would be?
Lenophis
Guest
« Reply #1 on: June 18, 2009, 02:04:47 am »

You could try the code/data logger. It'll flag whatever it sees as data or code (or in rare cases, both). Whatever it doesn't flag is probably free. Granted, this will involve playing through the whole game... (yeah, not the best option).
Tauwasser
Guest
« Reply #2 on: June 18, 2009, 12:11:49 pm »

Are you looking for stuff in the rom file or for stuff in ram?

If the latter...you really have to play and take your chances. However, many games will initialize all ram they ever use, so you might get lucky when you take a look at the boot-up routine.
Also, if you look for stuff in roms, you could try to understand the assembly insomuch that you know how the game reads data.
  • (if the game uses banking) from another bank
  • in its own bank
[(if the game doesn't use banking) from far reads of data. these will most likely be aligned so the game can use speedier reads compared to single-byte reads.[/li][/list].

Also, in games that don't use banking, you will usually find unused space all in the same corner and only here and there to fill space for aligning data.

I think your game will most likely be using banking, so you might want to read up on asm and specific adressing modes if you haven't already.

cYa,

Tauwasser
DanteRules
Guest
« Reply #3 on: June 18, 2009, 10:22:51 pm »

Quote from: Lenophis on June 18, 2009, 02:04:47 am
You could try the code/data logger. It'll flag whatever it sees as data or code (or in rare cases, both). Whatever it doesn't flag is probably free. Granted, this will involve playing through the whole game... (yeah, not the best option).

Thanks for reminding me about the data logger.  I knew that I did it before, but it's been awhile since I used fceuxdsp.

Also, what you mentioned is kind of why I decided to ask about easier ways.  Not only would I have to play through every level, but I would also have to explore every inch and do everything that is possible.  Since it's a SMB3 hack, then you can see why I'm looking for any way to avoid it. 


Quote from: Tauwasser on June 18, 2009, 12:11:49 pm
Are you looking for stuff in the rom file or for stuff in ram?

Also, in games that don't use banking, you will usually find unused space all in the same corner and only here and there to fill space for aligning data.

cYa,

Tauwasser

I forgot to mention that it was for the rom file.  That space-filler data is what I want to mess with.  If I'm right and it isn't actually being used, then I can get another 5 or 6 levels out of it.  I probably won't bother with ram stuff too much right now, though.  I'm still a ways off from understanding asm as much as I should.
tummai
Guest
« Reply #4 on: June 18, 2009, 11:12:53 pm »

Quote from: DanteRules on June 18, 2009, 01:42:43 am
I think I've found several bytes in the rom that aren't used, but I want to be absolutely sure.  I was wondering two things:

1.  I thought there was a way to track a range of bytes in fceuxdsp v1.07, but I can't remember how.  Does anyone else know?

2.  What would you say is the quickest and easiest way to look for unused bytes would be?

If it's in the ROM, try looking for an extremely long series of $00s or $FFs.  That's what unused bytes usually look like on the NES.

Another way to track bytes is to open the debugger and set a READ breakpoint over a range of bytes.  Then play through the game.  If those bytes are ever used(ie, read) the game will stop.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC