øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=276e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index4aa9-3.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=276e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index4aa9-3.html.zxuh^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ °VaÒOKtext/htmlISO-8859-1gzip8:ÖaÒÿÿÿÿÿÿÿÿWed, 11 Mar 2020 05:36:45 GMT0ó°° ®0®P®€§²ð®uh^ÿÿÿÿÿÿÿÿï-aÒ Show Posts - Edrin

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.


Messages - Edrin

Pages: 1
1
Game Modification Station / Re: FF6: AI Upgrade bug help
« on: July 12, 2014, 07:04:15 AM »
It appears the glitch may have just been a bad special animation. I used one of the ones later on the list, not really thinking about it and got wrapped up thinking it was my code (who was I kidding? my code is awesome). The boss is pretty challenging if you've got time to try it out. Still would like it confirmed from a couple other testers that the glitch is gone. Thanks for the help.

Happy Hacking!

2
Game Modification Station / Re: FF6: AI Upgrade bug help
« on: July 08, 2014, 01:45:54 PM »
I went ahead and released the Titan boss without having figured out the last graphic glitch. I'm hoping a myriad of testers will help me narrow down the source. It seems to pop up out of nowhere... But I've done a couple runs now without incident so I'm not worried about it messing up the experience too much. The real goal is to make the patch sans Titan for hackers to use.

Here's the link if you're interested in trying it out:
http://www.ff6hacking.com/forums/showthread.php?tid=2628
http://www.mediafire.com/download/uv40qztx8qtnykt/TitanEX.ips
*it uses a headered, expanded ROM.

3
Game Modification Station / Re: FF6: AI Upgrade bug help
« on: July 08, 2014, 06:30:40 AM »
that's a lot of different changes to your ROM.  try making a separate patch for each one, and applying them one at a time to figure out the culprit.

That's probably what I will end up having to do.

yeah, this sounds like quite a significant change.  can you elaborate on what you're doing, and why you're doing it?  why not just have the script issue a bunch of commands per turn, like you mentioned for your test scenario below?

Its implemented as a branching function to jump forward or backward in the script, by jumping over the "End if and reset targetting" you can continue running code after the conditional is closed. This helps me emulate "end if and continue", "else", and nested-ifs.

For example, in my demo boss, he has a few actions he takes when the party has such-and-such statuses, but I don't want him to ONLY respond to the party statuses, so I can have him perform those actions and continue with his normal script. Also, the boss is based on his FFXIV counterpart and uses phases and skill rotations, but because of the nature of FF6, I thought it would be too easy with a single set and thus he has a primary and secondary skill rotation which independently cycle (as they have a different number of moves in them). The move he performs each turn is based on a variable value that gets changed at the end of the script based on which phase he's in... so the moves and any other specifics are only scripted once and the variable changes (which are much shorter) can be scripted for each phase.

Here's a quick example from my boss script:

Code: [Select]
FC 0C 01 02    ; If variable VAR001 is less than to 2
FC 0D 01 01    ; If variable VAR001 is greater than or equal to 1
FB 11 04       ; Branch forward in script 4 bytes
FE             ; End If and reset targeting
FB 11 21       ; Branch forward in script 33 bytes
FC 15 03 00    ; If VAR003 has all the following bit cleared: 0
FC 17 4F 00    ; If target Back Row is valid, set it, and
E8             ; Landslide
FB 11 11       ; Branch forward in script 17 bytes
FE             ; End If and reset targeting
FC 14 03 00    ; If VAR003 has all the following bit set: 0
FC 17 4E 00    ; If target Front Row is valid, set it, and
E8             ; Landslide
FB 11 04       ; Branch forward in script 4 bytes
FE             ; End If and reset targeting
F1 52          ; Targeting: none
E8             ; Landslide
F9 00 03 00    ; VAR003 toggle bit: 0

This script is far from optimized, but it helps show what can be done with the code... The boss alternates hitting the front row and back row with Landslide every time the move counter equals 1, but since the fight is rotation based and we need to see if the skill has missed, I need to be able to get the skill text to appear and hit no one. The first set of conditionals checks to see if its time to use Landslide. If it is we run the code right after the conditionals which branches past the end-if and the branch that skips to the end of the code if VAR001 doesn't equal 1, essentially ending up being able to run more conditionals without having to close them all the first time one of them fails. There's also an example of using it to emulate an "else-if" statement if VAR003 bit 0 is cleared and the back row is valid... it sets up Landslide then skips past the script which checks for the bit being set and if the front row is valid.

...this is just a small example. The more nested if-statements you want, the more helpful the code becomes.

4
Game Modification Station / Re: FF6: AI Upgrade bug help
« on: July 07, 2014, 12:26:51 PM »
Other than "there is something wrong," there really isn't anything I could narrow down based on these screenshots. Any number of routines that execute could be an issue.

Doing STX $11A7 is an issue. If you are storing damage, you want to store to $11B0 or $F0, preferably $11B0. It's also an issue because a bit of this is used to call displaying text when a spell hits. That code is at C2/3262. If you're shifting $11A7, this bit may be misread. You'll also want to make sure that $1E70-$1E73 are actually free in ram. I'm not sure they are, but I do know that there's a big range of free ram in the $1440-$14FF range.

Of course, this may not be the issue at all.

I probably should have commented on my code a little better...
Code: [Select]
PHX
LDA $11A7
PHA               (Backup special byte 3)
PHP
LDA $3BB9,Y (Magic Defense)
BCC $0CD4   (Branch if concern MP or Magical damage)    
LDA $3BB8,Y (Defense)
LDX #$03
STZ $1E70,x
LSR A            (half M/Def stat)
ASL $11A7    (shift Special 3 bit (4-7) into Carry)
BCC 02         
STA $1E70,x (Store current value)
DEX
BPL F1          (branch if all 4 bits haven't been checked)
PLP
LDA $3BB9,Y (Magic Defense)
BCC $0CD4   (Branch if concern MP or Magical damage)    
LDA $3BB8,Y (Defense)
LDX #$03
SEC
SBC $1E70,x (subtract stored values based on m/def percentages (0 for values when bit wasn't set))
DEX
BPL FA
PLX
STX $11A7    (restore Special byte 3)
PLX
RTS

This runs when the game would normally load defense. It exits the function with X intact and A set to a modified defense value. I backup special byte 3 since it gets used elsewhere and restore it at the end of the function. Special byte 3 is used to set how much defense to ignore.



I can safely tell you that there isn't much to bank C5, but what is there is a mess that is difficult to figure out. Nothing in there is going to be wrong, it's the setup leading to the call.

Yea, i figured out what I was missing. I'm not entirely certain exactly what it does, but it appears to stop the music and menu temporarily to make sure everything is clear for the C5 function.

Code: [Select]
INC $E9ED
INC $6284
LDA #$10 (16 = instrument set?)
STA $1300
LDA $B8 (load song ID from parameter byte)
STA $1301
LDA #$FF (Volume: FF = normal)
STA $1302
JSL $C50004 (Changes the music)
STZ $E9ED
RTS

I should have looked a bit more before posting this one.

5
Game Modification Station / FF6: AI Upgrade bug help
« on: July 07, 2014, 08:42:44 AM »
I'm in the process of creating a Monster AI Upgrade patch which will expand the script AI functionality and fully integrate 24-bit monster HP.

I have a couple potentially related problems I'm having trouble tracking down and I was hoping for a little insight.

Firstly, I have a problem where sometimes when my demo boss attacks (only when he attacks, never my own characters), occasionally, if I am in the middle of a menu, the menu borders remain correct, but the displayed text gets mixed up with other views:

The first image is the main menu, the second is the item screen, the third is the magic menu.

As far as I'm aware, there should only be a couple changes to the ROM running at this point. The first being the 24-bit monster HP patch, which I can't see anything that would cause a problem... secondly is this code:

Code: [Select]
PHX
LDA $11A7
PHA
PHP
LDA $3BB9,Y (Magic Defense)
BCC $0CD4   (Branch if concern MP or Magical damage)    
LDA $3BB8,Y (Defense)
LDX #$03
STZ $1E70,x
LSR A
ASL $11A7
BCC 02
STA $1E70,x
DEX
BPL F1
PLP
LDA $3BB9,Y (Magic Defense)
BCC $0CD4   (Branch if concern MP or Magical damage)    
LDA $3BB8,Y (Defense)
LDX #$03
SEC
SBC $1E70,x
DEX
BPL FA
PLX
STX $11A7
PLX
RTS

...which essentially allows for independent selection for moves to ignore 50%,25%,12.5%,6.25% defense. I can't find a problem with this either...

There are a couple custom targeting functions I created as well that I'm 99% sure have nothing to do with the glitch (since it stays within the parameters and RAM space of the current targeting functions), but I could be wrong.

The last, is the fact that I wrote code to allow the scripts to run both inside and after conditionals optionally allowing me to queue up a bunch of attacks per turn. I'm worried that maybe I'm getting an overflow problem that is crossing over into graphical data. In my testing it appears that the whole script runs before attacks actually start leading me to this hypothesis. Does anyone know more about how the script queues attacks and if this could cause any potential issues?

Come to think of it, I could probably test this by making a script that just does a ton of attacks every turn and see what kind of limits I can find. But there really doesn't seem to be any consistency to the problem happening. Also, the script normally only calls 2-4 attacks per turn with a few exceptions that I don't believe were the case when the glitch occured. It only happens with I'm navigating menus and only during the boss' attacks but I can't make it happen with any consistency...

...thoughts?


And my other problem happens when I use a custom script to change the music from the monster script. I have narrowed it down to this specific command, but not sure why it's happening. This is another glitch that happens when navigating menues... in particular, when I am moving from the menu to target selection via cursor. It essentially sets up the RAM variables then runs the same code that runs at the beginning of battle and when the theme changes to fanfare after battle. This glitch causes the game to essentially freeze. The music stops and before the new music starts I lose the ability to move the cursor and everyone just sits there.

Code: [Select]
LDA #$10 (16 = instrument set?)
STA $1300
LDA $B8 (load song ID from parameter byte)
STA $1301
LDA #$FF (Volume: FF = normal)
STA $1302
JSL $C50004 (Changes the music)
STZ $E9ED
RTS

TBH, I have not dug through the music code before and am not very familiar with it. Any help would be appreciated. Hopefully its as simple as pushing a few variables before the code and restoring them at the end.

6
Game Modification Station / Re: FF6 timer tiles?
« on: September 05, 2013, 06:32:24 PM »
Thanks. I would use ZoneDoctor, but I had already started editing by the time ZoneDoctor was released and the map editor literally does nothing for my game for some reason. It might have to do with the fact that LE Rogue is telling me that I have too many tiles but saves anyway. I stayed within the bounds of the original map when I edited so I don't know why I'm getting the error, but the game saves and works fine so I let it go... but now ZoneDoctor won't work with it at all. Of course, I wouldn't even know what to look for if there were problems.

7
Game Modification Station / FF6 timer tiles?
« on: September 05, 2013, 04:07:33 PM »
looking at this:

Code: [Select]
CA/BA02: A0    Set timer 0 to $4650 [5m: 00s: 00j], jump to subroutine $CABA09 if it expires. Flags: 
               (Countdown continues in menu and battle)
               (Countdown shown while walking [must have tiles for it, only timer 0 can use])
               (Unknown flag enabled 0x20 on event bank byte)
               (Countdown overrides the game clock display)

What does it mean to "have tiles for it"? I am setting up a custom event and need a timer, but the timer on the map is using random other sprites (chocobo, merchant, etc...) all garbled up where the numerals should be. I took a look at the event code and don't see anything that loads numerals, and I looked into the map data with LE but nothing is really sticking out to me here...

a little help?

8
Game Modification Station / FF6 NPC bits
« on: July 29, 2013, 09:46:53 AM »
In FF6LE and the new ZoneDoctor NPCs have "Show if mem set" bits from $1EE0-$1F5F. Looking through the event script I see that some of these bits are used for setting NPC actions as well, but I don't know if the game uses these bits for anything else. I was wondering if there was a document for this set of bytes in the RAM logging which NPCs use which bits and any known uses for those particular bits. Are there any that are unused totally by the game? There are quite a few that always seem empty (according to my gamesaves) but I've also seen where bits are set and cleared in an event for immediate use, so I don't want to haphazardly use them in my hack unless I know they are free.

All that to say, before I go through the effort of documenting all of the NPC bits, is there already something out there with this information? Are there any known unused bits at the very least? Any information will be helpful.

9
Game Modification Station / Re: FF6 Overworld sprite pointers
« on: June 20, 2013, 10:49:13 AM »
Was that really what Edrin was asking? I don't see what PC slots have to do with this. I thought Edrin was expanding sprite sheets to player character-completeness.

The sprite pointers in towns and the overworld are split up. The lower 16-bit offsets are at 0xD0F2 while the bank byte and another value are at 0xD23C.

I don't know where this routine is used, but it's the only one in the disassembly that labels what these particular offsets are.
Code: [Select]
C0/69A3: BFF3D0C0 LDA $C0D0F3,X (Loads pointer to Map character graphcis)
C0/69A7: 852B    STA $2B
C0/69A9: 852E    STA $2E
C0/69AB: 8531    STA $31
C0/69AD: 8534    STA $34
C0/69AF: BF3CD2C0 LDA $C0D23C,X (Bank pointers and Number of Bytes to Copy per Tile for Map Char Gfx)
C0/69B3: 852C    STA $2C
C0/69B5: 852F    STA $2F
C0/69B7: 8532    STA $32
C0/69B9: 8535    STA $35

The routine for the behind-view sprite used when riding a chocobo is in bank $EE. It does not access a pointer table, instead calculating an address based on the assumption that all sheets are 0x16A0 bytes long.

Code: (Novalia's Disassembly: Overworld chocobo rider sprite) [Select]
EE/8943: ADFB11  LDA $11FB      (Sprite number for map character)
EE/8946: 8D0242  STA $4202      (Save as multiplicand)
EE/8949: A9A0    LDA #$A0
EE/894B: 8D0342  STA $4203      (Set multiplier to 160)
EE/894E: EA      NOP
EE/894F: EA      NOP
EE/8950: EA      NOP
EE/8951: AE1642  LDX $4216      (Product)
EE/8954: 866A    STX $6A        (Save the address temporarily)
EE/8956: A916    LDA #$16
EE/8958: 8D0342  STA $4203      (Set multiplier to 22)
EE/895B: EA      NOP
EE/895C: EA      NOP
EE/895D: EA      NOP
EE/895E: AD1642  LDA $4216      (Load low byte of product)
EE/8961: 18      CLC            (Clear Carry for addition)
EE/8962: 656B    ADC $6B        (Add middle byte of address)
EE/8964: 856B    STA $6B        (Save updated address)
EE/8966: AD1742  LDA $4217      (Load high byte of product)
EE/8969: 656C    ADC $6C        (Add to high byte of address)
EE/896B: 856C    STA $6C        (Save updated address)
EE/896D: 18      CLC            (Clear Carry for addition)
EE/896E: A56A    LDA $6A        (Low byte of address)
EE/8970: 6980    ADC #$80       (Add 128)
EE/8972: 856A    STA $6A        (Save changes)
EE/8974: A56B    LDA $6B        (Middle byte of address)
EE/8976: 6901    ADC #$01       (Add one, or two if an overflow occurred)
EE/8978: 856B    STA $6B        (Save changes)
EE/897A: A56C    LDA $6C        (High byte of address)
EE/897C: 69D5    ADC #$D5       (Add #$D5, or #$D6 if an overflow occurred)
EE/897E: 856C    STA $6C        (Save changes; D5/0180+X)

That's the one! Shouldn't be too hard to get this working now. Big thanks.

10
Game Modification Station / Re: FF6 Overworld sprite pointers
« on: June 19, 2013, 03:03:01 PM »
Does that apply to towns and such as well?

11
Game Modification Station / FF6 Overworld sprite pointers
« on: June 19, 2013, 08:42:23 AM »
So I'm trying to track down the overworld sprite pointers in an attempt to increase the total number of PC sprite sheets available. I've been able to get new sheets working in battle, but I can't find the overworld pointer list so that I can add new entries. Anyone know where these can be found? I have been trying to track them down in C0, perhaps around the code for the event queue commands... but it all looks like logic to me instead of display.

12
Game Modification Station / 16 color battle palettes
« on: August 13, 2012, 01:41:34 PM »
I'm working on a patch to allow all 16 colors of the battle palette to be used in battle instead of only 12. The problem I am currently running into is that the 8 bytes following each palette list in battle are used for other miscellaneous sprites throughout battle such as the little finger pointer, damage and healing numerals, etc... What I need to find is where these sprites assign the addresses for the battle palettes or the offsets for the address.

I already have down where the palettes write and rewrite their values in the RAM throughout battle.

Code: [Select]
Loads the palettes to RAM

C1/3E37: A918    LDA #$18
C1/3E39: 8510    STA $10
C1/3E3B: BF0063ED LDA $ED6300,X
C1/3E3F: 99AD81  STA $81AD,Y
C1/3E42: E8      INX
C1/3E43: C8      INY
C1/3E44: C610    DEC $10
C1/3E46: D0F3    BNE $3E3B

Code: [Select]
Writes palette from backup address to the address actually called by the sprites

C1/2DE0: A21800  LDX #$0018   
C1/2DE3: B9AD81  LDA $81AD,Y
C1/2DE6: 99807F  STA $7F80,Y    (set character palette's 1 - 4)
C1/2DE9: C8      INY
C1/2DEA: CA      DEX
C1/2DEB: D0F6    BNE $2DE3

I will eventually change one or both of those #$18's to $20 to copy the full list.

Based on debugging, this is where I have found the application of the palettes to all sprites (Character, Enemy, misc) takes place.

Code: [Select]
C1/0A7B: A2007F  LDX #$7F00     (pay attention to this one!)
C1/0A7E: 8E7243  STX $4372
C1/0A81: A97E    LDA #$7E
C1/0A83: 8D7443  STA $4374
C1/0A86: A20001  LDX #$0100
C1/0A89: 8E7543  STX $4375
C1/0A8C: A980    LDA #$80
C1/0A8E: 8D0B42  STA $420B

I don't fully understand this. $7F00 is obviously the starting address used for the palettes. I have tested this by changing $7F00 to $812D to line up the colors with the backup instance of the character palettes in the RAM, resulting in perfect character sprites and obviously screwed up everything else. Altering 7E also affects all sprites, but doesn't appear to be an offset because I can't get consistent results when altering it.


Regardless of those numbers, there isn't nearly enough information here to determine what values get applied to each value of each sprite palette. But I have been unable to find where this is actually defined in the code. Once I find where the sprites define their offsets to find their correct palettes from the $7F00 starting point loaded from the RAM I ought to be able to either move the character palettes to the backup address or move the misc palettes elsewhere to free up the full $20 bytes for character palettes.

I am admittedly new to SNES hacking and don't know exactly how sprites and graphics are applied to the screen. Anyone have any ideas?

Pages: 1