I posted about it in the General Screenshots thread as a quick preview but I figured I should 'probably' get a topic going on this now since it's going full force at the moment.
What this mini project thing is doing is allowing a 6th fully playable PC into the party, in my friend and I's case, Daisy.
The menu was actually pretty difficult to add her in. I 'technically' have enough room for a 7th PC too but that won't happen until I can figure out all the assets of the 6th PC first.
What had to be done:
1. The menu had to have a lot of it's HDMA data shoved around due to adding Daisy. All PC stats seem to be covered by it so Daisy's would end up overwriting into Layer 1's area and screwing everything up. Had to shuffle the boxes data I believe to an area that's used in the item menu and ONLY the item menu, so they overwrite each other as needed.
2. Hand palette sprite had to be moved to a new area as well along with the blinking arrows on various screens due to Daisy's overwriting it. I might see in the future soon if I can make them into Layer 3 bits instead to save another palette.
3. Item data was interesting. The game apparently already had 6 slots for item comparison. Daisy's value being '20'. Thanks to Lazyshell, that made it a quick process as a test to make her use all of Peach's items, which now work fully from what I can see.
4. PC Level tables had to be completely shuffled around to add in Daisy and I had to alter their code just a 'tiny' bit to allow use for 6 PCs. I'm thinking I'll redo this code sometime later to make it easier to dictate areas for each PC stats to make it much easier to mess with.
5. PC Names of course had to be moved as well. No room for adding in Daisy.
6. Sprite data routines had to heavily be altered to an extent. The main code is the same but how it gathered each sprites Bank was redone completely to allow TOTAL bank usage in any area of the game now. This was one of 'the' biggest problems considering it seems the big graphics routine is actually in an area that no debugger can seemingly trace due to how the game is handled in each emulator. No$SNS seems to be able to view it properly but since I can't really trace log..didn't help me in the long run. I had to manually find it since it used the same bank code as the menu PC sprites, thankfully.
7. All dialogue in the game has been shoved into the expanded area of the ROM and the bank swapping occurs automatically very quickly when each letter is loaded. There HAVE been a few issues with this and I'm incredibly uncertain if they're fixed at the moment. So far, I 'think' it's okay but that won't be known until a full playthrough of the game is done later. But with this, dialogue now has A LOT more room to be expanded.
8. Adding in Daisy's sprites as well. She literally mimics Peach quite nicely at the moment since they're so similar in graphic style. Obviously things will change as this progresses but so far it's working nicely.
9. I had to alter how the game loaded battle sprites and menu sprites as well for Daisy. Daisy's data uses two bytes of code while the game was trying to force only one byte usage which caused a huge number of problems. This has been remedied so now it's a lot easier to allow new sprites into the game, though, room is still very restricted. If possible and if it doesn't effect gameplay at all, I'd prefer to have ALL the enemy graphics compressed to save even more room. I'm thinking this shouldn't be too much of a problem as many games tend to go this route, so we'll have to see on it!
10. Battle sprites were horrifying to do. A lot of the animation code FORCES a certain PC graphic bit so I had to dissect it manually to understand how it worked. I had to use Mario's code as a base.. for some unknown reason. Any other one's animation code would cause her to turn into Bowser regardless of what was going on. With that though, she still runs just like Peach and as far as I can see, all generic animations have been updated to work for her.
11. The Equipment data in RAM had to be shuffled down further. The game's stats for PC's go consecutively and Daisy's would overwrite the Equipments. So Equipment got moved down and now Daisy takes it's place. Everything works fine in battle and in the menu along with collecting/deleting items. No worries there.
12. SRAM, sadly, had to be slightly changed. The current location the saved game is on got moved to a blank byte that was always transferred in there to accommodate for space. With that, this allows possibly even 7 PC values to be stored although old saved files are not able to be used unless you update SRAM manually, which is just a simple byte change and then moving the PC values back two, no biggy.
13. Battle PC values had to be moved to a blank byte since the graphic pointers were being used RIGHT behind it and Daisy clearly needed two bytes. That's been remedied and works just fine.
What has to be done:
1. The biggest obvious factor here are animation scripts for items and FP attacks. There is clearly not enough room to add her data in there so I'll PROBABLY have to throw that into another area to compensate. This will probably happen last as it's one of the biggest problems I'll encounter.
2. Full playthrough to scan for bugs. My biggest worry is how the bank swap on text that uses compression (AKA: Mario, I, Booster, etc..) caused a variety of sprite bugs for an unknown reason. Since the sprite code is in an area that cannot be traced due to emulation bug, it makes it near impossible to fix so this has to be watched extremely closely. Right now it seems okay but it could happen again. And if it does, we're in real trouble.
3. Obviously have to do a way to add her into the game! Can't do anything extravagant at the moment since there's no room to use but maybe in the future a whole new area could be added just to get her as well.
4. Balancing her out and her level up stats. I plan to have her stats start at Level 1 and continue up JUST so we know how exactly strong she will be when she gets added into the party at whatever level. She will NOT be a Peach clone and she will not be a super magic attacking person like Mallow's stats add him up to be.
5. Fully updating Lazy Shell to accommodate for all the changes done into the game. Right now, dialogue works, items work, names work, level up stats work, etc.. The only problem so far is the graphics in Lazy Shell. I had to nix the old bank code completely in the ROM to allow flexible banking but I'm not sure exactly how Lazy Shell is handling it. I'm not a programmer in anything but 65816 ASM so it's incredibly difficult for me to dissect.
But that is all for now! This'll be updated as progress goes but it's relatively slow at the moment!