øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1633.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index93de-3.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.220e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index93de-3.html.zx¿&h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0PdbOKtext/htmlISO-8859-1gzip@øÕbÿÿÿÿÿÿÿÿWed, 11 Mar 2020 00:02:31 GMT0ó°° ®0®P®€§²ð®¾&h^ÿÿÿÿÿÿÿÿÛ@b Blitz Battle Menu Tweak

Author Topic: Blitz Battle Menu Tweak  (Read 5383 times)

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Blitz Battle Menu Tweak
« on: June 20, 2011, 09:46:03 AM »
Hmm so I'm working on making blitz use a menu, rather than do "street fighter" button matching because as awesome as the original functionality is/was... it is some what obnoxious to use at times compared to other abilities...

All of this work is heavily based on, and not possible without the documentation provided on this site credit of Imzogelmo, assassin, Lenophis, and Novalia Spirit. Anywhere I say Assassin here, I really mean any of these four individuals but since I no way to break that down, and for brevity's sake... I'll just say Assassin. Also since I'm looking at his C2 doc on occasion as well... its safer ^_^

So I got it to the point that selecting blitz brings up a menu with 8 entries, which correctly correspond to Pummel through Bum Rush in two columns in a normal english reading order (left->right, next line below). Selecting an ability causes that ability to occur normal, etc.

However I have two problems:

The first problem that I have is that the method I've chosen for loading the available Blitz commands is modeled after Magitek, so it loads a static list of the 8 entries... meaning if you only know Pummel, it still allows you to try and use... say Fire Dance, and then when he tries to execute it, "Incorrect Blitz Command" happens as if you messed up the button entries.

I'm not too worried about this, because I've not really tried to fix this yet but seems like I can use the old Blitz code as a guide there, as this is minor compared to my second issue... though it should be noted that in general I modeled all the crap I changed the Blitz code to is based off Magitek / Dance.

The second problem that I have is that the text for the entries isn't being loaded correctly, and isn't in the right location (though the finger selector is). See the attached screen shot [edit: removed]...

Anyone have any thoughts on this?

Here is the ASM for the changes I made for this (along with my insane and possibly wrong/confusing notes... as well as some original comments from Assassain's C2 doc on Magitek):

Code: [Select]
hirom   ; don't change this
header  ; comment out if your rom has no header

;;; WTF THIS WORKS!!!
;org $C155A6
;DW #$8625
;org $C17CFD
;DW #$5983
;;;;;;;;;;;;;;;;;;;;;
; caveat is it uses magitek menu text and non-Terra only have acces to 4 abilites lol
;;;;;;;;;;;;;;;;;;;;;

;change blitz? menu pointer
org $C155A2

;DW #$5755
DW #$6F72

;change blitz? pre-function pointer
;org $C155A4

;DW #$575F
DW #$7076

;change blitz function pointer
;org $C155A6

;DW #$6FF8
DW #$6FC7
; TODO change other pointers?

; change blitz menu pointer
;C1/7CFD: 6B77    (Blitz)
org $C17CFD

DW #$6F72
; TODO change this? draw menu...

; change blitz 7BF0 function pointers ; no idea what impact this has, alters spacing on menu that I can tell...
;C1/4565: 3E50    (27) ($5757)
;C1/4568: 6250    (28) ($5761)
org $C14565

DW #$5088
DW #$50B6

;reference what magitek does in this table (and several other similar ability menus)
;C1/454D: 8850 (1B) ($59A5)
;C1/454F: B650 (1C) ($5718)

;change blitz functions
org $C16F6A

;Data: Blitz targetting ;taken from C1/9104
;DD #$6A434343
;DD #$43436A03
DD #$6A6A6A6A
DD #$6A036A03

;Data: Blitz attacks ;using magitek terra values to save space for now
;DD #$03020100
;DD #$07060504
;DD #$24180C00
;DD #$54483C30

;Maybe model off of this? no because it expects an index number, not a "where is my button matching code" number
;C1/6F88: 00      (Pummel)
;C1/6F89: 0C      (Aura Bolt)
;C1/6F8A: 18      (Suplex)
;C1/6F8B: 24      (Fire Dance)
;C1/6F8C: 30      (Mantra)
;C1/6F8D: 3C      (Air Blade)
;C1/6F8E: 48      (Spiraler)
;C1/6F8F: 54      (Bum Rush)

; @ 6F72
;Blitz command ;;;;;;;;;;;;;;;;;;;; from C1/5983
LDA #$3B ; magitek is 28...but blitz is 3D not sure what to use here but...maybe 3B? (from C1/5529, X = 28)
STA $7BC2
LDA $7BA5
BMI Branch1 ; branch if minus ?
JSR $5A17 ; common routine
STZ $7BA6
LDA #$80
STA $7BA5

Branch1:
LDA $7BA6
JSR MenuBuild
JSR $5729 ; common routine
BCC Return
LDA #$27  ; lore (19) loads #$11, rage (1C) #$13, dance (1F) #$15, row (22) #$17, def (25) #$19, magitek (28) #$1B, throw (2B) #$1D, tools (2D?) #$20...
STA $7BF0 ; ?
LDA #$11  ; lore (19) loads #$07, rage (1C) #$09, dance (1F) #$0A, row (22) #$0B, def (25) #$0C,03,08,?,05,04 , magitek (28) #$0D, throw (2B) #$0E, tools (2D?) #$0F...
JMP $5A2C ; common routine .. maybe calls into continuing menu pointer thing?.. stores into $7BC2 so...

Return:
RTS

; @ 6F9D
;Build the Blitz menu ;;;;;;;;;;;;;; taken from 4D2E
MenuBuild:
PHY
ASL A
TAY
TDC
TAX

LoadCyc:
;C1/4D33: BF4DE0C2 LDA $C2E04D,X  (format for drawing magitek menu)
LDA $C1704A,X  ; format for drawing blitz menu
STA $5755,X
INX
CPX #$000D ; did we get 13 bytes
BNE LoadCyc ; branch if not
TYA
TAX
; Note that the following two lines statically load list of available blitzes, that means it will act as if you know all blitzes at all levels...
LDA $C1910C,X   ; (Left column Blitz attacks) ; dance does this: C1/4D1A: B97E26  LDA $267E,Y    (List of known dances, even (left))
STA $575A
LDA $C1910D,X   ; (Right column Blitz attacks)
STA $5760
JSR $4E07  ; common function - used to set up menu format??
JSR $63AB  ; common function - used to get text to display based on what is in the accumlator when called? 06 for magitek, 15 for blitz?...
PLY
RTS

; @ 6FC7
; Load commands entry point ;;;;;;;;;;;;;;;;;;;;;;;
; taken from C1/8625
Enter:
STZ $88E3 ; (from C1/5529, X = 2A) ; What does 2A mean? What does it have to do with magitek?
LDA $7BCB
BEQ LoadComm
LDA #$3C ;LDA #$29
STA $7BC2  ; (queue up to execute at C1/5716)
RTS

; @ 6FD5
LoadComm:
LDY $62CA
LDA $893F,Y
STA $36
LDA $8943,Y
STA $37
STZ $38
LDA #$01
STA $39
JSR $80DB ; common function
LDA $3C
BNE LoadContrl
LDA $36
STA $893F,Y
LDA $37
STA $8943,Y

LoadContrl:
LDA $09      ;  (load controller 1)
   ;C1/8659: 1006    BPL $8661      (branch if not pressing B)
BPL LoadOptn    ;  (branch if not pressing B)
INC $96
JSR RageSet
RTS

; @ 7003
;Load command options ;;;;;;;;;;;;;;;;;;
LoadOptn:
STY $36
LDA $04     ;   (load shared controller byte)
BPL SkipMid   ;   (branch if nobody is pressing A)
;C1/8667: 209184  JSR $8491
JSR $8491    ; not common function, but probably don't want to replicate
LDA $C1910C,X    ;  (load blitz commands)
BMI SlotEmpty    ;  (branch if slot is empty, note that this will never be taken)
INC $96
STA $7A85
LDY $36
LDA $C16F6A,X   ;    (Targeting byte for Blitz commands)
STA $7A84       ;  (save as character targeting byte)
JMP $7795 ;  common function ; jump into fight routine

SlotEmpty:
INC $95

SkipMid:
LDY $36
LDA $893F,Y
TAX
LDA $C18289,X   ;  load finger positioning for magitek menu
STA $88E4
LDA $8943,Y
TAX
LDA $C1828D,X  ; load something... out of a data table? Vertical finger positioning?
STA $88E5
INC $88E3
RTS

; @ 7041 is next byte after end of this...
; magitek data format bytes ;;;;;;;;;;;;;;;;;;;;;;;;
;C2/E04D: 05 04        ORA $04
;C2/E04F: 04 21        TSB $21
;C2/E051: 06 00        ASL $00   ; the 06 here is what controls what word retrieval code we use
;C2/E053: 05 03        ORA $03
;C2/E055: 04 21        TSB $21
;C2/E057: 06 00        ASL $00   ; the 06 here is what controls what word retrieval code we use
;C2/E059: 00

DD #$21040405
DD #$03050015   ; swap word retrieval code to use 0x15 pointer... Not sure what used this originally though!! BUG RISK
DD #$00152104   ; swap word retrieval code to use 0x15 pointer... Not sure what used this originally though!! BUG RISK
DB #$00

; @ 704E
; take from C1/64EF - C1/6517

JSR $63F7 ; (from C1/6411, X = 15)  ; does some counters
LDA ($4F)
STA $2C     ; storing if the attack is available or not?
CMP #$FF
BNE GetName
LDA #$0A
JMP $66A5   ; common function?

GetName:
;STA $2C
LDA #$0A ; (10 = Blitz attack name length)
STA $2E
STA $40
JSR $18B0 ; common function
LDX $30
LoadName:
;C1/650A: BFADF9E6 LDA $E6F9AD,X (Loads Magitek attack name X)
LDA $E6F831,X ; (Loads Blitz attack name X)
JSR $63FE   ; common function?
INX
DEC $40
BNE LoadName
RTS

; @ 7076
; Not sure what this does but its between Magitek 28 and 2A command so probably related? ;;;;;;;;;;;;;;;;;;;;
; taken from C1/5716
; yes I'm aware this 1C does not reference Rage, but when I first started out I didn't realize 7BF0 was an index for a separate function pointer table
; so yes, this name is mislead and dumb for now.
RageSet:
;LDA #$1C ; Why 1C?? ;(from C1/5529, X = 29) ; X=3B uses #$27, X=3C uses #$28
;STA $7BF0
;TDC
;JMP $5A2C ; common function

LDA #$28 ; Why 1C?? ;(from C1/5529, X = 29) ; X=3B uses #$27, X=3C uses #$28
STA $7BF0
TDC ;LDA #$11 ;causes an infinite loop when using abilities...
JMP $5A2C ; common function

;@ 7080 is next byte

;@ 7095 is where blitz originally ended

; change blitz menu text pointer
; BUG RISK this overrides whatever was using 15, which I don't see anywhere but...
; C1/643E: 4767    (15) (exits)
org $C1643E

DW #$704E

; Pointer, but for what command I don't know, pretty sure this is for blitz...
; other commands point to "action" portion, i.e. magitek points to '2A' BUG RISK
;C2/E38C: 01 00
org $C2E38C

DW #$3D01 ; total risk here....but make point to 3D
« Last Edit: June 21, 2011, 11:53:58 AM by Ronnen »

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Re: Blitz Battle Menu Tweak
« Reply #1 on: June 20, 2011, 10:26:06 AM »
I guess I should also note that I took four risks (leaps of faith really) here by making some "un-educated" guesses about some pointer table values...

  • I made the assumption that the "3B" and "3C" values of $7BC2 in the pointer table @ C1/552C correspond to the Blitz command ($7BC2 being a register gets assigned whatever is in the accumulator when you jump to $5A2C).

    This assumption seems reasonable to me for a number of reasons, not the least of which being it makes the later part of the pointer table resolve nicely into chunks of 3 much like the middle part does (display menu function, then ?looping? function, then what to do when using a menu item)... for Magitek this is 28, then 29, then 2A... and so Blitz being 3B, 3C, then 3D isn't totally insane.


  • The second assumption is much less educated though. I made the assumption that the "27" and "28" values of $7BF0 in the pointer table @ C1/4517 should do the same thing as "1B" and "1C".

    I made this assumption because "1B" and "1C" correspond to the values of $7BF0 after calling "28" and "29" in the pointer table @ C1/552C (i.e using Magitek).... and "27" and "28" are the values after calling "3B" and "3C" in pointer table @ C1/552C (i.e. using Blitz if my first assumption was correct) prior to me making any changes...
    The code that gets called here at the very least seems to affect text spacing... and I'm not terribly concerned because several commands (dance, tools, etc) also use the same values as Magitek for this table so yeah...


  • The third assumption is that the "15" entry in the pointer table @ C1/6414 is free to be used by Blitz. This table controls what function gets called to load menu text based on the value of $2C when invoked from C1/6411, and gets referenced by the data bytes called by Assassain as "format for drawing magitek menu" @ C1/4D33.

    I have no good reasoning for choosing the "15" entry here, other than I couldn't find any references that loaded $2C up with "15" ... I did test a variety of commands and none of them seem impacted... but yeah... worst assumption yet...


  • The last assumption I made is that the "pointer" @ C2/E38C (which looked at by the function @ C1/5A2C in order to set $7BC2 for use in the pointer table @ C1/552C) is related to Blitz. Previously it was set to "00" (exit) but I changed it to "3D" (invoke my Blitz command code).

    Other commands follow a similar pattern (invoking the 3rd entry corresponding to them in the table @ C1/552C) so I did so as well...
    The function @ C1/5A2C takes whatever the accumulator is when invoked and multiplies it by 4, stores that into X, and then loads $C2E348 + X and stores it into $7BC2 until 4 bytes have been processed. Since the original "3B" and "3C" put #$11 in the accumulator prior to invoking the function @ C1/5A2C and I made the assumption that they were Blitz related... I have to make the assumption that C2/E38C ($C2E348 + 11 * 4) is Blitz related.

    Thus the C2 data section referenced here is in 4 byte blocks, for commands of like Magitek, tools, etc generally following the format 01 MM 00 00 where MM is where I put "3D," but other commands like Magitek put "2A"...

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: Blitz Battle Menu Tweak
« Reply #2 on: June 20, 2011, 11:23:43 AM »
The first problem that I have is that the method I've chosen for loading the available Blitz commands is modeled after Magitek, so it loads a static list of the 8 entries... meaning if you only know Pummel, it still allows you to try and use... say Fire Dance, and then when he tries to execute it, "Incorrect Blitz Command" happens as if you messed up the button entries.
1) The Magitek menu isn't dynamically built (because there's no variance to it), which is why it always has the 4/8 abilities listed (Terra's is different, why I don't know).
2) The Blitz command still executes the button interpreter code to see if you entered in the right combo. That code is in C1... :eek:

Quote
The second problem that I have is that the text for the entries isn't being loaded correctly, and isn't in the right location (though the finger selector is). See the attached screen shot...
Oooooooohhhh, I bet I know. There's some data towards the end of C2 that each menu looks at to determine positioning and stuff. You didn't add the data, so it's looking at garbage. Since there's no room at the data's normal position, you'll have to do so elsewhere. What data am I talking about? This data! Giving it a quick glance again points out that there's no option for the Blitzes, and I'm not really sure where you would add it. :blush:

119 bugs fixed and counting.

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Re: Blitz Battle Menu Tweak
« Reply #3 on: June 20, 2011, 12:07:46 PM »
1) The Magitek menu isn't dynamically built (because there's no variance to it), which is why it always has the 4/8 abilities listed (Terra's is different, why I don't know).
2) The Blitz command still executes the button interpreter code to see if you entered in the right combo. That code is in C1... :eek:
1) Yes, I'm aware its statically built, which is why mine is too when I copied its format :) I know why mine is static, just haven't gotten around to figuring out how to actually determine what the list of "known" blitzes is stored.. though the code @ C2/5818 gives me some good hints / starting places I think...

2) I overwrote the button checking code (C1/6F6A -> C1/7095). As well as the pointer that tells it to go look at that code (C1/55A6). It does a "failed blitz" because if if the players selects a blitz he/she hasn't learned yet, my code returns the index of that blitz as if you DID know it... and then code in C2 that actually does the Blitz goes "WTF you don't know this yet..."

But it isn't actually checking if the button combo is right because that code doesn't even exist anymore ^_^

Quote
Oooooooohhhh, I bet I know. There's some data towards the end of C2 that each menu looks at to determine positioning and stuff. You didn't add the data, so it's looking at garbage. Since there's no room at the data's normal position, you'll have to do so elsewhere. What data am I talking about? This data! Giving it a quick glance again points out that there's no option for the Blitzes, and I'm not really sure where you would add it. :blush:

That is super helpful, and tells me what that data block means in much more detail thank you!

However, I did already add that data... I put it in the middle of the old Blitz block @ C1/7041 from my code above...

Code: [Select]
; @ C1/7041 is next byte after end of this...
; magitek data format bytes ;;;;;;;;;;;;;;;;;;;;;;;;
;C2/E04D: 05 04        ORA $04
;C2/E04F: 04 21        TSB $21
;C2/E051: 06 00        ASL $00   ; the 06 here is what controls what word retrieval code we use
;C2/E053: 05 03        ORA $03
;C2/E055: 04 21        TSB $21
;C2/E057: 06 00        ASL $00   ; the 06 here is what controls what word retrieval code we use
;C2/E059: 00

DD #$21040405
DD #$03050015   ; swap word retrieval code to use 0x15 pointer... Not sure what used this originally though!! BUG RISK
DD #$00152104   ; swap word retrieval code to use 0x15 pointer... Not sure what used this originally though!! BUG RISK
DB #$00

and have the menu code looking here to retrieve this data...

Code: [Select]
; @ C1/6F9D
;Build the Blitz menu ;;;;;;;;;;;;;; taken from 4D2E
MenuBuild:
PHY
ASL A
TAY
TDC
TAX

LoadCyc:
;C1/4D33: BF4DE0C2 LDA $C2E04D,X  (format for drawing magitek menu)
LDA $C1704A,X  ; format for drawing blitz menu
STA $5755,X
INX

.... wait... $C1704 !A!  .... crap... this should be $C17041 obviously LOL... epic fail on my part...

I need to learn to read...

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Re: Blitz Battle Menu Tweak
« Reply #4 on: June 20, 2011, 12:11:34 PM »
And a quick test reveals  [edit: temporary] victory...

Thank you Leno   :happy:
« Last Edit: June 21, 2011, 11:54:31 AM by Ronnen »

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Re: Blitz Battle Menu Tweak
« Reply #5 on: June 20, 2011, 03:07:57 PM »
And getting it to limit it to only the Blitzes you know was pretty easy once I solved the display issue... though I did have to make space to keep this an "inline" change (not touching bytes outside of blitz functionality) by moving the data bytes I'd put in C1 over old blitz code to C4 where old Blitz button matching bytes were...

Just added this function and called it when loading the blitzes for the menu (with one tweak in one of those places, changing a BMI to a CMP followed by a BEQ... darn negative flag hanging around so long...)

Code: [Select]
CheckBlitz:
CMP $3A80        ; number of blitzes you know... e.g. if you know suplex, this will be #$03....
BCC CheckRet   ; suplex index is #$02 so do a simple less than branch
LDA #$FF          ; overwrite index with null ability if this is greater than blitzes you know

CheckRet:
RTS

This might not work "right" if you don't know Spiraler and you go learn Bum Rush... I can't remember if doing that teaches you all blitzes or just bum rush...

something to test I suppose

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: Blitz Battle Menu Tweak
« Reply #6 on: June 20, 2011, 04:21:25 PM »
Blitzes use a bitfield, so that check won't work. Try using BIT $3A80 instead of CMP, and change the BCC to BNE, see if that works in all cases.

119 bugs fixed and counting.

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Re: Blitz Battle Menu Tweak
« Reply #7 on: June 21, 2011, 11:50:59 AM »
Blitzes use a bitfield, so that check won't work. Try using BIT $3A80 instead of CMP, and change the BCC to BNE, see if that works in all cases.

You are quite correct that my code didn't work right, with the caveat that $3A80 stores the number of known Blitzes, not the bit mask. It turns out that $1D28 is the known blitz bit mask.

So my code using $3A80 did "work," unless you went and learned Bum Rush prior to learning the other 7 Blitzes (which is pretty likely given how early you can do the Duncan event).

In order to solve that, I had to write some code to generate a bit mask for each ability such that X = #$00 (Pummel) would return #%00000001, and X = #$01 (AuraBolt) would return #%00000010, and so on... and then use that generated mask to compare it to the list of known blitzes... and then return either whatever X was when the code was called, or #$FF (the "null" ability) depending on if I knew that Blitz...

Your suggestion of using BIT -> BNE for that was quite helpful!

Code: [Select]
;;;;;;;;;;;;;;; Menu Item Retrieval code ;;;;;;;;;;;;;;;;;;
;using $1D28 (bit mask of known blitzes)
; given X, load either X or FF, depending on bit mask
GetBlitzIndex:
PHY
TXY ; set Y = X
LDA #$01 ; initialize to check first bit (check if Pummel is known)
DEY
BMI GetBlitzCheckMask ; if Y was 0, we are done. Otherwise rotate bits to check appropriate Blitz

GetBlitzRollBits:
ASL ; shift bits left, could use ROL but that seemed to cause issues
DEY
BPL GetBlitzRollBits ; If Y not yet 0, we haven't made the right bit mask for the Blitz, keep rotating

GetBlitzCheckMask:
BIT $1D28 ; compare known Blitzes mask to the ability mask we just made
BNE GetBlitzValidRet ; if its valid return X (the index of the ability)
LDA #$FF ; Otherwise return the "null" ability
PLY
RTS

GetBlitzValidRet:
TXA
PLY
RTS

After applying the finishing touch of changing up the blitz non-battle menu to display the Blitz name instead of button combo and I think I'm ready to declare victory on this tweak!

See screen shots  :cycle:

darkmage

  • Phantom Train
  • *
  • Posts: 339
  • Skating the Razor
    • View Profile
Re: Blitz Battle Menu Tweak
« Reply #8 on: June 24, 2011, 06:20:47 PM »
Wow, Ronnen! Between this and the "extra magic" commands in the ToF, you've got some good stuff going on!

 :omg:

Poco Loco

  • Cagnazzo
  • *
  • Posts: 356
  • Gender: Male
    • View Profile
    • FF6hacking.com
Re: Blitz Battle Menu Tweak
« Reply #9 on: June 28, 2011, 01:03:55 AM »
this is insanely good work

you should make a patch for this man :)
"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Re: Blitz Battle Menu Tweak
« Reply #10 on: June 28, 2011, 07:45:29 AM »
this is insanely good work

you should make a patch for this man :)

Thanks! I'll likely submit this in a bit.

I just like to at least do a play through myself to make "sure" I didn't break stuff unintentionally. And also to make sure it feels right.

What I will say is that I have my ZSNES speed control buttons bound to my controller for "not rare" use, and because of this, I almost never used Sabin due to his ability not being conducive to playing at 2x/3x speed (the speeds at which I generally play the game).

These menus make this no longer the case :)

Poco Loco

  • Cagnazzo
  • *
  • Posts: 356
  • Gender: Male
    • View Profile
    • FF6hacking.com
Re: Blitz Battle Menu Tweak
« Reply #11 on: June 28, 2011, 01:42:48 PM »
great stuff bro :)

I'm really looking forward to this
"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: Blitz Battle Menu Tweak
« Reply #12 on: June 29, 2011, 12:19:08 AM »
can a SwdTech menu be far behind?  it's probably trivial to make at this point.  (easy for me to say; i'm not the one coding it.)

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Re: Blitz Battle Menu Tweak
« Reply #13 on: June 30, 2011, 09:24:12 AM »
can a SwdTech menu be far behind?  it's probably trivial to make at this point.  (easy for me to say; i'm not the one coding it.)

I considered this briefly when making Menu Blitz, and while I haven't done a full investigation to find all the pieces such a change would make unnecessary...

I would not say its trivial, especially if I try to make a SwdTech Menu patch that is independent of the Menu Blitz patch...

If I make a combined patch (Blitz and SwdTech), I can use the space I freed up from the Blitz data, as well as customize my menu drawing code such that it uses variable jumps / lookups. Possibly involving a new small pointer table somewhere, though I think I could get away without that.
This would make the code slightly bigger / less efficient... but saving a fair amount of space from having two separate Menus.

And if I went this route I probably could consolidate all the menu driven battle commands (magic, item, tools, dance, [Blitz], [SwdTech], Lore, etc.) to use the same generic "menu setup" methods. Riskier, but since those setup methods consume roughly 250+ bytes each and are in general mostly the same... my generic method could be several times as large and I'd still be saving upwards of 500 bytes for other future things to go in...

However, if I go the route of trying to make the patches independent, and since I want my patches to be "inline" at worst in order to prevent conflicts if at all possible (and C1 is pretty crowded already anyway)... I'd be stuck with the existing size of the SwdTech code.

Which other than a couple of small pieces spread out (which would be hard to utilize efficiently / without a bunch of semi random JMPs), seems to be restricted to the 224 bytes at C1/7D25 - C1/7E05 (for comparison, Blitz had a block of 300 contiguous bytes I could rampage over... I used 282 of them)

Trivial? Maybe not :P

Doable? Well its in the right size range if a little short... I can give it a shot ^_^

But yeah, I can start working on that here some point soon-ish.

I'll try and get an independent patch for SwdTech, and then if that works out, maybe look at doing it generically for an ultimate ninja menu consolidation magical girl transform job...
« Last Edit: June 30, 2011, 09:33:26 AM by Ronnen »

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Re: Blitz Battle Menu Tweak
« Reply #14 on: June 30, 2011, 09:31:30 AM »
Oh, and I threw Menu Blitz up on the submissions forum of this site as well.

It also includes the .asm, which because of its size and complexity I tried to comment at least in a manner decently coherent... Though I have a working version on my harddrive that contains much more insane, but more complete comments lol...

Feel free to take a gander at it Assassin and let me know what you think... might be that a SwdTech menu wouldn't be as large as I'm thinking it would have to be.