Phantasy Star Disassemblies

Discuss anything related to the Phantasy Star series

Re: Phantasy Star Disassemblies

Postby Zucca » Fri Nov 10, 2017 10:00 am

lorenzo wrote:As far as I know the .ips format is the most popular.
Ok thanks.

I'll be working on the last feature that is creating the patches. But that'll be finished later.
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Re: Phantasy Star Disassemblies

Postby Zucca » Fri Nov 10, 2017 12:19 pm

I think this script could be used on windows too under the "Linux runtime" or whatever it was named. The one where you get *NIX shell.
The script would need only few modifications. The main one being choosing asw instead of asl for the asm compiler. Users would then need to specify --p2bin and optionally --fixheader too.

The problem is that I don't have such new windows intallation in any computer. Not even virtual.
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Re: Phantasy Star Disassemblies

Postby Zucca » Fri Nov 10, 2017 4:52 pm

Since I'm in fire today (and have plenty of coffee)...
Code: Select all
zucca@wren ~/psbuild/mdps-asm-builder $ ./build.sh ../ps2disasm/ps2.asm /tmp/ps2.bsdiff /tmp/ps2.bin /tmp/ps2.xdelta
Path patch applied...
Source compiled...
Succesfully created the binary.
Binary header left unfixed.
BSDiff created to '/tmp/ps2.bsdiff'...
Xdelta created to '/tmp/ps2.xdelta'...
Binary created to '/tmp/ps2.bin'.

So. User only needs to give it the input assembly file and then it can create a binary or patch out of it. OR as above, all of them.

I was unable to find any ips patch creation utility for Linux. :( Maybe later...

I'll test the script over the weekend.
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Re: Phantasy Star Disassemblies

Postby Zucca » Sun Nov 12, 2017 2:27 am

I've also started a new, experimental, challenge-mode branch for PSII.

Time will tell if it's gonna evolve...
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Re: Phantasy Star Disassemblies

Postby Zucca » Sun Nov 12, 2017 7:44 pm

@lorenzo: I'd like to try and split out enemy data into different files. I've already made a test where I cut out enemy formation subroutines and pasted them in to a seperate file. Then I added include at the same place where the data was to point to that new file.
The compilation fails.
Now looking at the files that have been included succesfully... those aren't exactly pure assembly. Right?
So is there a way to tell the AS assembler to include a "cut file"?

If this is possible I'll try to come up with a some sort of awk script that sorts the enemy data to more "human readable" way. Kinda same way as you have done for FireAnt.

EDIT: Include line must be started with space character. :naughty: Solved.
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Re: Phantasy Star Disassemblies

Postby Zucca » Fri Nov 17, 2017 10:42 pm

I started to test out all kinds of things with the PSII disassembly.
Adding extra dialogs was first thing. I actually created a small script that takes plain text and transforms it into m68k assembly ready just to be copy pasted.

Next thing I tried was to take one of the unused enemies - S with id of 28. I placed Neifirst graphics for it and changed the palette a bit. The animation wasn't in place, so I copied the four unknown bytes from Neifirst - nothing. After that I copied the second to last byte from Neifirst, $7C, (that always matches with the enemy id) and BANG! I now have a working "Neifirst minor". That byte (and possibly the last one too) must have something to do with animation placement and which frames to display. Before, my "Neifirst minor" was shivering with the sword in the air and the normal attack animation moved the "force field" on top of left upper blue box for a frame or two.

Here's the diff for those curious.

Anyone else played with the disassemblies and tried to add new enemies etc?
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Re: Phantasy Star Disassemblies

Postby Doctor Hooves » Sat Nov 24, 2018 2:42 pm

Is it possible to give items new uses in the PSII disassembly? I know you can edit already-existing techniques in items, like make the Fire Staff cast Gifoi instead of Foi, and so on, but can you give previously unusable items technique-effects?
User avatar
Doctor Hooves
Blastoid
Blastoid
 
Posts: 237
Joined: Sun Jan 12, 2014 2:08 pm
Location: Frigidia

Re: Phantasy Star Disassemblies

Postby lorenzo » Sun Nov 25, 2018 1:35 pm

Try to add it in the section right above the label ItemUsed_NoEffect. You will see the following code

Code: Select all
   lea   (ItemUsedIndex-$5C).l, a2
   cmpi.w   #ItemID_AmberRobe, d0
   bcs.s   loc_25FA
   beq.w   ItemUsed_GiresGear
   cmpi.w   #ItemID_Crystanish, d0
   beq.w   ItemUsed_GraGear
   cmpi.w   #ItemID_CrystCape, d0
   beq.w   ItemUsed_GraGear
   cmpi.w   #ItemID_CrystChest, d0
   beq.w   ItemUsed_GraGear
   cmpi.w   #ItemID_Aegis, d0
   beq.w   ItemUsed_GiresGear
   cmpi.w   #ItemID_GrSleeves, d0
   beq.w   ItemUsed_GrSleeves
   cmpi.w   #ItemID_TruthSlvs, d0
   beq.w   ItemUsed_GiresGear
   cmpi.w   #ItemID_FireStaff, d0
   beq.w   ItemUsed_FireStaff
; ---------------------------------------------------------------
ItemUsed_NoEffect:


Add a cmpi instruction with the new item; then branch to the location where you set the technique. For example if you want to have the item cast Gires, branch to ItemUsed_GiresGear, otherwise you need to add new code with the new technique. It should be easy to do if you check out the other ItemUsed_ examples.
lorenzo
Blastoid
Blastoid
 
Posts: 92
Joined: Thu Dec 25, 2014 12:57 am
Location: Italy

Re: Phantasy Star Disassemblies

Postby Doctor Hooves » Sat Dec 01, 2018 2:26 pm

I tested it out, yet no items had a new use, are byte limits causing that? Anyways, I don’t actually think any more items need to be given uses.

On the matter, how do you fix the old man in Paseo giving one of Lutz’s line?

I think I’ll make changes to dialogue in some parts, like the NPC in Arima magically knowing about the rebels having two more dynamite sticks.
User avatar
Doctor Hooves
Blastoid
Blastoid
 
Posts: 237
Joined: Sun Jan 12, 2014 2:08 pm
Location: Frigidia

Re: Phantasy Star Disassemblies

Postby lorenzo » Sat Dec 01, 2018 3:28 pm

Did you change the bit for the item that enables you to use it in battle? You need to set the 5th bit to 1 on byte 13 for any item. The logic to use items as techs is a little weird; I think it can be made more simple.

I gave the old man an unused line. Go to loc_E6B0: and you should see a comment below saying there's a wrong pointer. I changed $94 to $96.
lorenzo
Blastoid
Blastoid
 
Posts: 92
Joined: Thu Dec 25, 2014 12:57 am
Location: Italy

Re: Phantasy Star Disassemblies

Postby Doctor Hooves » Sat Dec 01, 2018 6:58 pm

Ah, yeah, I managed to make it work, by giving a new headgear for Nei (Lacon Ribbon) the effect of Sar. I also plan on giving some other items new abilities, but nothing extreme.

Fixed that.
User avatar
Doctor Hooves
Blastoid
Blastoid
 
Posts: 237
Joined: Sun Jan 12, 2014 2:08 pm
Location: Frigidia

Re: Phantasy Star Disassemblies

Postby lorenzo » Sat Dec 01, 2018 8:50 pm

That's good to hear! I will also check out your hack at some point.
lorenzo
Blastoid
Blastoid
 
Posts: 92
Joined: Thu Dec 25, 2014 12:57 am
Location: Italy

Re: Phantasy Star Disassemblies

Postby Zucca » Fri May 31, 2019 7:24 pm

Doctor Hooves wrote:Ah, yeah, I managed to make it work, by giving a new headgear for Nei (Lacon Ribbon) the effect of Sar. I also plan on giving some other items new abilities, but nothing extreme.


Nice.

My progress on creating harder PSII has been stalling. :(
I may start from scratch some day. As Lorenzo's diassembly has seen some updates It might be easier to edit the source.
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Re: Phantasy Star Disassemblies

Postby Doctor Hooves » Tue Oct 13, 2020 6:45 pm

I noticed that the Portuguese/Brazillian names have been included in the PSII disassembly. If I only edit the English names, my patch will only produce an English/American rom hack, right? Thanks.
User avatar
Doctor Hooves
Blastoid
Blastoid
 
Posts: 237
Joined: Sun Jan 12, 2014 2:08 pm
Location: Frigidia

Re: Phantasy Star Disassemblies

Postby Doctor Hooves » Sun Oct 18, 2020 11:39 am

I noticed there were some empty and blank techs in PSII. I tried to transform them, like creating the Wat technique by adding certain properties to the tech.

Surprise! It works! There are 11 unused techs in total. I have 7 techs in mind, and might use the remaining four letter on.

EDIT: Okay, turns out that it isn’t as easy as it looks. You have to modify the technique and its properties. This was fine for the first unused tech, but the remainder? No. I added them to the constonants, and make sure they had the correct values, but still wouldn’t work. I’ll try again soon.
User avatar
Doctor Hooves
Blastoid
Blastoid
 
Posts: 237
Joined: Sun Jan 12, 2014 2:08 pm
Location: Frigidia

Previous

Return to Phantasy Star

Who is online

Users browsing this forum: No registered users and 6 guests

cron