11 March 2016 - Forum Rules
Started by redmagejoe, December 10, 2019, 03:09:14 AM
C0 Fire CA Confuse D4 Cure DE MiniC1 Thunder CB Blind D5 Life DF SilenceC2 Blizzard CC Curse D6 Basuna E0 SapC3 Scourge CD Toad D7 Esuna E1 FogC4 Drain CE Break D8 Barrier E2 SlowC5 Osmose CF Death D9 Blink E3 SwapC6 Flare D0 Warp DA Protect E4 FearC7 Sleep D1 Berserk DB Shell E5 HolyC8 Stun D2 Haste DC Wall E6 TeleportC9 Stop D3 Aura DD Dispel E7 Ultima
Quote from: Cyneprepou4uk on December 10, 2019, 04:18:01 AMKids these days, can't do anything without a disassembly.
Quote from: Lenophis on December 10, 2019, 08:57:46 AMA complete disassembly was not made. I should know. I do have some hacking bytes, but it's not complete, or anything like you're looking for. The only code I've tangled with is what made the DTE Fixer Upper patch. I haven't really hacked FF2 in a while.
Quote from: Jiggers on December 13, 2019, 04:24:04 PMOne thing you'll want to do is make sure that a disassembly can be re-assembled after edits. I've been absolutely spoiled by FF1's, but its SO much easier to work with than trying to make changes where you can't just shift the whole game by 2 bytes and change every single pointer and jump address in the process.
Quote from: abw on December 13, 2019, 06:24:13 PMActually, a quick search of the internet turned up https://taotao54321.github.io/appsouko/work/CDL/pub/, which appears to have a mostly complete CDL file of "FF2", which I'm hoping means "Final Fantasy II". I plugged it in and played the game for a couple of minutes and FCEUX didn't change anything, so maybe it's legit? How does this look?
600000 - $01 = Pirate Ship Visible, triggers animation/fight scene? $02 = in control of pirate ship01 - Pirate Ship X position02 - Pirate Ship Y position03 - $C0 when riding ship in animation, $10 when in control of pirate ship?04 - $01 - Airship Visible. $02 = trigger animation? $04 = in control of airship05 - Airship X position06 - Airship Y position07 - Airship Flyover Animation Counter? 08 - $02 = On chocobo! $80 = Chocobo Animation? 09 - Chocobo X position (for animation?)0A - Chocobo Y position (for animation?)0B - 0C - Ship Usable0D - Ship X position0E - Ship Y position0F - 10 - Player Overworld Position X (for saving)11 - Player Overworld Position Y (for saving)12 - Constantly read when moving in town ($36)13 - 14 - Giant Airship Visible15 - Giant Airship X position16 - Giant Airship Y position17 - 18 - 19 - 1A - Key Item inventory? $02 when given Scott's Ring1B - 1C - Gold low byte1D - Gold middle byte1E - Gold high byte1F - Battle Text Speed (-1 from option chosen on game start)20-3F - Seems to be treasure chest contents. Everything starts full, at $FF. Opening the chest south of the room you start in decrements 6022 to $FE. #256 chests total in the game?40-5F - Game event flags6042 - Starts $8B, turns to $8A when given Scott's Ring 6046 - Starts $7F, turns to $7E when using Wild Rose on bartender in third town. Then to $7C when given Scott's Ring. Flags character sprites vanishing?60-7F - Items80-8F - Passwords - Password IDs starts at $F1 and ends at $FF6100 - Character stats, $40 per character00 - Character ID - portrait, sprite 00: Firion 01: Maria 02: Guy 03: Minwu 04: Josef 05: Gordon 06: Leila 07: Ricard 08: Leon01 - Ailment 01: Blind 02: 04: Venom 08: Cursed 10: Amnesia 20: Toad 40: Stone 80: Dead 02 - Name Letter 103 - Name Letter 204 - Name Letter 305 - Name Letter 406 - Name Letter 507 - Name Letter 608 - Current HP low byte09 - Current HP high byte0A - Max HP low byte0B - Max HP high byte0C - Current MP low byte0D - Current MP high byte0E - Max MP low byte0F - Max MP high byte10 - Strength - not shown in menu11 - Agility - not shown in menu 12 - Stamina - not shown in menu13 - Intellect - not shown in menu14 - Spirit - not shown in menu15 - M. Power - not shown in menu16 - Min Accuracy %17 - Max Accuracy %18 - Attack19 - Head (Item ID)1A - Body (Item ID)1B - Hands (Item ID)1C - Right Hand (Item ID)1D - Left Hand (Item ID)1E - Item 1 (Item ID)1F - Item 2 (Item ID)20 - Strength21 - Agility22 - Stamina23 - Intellect24 - Spirit25 - M. Power26 - Defense27 - 28 - 29 - 2A - Min Evasion %2B - Max Evasion %2C - Min M. Resist % 2D - Max M. Resist %2E - 2F - 30-3F - Known spell slots (Usable spell IDs start at $C0, end at $E7?)Weapon skills:$10 per character, in $40 byte intervalsLevels are -1, where 00 = level 1Both should cap at $636200 - Firion's weapon Skills 6240 - Maria's weapon skills6280 - Guy's weapon skills62C0 - Character 4's weapon skills?00 - Unarmed level01 - Unarmed experience02 - Shield level03 - Shield experience04 - Dagger level05 - Dagger experience06 - Staff level07 - Staff experience08 - Spear level09 - Spear experience0A - Sword level0B - Sword experience0C - Axe level0D - Axe experience0E - Bow level0F - Bow experience6235627562B562F5 - Row ; 0 = back row, 01 = front row, 80 = no character portrait visible in menus
QuoteWeapon skills:$10 per character, in $40 byte intervalsLevels are -1, where 00 = level 1Both should cap at $63
Quote from: redmagejoe on December 13, 2019, 08:39:29 PMShouldn't the levels cap at 0F, for 15? Max spell and weapon levels are 16.
QuoteEvasion and Magic Defense should cap at 16 (whether that's $0F or $10 I don't know), and I haven't tested if they can still go up. There'd be no easy way to test that, as there's no message stating they go up and you'd only be able to tell from looking at your stat windows 2 battles later.
0x001C7F|$00:$9C6F:A2 3F LDX #$3F ; control flow target (from $9CA2)0x001C81|$00:$9C71:BD 80 8F LDA $8F80,X0x001C84|$00:$9C74:9D 00 61 STA $6100,X0x001C87|$00:$9C77:BD 00 90 LDA $9000,X0x001C8A|$00:$9C7A:9D 40 61 STA $6140,X0x001C8D|$00:$9C7D:BD 80 90 LDA $9080,X0x001C90|$00:$9C80:9D 80 61 STA $6180,X0x001C93|$00:$9C83:BD 80 8F LDA $8F80,X0x001C96|$00:$9C86:9D C0 61 STA $61C0,X0x001C99|$00:$9C89:BD C0 8F LDA $8FC0,X0x001C9C|$00:$9C8C:9D 00 62 STA $6200,X0x001C9F|$00:$9C8F:BD 40 90 LDA $9040,X0x001CA2|$00:$9C92:9D 40 62 STA $6240,X0x001CA5|$00:$9C95:BD C0 90 LDA $90C0,X0x001CA8|$00:$9C98:9D 80 62 STA $6280,X0x001CAB|$00:$9C9B:BD C0 8F LDA $8FC0,X0x001CAE|$00:$9C9E:9D C0 62 STA $62C0,X0x001CB1|$00:$9CA1:CA DEX 0x001CB2|$00:$9CA2:10 CD BPL $9C71 0x001CB4|$00:$9CA4:60 RTS
; indirect control flow target0x03A1BF|$0E:$A1AF:A9 10 LDA #$10 0x03A1C1|$0E:$A1B1:D0 0A BNE $A1BD ; indirect control flow target0x03A1C3|$0E:$A1B3:A9 11 LDA #$11 0x03A1C5|$0E:$A1B5:D0 06 BNE $A1BD ; indirect control flow target0x03A1C7|$0E:$A1B7:A9 14 LDA #$14 0x03A1C9|$0E:$A1B9:D0 02 BNE $A1BD ; indirect control flow target0x03A1CB|$0E:$A1BB:A9 13 LDA #$13 ; control flow target (from $A1B1, $A1B5, $A1B9)0x03A1CD|$0E:$A1BD:85 80 STA $80 0x03A1CF|$0E:$A1BF:A5 F0 LDA $F0 0x03A1D1|$0E:$A1C1:29 C0 AND #$C0 0x03A1D3|$0E:$A1C3:05 80 ORA $80 0x03A1D5|$0E:$A1C5:AA TAX 0x03A1D6|$0E:$A1C6:BD 00 61 LDA $6100,X0x03A1D9|$0E:$A1C9:18 CLC 0x03A1DA|$0E:$A1CA:69 0A ADC #$0A 0x03A1DC|$0E:$A1CC:C9 64 CMP #$64 0x03A1DE|$0E:$A1CE:90 02 BCC $A1D2 ; code -> unknown0x03A1E0|$0E:$A1D0:A9 63 ; LDA #$63 0x03A1E1|$0E:$A1D1:63 ; INVALID OPCODE; unknown -> code; control flow target (from $A1CE)0x03A1E2|$0E:$A1D2:9D 00 61 STA $6100,X0x03A1E5|$0E:$A1D5:BD 10 61 LDA $6110,X0x03A1E8|$0E:$A1D8:18 CLC 0x03A1E9|$0E:$A1D9:69 0A ADC #$0A 0x03A1EB|$0E:$A1DB:C9 64 CMP #$64 0x03A1ED|$0E:$A1DD:90 02 BCC $A1E1 ; code -> unknown0x03A1EF|$0E:$A1DF:A9 63 ; LDA #$63 0x03A1F0|$0E:$A1E0:63 ; INVALID OPCODE; unknown -> code; control flow target (from $A1DD)0x03A1F1|$0E:$A1E1:9D 10 61 STA $6110,X
Quote from: abw on December 15, 2019, 04:35:56 PMI put a few hours into creating an updated version of my disassembly, marking in some CHR, the main dialogue, unused code paths, a bunch of pointer tables, probably most of the inter-bank references, formatting some of the larger data blocks, a teeny-tiny bit of documentation on a couple of routines (mostly the ones involving bank swaps), stuff like that. It's still pretty rough, but should make any code changes that you want easier to make.
Quote from: redmagejoe on December 15, 2019, 05:15:26 PMThis is great, abw. I'm going to start looking through this and see if I can work with what's provided while I've got some downtime between work projects. The main issue is knowing where to even begin looking to make changes, I'll admit. Once I have an idea of where the relevant routines are for handling stat level up checks at the end of battle, I'll have a much better idea how to move forward.
Page created in 0.083 seconds with 19 queries.