User | Post |
Ghettoyouth
Posts: 64/73 |
AF 83 81 7F C9 00 F0 06 3A 8F 83 81 7F 6B A9 7F 8F 83 81 7F A9 4A 8F FC 1D 7E 6B |
Sukasa
Posts: 1972/1981 |
Could you please post the assembly? I'll have a look at it. |
Ghettoyouth
Posts: 63/73 |
thx for the help, now it works perfect
i don't get it, sometimes it works, sometimes not. whats wrong with this f**king code?? |
Sukasa
Posts: 1968/1981 |
try changing thvalues to fine tuneit, or change the ASM to read the ExAnimated frame number and play the SFX when it changes to the correct one. |
Ghettoyouth
Posts: 62/73 |
d'oh, nothing works, after 30 seconds the sfx won't fit right with the pallete animation *crysandrunsaway* |
HyperLamer
Posts: 7968/8210 |
Originally posted by Dark Ludwig
Originally posted by Santa Claus the game runs at about 60 frames per second.
Actually, it's x40 frames per second. Just to let him know so that he'll get an idea of how many frames he should wait between sounds.
0x40 = 64, so there's not really any difference. |
Ghettoyouth
Posts: 59/73 |
Originally posted by Sukasa
Ghettoyouth, now change the frame number to use to 30 for twice a second, 60 for once a second (those are decimal values, BTW), or 120 for every 2 seconds.
i changed the frame number(yes, i've converted them to HEX), but it doesn't plays the sfx on frame 8 and not from the beginning of the level(it begins after 8-10 seconds)
Edit: when i change it to 80 it would fit on the 13th frame, but after a few times the sfx doesn't fit right with the lightning |
Tatrion
Posts: 123/215 |
What hex editors do you guys use? ZD has tons; I can't decide on one. Or does it even really matter? |
Sukasa
Posts: 1952/1981 |
DL, try checking the frame rate counter in any SNES emu. it's 60.
Ghettoyouth, now change the frame number to use to 30 for twice a second, 60 for once a second (those are decimal values, BTW), or 120 for every 2 seconds. |
Dark Ludwig
Posts: 167/172 |
Originally posted by Santa Claus the game runs at about 60 frames per second.
Actually, it's x40 frames per second. Just to let him know so that he'll get an idea of how many frames he should wait between sounds. |
HyperLamer
Posts: 7946/8210 |
Well no wonder, the game runs at about 60 frames per second. You're playing a sound ~8 times per second. |
Ghettoyouth
Posts: 57/73 |
now it sounds like a machine gun |
Sukasa
Posts: 1937/1981 |
Hmmm. Looking at your code, the only thing I could suggest is to change the DEC $C100 (CE 00 C1) to
DEC A STA $7EC100 And change the break amount to match.
Other than that, I honestly have no idea what's wrong. |
Ghettoyouth
Posts: 56/73 |
this is the way i typed it in:
AF 00 C1 7E C9 00 F0 04 CE 00 C1 6B A9 08 8F 00 C1 7E A9 4A 8F FC 1D 7E 6B |
Sukasa
Posts: 1933/1981 |
Oh, levelASM (missed that). Why won't the 24-bit addresse work? how did you store that addresses? They should be in hex like this: 7E1DFC = FC 1D 7E in the .bin file. |
Ghettoyouth
Posts: 55/73 |
if change RTL to RTS it'll crash because i use level asm and the thing with the 24-bit adresses doesn't work too |
Sukasa
Posts: 1931/1981 |
Wow, I'm amazed it didn't crash. Change the RTL's to RTS's, then try moing around while you're touching the block if you don't already, with top, sides, and bottom offsets set at 0. If it still doesn't work, change the lda and sta statements to 24-bit addresses (lda $7EC100 instead of lda $C100, sta $7E1DFC instead of sta $1DFC, etc.) and try that. |
Ghettoyouth
Posts: 54/73 |
thanks man, i'll try it after school
edit: hmm doesn't work. i can't hear the sfx |
Dark Ludwig
Posts: 157/172 |
I'm back from school now. Instead of:
AD 00 C1 C5 00 F0 06 3A C6 00 C1 6B A9 08 8D 00 C1 A9 4A 8D FC 1D 6B
Try:
AD 00 C1 C9 00 F0 04 CE 00 C1 6B A9 08 8D 00 C1 A9 4A 8D FC 1D 6B
In your code, in place of the decrement instruction decrementing memory, you were having it decrement the accumulator. As for the compare instruction, you were having it compare direct page, not memory. Also, your branch was one too high. I tuned it down two, though, since the compare instruction caused me to have to take one out.
Whenever I have the time, which I rarely do, I use geiger's SNES9X debugger to check my work and disassemble data. Here's what I just put up there turns out to look like:
$00/8000 AD 00 C1 -- LDA $C100 $00/8003 C9 00 -- -- CMP #$00 $00/8005 F0 04 -- -- BEQ $04 $00/8007 CE 00 C1 -- DEC $C100 $00/800A 6B -- -- -- RTL $00/800B A9 08 -- -- LDA #$08 $00/800D 8D 00 C1 -- STA $C100 $00/8010 A9 4A -- -- LDA #$4A $00/8012 8D FC 1D -- STA $1DFC $00/8015 6B -- -- -- RTL
As of yet, it's still untested, as I have homework. This should work though. |
Ghettoyouth
Posts: 53/73 |
i don't know why but it doesn't work this is the way i typed it in the hex editor:
AD 00 C1 C5 00 F0 06 3A C6 00 C1 6B A9 08 8D 00 C1 A9 4A 8D FC 1D 6B
the sfx is only played one time at the beginning of the level. |
This is a long thread. Click here to view it. |