Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - DLPB

Pages: [1] 2 3 ... 7
Completely unrelated / Yuzo Koshiro Interview
« on: 2018-02-21 14:38:41 »

I always like these kinds of things.  It's nice to hear from guys like this.  They formed part of our childhood without us realizing it at the time.  I knew his music was among the best back then too...  You could tell.  Also, since his copyright credit was always displayed on the title screen, he was the only japanese composer I had any idea about for years.

It's interesting that he notes his influences as Western rock/dance.  Uematsu is also heavily influenced by Western artists, such as Elton John.  And you can definitely hear certain tracks having been influenced by certain songs.  Like Red XIII theme intro sounding similar to, and maybe being influenced directly by, Apache (my view).

What originally influenced me was... American and British music. It feels kind of strange to hear those people say they like my music. I think, “But it was your music originally!”

Aali and 7h can load individual files from your hd outside of the archives. At the moment my mod manager is sleek and simple but it really could benefit from this feature. Without hooks I've managed to load the archives from new locations but i do not understand in any way shape or form how id make ff7 locate say aaaa.hrc on my hd instead of out of char.lgp. in fact im not even sure if ff7 loads all the files contained within to memory. It seems to? Are 3rd party dll hooks the only way of doing this or can i rewriteva ff7 function or two. I'd prefer the latter since 7h is chocabloc with 3rd party dlls.

My own dll can intercept functions if need be - but at the moment, all I've managed to do is locate and change path at the memory location the actual archives are loaded.  The functions related to that are a complete mystery to me.

I'm not really sure if I need to preserve edi,ebx,esi here.  Didn't check.

Still this nifty replacement I've made for the Enemy Skill mask ensures that, from now on, the enemy skills MISSING from the total are what count, not the ones that are PRESENT.  See, originally, if one of your characters had a full enemy skill set, it would then stop all other enemy skills from learning all abilities. And if one of the materias had, say, Frog Song, then none of the others without it would gain it either.

Code: [Select]
Procedure CreateEnemySkillMask5CFB93; stdcall;

push ebx
push esi
push edi

xor edi,edi
mov esi,$00FFFFFF

mov ecx,[esp+$10] //Starting address of character materia

xor ebx,ebx


cmp ebx,8
je @Label5

test edi,edi
jne @Label3
  mov eax,[ecx+ebx*4+$40] // Retrieve Materia ID and AP in Weapon slot.
  jmp @Label4
  mov eax,[ecx+ebx*4+$60] // Retrieve Materia ID and AP in Armour slot.

cmp al,$FF //If no materia in slot, then jump to next slot.
je @Label2

xor edx,edx
mov dl,al
imul edx,edx,$14
mov dl,[edx+$DBDF6D] //retrieve formula ID for materia
and dl,$F
cmp dl,7  //materia is Enemy Skill
jne @Label2

shr eax,8
and esi,eax
or esi,$80000000

inc ebx

jmp @Label1

  test edi,edi
  jne @End
    inc edi
    jmp @START


mov eax,esi

pop edi
pop esi
pop ebx


Not rigorously tested yet, but seems to work.

NFITC1 has done the rest, so gave him a little head start with this one.  It's more or less complete aside from a few unknown flags and their function.

Hopefully, that will prove useful to you, NFITC1 :)  Have at you.

The Sleep, Confusion, Manip flags are there to remove the status if hit.  Those 3 are removed on physical attack.  Not sure why it's ecx+0000023C and not ecx+00000228.  Evidently, the former is checked to see what needs removing.

Certain statuses (like Resist) are intentionally not shown in the battle menu.  To place them back:

41C4C0 = 90 90 90 90 90 90
41C5B9 = 90 90 90 90 90
6E17FB = B9 20 00 00 00
6DD2A4 = B9 20 00 00 00

However, the correct text will also need adding back if not present (Luksy's touphScript will need an update too if not adding back with hex)

For example, to add Resist back

91E94A = 32 45 53 49 53 54 FF

Other status such as Minimum (Small) are simply removed by a mask.  Easy to fix.

Next, I am adding a status toggle to battle, so that you can choose to see status in main menu rather than Limit/Time.

Scripting and Reverse Engineering / World Map Functions
« on: 2018-01-05 15:41:44 »
Jump Location Var: E045E4.

Set to 02 and you'll have menu access while submerged in the sub.  I needed to find this so I can fix the bug that causes Emerald Weapon battle music when resurfacing. [although I already had it in Ochu.  Whoops! ]

Event loader: 76420A

Events are loaded from here.  There are certain types. Special events, like Emerald Weapon's movement and battle are initiated from 7642D1. For example, when your sub comes into contact with Emerald, certain new functions are called from the parameter placed into the function (0x300 is deducted inside the function, so below are actual jump IDs):

This chain is in  order:

4A, 7659DF (sonic boom effect)
07, 7650d2
1D, 7657C4 Electric sound effect
36, 7650E7 Sub pushed away
28, 765184
3B, 7655F1
34, 765BF2
48, 7655CC Battle swirl - battle intro
55, 765808
17, 7657E1 Initiates Emerald Weapon battle

The World Map simply has opcodes like Field, it seems.  So you could call for a sonic boom effect around a model at any time.

03 is Emerald Weapon movement
04 is involved in Emerald Weapon's movement.  May be the direction change operations (the movement path).
05 Emerald Weapon collision detection.  If this isn't called, the sub will not interact with Weapon - but the battle can still happen if you touch a certain part of Weapon. Issues will arise.  Seems to also depend... I can't always make the collision disable.  May be the return value I am messing up.
06 is Emerald Weapon movement.

21 Unknown

It is likely that Ultima Weapon shares some or all of these functions.


[00E39BC0] is used for the collision and movement.  When it's set to 1, there is no movement and all collision is off.  It's used by 05.

Completely unrelated / Best FF7 Death Ever.
« on: 2017-12-30 03:37:28 »

Noticed you can make Cloud kill himself in a psychotic episode when messing with the battle attack status flags.

I spent a while looking at how the flags work, and, tbh, it's a mess in there. Way too many things going on to provide a full picture. So, this fix may break other things.  I need people to test it.  Sega Chief would be a good bet :)

{this allows for the 0A to take effect below. 
0041C6D5 = 66 25 DF FF

{this ensures that 0x02 will be seen later on - and thus set the correct value to the field opcode battle result.
005DCB3E = 0C 0A

If this fails, I'll simply have to add in a completely new piece of code to account for the exact value that is seen when you escape using item/magic from battle arena.

The above might actually pose an issue at some point, since 0041C6D5 is used numerous times during battle to reset some (nearly all) flags I have no idea about.  So now that 0x02 isn't being reset... who knows what will happen.

Completely unrelated / Underrated Game Music
« on: 2017-12-19 19:13:07 »
Not sure I ever sent this on the forum.  It's too good to ignore really.

The TV show was narrated by Levar Burton and he was also a character on it.  Whoopi Goldberg was Gaia.  It was corny as hell.

The game, on the other hand, was very fun, very difficult (I eventually finished it on a real NES as a kid... without using passwords), and had an awesome soundtrack. 

Post your own examples.  :mrgreen:

First to fall over when the atmosphere is less than perfect
Your sensibilities are shaken by the slightest defect.

Now, if I tell you that you suffer from delusions
You pay your analyst to reach the same conclusions.

Troubleshooting / FF8 - What's the deal with the textures?
« on: 2017-09-07 23:30:14 »
I don't come to this section often... but what's with the boxes around the textures?  Those should not be visible.

I worked with JWP to solve this issue for user Giud, and eventually we got there.  FF8 is a NIGHTMARE to debug.  The optimizer being on without stack frames is only the start.  This may be useful to those with epilepsy.  Use HextEdit (or other hex editor) with the following:

Code: [Select]

{For certain flashes like critical attacks
{1067BC = 90:5

{Disable all battle flashes
1712C0 = C3

When using HextLaunch (memory addresses), it is

Code: [Select]
{For certain flashes like critical attacks
{5067BC = 90:5

{Disable all battle flashes
5712C0 = C3

If you only want specific critical flashes to be disabled, move the curly bracket { over the second entry and remove it from the first.

This is for the English Steam version.  Other versions will need new addresses.

I seem to be missing them, and I need them if I am to work on Raw.dll

Anyone have a nice tidy package?  All languages, all versions. If so, let me know and I'll open PM for you.  If you already can PM me, then do so.  :)


Any GoT fans around?  Well, here are my thoughts - posted on imdb.

Contains spoilers.

Season 1 to 4 = 10/10.

TVW = TV writers.

Since the TV show left the books behind (around S5 on), the show's writing has gotten worse and worse. I think the first poor episode was probably the one where Arya is being pursued by the T- 1000. It was utterly absurd. But this season (s7) has been by far the worst.

Aside from the odd decent moment, and the awesome spectacle of the dragons, it has been average at best. Melodrama has replaced a proper narrative. Contrivances have replaced logic. Let me give you some examples:

1. Daenerys has spent her entire time planning to invade Westeros. And when it was finally time to do so, the dumb TVW threw a spoke in the wheel. Out of nowhere, she suddenly can't hurt any bystanders, so holds off the attack on King's Landing (Yeah, 'cause she hasn't had to hurt any innocent people in order to get to the position she is in now, has she!?) This silly little contrivance is designed to prolong Cersei on the throne (itself a really dumb idea) as long as possible in the most artificial way possible. The TVW are completely shitting on logic in order to force this demented Mexican standoff. The latest episode goes even further... A proposed alliance between Cersei and Daenerys and Jon - to defeat the Army of the Dead. Jon and co have to prove to Cersei that the army is real by capturing one of the living dead. Just think about how DUMB that sounds. As if Tyrion, or Daenerys, would be entertaining anything of the sort, especially at this moment in time. Tyrion would never even advise it, because he isn't stupid enough to trust his sister for ANY REASON.

2. The long awaited reunion of characters was handled in a really clumsy way. It was dreadful. Where was the real emotion with Sansa- Arya or Bran-Sansa? It was non existent. It was like these people were just ordinary buddies who chanced upon a meeting. I was really looking forward to seeing the reunions, because we have been waiting since SEASON 1 for it. What a complete let down that was.

3. Characters are everywhere at any time, as if they have a teleportation device. Daenerys hears that the Lannisters have taken Highgarden - and the next minute, her army is right there with Jaime in the thick of it. The continuity has gone out of the window. Whatever the writers want to happen happens. Magic wand, LAZY writing.

4. Melodrama / soap opera nonsense. In the last episode (S7E4), I had to suffer watching jaime being saved by Bronn in the most ridiculous way there is. The cliché and brainless 'last second save'. And then, as I fully expected, we open episode 5 to discover they haven't been captured and have miraculously managed to escape unscathed, floating in deep water while WEARING ARMOUR and A SWORD! Holy crap. That's what happens when you run out of actual genius (Martin's work) and have to work on your own crappy, limited brain (TVW).

5. Characters aren't behaving like they should be. I've already mentioned Daenerys in regards to this, but it extends across the board. Bran "OOooo I am suddenly not Bran anymore... but I can feel who he was" or some slop. He still hasn't explained ANYTHING to anyone, even though the world is about to do battle with a mortal threat that he understands better than any other person on the planet. Sansa's turned into some awful caricature, totally alien to who she is as a person. And don't give me the Ramsay bullshit, since that was a dumb TV move in the first place and never happens in the books. Cersei is somehow queen and ultimate ruler, and making logical tactical decisions. But, here's the thing, it's already been established long before now that she is a useless tactician, and a naive, childish brat, who has no leadership qualities. But that's all out now, because they need her to be a main antagonist on the show. Speaking of Cersei, her one remaining child died and her emotion to it was zero. That's after it being well established that her only reason for carrying on with life was her children. Oh, but let's just switch off our brains again. The TVW said it's all OK! Whoopi-doo.

6. Contrivances. For example, Jorah Mormont needs a cure. Suddenly, he's managed to trek to some sort of hostel hundreds and hundreds of miles away, seemingly to just die - where he meets up with Sam - who not only finds a cure in a random book, but manages to pull off the delicate procedure, explained within, at the first time of asking. Then Jorah is back with Daenerys super-quick time. It's just so damn lazy and transparent.

7. Dialogue. This has taken a big hit as well. It's always been the case that the writers think swearing is uber-cool and shoehorned it into as many places as possible - but now they are out of Martin's material, a lot of the meat is gone. Tyrion stands out the most. The TVW are in over their heads. They are out of their depth.

Does anyone think Martin will be remotely THIS incompetent? The TVW have always made a mess when changing things (very often for no sane reason) from the books. For example, army numbers and population numbers being exaggerated to absurd levels; ridiculous and unrealistic events, like Sansa marrying Ramsay; over the top swearing, sex, nudity - for no other reason than to appeal to the mindless, lowest common denominator. But this is worse.

It's still entertaining, but the quality slide after S1-4 is larger than people are admitting. Some cool scenes with dragons isn't making me blind and dumb to all these issues.

also see


It's my birthday today, but I seem to do things backwards... so I am the one handing out presents.

Supports LoopStart and LoopEnd tags (as will my FF7 dll - and the next version of RaW for ff8).  Any issues, let me know.

I created FixLoop to help me create the audio files for FF7 - which required precise loops. With this, you can use "GoTo" and see how your loops sound - whether there is any popping/clicking and so on. It will also play audio files perfectly, something most players fail at with small audio files.  Many formats can be played- but only OGG loops can be saved from the program. It isn't recommended (as far as I am aware) to use MP3 for loops anyway.

See the help file for more information.

Download 1.3 here

Completely unrelated / Carmina Burana
« on: 2017-06-03 00:54:06 »

The opera that was used to form the lyrics of A One Winged Angel. Clearly a favourite of Uematsu's as well as mine. This performance is one of the best I have heard. 

Were diu werlt alle min
von deme mere unze an den Rin
des wolt ih mih darben,
daz diu chunegin von Engellant
lege an minen armen.

Were all the world mine
from the sea to the Rhine,
I would starve myself of it
so that the queen of England
might lie in my arms.

Other Mods / [FF7PC] Post bug reports here
« on: 2017-05-07 15:33:42 »
FF7 The Reunion Database

Final Fantasy VII suffers from a very large number of bugs, across all modules. Some are small and insignificant; others can hang or crash the game. White Wind and I are attempting to log all known bugs with Final Fantasy VII PC (1.02 English with Aali's Driver/Steam English version) and then find a solution. 

We can't possibly find and fix all the bugs, so if you see a bug that isn't in the database above (see the tabs at the bottom), or you think you can fix a bug, please don't hesitate to post here.


Audio Mods / Automatic Loop Point Detection
« on: 2017-04-16 03:54:28 »
I've been killing myself for nothing. Learn from my mistake.

This can find the loop point usually to a perfect sample (the search will take time - but it's worth the wait). I am using it to find loop points for sound effects that are too tricky to do by ear and eye.

Edit.  Hmm then again, it's still not great with music.  Still, it can be used as a guide.

Completely unrelated / Megaman Music Fans?
« on: 2017-04-02 14:30:47 »
Well, Megaman 3 haha.  I think that was the best of all - certainly music wise. It's uncanny how well 8 bit game music works on piano.


Intro again

Snake Man

Proto Man

Spark Man

Wiley Stage 2

Top Man

Magnet Man

Orchestra MM1-3.

I know I can cheat using something like dxwnd, but I want to do this properly.  I have spent a lot of time looking at the apis (like destroy / createwindow, which aali seems to use), setwindowpos, setwindowlong... you name it. But I clearly have no idea what I am doing. It's like the blind leading the blind.

The game starts full screen and I have no idea how to make the game work in a window. Aali's driver seems to destroy the initial window, and recreate it - but it's not as simple as that, since that alone just leaves a black window. So how is it done?

If anyone can help, then please do.  Set ff7config to software mode (using nvidia tnt seems to work ok for me) or hardware nvidia tnt - and have a look at 6786bf.

Yeah, I don't use it - and I disabled it.  But, still, a huge file remained on Drive C.  I didn't know about it until I decided to look at hidden system files.

So, if you want to save some GB of space...

powercfg -h off

Use that inside the command window (cmd).

Scripting and Reverse Engineering / [FF7] FF7ddraw - WIP
« on: 2016-12-20 08:34:11 »
WIP. See latest post.

I will add to this if I do more work on it.  Suffice to say, this stuff is really irritating. As I mentioned before, the code is a joke.  You have numerous functions doing mostly the same thing - calling one another after numerous checks to decide everything from loops to which channel to dump the effect on.  The field module does this by script, which is fair enough, but the battle module doesn't have a set standard.  Take a look at the following paths that the processor took to initiate a sound effect from dsound:

Path for enemy attack (just one I chose at random)
call 005BFFF3 
call 00745606
call 00745160
call 0074A795

Path for menu cursor (menu outside of battle also)
call 0074580A
call 00745160
call 0074A795

Path for Summon effects
call 005BFFF3
call 00749404
call 00748D69
call 0074A795

path for disappearing characters
call 00748F8F
call 0074A795

As you can see, this isn't a case of a sane, or rational, or well coded function. It's a giant mess. Some effects, like the sound used when characters disappear before a Summon, use a dedicated function, like 00748F8F. This function is ONLY called for this ONE effect.  Despite the fact they could have just used 00745160 - or any other function that eventually calls 0074A795. And there's the first problem.  Even if you do hijack the functions that do most of the work:   005BFFF3  and 0074580A , you are still left with these oddities.  There are others out there too.

It's like the programmers lost track entirely of what was going on. There is a ton of duplicate checking code.

005BFFF3: This has 3 parameters.

1: Pushes identification to decide how to proceed.
Code: [Select]
21 to 23: Calls 00749404
24 to 27: call 745606 and let it decide the channel.
28:Channel 1, call 745160
29:Channel 2, call 745160
30:Channel 3, call 745160
31:Channel 4, call 745160
Else call 745606 and let's it decide the channel.

Yeah, you aren't going to believe how these silly ID numbers come into being either.  They seem to be plucked from someone's brown end. When the function is called, it deducts 21 from the ID.  So if the value is less than 21, you get 20 - 21 = -1 (sigh which is then seen as HIGHER than 10 using a "Ja" - so it ends up calling 745606. It also has a silly table to decide the jump positions and even that isn't logical.  I have solved this above (as you can see).

2. L/R Balance of the sound effect (where 00 is left, 64 is centre and 127 is right).

3. Effect ID (0-750, but some of these don't even exist past a certain number). Note that a check is done in numerous functions to make sure that the range is correct.

So as you can see, 005BFFF3 doesn't know what to do until the programmer tells it. It is sent a balance value and the effect to play, but what path it takes from there depends on the stupid ID it is given.

0074580A: Haven't really gone into this one much but it ultimately ends up either playing the effect with centred panning on channel 5 (4) using 745160, or it calls 00745CF3 with the effect ID and does another raft of checking.  It's bizarre.

Then we have akao/akao2 from field script.  At least we know exactly how this works and it is guaranteed that one of these is going to be called in order to play an effect from the field.  So, unlike battle, you aren't running around trying to disassemble the universe. The field code effects probably won't take me long to code.  But the battle side of things is tougher if we want  to completely replace the original engine. Unless someone can shed some light on how call 0074A795 actually uses all the data it is given to produce the effect using dsound.

But even then it may still need multiple changes elsewhere.

I am not going to go into this in any detail. Firstly, because I haven't myself that much; secondly, because it's boring. But a no-frills explanation is this:

There are numerous and chaotic functions that make the simplest idea the most convoluted. Functions calling functions where, if proper communication, time, and better coding had been deployed, much of the bloat would not exist.  But, hey ho... that's where we are. I'd love to tell you that one function takes in a few parameters and then just works with them... but no. Some effects, like the Summon effects use a completely different function to set audio compared to the field version. And there are others.  In fact, I think it's even possible to call the main function (74A795)  directly, which I am sure a few areas do. 

But let's keep it simple.  The field module, as some will know, uses akao and akao2. The difference between these is that akao is 8 bit and akao2 is 16 bit.  These field functions then call another function... which passes on to another function (745160).

Most normal menu and field effects use 745160 eventually. I haven't checked if any of the other functions do this, but 745160 does:

All audio effects have an associated record of 28 bytes. I don't know what all of them do, but the only thing I needed to know was - how does the game know when to loop sounds and when to play once?

In code you can see at 7452EA, the "does this sound effect loop" flag (where 00 = no).

To work out where in memory the "loop flag" for each effect is, you just do this:

( (EffectID - 1) * 1C) + 00DE0E8C.  For example, the cursor ID is 01, so:

( (1 - 1) * 1C) +  00DE0E8C = 00DE0E8C :P  [Well, it's the first effect and the minus above makes it 0].

So look at 00DE0E8C and set it to 01. You should then get a looping cursor.

And that's how it's done.


The mov eax,[edx+00DE0E9C] at 745479 is actually retrieving an address for sample rate for the effect.  In this case, 44100.

Pages: [1] 2 3 ... 7