øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;sa=topics;u=276e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index49d7.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=276e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index49d7.html.zxuh^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ °VqOKtext/htmlISO-8859-1gzip0|ÖqÿÿÿÿÿÿÿÿWed, 11 Mar 2020 05:36:46 GMT0ó°° ®0®P®€§²ð®uh^Uq 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.


Topics - Edrin

Pages: 1
1
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.

2
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?

3
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.

4
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.

5
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