Aslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1888.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexdb9b.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=17.60e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexdb9b.html.zx9h^\OKtext/htmlISO-8859-1gzip8:\Wed, 11 Mar 2020 01:22:49 GMT0 0P9h^\ Smaller Inventory Patch

Author Topic: Smaller Inventory Patch  (Read 1219 times)

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Smaller Inventory Patch
« on: September 29, 2013, 06:50:26 PM »
A while back, I was thinking about ways to free up more RAM space for modding use in FF5.  The method I had settled on was reducing the size of the inventory.  I'm happy to announce that this patch is finally (mostly) ready!

I had thought it would be a relatively simple matter of replacing a few values indicating the size of the list.  That was a naively optimistic assumption.  Since there are 256 items, and 256 slots, there are a number of instances where it's assumed there will always be somewhere to put an item.  Interestingly, there are also some bits of code that actually account for a disparity between the number of items and number of slots.  So it wasn't a complete rewrite, but it wasn't completely inline like I wanted.  It's not 100% finished, but the rest of the things that need to be done are cosmetic and don't affect the function.  Right now it's hard-coded for 128 items; I would like to make this a something you can define when it's assembled.

Speaking of assembly, I have only uploaded the ASM file.  I'm not planning on making an IPS patch for this, though I don't mind if others do.  Why no IPS?  Frankly, this is a patch for experienced modders - if you can't handle assembly (or at least patching asm files) yet, you really don't need this.  Use xkas 0.6 or (preferably) asar to compile it.  When testing, I used the ROM with RPGe's patch already added; the CRC32 value is 17444605.  It should work with most expanded ROMs, although I doubt it will work with the original Japanese ROM.  I haven't tested it.

This has mostly been a labor of learning and love (except the optimize function - fuck that code).  I mostly started this for two reasons: to learn ASM coding with asar, and to open up some RAM space for the mod I'm working on.  Honestly, 128 slots is probably overkill; I'm not sure I really need 256 bytes of RAM.  Anyway, if there are any questions, bugs, comments, whatever, feel free to let me know!
« Last Edit: December 08, 2014, 04:48:07 AM by Jorgur »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Smaller Inventory Patch
« Reply #1 on: September 30, 2013, 02:51:55 PM »
An interesting project. I forgot that FFV allowed you to have a 255 Inventory what surprises me is that there was already code in place to utilize an overload in the first place. What did you plan to do that with that now freed up RAM? Is it going to be crucial to your project?