spinout Posted May 23, 2013 Share Posted May 23, 2013 Hello! I haven't made a release (or let alone worked on Z64!) in a while. Today was different. I dropped into #z64 (on freenode, you should check it out!), and wareya was looking for some space to put his assembly. I told him to put it in code, over debug text, but he didn't like that answer. He wanted me to extend code. An hour or so more of research showed that loading anything more into code broke the game; the save file is loaded right after it and the rest of the game is coded around code and the save file being exactly where they are. So how do we fit more into code? I went back to an old idea I had about adding more scenes: move the scene table outside of code. But why stop there? Might as well pull the other tables out too! A bunch of research finding all the pieces of code which reference all those tables, some good ol C and python, and the rest of the day later, I got the game to run using tables loaded via an alternate method. What does this mean? It means: Up to 819 scene files. MQ Debug, by default, only has 109. Up to 1536 actor files. OoT, by default, only has 470 actors. Up to 512 objects. OoT, by default, only has 401. Okay, I can up that if you really need more. Up to 31,744 exits! OoT, by default, only has... 1556. (Note: Cendamos told me the engine rolls the number over after a certain point, if so, I will fix this in a future release.) Up to 32.7kB (that's kilo-bytes) of whatever you want to always have loaded! It also means that the tables for these can be modified as individual files, which will certainly make ROM hacking easier. Willing to check it out? [EDIT: Release 2] 9 Link to comment Share on other sites More sharing options...
Jason777 Posted May 23, 2013 Share Posted May 23, 2013 Bravo, spinout, bravo. I will definitely be looking at this for rest of the week! Link to comment Share on other sites More sharing options...
haddockd Posted May 23, 2013 Share Posted May 23, 2013 *Welcomes you back from the dead* I am not quite awake yet to delve into this, but I will also be checking this out later! Link to comment Share on other sites More sharing options...
DeathBasket Posted May 23, 2013 Share Posted May 23, 2013 I know myself and a few others have had the idea to do this for a while now too, cool to see that you've already gone and done it. I will definitely be taking a look once I have time and feel like getting back into things. Link to comment Share on other sites More sharing options...
xdaniel Posted May 23, 2013 Share Posted May 23, 2013 Quick suggestion: Haven't tried it yet, only read the readme and source, but is there any chance you could move the table at 0xBE80 elsewhere, so as to not overwrite the start of the filename table; preferably somewhere that's normally all zero, ex. 16 bytes after the end of the DMA table, 0x18F40? Would make implementing support in editors for this easier, I think, while also keeping support for filenames - like, is there non-zero data after DMA table, if so use data as tablestruct, else scan for/read tables from code file. Link to comment Share on other sites More sharing options...
spinout Posted May 23, 2013 Author Share Posted May 23, 2013 Thanks for the comments. xdaniel,in the next release I'm planning on moving the hack into 'code', where the now-unused tables are. I think that'll take care of CRC issues as well. EDIT: also, xdaniel, as far as hack presence or not, a quick and easy way to check is by checking the JAL to my code - will provide some more details in a bit. Link to comment Share on other sites More sharing options...
john_smith_account Posted May 23, 2013 Share Posted May 23, 2013 Well, I guess if Dark_Link-77 ever gets time to come back, he could port all of MM into OOT now. Great work as always spinout. Link to comment Share on other sites More sharing options...
spinout Posted May 24, 2013 Author Share Posted May 24, 2013 xdaniel: if( u32(rom_data, 0x1238) == 0x0C00084C ){ regular rom...} else { extended tables... } New release in a few minutes. Or something. EDIT: http://spinout182.com/ar/z64tables_r2.7z Link to comment Share on other sites More sharing options...
wareya Posted May 24, 2013 Share Posted May 24, 2013 6:11 PM 5/23/2013 SECOND RELEASE. MOVE HACK TO code FILE SO NO CRC RECALC ON CHANGED TABLES. 1 Link to comment Share on other sites More sharing options...
mzxrules Posted July 13, 2013 Share Posted July 13, 2013 Did you ever modify the save format so that the extra scenes won't corrupt the game data or no Link to comment Share on other sites More sharing options...
spinout Posted July 14, 2013 Author Share Posted July 14, 2013 I didn't know that additional scenes would corrupt the save... Where is the info on this? Link to comment Share on other sites More sharing options...
DeathBasket Posted July 14, 2013 Share Posted July 14, 2013 The flags for each scene are stored right after the items/equipment/etc. in RAM for the file you're currently playing. I guess if you use a scene number that's higher than what was originally available then you'll start overwriting other things. However, the current scene's flags are always in the same location iirc so you could probably change the code that stores them to not store any flags for scenes over a certain number. I don't know whether there's free space in the game save or it can be expanded or whatever so it could be possible just to move it to unused RAM. Link to comment Share on other sites More sharing options...
Arcaith Posted July 14, 2013 Share Posted July 14, 2013 I was actually thinking about this myself. Wouldn't it be worthwhile to make use of the full 8MB of RAM that the N64 has? I'm sure we can improve the game's overall performance, and also use it for extended data. Link to comment Share on other sites More sharing options...
Recommended Posts