øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=262;area=showposts;start=135e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index1135.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=262e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index1135.html.zx‹h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ ,/{(OKtext/htmlISO-8859-1gzip0|Ö{(ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 22:44:50 GMT0ó°° ®0®P®€§²ð®Šh^ÿÿÿÿÿÿÿÿ;5{( Show Posts - Madsiur

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

Pages: « 1 2 3 4 5 6 7 8 9 10
136
SPC - Hard Core / BRR samples
« on: February 11, 2012, 05:09:28 PM »
I have a somewhat SPC related question but it's more concerning BRR samples.

I started ripping WAV samples from PSX and DS RPGs and I would like to know the best sampling rate by taking in account the size vs quality factor. I changed some FFIV DS samples to 16 bit at 16000Hz. I haven't really noticed too much change in the quality but when I dropped to 8000Hz there was a significant drop of volume and quality. So what would be the best sampling rate for my WAV samples that will be converted into BRR samples after? What is the ideal sampling rate for the SPC-700?

Also, as for GBA sample is the audio quality of the GBA is that bad  that it I shouldn't spend my time on those?  :hmm:

I read somewhere that the quality of the GBA sound is 8 bit at a average sampling rate of 8000Hz...

Thanks

137
Game Modification Station / Re: Unused RAM?
« on: February 04, 2012, 01:02:54 PM »
Thanks Lenophis. I made it work with the stack and $1B.  :happy:


And this time I did more tests with the command.

138
Game Modification Station / Re: Unused RAM?
« on: February 04, 2012, 01:46:27 AM »
Thanks for the answer!

i really couldn't answer this without seeing your tentative code, or at least pseudocode.  there's always the stack to store temporary variables on, btw.  though it can get unwieldly if you have branches, because then you have to PLA in two separate places.

Well the stack could be a good option. Sorry for my ignorance, but how much bytes can the stack hold? I tried to find the answer on net but I haven't found anything...

Let's say I PHA 4 bytes (twice 2 bytes) into the stack: The important thing if I understand right would be to PLA those 4 bytes by the end of my custom function in case what is already in the stack (if there is anything) would be require by another function later on ?

Quote from: assassin
as for potentially free variables, Function C0/6CF3, which is called by a few event functions, uses the 1-byte $1B.

You're right. $1B seems to used to store a character number, sometimes a data from a character (such as his level) or it's even used a a counter for looping I think.
Another solution would be like you did to try to identify (potentially safe) variables that are used to store multiple things...I should start taking notes...

As for my code I haven't really worked on my function since last week and I was really absorbed in SPC composition this week. I'll post it when I'm sure it's good so that way I won't look like an idiot. I'm still learning...  :blush:


Edit: Well I'm not done but here's what my code looks like. This one checks if one member of the active party has a level higher than the parameter. I would like to change the code so it would check if all members of the party have a level higher than parameter...Then I would need to store the number of people in the party somewhere (in the stack maybe?) and how many members of the party has a level higher than the parameter somewhere else ($1B?) and compare those two values when I would have looped 16 times. There might be some mistakes in my code but you should get the general idea:

Code: [Select]
TDC                     (zero A)
  LDX $00 (zero X)
            TXY             (zero Y)
REP #$20              (16 bit accum./memory)
(A)           LDA $0867,Y (current character's party)
            AND #$0007 (check which party)
  CMP $1A6D (compare A to the value of the active party stored in $1A6D)
    BNE  (branch  to (B) if not the current party)
SEP #$20 (8 bit accum./memory)
STX $4202 (store character number as multiplier A)
LDA #$25 (character data length)
STA $4203 (store character data length as multiplier B)
REP #$20              (16 bit accum./memory)
NOP (wait for the multiplication to be done)
NOP (wait for the multiplication to be done)
LDA $4216 (store the result of the multiplication in A)
TAY (transfer A to Y)
LDA $1608,Y (load current level of the character)
SEP #$20 (8 bit accum./memory)
(E) CMP $EB (compare to parameter)
BEQ (Branch to (D) if level was initially equal or higher than parameter)
CMP #$01 (check if it looped down to level 1)
BEQ (branch to (B) if level was never equal or higher than parameter)
DEC (decrement level by 1)
BRA (Branch to (E))
(B) INX (Increment X by 1)
TXA (Transfer X to A)
BIT #$10 (Have we checked all 16 characters?)
BNE (Branch  to (C) if we have checked all the characters)
STX $4202 (store next character number as multiplier A)
LDA #$29 (character data lenght)
STA $4203               (store character data length as multiplier B)
NOP (wait for the multiplication to be done)
NOP (wait for the multiplication to be done)
REP #$20              (16 bit accum./memory)
LDA $4216               (store the result of the multiplication in A)
TAY (Transfer A to Y)
BRA (Branch to (A))
(C) REP #$21
LDA $E5                   (Load low and middle byte of current offset)
ADC #$0005    (Command + parameters length)
                STA $E5         (Save in $E5)
                TDC             (Transfer D to C)
                SEP #$20        (8 bit accum./memory)
                ADC $E7         (Add to A $E7)
                STA $E7         (Store A in $E7)
JMP $C09A6D            (Make a 5 bytes jump from the command number in the event)
(D)           REP #$20        (16 bit accum./memory)
                LDX $EC         (Load parameter 2 and 3)
                STX $E5         (store the low and middle byte of the offset in $E5)
                SEP #$20        (8 bit accum./memory)
                LDA $EE         (Load parameter 4)
                CLC             (clear carry)
                ADC #$CA        (Add #$CA to the high byte of the offset)
                STA $E7         (Stre high byte of the offset in $E7)
JMP $C09A6D     (Make the event branching/jumping effective)


139
Game Modification Station / Re: Unused RAM?
« on: February 03, 2012, 09:03:34 PM »
well sorry for the double post...

Someone suggested me to use the japane bushido names space ($1CF8 to $1D27) which is not a bad thing but I would prefer using a place in the RAM that is not where the data are saved so anywhere previous to $1600 and after $2000 I guess but I don't what t touch a spot that would contain or could contain an important value that could be needed by the game after I overwrite it. I know there must be "unused RAM" floating around but how can I identify it? I only need a few bytes for temporary values, at most 3 x 2 bytes...

I know that most of the RAM between $2000 to $3000 hold the battle related RAM so could I use temporary a spot there (like the enemy names from $200D to $2018) assuming the values are reset after a fight or overwritten at the beginning of a battle?

Any suggestion?

140
Game Modification Station / Unused RAM?
« on: January 28, 2012, 10:23:01 PM »
I got a question for you guys,

Is there any RAM that could be used to store temporary values in FF3us? I'm trying to write a event command that would check if all the characters of the current party are above level X (parameter). My problem is that I'm looping 16 times and make a check on the party of each character to see if they are in the active one. So X holds the character number or in other words the number of times I have looped so far and Y holds the value of the increment to make the check respectively at $0867,Y (current character party?). Later on in the function I want to load the value at $1608 + (character number multiply by #$25) which is the level of the current character in the active party but I don't want to put that value in a variable that could affect other things in the game.

So is there some safe and/or unused places in the RAM I could dump that temporary value or any other value?

Or would there be a way by clever assembly programming to do what I want to do and only use A, X and Y without storing one of the two increments (level and party) related to the character in a variable ? (Don't give me the answer I just want to know if it's possible...)

Thanks in advance

141
Game Modification Station / Re: Party Leader identification
« on: January 17, 2012, 08:13:09 AM »
The leader is always in the first slot. This routine is setting the caseword to whoever is in the lead slot.

If there is no one in the first slot, would the subroutine consider the party member in the second slot as the party leader?

More preciscely, what interest me is the party leader actor number stored in $1E if I'm right.  When would it not branch (BCS) to C0/B4D7 and instead store the value in $1E (C0/B4D5) and change the value of $1A (C0/B4D3)? When the result of the CMP is negative, positive or equals 0? (So when does the carry flag is set?)

From what I'm understanding if $1A holds #$20 the first time and A holds either #$00, #$08, #$10 or #$18 each time, the result of the CMP $1A would always be negative each time it loops no?

There's probably something I don't understand right... :sad:

And by setting the caseword to whoever is the party leader, does it mean it will in the end set one of the following event bits with the STA $1EB4 at C0/B4E8? Sorry but I never used an event command setting/using a caseword ...

Code: [Select]
1A0 B4:0 Multipurpose, Terra-related bit; CaseWord bit 0
1A1 B4:1 Multipurpose, Locke-related bit; CaseWord bit 1
1A2 B4:2 Multipurpose, Cyan-related bit; CaseWord bit 2
1A3 B4:3 Multipurpose, Shadow-related bit; CaseWord bit 3
1A4 B4:4 Multipurpose, Edgar-related bit
1A5 B4:5 Multipurpose, Sabin-related bit
1A6 B4:6 Multipurpose, Celes-related bit
1A7 B4:7 Multipurpose, Strago-related bit
1A8 B5:0 Multipurpose, Relm-related bit
1A9 B5:1 Multipurpose, Setzer-related bit
1AA B5:2 Multipurpose, Mog-related bit
1AB B5:3 Multipurpose, Gau-related bit
1AC B5:4 Multipurpose, Gogo-related bit
1AD B5:5 Multipurpose, Umaro-related bit
1AE B5:6 Multipurpose, actor 14-related bit
1AF B5:7 Multipurpose, actor 15-related bit

142
Game Modification Station / Party Leader identification
« on: January 17, 2012, 12:07:52 AM »
Hi everyone,

I have a new question. I would like to use an *unused* event command and make a custom command that would make checks on the party leader (of the active party). It could be any characteristic of the Actor starting at $1600. So I could do something like: If party leader level is below 50 (parameter of the command) branch to $CA/0000 + $XX/XXXX (bytes 2, 3, 4 of the parameter). Or I could make a check on a item equipped ($161F to $1622) I haven't deceided yet. Now I found a portion of code in C0 that identify the actor number of the party leader, and this would be the first step of my command.

But from what I understand of the code comes a question: Is this function only good if the leader is in slot 0 or would I get the party leader actor number even if he's in slot #1 and there's no one in slot 0? I don't know if my understanding of the opcodes are good enough but here it is:

Code: [Select]
C0/B4B9: A920    LDA #$20
C0/B4BB: 851A    STA $1A (Store #$20 in $1A)
C0/B4BD: A400    LDY $00 (Load $00 in Y, probably #$00)
C0/B4BF: BB      TYX (Transfer Y to X, probably to zero X)
C0/B4C0: B95018  LDA $1850,Y (Load place of the Actor Y in the parties (value: either E1, E9, F1 or F9 for 1 party))
(E2, EA, F2 or FA for party #2 and E3, EB, F3 or FB for party 3)
C0/B4C3: 2907    AND #$07 (Bitwise #$07 AND  A, the result will always be 1, 2 or 3 (party number of character Y))
C0/B4C5: CD6D1A  CMP $1A6D (compare with active party number)
C0/B4C8: D00D    BNE $B4D7 (Branch if not equal)
C0/B4CA: B95018  LDA $1850,Y (Load place of the Actor Y in the active party)
C0/B4CD: 2918    AND #$18 (A = 0, 8, 16 or 24 dependig in which slot is the character)
C0/B4CF: C51A    CMP $1A (compare A with $1A)
C0/B4D1: B004    BCS $B4D7 (Branch on Carry set so when equals to 0?)
(I'm not sure but this would only happend only if $1A already equals 0
so once $1E would already hold character number in slot 0???)
C0/B4D3: 851A    STA $1A (Store A (the position in party) in $1A)
C0/B4D5: 861E    STX $1E (Store X (character number) to $1E)
C0/B4D7: E8      INX (increment X by 1)
C0/B4D8: C8      INY (Increment Y by 1)
C0/B4D9: C01000  CPY #$0010 (Y - 16)
C0/B4DC: D0E2    BNE $B4C0 (branch if we didn't looped 16 times)
C0/B4DE: C220    REP #$20          (16 bit accum./memory)
C0/B4E0: A51E    LDA $1E (Load $1E (the party Leader actor number in the accumulator) (A number from 0 to 15)


***This part is not really useful for what I want to make***
C0/B4E2: 0A      ASL A (multiply by two the actor number (now a even number from 0 to 30))
C0/B4E3: AA      TAX (Transfer A to X)
C0/B4E4: BFF3B4C0 LDA $C0B4F3,X          (load caseword (2 bytes, binary encoding?))
C0/B4E8: 8DB41E  STA $1EB4 (save CaseWord)
C0/B4EB: 7B      TDC (Transfer D to C, zero A)
C0/B4EC: E220    SEP #$20                           (8 bit accum./memory)
C0/B4EE: A901    LDA #$01
C0/B4F0: 4C5C9B  JMP $9B5C

I think I'm missing something or don't fully understand the part at C0/B4D1...

Thanks in advance!

143
Game Modification Station / Re: Map event triggers
« on: December 10, 2011, 09:07:28 PM »
So you can't simply just plop a pointer anywhere you wish, you need to manually adjust the pointer for the map you want, and every map afterwards. Not something to be done by hand.

I understand. I think I will put a hold on moving the pointers and the data. Thanks for commenting the code. It is much appreciated.

144
Game Modification Station / Map event triggers
« on: December 10, 2011, 10:13:45 AM »
I would like to be able to create more event trigger or event tiles than FF6LE limit us by moving that data in the ROM. That can be easily done and movin the pointers also but I have a few questions:

1) how does the game recognize which event trigger goes on which map since that data is only 5 bytes long ( X position, y position and 3 bytes for the event offset)? I ask that because if I add a new trigger manually, I suppose I can't just put it at the end of all the others. It must be regrouped with the others triggers who are on the same map... So how does the game recognize or calculate the number of triggers on the same map?

2) my second question is related to the function that loads the pointers and go to the correct event trigger and then loads the correct event. I suspect that function would be in the C0 bank but since my knowledge of that kind of coding is limited I would just like know if I found the correct function where the pointer of a event trigger is loaded:

Code: [Select]
C0/BC6F: A584    LDA $84        (from C0/00D4)
C0/BC71: D05C    BNE $BCCF
C0/BC73: A559    LDA $59
C0/BC75: D058    BNE $BCCF
C0/BC77: AC0308  LDY $0803
C0/BC7A: B96A08  LDA $086A,Y
C0/BC7D: 290F    AND #$0F
C0/BC7F: D04E    BNE $BCCF
C0/BC81: B96908  LDA $0869,Y
C0/BC84: D049    BNE $BCCF
C0/BC86: B96D08  LDA $086D,Y
C0/BC89: 290F    AND #$0F
C0/BC8B: D042    BNE $BCCF
C0/BC8D: B96C08  LDA $086C,Y
C0/BC90: D03D    BNE $BCCF
C0/BC92: A6E5    LDX $E5
C0/BC94: E00000  CPX #$0000
C0/BC97: D036    BNE $BCCF
C0/BC99: A5E7    LDA $E7
C0/BC9B: C9CA    CMP #$CA
C0/BC9D: D030    BNE $BCCF
C0/BC9F: B97C08  LDA $087C,Y
C0/BCA2: 290F    AND #$0F
C0/BCA4: C902    CMP #$02
C0/BCA6: D027    BNE $BCCF
C0/BCA8: C220    REP #$20      (16 bit accum./memory)
C0/BCAA: A582    LDA $82
C0/BCAC: 0A      ASL A
C0/BCAD: AA      TAX
C0/BCAE: BF0200C4 LDA $C40002,X
C0/BCB2: 851E    STA $1E
C0/BCB4: BF0000C4 LDA $C40000,X
C0/BCB8: C51E    CMP $1E
C0/BCBA: F013    BEQ $BCCF
C0/BCBC: AA      TAX
C0/BCBD: BF0000C4 LDA $C40000,X
C0/BCC1: C5AF    CMP $AF
C0/BCC3: F00E    BEQ $BCD3
C0/BCC5: 8A      TXA
C0/BCC6: 18      CLC
C0/BCC7: 690500  ADC #$0005
C0/BCCA: AA      TAX
C0/BCCB: E41E    CPX $1E
C0/BCCD: D0EE    BNE $BCBD
C0/BCCF: 7B      TDC
C0/BCD0: E220    SEP #$20      (8 bit accum./memory)
C0/BCD2: 60      RTS

From what I think I understand, near the end of the function (C0/BCAE) the value of two pointers are compared to each other then if they are equals we branch at $BCCF, if not there is a transfer from A to X and then the value of the pointer loaded from the same place is compared to AF$ and I really don't know what $AF hold as data. Anyway I'm not even sure if I'm looking at the right thing. So a little bit of help in assembly would be appreciated...

I'm not even at south figaro in my hack and I have no more event trigger to use so I really would like to be able to do more event creations...

Thanks in advance

145
Game Modification Station / Re: Overworld Map Corruption in FF6LE
« on: November 15, 2011, 11:25:20 PM »
I had the same problem. As soon as I was modifying something with usME, the next time I opened LE al lot of the overworld map tiles were glitched and the tileset in the upper right corner of the editor was all messed up. I don't know if in game the map was fine as I haven't checked that.

I did some experimentation too and I managed once or twice to succesfully patch a ROM that was modified with usME with a patch that was made ONLY of the changes in LE and then the overworld maps in LE were still editable and looked fine (again I don't if the map in game was correct and this "technique" doesn't work if you edit other maps in between). If I was using usME after I was corrupting the maps in LE again . I don't remember If I was using an expanded rom but I think so.

My only option was to modify at first the overworlds maps and create a patch and then start(again) my hack.

You probably localized part of the problem and I'll try to figure it out on my side as soon as I have time.

146
Game Modification Station / Re: Monsters graphics relocalization
« on: November 10, 2011, 12:51:42 AM »
Thanks for the help Assasin (and Lenophis). In the end I've been able to relocalize the monsters graphics and composition data in the F2 and F1 bank respectively. I've been able to incresed by $10000 bytes the free space for monster and esper sprites with an edited FF3se:



It looks nice but sadly there is something wrong when I save the sprites that have been imported after the firsts  $1F00 bytes of free space (approximately). Their sprite simply dissapear even though I have no error message. Here's the new location of the data followed by the changes I made to FF3se using an hex editor. My descriptions might be a bit off as I am not an assembly or C++ specialist:

New locations:

31AA20   31AA21   PTR      Pointer to 8-High Monster Composition Data   
31AA22   31AA23   PTR      Pointer to 16-High Monster Composition Data   
31AA24   31AE23   DATA   Monster 8-High Composition Data
31AE24   31B423   DATA   Monster 16-High Composition Data
320000   3571FF   GFX      Monster Graphics

Changes made to FF3se (all values were taken from the source file monsters.cpp):

0A0F1      C0 73 03      C0 73 04            value of the constant maxTileSize in the constructor Monsters + $10000 bytes (from $373C0 bytes to $473C0 bytes).
0A0FE      DC 0A           08 14            value of the constant maxMoldSize in the constructor Monsters almost doubled (from $ADC bytes to $1408 bytes).
0A46B      00 72 29      00 02 32            Offset of the start of the monster graphics in the function loadMonsGraphics.(from $297200 to $320200)
0A50B      00 B5 12      23 BE 31            Value of the variable address3 in the function loadMonsMold. (from $12B500 to $31BE23)
0A512      20 AA 12      20 AA 31            Offset of the 8-high monster specification pointer in the function loadMonsMold.(from $12AA20 to $31AA20)
0A53D      00 00 D2      00 00 F1            Value added to the parameter of the variable address1 in the function loadMonsMold. (from $D20000 to $F10000)
0A568      00 00 D2      00 00 F1            Value added to the parameter of the variable address2 in the function loadMonsMold. (from $D20000 to $F10000)
0B0CE      20 AA 12      20 AA 31            Offset of the 8-high monster specification pointer in the function saveMolds. (from $12AA20 to $31AA20)
0B0F9      24 AA 12      24 AA 31            Offset of the start of monster specification data in the function saveMolds. (from $12AA24 to $31AA24)
0B1BC      00 02 12      00 02 31            Value substracted to the variable address in the function saveMolds. (from $120200 to $310200)
0B1C7      22 AA 12      22 AA 31            Offset of the 16-high monster specification pointer in the function saveMolds. (from $12AA22 to $31AA22)
0B1F6      00 02 12      00 02 31           Parameter of the last lseek in the function saveMolds. (from $120200 to $ 310200)
0B548      00 72 29      00 02 32            Offset of the start of the monster graphics in the function saveTile.(from $297200 to $320200) ***first instance***
0B59B      00 72 29      00 02 32            Offset of the start of the monster graphics in the function saveTile.(from $297200 to $320200) ***second instance***

If anyone ever done something similar and might know what I missed or did wrong, he would be of a great help for me, as I almost gave up on that project... :sad:

147
Game Modification Station / Re: Monsters graphics relocalization
« on: November 02, 2011, 11:19:24 AM »
Thanks for those infos!


my best guess as to your graphics glitches is that in your monster bitmap template, you forgot to set the bit indicating the monster uses an 8-color bitmap (versus a 16-color one), which causes the game to read 32 bytes per monster tile, when it should only be reading 24.


That could be an explanation but I was thinking before going to bed yesterday that I might just be off by 200 bytes because of the header, that's why I see part of monster 002 instead of 001...I'll so some experimentations after work but I'm not far from the solution.

The only thing left would be making FF3SE code compile properly but if some file(s) are missing from the source code, I don't think I'll be able to code header file(s) for the editor in C++.

148
Game Modification Station / Re: Monsters graphics relocalization
« on: November 01, 2011, 09:45:39 PM »

So I decided to move the monsters graphics to the empty F1 bank of a expanded rom. I changed the value of what I think is the starting offset of monsters graphics (at C1/210F, C1/2115 and C1/211B) in what I think is the corresponding subroutine that load a monster graphic. (I might be totally offtrack...)

 :isuck:

I just checked and since  the monster graphics in game doesn't load properly (I have part of the graphics of a soldier instead of a guard), I don't really feel more ashamed of myself by quoting myself. These are the changes I made in the F1 bank:

Code: [Select]
C1/210E: 69 00        ADC #$00
C1/2110: 85 64        STA $64
C1/2112: A5 65        LDA $65
C1/2114: 69 70        ADC #$00
C1/2116: 85 65        STA $65
C1/2118: A5 66        LDA $66
C1/211A: 69 E9        ADC #$F1

 I have no clue what's wrong because I see part of the graphics of enemy 002 instead of enemy 001 in the first fight of the game...

149
Game Modification Station / Monsters graphics relocalization
« on: November 01, 2011, 09:22:06 PM »
Hi everyone,

I've been learning rom hacking in general in the past few weeks. When it comes to changing monster sprites, FF3SE is a great tool. Sadly, there is not much empty space for new monster sprites.

So I decided to move the monsters graphics to the empty F1 bank of a expanded rom. I changed the value of what I think is the starting offset of monsters graphics (at C1/210F, C1/2115 and C1/211B) in what I think is the corresponding subroutine that load a monster graphic. (I might be totally offtrack...)

I have two questions:

1) Do I have to change the location of the Monster 8-High Composition Data and 16-High Composition Data as well or the unused 220 byte (starting at D2B424) would be used if I add more sprites via FF3SE?

I downloaded the source code of FF3SE and changed the value of the variable "offset" in the respective loading and saving functions. I also increased the value of the variable "maxTileNumber" so that way I could have more space for monster sprites in the editor. The code however doesn't compile. I have an error saying some header file is missing (png.h I think).
I sent a email to the creator of the editor but I haven't receive an answer(yet).

2) Have anyone ever tried that process? If so, am I on the right track or am I missing some steps? :hmm:

I've been studying programming since last year but never learned C++ (the language FF3SE is coded in) specifically. As for assembly, I'm learning but I don't know enough to understand every line of the subroutines that loads the monster graphic, mold, composition data, x and y position. Is it a harder process than I think to move the monsters graphics and being able to use FF3SE after that?

I hope someone can help, this site has been a good ressource for answering my questions so far.

Pages: « 1 2 3 4 5 6 7 8 9 10