Users browsing this thread: 1 Guest(s)
The 15th Man Project: ASM Thread

#21
Posts: 45
Threads: 4
Thanks Received: 7
Thanks Given: 1
Joined: Jul 2013
Reputation: 4
Status
None
No problem. Consider it my next project, after I get done with the next version of my own palette hack. (I assume there is no near-future deadline for this hack's ASM code, since a lot of other stuff is still incomplete or not even started.)

It is probably for the best to let me take over. It turns out these windows can be very hard to hack. There are a lot of idiosyncrasies that take a long time to learn, and I've spent the last while struggling with them. I'll probably be able to do it a lot faster than you could, if you had to learn the C3 menu code from scratch.
  Find
 

#22
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
I've been thinking about the magic list; I think the best suggestion so far has been to use the SRAM blocks from $1CF8-$1D27 (Bushido names in 6j) + an additional six bytes of $1E1D-$1E3F (unused) for a total of 54 spell bytes. Personally, I'm in favour of a solution that gives us a contiguous set of bytes for the spell list rather than handling it in two different places (not least because it would drastically simplify the code used to display the spell list), and I think I may have one.

$1E1D-$1E3F is a total of 35 bytes, leaving us 19 more needed. Immediately following is $1E40-$1E6F (48 bytes), which is treasure chests opened, of which only 33 (IIRC, $1E40-$1E60) are used (15 available bytes); after /that/ is an additional 16 (theoretically) unused bytes from $1E70-$1E7F. If we move the 33 bytes of treasure chest information to the end of that block -- $1E5F-$1E7F -- that gives us a total of 66 bytes to work with, leaving us with block of 54 bytes for the spell list plus an additional 12 bytes for treasure chests, should we wish to add additional ones related to Iris (or if there are any chests not actually covered by the 33 known bytes).

It'd take a bit of time to move the chest data around, but unless I'm missing something drastic it shouldn't actually be /complicated/, just time consuming, and probably much less complicated than moving other data around the SRAM or dividing the spell list into two separate blocks.

ETA: And I know the idea of a natural spell list has been thrown around, although not decided on; I'll point out that if we do go with that idea, I've already written code to introduce an additional natural spell learner that I'd be more than happy to throw at this project.


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
 

#23
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
That's a really good idea. So good, I'm leaning toward it. I could probably make the necessary code changes without too much hassle, but im not inclined to move all the chest data myself (im lazy like that). The main downside is that it would mean this patch couldn't loaded with existing saves without giving her a jumbled magic list... Actually, thats not true... I wrote custom event code to totally clear a magic list... maybe I could put that in and clear all the data needed when you recruit her, and then the players would just get to reopen a ton of chests since they will be looking at the new bits for them.

Hrm... Gray, if you are up to it you can make these changes. Alternatively, if anyone wants to move the chest data for me I can do the ASM for the magic code.
  Find
 

#24
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(09-09-2013, 11:37 PM)Edrin Wrote: Hrm... Gray, if you are up to it you can make these changes. Alternatively, if anyone wants to move the chest data for me I can do the ASM for the magic code.

I can try to move the chest data. Also, I'll try by next week to hsve character 0E fully equipable. I just need a savestate when you control Leo because I don't want to change anything except the ASM code in C2. When I'm done I'll make a patch with my changes.
  Find
 

#25
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
I'll give a stab at the chest data as well, and I'll definitely do the magic ASM, when I'm off on Friday.


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
 

#26
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Have at it. If you need any help with the Magic learning and calling, let me know... it can be tricky if you don't know how it works.
  Find
 

#27
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Hey Mad, I thought of something for the equipment. Why not shove off the "Spec active when imp" bit to the empty byte 0, bit 7. That way you don't have to split up the equip data. Might simplify things for you.

Edit: just checked... if you remove the "no equip" restriction on Banon (properties 0E), he can be requiped with imp gear, so the game already knows how to use the extra bits there. Our best bet is probably to move Banon to another property slot and fix its call in the event code, then put Iris in slot 0E. Then all you have to do is fix the imp code to work with byte 0 bit 7 in a few places and we should be golden.
  Find
 

#28
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Thanks for the info. I'll have a closer look at all this Friday night but your suggestion would indeed simplify my life.
  Find
 

#29
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Updating our tasks, can you guys give updates as you have them on progress? I know most of you aren't getting started til a little later, just whenever you have information to share, please do. We are moving along in the project now so I'd like to start seeing some more action in here (talking primarily to myself here).

Also, if you need to use ANY additional ROM space at all, tell me how much you need and I will tell you where to put it, I need to keep all of our extra data as organized as possible. And lastly, please remember to document all of your changes to be sent to me with your patches as you complete them.

    Assigned Tasks:
  • [progress=66]Display the character portrait correctly in all instances. -Edrin[/progress]
  • Display the character properly in the shop menu. -Eggers
  • Make the character be able to re-equip. -Madsiur
  • [progress=33]Make the character learn and use magic (if applicable). -GrayShadows[/progress]

    To be Assigned:
  • Make special ability(s) display and function correctly in menus/battle.
  • Make the character appear in the coliseum and fight properly.
  • Edit events and battle events to move Maduin and Leo from actor $0E to $0D.

    Completed Tasks:
  • Display the character properly on overworld maps and in battle. -Edrin

  Find
 

#30
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
... OKAY SO. I think I may actually have spell learning solved, and it's actually REALLY EASY, unless I'm missing something huge. Original code at C2/5E5C is first followed by my suggested change.

Code:
C2/5E59: B9 D8 3E     LDA $3ED8,Y    (Which character it is)
------
C2/5E5C: C9 0C        CMP #$0C
C2/5E5E: B0 13        BCS $5E73      (Branch if Gogo or Umaro)
------
C2/5E5C:
JMP CheckCharacter
NOP
------
C2/5E60: 20 83 62     JSR $6283      (Stores address for spells known by character in $F4)
C2/5E63: BE 10 30     LDX $3010,Y    (get offset to character info block)

And then CheckCharacter would be:

Code:
CMP #$0E         ; Is this Iris?
PHP
LDA #$1E1D       ; This stores in $F4 the start of Iris' spell list,
STA $F4          ; which other character have calculated at C2/6283.
PLP              ; That's called from C2/5E60, where we return below for other
JMP $5E63        ; characters, and Iris returns to C2/5E63 skipping that call
NotIris:
CMP #$0C         ; Is this Gogo or Umaro?
BCC NotGU        ; If not, branch.
JMP $5E73        ; If so, skip spell learning.
NotGU:
JMP $5E60        ; Otherwise, continue with spell learning, etc.


Both the code that governs learning from equipment and the code that governs learning from espers call the same subroutine -- C2/604B -- to actually teach the spell, and it references the character's spell block from $F4. The above code sets it manually for Iris, and then returns to the regular code to call C2/6283 for everyone else. Additionally, this also means that Iris would be able to uncurse the Cursed Shield, as it's checked when spells-learned-from-equipment are checked.

Also, I took a quick glance through, and it looks like there are only give locations in C0 that we'd need to change to move the chest data block -- and thinking about it, it makes even more sense to move that to $1CF8, the Bushido names block, because they're both 48 bytes long which means this would be compatible with the full range of potential chests, and also means we don't need to touch that last 'may or may not be used for anything' block of 16 bytes at $1E70. That would mean we'd need to change five lines to:

Code:
C0/1614:    B9F81C      LDA $1CF8,Y
C0/4C24:    B9F81C      LDA $1CF8,Y    (treasure chest bits)
C0/4C2D:    B9F81C     LDA $1CF8,Y    (treasure chest bits)
C0/4C34:    99F81C      STA $1CF8,Y    (set this chest as now open)
C0/BB1A:    9EF81C      STZ $1CF8,X    (set all treasure chests as not opened)


Next step is having her be able to /cast/ magic properly; I may wait on tackling that until the first of the week.


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
 



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite