News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Metroid Expando

Started by snarfblam, July 18, 2010, 10:27:12 AM

Previous topic - Next topic

snarfblam

Update: This hack can be considered abandoned/irrelevant since Editroid can now (try to) expand any NesTroid ROM. If you want an expanded ROM, open it with Editroid, and select Tools->Expand ROM in the menu.

I'm actually already pretty far along in this one. The inspiration was a simple suggestion from DekuKnight.

Obviously, it looks just like the original Nestroid. What this is is an expanded Nestroid ROM. The idea is that it will be indistinguishable from the players point of view, but will relieve the hacker of the painful memory limitations of the original Nestroid. Expanding an NES ROM isn't very straightforward, what with mappers and banking and what not, but I'm pretty happy with what I've got so far.

Here's what I've done so far:

  • Doubled the ROM size to 16 PRG banks.
  • Moved PRG bank 7 to PRG bank F (MMC1 'hardwires' last PRG bank).
  • Moved all patterns (i.e. tiles) into new banks
  • Updated pattern loader (+ some other tweaks) to load patterns from new location

Here's what you get out of it.

  • Virtually unlimited space for additional data/code*
  • Each level now has it's own, entire, dedicate full page of background patterns.
  • Approx 2000 bytes of freed up data in each level-data bank (from removed patterns)
  • Approx 240 bytes freed in main program bank.
*Bank switching is required to access this additional data.
So now levels no longer share patterns. You don't have to worry about messing up one level's graphics when changing another. Plus, each level has available to it as many patterns as can fit in PPU memory. This also means no messing with the pattern loader (the "Pattern Source Editor" in Editroid) to squeeze out more room for pattern data, since you start out with the best-case scenario.

Moving the patterns out of the level-data banks means that you have a bunch of free space where you can add more rooms, items, structures, or combos. This also allowed the pattern loader to be greatly simplified, shrinking the code by 240 bytes which give you a little breathing room if you want to do some ASM hacking (in the original NesTroid, the largest contiguous block of free memory available for code was about 15 bytes).

Here's some other things I would like to do:

  • Relocate room/structure/item/combo data and relevant pointer tables to make freed up memory easier to use.
  • Make Editroid compatible with this expanded ROM.

I don't think that I'll bother releasing this hack until Editroid can be updated to work with it, because I doubt there are many (any?) people who are deeply enough involved in Nestroid hacking to make use of it. On the other hand, once Editroid can work with the expanded ROM everyone can use it and people will be all like "OMG I have so much free memory to make new rooms". And there can finally exist a Nestroid hack that isn't painfully repetitive.

I'm also planning on expanding my hack-in-progress (for which there is no topic here, but you've probably seen a lot of in RoTW) in a similar fasion, because I'm already feeling claustrophobic, having already reached limits on room data and structure data.



Edit: w00t! I've got Editroid opening the expanded ROM, and it should be able to find relocated data no problem. Just need to move some data around in the ROM and allow Editroid to make use of the extra space.

[attachment deleted by admin]

Parabox

Nice to see I could help a bit with the development of the NEStroid hacking scene. I thought that it would be insignificant, but this proves the opposite.

Malpercio

Development my foot, you helped with the resurrection. i believe the last time something was posted in here about NEStroid was changing Title screen text. this might actually get NEStroid some love

snarfblam

so i herd u liek bytes



In decimal that would be 1851 extra bytes to work with, almost doubling the amount of room data you can use. Bonus: 96 more bytes for structures. Also This is only working for Brinstar ATM, but now that I have the process down, the other four levels should go quicker. Also need to update the room testing feature and structure editor to work with expanded ROMs. Also need to add a feature to increase the number of rooms/structures available. That should be easy though.

Malpercio

1851 extra? you could... build most of Tourian with that much, no? holy crap.

snarfblam

#5
Well, I think I've finally completed my very first ROM hack :grin:. [Link Redacted]

If you play this hack, you shouldn't notice any difference in any way, whatsoever, from the original game. The difference is when you open the patched ROM in the editor, you will have a whole bunch of free space for new rooms. (You'll need the new version of Editroid from the link above.)

Things to note:
-Each level gets a full page of background patterns. Levels no longer share bg patterns. Each level has unused patterns that were shared with another level in the original game. You can edit these without consequence.
-You are free to overwrite the "garbage" combos in the structure editor.

Lunaria

snarfblam: You should make the editor auto patch up any original ROMs up to Expando when first opening them. :P

Also, I may or maynot give this a try once Ice Metal is out. ( I always wanted to make a LoZ OoS hack and there is an editor for that now too! :3 )

snarfblam

 :cry:

Found what's kinda a big bug in the just-released Editroid.

[spoiler=Explanation]When you delete a room it leaves an extra pointer at the end of the room pointer table. This is okay until you save the rom and re-load it later, at which point the now-junk pointer confuses Editroid and results in junk rooms being loaded and an incorrect calculation of free space. All bets are off if you save after loading this glitched ROM.[/spoiler]

If you are using the new version of Editroid, avoid deleting rooms at any cost. Or just wait until I release an update.

snarfblam

Removed the link to the updated version of Editriod. It was not fit to be released.

Looking over the code for the new version, I realized how aweful it was. Between not being all there (a little insomnia lately) and being rusty on Editroid (I hadn't touched or looked at the code for many months) it was a bad idea to just dive in and hack in the expanded ROM support. I've fixed the glaring bugs, but the code needs some refactoring and some more serious testing before it is ready.

Parabox

Lol I still have it. Anyways hope to see a fixed version soon. And auto-expando patching. It kind of broke a test ROM of mine when I applied this to a vanilla ROM and then posted what's already done of my hack over it.

Infinitys_End

HAHAHAH!

I could have probably used this hack to help with my own hack.  But ah well... its release is just on the horizon... it just might happen to coincide with some other release date...  :heheh:

fuducker81

thanks for that. i can do anything that i wanted to do,thanks.

Zhs2


snarfblam

Quote from: fuducker81 on August 07, 2010, 04:36:33 PM
thanks for that. i can do anything that i wanted to do,thanks.
This... is... Zombocom.