øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=337;area=showposts;start=60e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexada8.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=337e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexada8.html.zx¯Ih^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ@>úâOKtext/htmlISO-8859-1gzip8:ÖúâÿÿÿÿÿÿÿÿWed, 11 Mar 2020 02:31:35 GMT0ó°° ®0®P®€§²ð®®Ih^ÿÿÿÿÿÿÿÿ‚+úâ Show Posts - Praetarius5018

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 - Praetarius5018

Pages: « 1 2 3 4 5 6 »
61
Final Fantasy V Research & Development / Re: New Ability Info
« on: May 28, 2017, 03:05:39 PM »
Well, I had to interject about a dozen calls to get it working properly.
Partially because MP costs and targetting by mapped spell index is loaded at battle start and any value > $80 isn't expected...

At least I got 2 menus of 8 skills (rather 5 + 3shared between both) each out of that adventure.

Except there's still a scrolling bar on a menu that can't scroll...
!Sing has that too, so whatever.

62
Final Fantasy V Research & Development / Re: New Ability Info
« on: May 27, 2017, 09:47:41 AM »
doesn't look that hard

$D83316 has 8 bytes per menu, and I've only seen the first used which tells that "menu" what id has is the first spell.
the second byte looks like the last spell "id" of each menu but that value doesn't seem to be used at all.
ok, not that simple.
$0 to $5E are the same number as the spell ids used.
$5F to $7C map to $82 to $9F (blue magic).
of course they are only loaded if you "know" that spell, by spell level, buying/finding/learning, etc.
$80 or higher read from wrong data so the shown spells are more or less random.
at least white and red have completely separate entries and then used asm routines.

In case of white it comes from $C1/37BA BF 16 33 D8 LDA $D83316,x[$D8:331E]

I may not even have to move !white at all to the red menu table.
$7E:41B2 tells which ability is currently used, so just smuggle a little if in there...


also, another table at $C0EEF4, 3 bytes per entry, unless the first byte is $ff, that is the signal for list ends
this tells the game which spells are usable in the menu and what they do
first byte is the spell id
called from $C2/DEDE

63
Final Fantasy V Research & Development / Re: New Ability Info
« on: May 26, 2017, 11:07:44 AM »
Sort of. It will be my follow-up project once SD3 is done, which should be about 2-3 weeks.
I worked a bit on it over the last year but not much.


I'm currently mostly interested in creating a few "physical spells".
Weapon attacks currently too binary in my taste; you either have the not-too-exciting default attack or use a command slot for a single "overpowered" move but still have not much variety. While on the magic side you can pick e.g. white and solve 20 problems at once.
Ideally I could make a "new" spell menu for some physical techs, 4-5 would already be enough;
can I move both black and white into the mixed menu of Red and use the now free white menu for my purpose?
Spells F0-FF look free and usable, so I might be able to use that?

Just some ideas, I'm not that far yet.

64
Final Fantasy V Research & Development / New Ability Info
« on: May 25, 2017, 03:04:45 AM »
at least I didn't find it on the wiki

$C1/5F17 has a table with the called up menues for abilities, 1 byte per ability
0 for abilities that don't use a magic menu, 1 = Spellblade, 2 = white, 3 = black, etc.
called from $C1/52A8


$D0/ED02 has a table with the "action types" that are executed
04 = normal attack and variants like aim
0C = jump start
16 = X-Fight (4x fight)
2B = value for all spell menues and monster attacks
called from $C2/49EA


$D1/5DA0 has a table with the delays before actions are executed
$80 or higher - instant
otherwise that many atb ticks
called from $C2/1AAA

65
Final Fantasy V Research & Development / Re: Monsters die slowly...
« on: May 18, 2017, 12:18:14 PM »
err... I'm still getting flickering with the IPS patches of the latest zips

66
Do we know of any other attributes that only work on one equip type?

67
Well, some combinations are just that hard to get that you might just let them win that one.

But if that zombie combo seems to abusable to you:
end the state at the end of battle and kill the former zombie properly.

68
Lv5 Death;
taken from the wiki here (InstructrTrepe - c2 bank):

Attack Type 4B (L5 Doom)
Code: [Select]
C2/7266: 20 67 7E     JSR $7E67     (Check Target Level is Muliple of Parameter 1)
C2/7269: A5 56        LDA $56
C2/726B: D0 1F        BNE $728C
C2/726D: A6 49        LDX $49
C2/726F: BD 65 20     LDA $2065,X   (Target Creature Type = Undead?)
C2/7272: 29 01        AND #$01
C2/7274: D0 07        BNE $727D
C2/7276: BD 39 20     LDA $2039,X   (Check Attacker Armour Special Effect Byte)
C2/7279: 29 02        AND #$02      (Check if Undead)
C2/727B: F0 0C        BEQ $7289
C2/727D: C2 20        REP #$20
C2/727F: BD 08 20     LDA $2008,X
C2/7282: 9D 06 20     STA $2006,X   (Fully Heal HP)
C2/7285: 7B           TDC
C2/7286: E2 20        SEP #$20
C2/7288: 60           RTS

C2/7289: 20 2B 90     JSR $902B   (Apply Status 1 to Target, bypass Status Immunity)
C2/728C: 60           RTS


so replace C2/7289 with a new routine that checks for heavy;
as for how to check against heavy, this could give an idea

Attack Type 29 (Kill, not Heavy)
Code: [Select]
C2/6E12: A6 49        LDX $49
C2/6E14: BD 65 20     LDA $2065,X
C2/6E17: 29 20        AND #$20      (Target Creature Type = Heavy?)
C2/6E19: D0 0F        BNE $6E2A
C2/6E1B: 20 F6 7E     JSR $7EF6     (Hit Determination for Magic)
C2/6E1E: A5 56        LDA $56
C2/6E20: D0 0A        BNE $6E2C
C2/6E22: A5 58        LDA $58
C2/6E24: 8D D8 3E     STA $3ED8     (Status Duration = Parameter 2)
C2/6E27: 4C 05 8E     JMP $8E05     (Apply Status Effect 4)
C2/6E2A: E6 56        INC $56       (Attack Misses)
C2/6E2C: 60           RTS



Odin/magic lamp
dunno, it should be possible to make him use his regular move always instead.
or modify his "kill stuff" move to only deal damage instead of a death effect, just an idea.

69
Final Fantasy V Research & Development / Re: Altering stats
« on: January 15, 2017, 04:09:35 AM »
...I am completely lost, because I have literally no clue what all those 3 letter codes mean.
maybe this reference will help a bit to get started:
https://wiki.superfamicom.org/snes/show/65816+Reference
it has a list of both the hexcodes and their respective 3-letter codes with a short description what it should mean

70
for class "filtering" this is the most important line:
Code: [Select]
$C2/D8B3 B9 00 00    LDA $0000,y[$7E:0842]   A:FF10 X:0010 Y:0842 P:envMxdIzc
$C2/D8B6 85 E2       STA $E2    [$00:01E2]   A:FFFF X:0010 Y:0842 P:eNvMxdIzc
Y tells you which "set" is currently checke - you have 3 8-bit variables for that

$7E:0840
   80 - Knight
   40 - Monk
   20 - Thief
   10 - Dragoon
   08 - Ninja
   04 - Samurai
   02 - Berserker
   01 - Hunter
$7E:0841
   80 - Mystic Knight
   40 - White Mage
   20 - Black Mage
   10 - Time Mage
   08 - Summoner
   04 - Blue Mage
   02 - Red Mage
   01 - Mediator / Beasttamer
$7E:0842
   80 - Chemist
   40 - Geomancer
   20 - Bard
   10 - Dancer
   08 - Mimic
   04 - Jobless
   02 - (Glitch/None)
   01 - (Glitch/None)

these are which classes are available for your entire party

warning: ability selections end up here, too, with Y > 0842

who is currently checked can be gotten via:
Code: [Select]
A6 80 LDX $80    [$00:0180]
BD 00 05 LDA $0500,x[$7E:0500] <- char id, 0 = Bartz, 1 = Lenna, 2 = Galuf, 3 = Faris, 4 = Kyle
29 07 AND #$07

71
Final Fantasy V Research & Development / Re: Monsters die slowly...
« on: November 26, 2016, 03:48:27 AM »
Emulator: Snes9X v1.51.ep10r1 - Geiger's Snes9x Debugger

SNESUtil says my unmodified ROM is unheadered, and I used the -N patch.
and I get death flicker everywhere: Bandersnatch on worldmap, any monster in wind temple, didn't test further

72
Final Fantasy V Research & Development / Re: Monsters die slowly...
« on: November 25, 2016, 03:07:25 PM »
with the new patch I get black flickering in the top half of the screen during monster deaths :(

73
Final Fantasy V Research & Development / Instant ATB
« on: November 25, 2016, 02:57:37 PM »
So I was tired of waiting for the ATB bar, and thought I'd share my changes.

What this does it:
instead of directly counting down remaining ATB, status ticks, etc.
we calculate in the first pass-through how many "ticks" would be needed until the next event (action, poison tick, etc.)
and in the second pass we subtract just that many.
Disadvantage is of course that you can no longer wait for the perfect moment to use jump to avoid specific attacks.


I'll use 2 seemingly unused enemy bytes for this:
7E2596   8th enemy "command 1"; we'll use this to calculate how many ATB ticks have to pass
7E2597   8th enemy "command 2"; 0x80 = calculation mode, otherwise update ATB


this function is used for ALL increases/checks of all status timer, ATB, jump, etc.
Code: [Select]
$C2/203C 20 55 20    JSR $2055  [$C2:2055]   A:0000 X:0007 Y:0002 P:envMxdizc
$C2/2055 64 08       STZ $08    [$00:0008]   A:0000 X:0007 Y:0002 P:envMxdizc
$C2/2057 5A          PHY                     A:0000 X:0007 Y:0002 P:envMxdizc
$C2/2058 A4 0C       LDY $0C    [$00:000C]   A:0000 X:0007 Y:0002 P:envMxdizc
$C2/205A B9 E4 3E    LDA $3EE4,y[$7E:3EEB]   A:0000 X:0007 Y:0007 P:envMxdizc
$C2/205D F0 2C       BEQ $2C    [$208B]      A:0001 X:0007 Y:0007 P:envMxdizc
$C2/205F C0 0A 00    CPY #$000A              A:0001 X:0007 Y:0007 P:envMxdizc <- branch for ATB, status effects check first if they are actually applied
$C2/2062 F0 05       BEQ $05    [$2069]      A:0001 X:0007 Y:0007 P:eNvMxdizc <- change to F011 to go directly to our edited check
$C2/2064 AD 4E 47    LDA $474E  [$7E:474E]   A:0001 X:0007 Y:0007 P:eNvMxdizc
$C2/2067 D0 22       BNE $22    [$208B]      A:0000 X:0007 Y:0007 P:envMxdiZc
$C2/2069 BD F1 3C    LDA $3CF1,x[$7E:3CF8]   A:0000 X:0007 Y:0007 P:envMxdiZc
$C2/206C F0 1D       BEQ $1D    [$208B]      A:0001 X:0007 Y:0007 P:envMxdizc
$C2/206E 30 15       BMI $15    [$2085]      A:0001 X:0007 Y:0007 P:envMxdizc
$C2/2070 BD 75 3D    LDA $3D75,x[$7E:3D7C]   A:0001 X:0007 Y:0007 P:envMxdizc <- needed ticks on regeneration gauge
$C2/2073 F0 08       BEQ $08    [$207D]      A:0001 X:0007 Y:0007 P:envMxdizc
$C2/2075 DE 75 3D    DEC $3D75,x[$7E:3D7C]   A:0001 X:0007 Y:0007 P:envMxdizc <- we'll place a fitting JSL/JSR here
$C2/2078 BD 75 3D    LDA $3D75,x[$7E:3D7C]   A:0001 X:0007 Y:0007 P:envMxdiZc <- EA/use for missing JSL byte as needed
$C2/207B D0 08       BNE $08    [$2085]      A:0000 X:0007 Y:0007 P:envMxdiZc
$C2/207D BD F1 3C    LDA $3CF1,x[$7E:3CF8]   A:0000 X:0007 Y:0007 P:envMxdiZc
$C2/2080 09 81       ORA #$81                A:0001 X:0007 Y:0007 P:envMxdizc
$C2/2082 9D F1 3C    STA $3CF1,x[$7E:3CF8]   A:0081 X:0007 Y:0007 P:eNvMxdizc
$C2/2085 A5 0C       LDA $0C    [$00:000C]   A:0081 X:0007 Y:0007 P:eNvMxdizc
$C2/2087 D0 00       BNE $00    [$2089]      A:0007 X:0007 Y:0007 P:envMxdizc
$C2/2089 E6 08       INC $08    [$00:0008]   A:0007 X:0007 Y:0007 P:envMxdizc
$C2/208B 7A          PLY                     A:0007 X:0007 Y:0007 P:envMxdizc
$C2/208C E8          INX                     A:0007 X:0007 Y:0002 P:envMxdizc
$C2/208D E6 0C       INC $0C    [$00:000C]   A:0007 X:0008 Y:0002 P:envMxdizc
$C2/208F 60          RTS                     A:0007 X:0008 Y:0002 P:envMxdizc


external routine for $C2/2075
Code: [Select]
AD 97 25 LDA $2597  [$7E:2597]
29 80 AND #$80
F0 11 BEQ $11
---read mode---
AD 96 25 LDA $2596
38 SEC
FD 75 3D SBC $3D75,x[$7E:3D7C]
90 06 BCC
BD 75 3D LDA $3D75,x[$7E:3D7C]
8D 96 25 STA $2596
80 0E BRA skip apply
---apply mode---
BD 75 3D LDA $3D75,x[$7E:3D7C]
38 SEC
ED 96 25 SBC $2596  [$7E:2596]
B0 02 BCS $02
A9 00 LDA #$00
9D 75 3D STA $3D75,x[$7E:3D7C]
---end cases---
BD 75 3D LDA $3D75,x[$7E:3D7C]
6B RTL



At the end of each character's status/ atb check loop, it checks if we have to go to the next character or if we have finished all 12 possible characters (4 heroes + 8 enemies).
We'll expand the "finished" case for a mode change (calculate ticks <-> apply difference)

Code: [Select]
$C2/204E A5 0A       LDA $0A    [$00:000A]   A:0000 X:0079 Y:000B P:envMxdizc <- we'll place a fitting JSL/JSR here
$C2/2050 C9 0C       CMP #$0C                A:000C X:0079 Y:000B P:envMxdizc <- this'll disappear into the JSL/JSR
$C2/2052 D0 BE       BNE $BE    [$2012]      A:000C X:0079 Y:000B P:envMxdiZC
$C2/2054 60          RTS                     A:000C X:0079 Y:000B P:envMxdiZC


external routine for $C2/204E

Code: [Select]
A5 0A LDA $0A
C9 0C CMP #$0C
D0 11 BNE $11
---update mode---
AD 97 25 LDA $2597  [$7E:2597]
49 80 EOR #$80
8D 97 25 STA $2597  [$7E:2597]
29 80 AND #$80
F0 05 BEQ $05
A9 FF LDA #$FF
8D 96 25 STA $2596  [$7E:2596]
---end---
A5 0A LDA $0A
C9 0C CMP #$0C
6B RTL

74
I've done this before for some CT code, but I came across this gem in the FF5 timer code:

Code: [Select]
C2/2085: A5 0C        LDA $0C (Are we looking at Stop?)
C2/2087: D0 00        BNE $2089 (uhhhh)
C2/2089: E6 08        INC $08 (return TRUE)

I've come across similar strange codes and if what I've read is correct, this form of branch to pad two "do nothing" bytes is minimal cheaper than 2x NOP.
BNE supposedly costs 2 CPU cycles total, 1 NOP does also, so 2 NOP are more expensive.
BRA would be inbetween those two options.
Does it matter in the grand scheme of things? Probably not.

75
Seiken Densetsu 3 Research & Development / cast timer / menu bug
« on: June 01, 2015, 12:00:50 PM »
Not a 100% perfect thing, but so far it seems to work.

some background information
$7E:2040 - pointer to 1st hero (e.g. F060)
$7E:2042 - pointer to 2nd hero
$7E:2044 - pointer to 3rd hero
$7E:2046 - pointer to 1st enemy
$7E:2048 - pointer to 2nd enemy
$7E:204A - pointer to 3rd enemy

all of these have a pointer that tells them if they are present:
+$04, non-0 means is on screen, e.g. 7F:F064

+$5B, e.g. 7F:F0BB - is 0 while you can act
   1 in ring menu, 2 in main menu, 1 or 2 while casting or spell animation runs or during events
   1 or 2 during map transition, anything higher means world map - so we should do nothing then

+$8A, e.g. 7F:F0EA, has the flag if anyone is in the menu, AND $04 tells us that

and last there's +$57 (2 bytes), e.g. 7F:F0B7, which is the pointer to the timer of the current action

those timer objects are 16 bytes each
00, 01 - tells us the next timer in the list (the whole thing should be a ordered list, it isn't)
02, 03 - (unknown)
04, 05 - time stamp in frames when the action is to be executed
06, 07 - original duration from start of timer until its execution
08, 09 - if 0 the timer is active, non-0 means the timer is stopped and this value is the remaining duration after resuming
0A, 0B - (unknown)
0C..0F - identifies the type of action


7F00C6 (2 bytes) holds the current time stamp in frames and gets updated exactly once per frame there:
Code: [Select]
$C0/CC63 C2 30       REP #$30                A:0000 X:000A Y:1CC0 P:envmxdIZC
$C0/CC65 EE C6 00    INC $00C6  [$7F:00C6]   A:0000 X:000A Y:1CC0 P:envmxdIZC

instead put a JSL to some free space and put there:
Code: [Select]
C2 30 REP #$30
48 PHA
DA PHX
5A PHY
AD C6 00 LDA $00C6 [$7F:00C6]
29 07 00 AND #$07 <- run only once every 8th frame
C9 07 00 CMP #$07
D0 04 BNE 04
22 xy xyxy JSL <- run tick updater
7A PLY
FA PLX
68 PLA
EE C6 00 INC $00C6  [$7F:00C6]
6B RTL

tick updater:
Code: [Select]
A2 40 20 LDX #$2040
A0 06 00 LDY #$06
===LOOP START===
DA PHX
5A PHY
BF 00 00 7E LDA 7E0000, x
F0 2D BEQ <- no one there, skip checks
===checks start===
AA TAX
BD 04 00 LDA $0004,x[$7F:F064] - 0 while not present
F0 27 BEQ <- was 0, go to checks end
BD 5B 00 LDA $0004,x[$7F:F0BB] - 2 while casting, >> 2 while on world map
29 FF 00 AND #$00FF
C9 10 00 CMP #$10
90 04 BCC <- $10 or more, go to end of entire function
--go to end--
7A PLY
FA PLX
80 21 BRA
--else--
C9 02 00 CMP #$02 <- 2 = casts a spell right now, go to update timer
90 04 BCC
--go to update timer--
7A PLY
FA PLX
80 19 BRA
--else--
BD 8A 00 LDA $0004,x[$7F:F0EA] - 4 is set while in menu, 1 seems to be movement related; enemies can have non-sensical values here sometimes... D255
29 05 00 AND #$05
C9 04 00 CMP #$04
D0 04 BNE <- was not set, go to checks end
---go to update timer--
7A PLY
FA PLX
80 0A BRA
===checks end===
7A PLY
FA PLX
E8 INX
E8 INX
88 DEY
F0 02 BEQ leave loop if 0
80 C2 BRA go to start of loop
===LOOP END===
6B RTL
===update timers===
A2 40 20 LDX #$2040
A0 03 00 LDY #$03
===START UPDATE LOOP===
DA PHX
5A PHY
BF 00 00 7E LDA 7E0000, x
F0 23 BEQ <- no one there, skip
===CHECK===
A8 TAY
BE 57 00 LDX $0057,y[$7F:F0B7] <- pointer to spell data
F0 1D BEQ
BD 0E 00 LDA $000E,x[$7F:19BE] <- timer type, 21D3 is spell preparation
EA EA EA
C9 D3 21 CMP #$21D3
D0 12 BNE
BD 0C 00 LDA $000C,x[$7F:19BC] <- timer type, D064 is spell
C9 64 D0 CMP #$D064
D0 0A BNE
BD 04 00 LDA $0004,x[$7F:19F4]
18 CLC
69 08 00 ADC #$0008
9D 04 00 STA $0008,x[$7F:19F4]
===END CHECK===
7A PLY
FA PLX
E8 INX
E8 INX
88 DEY
F0 02 BEQ leave loop if 0
80 CC BRA go to start of loop
===END UPDATE LOOP===
===end update timers===
6B RTL


I run this only every 8 frame because I've put a few more changes in that routine (e.g. passive MP regeneration)

edit: added check against false menu positive

Pages: « 1 2 3 4 5 6 »