Language…
14 users online: Alfombra de madera, Green Jerry, Hammerer,  Hooded Edge, JaizePLS, Neuromancer, Pink Gold Peach, PJHacker,  Ringo,  shovda, SMW Magic, Suru48, TheRealCatsup, Vanessa - Guests: 71 - Bots: 332
Users: 66,000 (2,158 active)
Latest user: TooMuchOfEverything

Official Hex/ASM/Etc. Help Thread

  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 418
  • 419
  • 420
Just curious, which values at $1DF9 are the Wrong/Right sounds? I need to know for a password system I'm trying to implement. Thanks.
Originally posted by S.N.N.
Just curious, which values at $1DF9 are the Wrong/Right sounds? I need to know for a password system I'm trying to implement. Thanks.
The correct/incorrect sound values writable to $1DFC are #$29 and #$2A, respectively.
Yeah, wrong address, my bad. Thanks.

I ended up having one more problem, hopefully my last one. I had made some password blocks, which were working fine until I decided to tweak around with them a bit. Here is the hex for the block itself:

a5 16 08 f0 18 ad 06 c9 09 d0 08 ad fc 1d a9 05 85 9c 06 a9 8d fc 1d

It checks to see if $0661 equals 9. If it doesn't, it plays the "wrong" sound. If it does, it plays the "right" sound and teleports you. I have five blocks, numbered 1 2 3 4 5 that increase the address by a certain amount. For each block, it looks kind of like this:

1)

INC $0661

2)

INC $0661
INC $0661

And so on to 5. However, no matter how many times I try to make $0661 equal 9, it never ends up playing the right sound and teleporting me.

Any info on why this is screwing up would be awesome, thanks.

EDIT: Here is my ASM:

LDA $16
AND #$08
BEQ NoPress
LDA $0661 - loads an empty space
CMP #$09 - sees if it = 9
BNE Incorrect
LDA #$29 - plays the right sound if 0661 = 9
STA $1DFC
LDA #$05
STA $71 - teleports you to current screen exit
STZ $0661 - resets for future use
RTS
Incorrect:
LDA #$2A - plays the wrong sound if 0661 does not = 9
STA $1DFC
STZ $0661 - resets 0661
RTS
NoPress:
RTS

I thought I was doing it right too :\ I have other blocks that raise the value of $0661 by 1, 2, 3, 4, and 5, but yeah .. no luck on getting the teleport.
What would i need to do to make Fusoya's pipes go faster or slower?
SNN, your asm source looks good, but it doesn't match the hex that you posted. Give that a check and repost the hex for the block.
Oops, I posted my experimentation password block. Here's the real one:

A5 16 29 08 F0 1D AD 61 06 C9 09 D0 0D A9 29 8D FC 1D A9 05 85 71 9C 61 06 60 A9 2A 8D FC 1D 9C 61 06 60 60

There it is. It just keeps playing the Wrong sound no matter how many times I hit my other blocks which increase the accumulator. It's really all that's standing in my way of finishing this demo now :\

I'll look at that a bit later, but it may be helpful to see the actual code for the blocks that control $0661
Well, I made 5 separate blocks, each with a number on them.

Block 1 has:

INC $0661
RTS

Block 2 has:

INC $0661
INC $0661
RTS

Block 3 has:

INC $0661
INC $0661
INC $0661
RTS

Block 4 has:

INC $0661
INC $0661
INC $0661
INC $0661
RTS

And block 5 has:

INC $0661
INC $0661
INC $0661
INC $0661
INC $0661
RTS

That's all that is in each one. I made my password block so that if it equals 9 and you hit Up on it, you teleport, so I hut block 4, then 3, then 2 to equal 9. No luck though.

I think it's something to do with all the INCs, but I have no idea really.
Your door block code is correct. I inserted the block you posted into a level, applied the cheat 7E066109 ($7E0661 = 09) in Snes9x, and things behaved as expected.

One important debugging tip I have is to track the value of the address you care about. I like to use Sprite Tool. For example, add the following as a generator. It will display the value of $0661 in the coin counter on the status bar:

dcb "INIT"
RTL
dcb "MAIN"
LDA $0661
STA $0DBF
RTL

As for why things aren't working -- I'm guessing it has to do with your increment blocks. I bet Mario touches them for more than one frame when he hits them, so the block's code is getting executed more that you think.

If that is the problem, one way to avoid it is have the blocks give Mario a downward speed (e.g. set $7D=#$20).
Oh, that's actually pretty useful. I can't use it for the password blocks, because I use the coin counter in that level, but I can think of many other useful purposes for it, heh.

What you said about touching the blocks more than once per frame is probably right - which kind of sucks, but meh. I'll give the Y-speed adjustment a shot and see if that solves the problem. Thanks for all the help.
When I mentioned the generator, I meant use it as a debugging tool. Have it in there while you're working on your blocks, and just delete it when you got the problems worked out.
How do you get the equivelent of Reloc Offsets in Blocktool Omega?
Originally posted by Marche102
How do you get the equivelent of Reloc Offsets in Blocktool Omega?


Eliminate the need for them all together -- use asm files instead of bin files. In the case of old blocks, disassemble them. For new blocks, create them as asm files and let BTO do the work.
How do you Turn on the Star power-up via Custom Block?
Edit:Also,how do you make a block solid,but then Pass through if it a certain condition is fulfilled?
How does one make a block change into the next block in Map16?
Originally posted by Marche102
How do you Turn on the Star power-up via Custom Block?
Edit:Also,how do you make a block solid,but then Pass through if it a certain condition is fulfilled?

Look at to other blocks. I think they have to load the status of what you are trying to do or something.
Like If C =0 then solid, when C =1 then passable. So if it does not = that set function then its not passable.

|Says if it does not =5 then do them i cant pass|
ad 20 14 c9 05 d0 07
|Loads and tells it when its passable|
a9 30 8d 93 16 a0 01 60


*not sure about 2nd part of the code
Originally posted by Marche102
How do you Turn on the Star power-up via Custom Block?


Write to $1490...

LDA #$FF
STA $1490
Can someone hep me with LevelASM?I'm trying to get it,but I'm not doing well. { _ }
Scratch that for now.How do you prevent a sprite(Birdo,for example)from being killed unless a condition is true?
Is there a way to make a hex value negative?
Set the high bit, or sign bit. If you were using a byte...

0 to 127 = 00h - 7Fh
-128 to -1 = 80h - FFh

Ofcourse it's up to the software to interpret it as negative.
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 418
  • 419
  • 420