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

#1
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
This thread is to discuss ASM problems that should arise with the implementation of a 15th character. It is not to discuss things like implementing a new skill or any other feature specific to the character. These feature will have their own thread when we take a decision regarding them.

Here are the potential problems that we have identified so far:
    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=90]Make the character learn and use magic (if applicable). -GrayShadows[/progress]

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

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

If you find a complete solution for a problem, submit it by posting the modified code, preferably with comments. Next to the potential problem, the name of the person/people who is working on it will appear.

It is suggested to work on one problem at the time and post your difficulties if you have any. The goal of this thread is to encourage discussion.
  Find
 

#2
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Another thing we need to think about is sprite space. If we want to keep the game as-is, we need to be able to add a whole PC sprite sheet. Most of it is pretty simple, but there are a few obstacles. The main one I have currently is finding the overworld sprite pointers. I've got extra sprites working in battle 99%, they just don't do the victory dance at the end of battle, which I'm pretty sure I can find and fix with a little effort.


I've got a semi-complete solution for learning magic. I made a patch sometime last year that reuses the magic lists over and over again for every actor. Our 15th man would have to share their magic list, but it would be fully functional including esper bonuses and learning magic from equipment. At absolute worst, it would be a little unfair that they would already have magic (unless we get the character before Zozo), and that they and whoever they share with will learn magic more quickly because 2 characters will be adding spells to the pool. Originally I replaced Gogo's magic code to make the patch, but I will go back and update it so that Gogo will still work as intended. I will fully document it so that the new code doesn't run on top of anyone else's in here.

While I'm going through it all I will keep an eye out for ways to revamp the magic system to allow more lists, I had an idea where instead of having a byte per spell, having a byte per esper followed by a bit per spell, then let the game figure out which spells the character knows from there... but then I would have to figure out a solution for equipment-learned magic. Theoretically, I could reduce the amount of memory needed for each actors list down to 35 bytes, down from 54 bytes. This would allow us to have 18 distinct magic lists with 16 bytes left over. This would obviously require a massive overhaul of the code, but it is technically doable. Again, the main problem is magic learned from equipment. I count only 8 pieces of equipment currently that teach magic, if we restrict the game to only being able to learn from those specific gear, we could add another 8 bytes to each list giving us 43 bytes per list, getting us to 15 usable lists with 1 byte left over.

Another perk to this method would be there would be 2 extra learned magic bits allowing us to add 2 new spells to the game if we want, but making them display correctly as magic in battle (with openings and all) would be opening a whole other can of worms... just something to think about.

Thoughts? ideas? preferences?
  Find
 

#3
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Actually for the magic list we could use two ranges of unused bytes in the U.S. version:

Code:
$1CF8-$1D27: Sword tech names (48 bytes)
$1E1D-$1E3F: Unused Bytes (35 bytes)

We could put the first 48 spell on in the first block and the remaining in the other block. This would not modify the magic learning system (solution I prefer) and we could have a full learning list for character 15. It's just a proposition.
  Find
 
[-] The following 1 user says Thank You to madsiur for this post:
  • Robo Jesus (05-05-2015)

#4
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
This is where I'm at with the sprites:

I've got it functionally working and tested, I can add a new sprite into blank space in an expanded ROM and edit the various pointer lists and palette data to get them functioning in the overworld and battle. The main thing I need to hammer out is the palettes for save data, shop menus, and party selection menu. I see the data that's changing, but haven't quite tracked down what is which and what values to use... Also I will have to handle expanding and moving the data for this. But at the very least its functional...

my notes so far.
Code:
PC Sprite Sheet Expansion

Map Pointers

C0/6992:    BFF2D0C0    LDA $C0D0F2,X    (Loads pointer to Map character graphics)
C0/6996:    852A        STA $2A
C0/6998:    1A          INC A
C0/6999:    852D        STA $2D
C0/699B:    18          CLC
C0/699C:    690F        ADC #$0F
C0/699E:    8530        STA $30
C0/69A0:    1A          INC A
C0/69A1:    8533        STA $33
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
C0/69BB:    A600        LDX $00
C0/69BD:    8620        STX $20

Bank pointers and Number of Bytes to Copy for Map Character Gfx (2 bytes each)
C0/D23C - C0/D385

Pointers to Map Character Graphics (2 bytes each)
C0/D0F2 - C0/D23A



Battle Pointers (needs to be moved in order to expand list!)
c2/ce43:
00 00 D5
A0 16 D5
40 2D D5
E0 43 D5
80 5A D5
20 71 D5
C0 87 D5
60 9E D5
00 B5 D5
A0 CB D5
40 E2 D5
E0 F8 D5
80 0F D6
20 26 D6
C0 3C D6
60 53 D6
00 6A D6
60 7F D6
C0 94 D6
20 AA D6
80 BF D6
E0 D4 D6
40 EA D6
C0 3C D6

C1/3D6E:    BF43CEC2    LDA $C2CE43,X     (Pointer to start of character battle graphics)

Battle Palette Table (If pointers are moved, this table doesn't, just expand the table over the old pointer list)
C2/CE2B: 02 01     
C2/CE2D: 04 04       
C2/CE2F: 00 00       
C2/CE31: 00 03     
C2/CE33: 03 04      
C2/CE35: 05 03     
C2/CE37: 03 05  
C2/CE39: 01 00      
C2/CE3B: 00 03     
C2/CE3D: 06 01       
C2/CE3F: 00 03  
C2/CE41: 03 00
  Find
 

#5
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(06-20-2013, 05:05 PM)Edrin Wrote: The main thing I need to hammer out is the palettes for save data, shop menus, and party selection menu.

Those palettes are set by the OAM data here:

Code:
sprite arrangement, 9 bytes each, 2 sets for each character

(standing still, facing left)
D8/EA5C: unknown
D8/EA5D: X position of head tile
D8/EA5E: Y position of head tile
D8/EA5F: head tile
D8/EA60: palette and other things; palette uses (0000 1110) bits
D8/EA61: X position of foot tile
D8/EA62: Y position of foot tile
D8/EA63: foot tile
D8/EA64: palette and other things; palette uses (0000 1110) bits

("fanfare" pose, both arms up, facing left)
D8/EA65: unknown
D8/EA66: X position of head tile
D8/EA67: Y position of head tile
D8/EA68: head tile
D8/EA69: palette and other things; palette uses (0000 1110) bits
D8/EA6A: X position of foot tile
D8/EA6B: Y position of foot tile
D8/EA6C: foot tile
D8/EA6D: palette and other things; palette uses (0000 1110) bits

sprite palettes for save/load (and possibly other screens): add 2 to palette

I think also according to bank C3 comment that there is a pointer table for that data starting at D8/E917. Check the loading menu loading routine at C3/1903 to see what I am talking about. You can also make a search for ''OAM'' in bank C3. There is 3 or 4 places where those specific pointers are loaded.
  Find
 

#6
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Concerning the equipment of the 15th character, I was wondering if it would be a good idea to use bit 7 of byte 00 of the item data for an equip bit? It seems like an unused bit and it's common to all items. This way, we could choose what the character could equip without using the imp or heavy gear bit...

If we don't make an equip bit, the character will be able to equip everything.
  Find
 

#7
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
That makes sense to me, sounds like exactly what we would want to make it doable.

I was working on my hack all week but I've got sprites and portraits expanded, I still need to sit down with the OAM data and work out shop and save menus, but otherwise we are functionally 100%.
  Find
 

#8
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
I won't lie, I am still exactly where I was almost 2 months ago on this. I have learned a bit about the OAM data, but I haven't done any practical application yet. It looks like I will need to shift sprite placement around for the shop menus since they don't have the two extra spaces the party select menu has, I haven't even begun to dig into the code necessary for this.

Your job seemed pretty straightforward, Mad, did you ever get this knocked out or were there complications?

Does anyone have the know-how and willingness to get into the Colosseum code we need?

Can anyone think of any other ASM related tasks that need doing? We will eventually to make minor edits to the code as far as who can access the equip and relic menus, but nothing difficult I can think of.
  Find
 

#9
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(08-12-2013, 10:11 PM)Edrin Wrote: Your job seemed pretty straightforward, Mad, did you ever get this knocked out or were there complications?

Honestly I haven't work on this. I will in the next weeks though.
  Find
 

#10
Posts: 45
Threads: 4
Thanks Received: 7
Thanks Given: 1
Joined: Jul 2013
Reputation: 4
Status
None
I'm interested in helping with this. Is it a challenge to get an additional character to work with the coliseum? I might volunteer, if every other part of the project has been taken. Though I hesitate to commit just yet, since my palette project is still "active". Plus, I want to see you get shops and everything working first. Smile

Are you -- the collective you, since I don't know who in particular -- are you planning to give the new character a spell list? Is there enough remaining space in RAM, and, if so, how big a problem is it that it's not contiguous space? How many pointers will need to be changed to stat data and so on, if we start changing the offsets of things to accommodate a new spell list in one piece and contiguous with the old ones? I.e., HP moves ahead 29 bytes, and a thousand things break. Has something like this been attempted before, and is there a known list of pointers? Because that right there seems to me like it would be the biggest headache. Though I could be wrong.
  Find
 



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite