News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Phantasy Star 2 Rom Hacking  (Read 11293 times)

marlin1500

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #20 on: December 29, 2013, 02:58:41 pm »
Thank you that would be awesome.

Tony H

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • The Code Hut
Re: Phantasy Star 2 Rom Hacking
« Reply #21 on: December 29, 2013, 03:05:40 pm »
Finally figured out where the stats are in the ROM for gun damage.  Here's how the game is programmed for gun damage: It gets a value and adds 5C to it, then multiplies it by a value that changes depending on which gun you have (this is the stat we will be changing), then divides it by 64.  This final value is the amount of HP subtracted from the enemy.

Here are ROM addresses for the multiplier values for the Bow Gun, and the Sonic Gun.  I don't know where to buy a Shotgun, so don't have an address for that one yet (although it's address should be fairly close to the others).

Bow Gun multiplier: $0277E6 (normal value is 05)
Sonic Gun multiplier: $0277F2 (normal value is 07)

New Game Genie codes:

AF5T-EWHG
Makes the Bow Gun stronger (does more damage).

AF5T-E6HG
Makes the Bow Gun much stronger (does much more damage).

AF5T-E2HW
Makes the Sonic Gun stronger (does more damage).

AF5T-FEHW
Makes the Sonic Gun much stronger (does much more damage).


Also, made a new code that makes all gun attacks stronger...

1AYA-AAC2
All weapon attacks (guns, etc) inflict more damage.  Doesn't apply to melee weapons (knife, etc).  Can use with the stronger gun codes for even more damage.

RAYA-ACC2
All weapon attacks (guns, etc) inflict much more damage.  Doesn't apply to melee weapons (knife, etc). Can use with the stronger gun codes for even more damage.

I'll update/correct the codes on my site shortly.
« Last Edit: December 29, 2013, 05:42:41 pm by Tony H »
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

marlin1500

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #22 on: December 29, 2013, 08:32:26 pm »
Thanks but the genie codes don't seem to work.  Just to clarify $0277F2 = 000277F0 (2)

Tony H

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • The Code Hut
Re: Phantasy Star 2 Rom Hacking
« Reply #23 on: December 29, 2013, 09:07:46 pm »
Thanks but the genie codes don't seem to work.  Just to clarify $0277F2 = 000277F0 (2)

I just tested all of the Game Genie codes again, and they work fine. Keep in mind that I didn't go very high with the values (didn't want to make the game too easy). Here is an example of the increase of damage with the code that makes the Sonic Gun much stronger (AF5T-FEHW): Without the code I did 7 damage, with the code I did 18 damage.  When I used that code together with the "All weapon attacks" code (RAYA-ACC2), I think I did 56 damage.  I'm using the codes at the very beginning of the game.

If the codes don't work for you, you may have a different version of the ROM.  Make sure you are NOT using the "REV A" ROM. The CRC-32 checksum for the correct ROM is: 0D07D0EF.

Also keep in mind that the new codes don't change the ATK stat for your character.

December 29, 2013, 09:10:30 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
EDIT:
When you say  "Just to clarify $0277F2 = 000277F0 (2)", I'm not sure what you mean. If you go to ROM address $000277F2, the value there should be 07.  Changing that to a higher value will make the Sonic Gun stronger.
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

marlin1500

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #24 on: December 30, 2013, 12:22:01 am »
Any chance you have a link to the correct rom the one,as unfortunately the one I have has a checksum of B4146066.  I got it from here (REMOVED).

The one I downloaded was the US/PAL version.  You may just be able to send me the Hex block for the guns as they should be the same or very similar and I can find them in my version.

I just realised have been using the "Rev 2" rom but even with it stock the checksum is B4146066.
« Last Edit: December 30, 2013, 02:50:33 pm by KingMike »

Tony H

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • The Code Hut
Re: Phantasy Star 2 Rom Hacking
« Reply #25 on: December 30, 2013, 01:22:05 am »
Here's how to find the right ROM address with your ROM:

Open up your ROM with a hex editor. Search for this hex string: 0501B6. There should only be 1 match. The "05" in that string is the value for the Bow Gun damage.

For the Sonic Gun, search for this hex string: 0701B6. There should only be 1 match. The "07" is the value for damage.
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

marlin1500

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #26 on: December 30, 2013, 02:10:20 am »
Thank you your awesome, my rom version has 07B6 I assume the middle hex value is number of hits, all the names and stats in the one I sent to you are in to parts.  See below an example.
Fire Ant(name) at  00017DD0(04 - 07) & 00015DD0(04 - 07).  I refer to the hex number of the line then have the columns in brackets which is why I was a big confused before.

Don't change the 01 in 0701B6 it causes the game to crash.  The shotgun is 0A02B6 so there must be another mechanic for number of shots and effects.
« Last Edit: December 30, 2013, 02:23:26 am by marlin1500 »

Tony H

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • The Code Hut
Re: Phantasy Star 2 Rom Hacking
« Reply #27 on: December 30, 2013, 09:36:26 am »
I found part of the problem with your ROM... it's in the wrong format. It's in the "smd" format, but should be in the "bin", "md" or "gen" format. That's why names and stats are in parts when you look at them with a hex editor. If the ROM is in bin format, everything will be much easier to see. You can either get a conversion program online to convert it from smd to bin, or you can use Google to find and download a ROM that's already in bin, md or gen format. There's a conversion program here: http://www.romhacking.net/utilities/383/

Just for future reference, you should never use ROMs in smd format.

December 30, 2013, 09:55:17 am - (Auto Merged - Double Posts are not allowed before 7 days.)
EDIT: Here are some new shotgun codes...

AK5T-FAH8
Makes the Shotgun stronger (does more damage).


AK5T-FRH8
Makes the Shotgun much stronger (does much more damage).
« Last Edit: December 30, 2013, 09:55:17 am by Tony H »
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

marlin1500

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #28 on: January 01, 2014, 04:57:54 am »
Thanks made the changes I want, doubled all monster hp and made the guns viable.  Also Nei has slasher animations and Anna has a gun animation.  Amy only has pistol animations so I changed the shot weapons to be pistols, including the silent shot by given it a damage value and removing the sleep factor.  Hugh has normal gun animations.

Shir has the same animations as amy as well.  If you want make nei use slashers her weapon user code is 02, Anna's is 20 so add them together for 22 and Nei and Anna can use the same weapon.

January 02, 2014, 07:11:01 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Is anyone else interested in what I have found out of the PS2 rom? I am happy to share.

Nei also has knife animations if you want to give her knifes etc, I am playing numan revolution so the weapon purchase order is different.

Hey Tony could you work out where the slashers work so instead of only hitting a single group of one type of monster they hit every enemy like they do in PS4?
« Last Edit: January 03, 2014, 09:52:16 am by marlin1500 »

marlin1500

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #29 on: January 09, 2014, 06:35:55 am »
Again does anyone know how to make the group attack weapons like slashers attack 2 different monster types as per PS4?
Also does anyone know how to give max hp & tp at level up instead of random amounts?
Tony K can you have a go at working out how to determine what gives an item such as Storm gear a technique attached to it?
I have made a great deal of progress with the help of Tony K and others in determining the Offsets of PS2.

tryphon

  • Hero Member
  • *****
  • Posts: 722
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #30 on: January 09, 2014, 06:54:20 am »
I have made a great deal of progress with the help of Tony K and others in determining the Offsets of PS2.

I'm currently studying the ROM (partial dissassembly, using Ida), from another point of view (I work on dialogs, trying to bypass some size limitations, and events, trying to modify slightly the flow of the game in order to make a decent Nei resurrection ; doing this, I try too to include custom items).

You could spare me some time sharing these offsets. Would it be possible?

I have too some infos to share, it's likely I will find sooner or later how to add a technique to an item. I can have a look at how the TP and HP are computed.

January 09, 2014, 08:49:47 am - (Auto Merged - Double Posts are not allowed before 7 days.)
I have found where the program computes the new max HP and max TP (and also all other stats).

The part of the routine is located from 0xF3A0 to 0xF3BC (in the same routine, all others stats are updated).

Basically, it looks for a value in a table (starting at 1619E, with offsets according to character), then compute a random multiplier between 0.5 and 1.5, and multiply the value by this multiplier. Then add it to the current stat.

Do you want to remove this random multiplier ? For all stats ?
« Last Edit: January 09, 2014, 08:49:47 am by tryphon »

Tony H

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • The Code Hut
Re: Phantasy Star 2 Rom Hacking
« Reply #31 on: January 11, 2014, 02:51:32 pm »
Again does anyone know how to make the group attack weapons like slashers attack 2 different monster types as per PS4?
Also does anyone know how to give max hp & tp at level up instead of random amounts?
Tony K can you have a go at working out how to determine what gives an item such as Storm gear a technique attached to it?
I have made a great deal of progress with the help of Tony K and others in determining the Offsets of PS2.

I'd be more than happy to help, but here's the problem... I'm not familiar with PS2 at all. I've played it enough to make all the Game Genie codes, but that's it. I have no idea what you mean when you mention group attack weapons, or items having a technique attached to it. I enjoy finding this kind of stuff in the ROM, but getting familiar enough with PS2 to figure that stuff out would probably take lots of time.  Will let you know if I figure anything out.
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

marlin1500

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #32 on: January 29, 2014, 03:55:20 am »
Thanks Tony been flat out with work, I think I am close to working out where item special abilities are in the rom.  What I would like to know know is how to work out to give max hp and tp on level up as I have double or in some cases triple monster hp, in the stock game the hp and tp level up tables are modified by 0.5 or 1.5.

January 30, 2014, 08:04:17 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Now have double HP and TP granted per level, as you can set techniques to effect every enemy on the screen regards of type I should be able to do the same with weapons.
« Last Edit: January 30, 2014, 08:04:17 am by marlin1500 »

tryphon

  • Hero Member
  • *****
  • Posts: 722
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #33 on: January 30, 2014, 04:50:42 pm »
Not related to what you're doing, but related to the thread's title, I'm currently updating the Phantasy Star II page on the wiki, especially the Notes page (but there will be soon partial ROM and RAM maps). Feel free to contribute.

marlin1500

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #34 on: January 31, 2014, 05:40:48 am »
Awesome I will have heaps of stuff for you.

February 02, 2014, 06:31:48 am - (Auto Merged - Double Posts are not allowed before 7 days.)
I'm currently studying the ROM (partial dissassembly, using Ida), from another point of view (I work on dialogs, trying to bypass some size limitations, and events, trying to modify slightly the flow of the game in order to make a decent Nei resurrection ; doing this, I try too to include custom items).

You could spare me some time sharing these offsets. Would it be possible?

I have too some infos to share, it's likely I will find sooner or later how to add a technique to an item. I can have a look at how the TP and HP are computed.

January 09, 2014, 08:49:47 am - (Auto Merged - Double Posts are not allowed before 7 days.)
I have found where the program computes the new max HP and max TP (and also all other stats).

The part of the routine is located from 0xF3A0 to 0xF3BC (in the same routine, all others stats are updated).

Basically, it looks for a value in a table (starting at 1619E, with offsets according to character), then compute a random multiplier between 0.5 and 1.5, and multiply the value by this multiplier. Then add it to the current stat.

Do you want to remove this random multiplier ? For all stats ?

PM me your email and I will send you everything I have, not its all over the shop but just ask me if you can't work anything out.
« Last Edit: February 02, 2014, 06:31:48 am by marlin1500 »

marlin1500

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #35 on: November 05, 2015, 05:03:48 am »
Hi does anyone have a rom dump yet for PS2?

tryphon

  • Hero Member
  • *****
  • Posts: 722
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #36 on: November 05, 2015, 05:54:04 am »
Lorenzo posted a complete disassembly of the game, fully recompilable. Check documents pages.

marlin1500

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Phantasy Star 2 Rom Hacking
« Reply #37 on: November 05, 2015, 07:07:09 am »
Thanks above my head, I'm only good at Hex editing, does anyone have a dump as per below for PS4?
http://www.wrftpb.com/psiv/

November 06, 2015, 07:29:50 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I am after where the techique affects are I have mapped out most of the rest of rom, let me know if anyone wants any help.

November 10, 2015, 08:41:14 am - (Auto Merged - Double Posts are not allowed before 7 days.)
If anyone is interested I just checked if you can use Neifirst as a normal monster and it appears you can, i am running the Numan Revolution mod, but I assume it works with the stock rom as well.  Her code is 7C, I only fought 1 of her with 3 pythons at once.  I'll test tomorrow if you can fight multiple "Neifirsts" at once, given her sprite I think 3 will be the max.  For a challenge I gave her 8000hp.

This should also mean you can fight Dark Force & Mother brain as normal monster to.

Link below to Neifirst & 2x Neithird.
http://postimg.org/image/8xpzgdfsx/

Works fine with no bugs.
« Last Edit: November 18, 2015, 06:22:22 pm by marlin1500 »