Language…
16 users online: Batata Douce, BlueSheep123, CalHal, crocodileman94,  Deeke, Ekimnoid, Gamet2004, Golden Yoshi, Green, Hidincuzimsmokin, NewPointless, playagmes169, ppp9q,  Ringo, sinseiga, sugarfish456 - Guests: 279 - Bots: 291
Users: 64,795 (2,376 active)
Latest user: mathew

Official Hex/ASM/Etc. Help Thread

  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 418
  • 419
  • 420
That actually makes sense - thanks, Wye, I'm going to test it as soon as possible. :)
Originally posted by Hailstorm
I want to make a block that acts like the 1-way left block when the on/off value is on, and acts like the 1-way right block when the value is off. Here's my code:

LDA $14AF
CMP #$01
BEQ Right
LDA #$00000010
STA $77
RTS
Right:
LDA #$00000001
STA $77
RTS

It works right when the switch is on, but when it's off, the block is just a blank tile that allows movement in both directions. What am I doing wrong?


Sorry if asking again is annoying, but I think this block might be good for puzzles, and I want to know what's wrong about this code. Actually, if someone already made this block, let me know.
Originally posted by Hailstorm
Originally posted by Hailstorm
I want to make a block that acts like the 1-way left block when the on/off value is on, and acts like the 1-way right block when the value is off. Here's my code:

LDA $14AF
CMP #$01
BEQ Right
LDA #$00000010
STA $77
RTS
Right:
LDA #$00000001
STA $77
RTS

It works right when the switch is on, but when it's off, the block is just a blank tile that allows movement in both directions. What am I doing wrong?


Sorry if asking again is annoying, but I think this block might be good for puzzles, and I want to know what's wrong about this code. Actually, if someone already made this block, let me know.

hmmm... I have no idea what's wrong, but I have a creative idea about how you could do this, but something I would like to know: Why is there an above offset, a below offset, but only a side offset? why not left or right?

*WARNING: due to cosmic radiation, Quantum fluctuations, or earth going into sector x79352C, the world may end at any moment. Have a nice day.

Current Project:



Status:Complete

Previous project status: Failed/Quit

Current Issue

C++ : fsteam help



Originally posted by Hailstorm
Actually, I figured out how to use that RAM address. However, I still can't get the code right. I want to make a block that acts like the 1-way left block when the on/off value is on, and acts like the 1-way right block when the value is off. Here's my code:

LDA $14AF
CMP #$01
BEQ Right
LDA #$00000010
STA $77
RTS
Right:
LDA #$00000001
STA $77
RTS


It works right when the switch is on, but when it's off, the block is just a blank tile that allows movement in both directions. What am I doing wrong?

I'm new to this too, but I think I can give you some pointers.
Ah, first of all, 000000001 isn't a SNES address.
Also, "xxxxUDLR" is a binary byte set (right..?) so 0000 is always in the beginning, and then there is a 1 at any UDLR where mario is blocked, e.g. "00000100" would mean left is blocked. Now, here we go...
Binary isn't hex, as you may have noticed. Use Windows Calculator to transfer 00000001 to hex, and that is what you load to A, not the binary. Then it'll work for you, I just tested it. Here's the code:

LDA $14AF
CMP #$01
BEQ Right
LDA #$02
STA $77
RTS
Right:
LDA #$01
STA $77
RTS


Hooray for you!


EDIT: wait, no. For some reason it only works with up (08.) So, ah, here's the essential code and a nice lesson for you, but I forget (
or don't know how) how to set bytes. Err..
Awesome, it worked! Thanks a lot! Now I'll just make a reverse version of that block, and maybe two more for vertical directions.

EDIT: Okay, new problem. Here's my code for a block that acts like 1-way block up when the on/off value is on and 1-way block down when it's off.

LDA $14AF
CMP #$01
BEQ Down
LDA #$04
STA $77
RTS
Down:
LDA #$08
STA $77
RTS

It works fine when the switch is off, but when it's on, the block is a blank tile that lets you go in both directions, kinda like my previous problem, but this time I didn't use binary. Help?
Originally posted by Hailstorm
Awesome, it worked! Thanks a lot! Now I'll just make a reverse version of that block, and maybe two more for vertical directions.

EDIT: Okay, new problem. Here's my code for a block that acts like 1-way block up when the on/off value is on and 1-way block down when it's off.

LDA $14AF
CMP #$01
BEQ Down
LDA #$04
STA $77
RTS
Down:
LDA #$08
STA $77
RTS

It works fine when the switch is off, but when it's on, the block is a blank tile that lets you go in both directions, kinda like my previous problem, but this time I didn't use binary. Help?

Yeah, I tested the code and had the same problem, and I have no idea. It's really strange..
what r teh ASMs tht makem mario do the asploding?
/sarcasm

How would i change the colors on the status bar via ASM ( like a single tile (ex. tile $0f00 on the status bar should be blue))? I know smallhacker's tool is able to change the colors, but, i want to know how to do it in an asm file.

Originally posted by Aiyo
what r teh ASMs tht makem mario do the asploding?
/sarcasm

How would i change the colors on the status bar via ASM? I know smallhacker's tool is able to change the colors, but, i want to know how to do it in an asm file.

---
Ice Man helped me out with this one:

Originally posted by Ice Man
change Mario's palette with this:

LDY #$81 ;\ Write palette 8 & color 1
STY $2121 ;| to CG-RAM Address Write
LDA #$FF ;| Write new color (low byte)
STA $2122 ;| to CG-RAM Data Write
LDA #$7F ;| Write new color (high byte)
STA $2122 ;/ to CG-RAM Data Write


This writes $7FFF (white) to palette 8 and color 1. It's long, yea, but works perfect.

---
Just do that for the status bar colors.
Quote

Ice Man helped me out with this one:

Originally posted by Ice Man
change Mario's palette with this:

LDY #$81 ;\ Write palette 8 & color 1
STY $2121 ;| to CG-RAM Address Write
LDA #$FF ;| Write new color (low byte)
STA $2122 ;| to CG-RAM Data Write
LDA #$7F ;| Write new color (high byte)
STA $2122 ;/ to CG-RAM Data Write


This writes $7FFF (white) to palette 8 and color 1. It's long, yea, but works perfect.

---
Just do that for the status bar colors.

I see, but how do i know where its writing the color too? Like say, i want to make $0f00 blue?
I could use some help making an animated sprite. All that I need it to do is switch between two tiles, and I'm having trouble doing it on my own.

Edit: Nevermind, new question. How do you check if a sprite has its extra bit set?
smwcentral iconEdit: I have a question. When I used EXAnimation, the blocks that I use EXAnimation on just flash.(Show current EXAnimated frame, disappear next frame, show next EXAnimated frame, repeat without showing current frame)How would I be able to fix this? This is exactly what I put:
Entry 00, ON/OFF Activated, Four 8x8s:line, Destination:54, Frames:4CC 4DC 4EC 4FC X 2 4B4 X8
Entry 01, ON/OFF Activated, Four 8x8s:line, Destination:78, Frames:4B4 X 8 4CC 4DC 4EC 4FC X 2
Original post:You press Sprite Data (Hex Code) under View or press 5. Then you see if the custom sprite's top number (next to the X) is a two or three. If its two, extra bit isn't set and if its three, extra bit is set. If its zero or one, its a normal sprite.
You know, it would be cool if someone made a sword sprite(s) and released it to the public. That would help a lot of people........ Now that I think about it, that would be perfect for C3! (Not that I could program a sword sprite)
Originally posted by scepile3
Original post:You press Sprite Data (Hex Code) under View or press 5. Then you see if the custom sprite's top number (next to the X) is a two or three. If its two, extra bit isn't set and if its three, extra bit is set. If its zero or one, its a normal sprite.

Uh, I meant coding a sprite that uses the extra bit.
This is my first try at ASM, and I'm trying to make a block which 'steals' your coins. But its not working, Instead of losing 16 coins, I get 16 coins when touching it from the sides, and 0 when I touch it from above. What's wrong with my code?

LDA #$0DBF ;load coins
SEC
SBC #$10 ;coins to take in hex (16)
STA $0DBF
RTL
smwcentral iconEdit:@piranha productions:What was the offsets for the block? #$0DBF is supposed to be $0DBF. Same goes for all RAM addresses. (probably ROM too.) Was that code the only part? If it was, you would need to add another part. Here's how it would look: (bold is changed/added parts.)LDA $0DBF ;load coins
CMP #$10 ;Compare to 16 coins (in hex)
BCC Blah ;If coin count is below 16, branch (or jump) to Blah
;Change Blah to modify the symbol name (Doesn't change anything)

SEC
SBC #$10 ;coins to take in hex (16)
STA $0DBF
RTL
Blah:
STZ $0DBF
RTL

Original post:
Originally posted by Boingboingsplat
Originally posted by scepile3
Original post:You press Sprite Data (Hex Code) under View or press 5. Then you see if the custom sprite's top number (next to the X) is a two or three. If its two, extra bit isn't set and if its three, extra bit is set. If its zero or one, its a normal sprite.

Uh, I meant coding a sprite that uses the extra bit.

Well, I checked some of spritetool's sprites' asm files (since I don't know any sprite asm and I feel guilty) and I have come to believe that this would be how to code a sprite that uses the first extra bit:LDA $AB10 AND #$04 BEQ ... replace ... with a symbol.
You know, it would be cool if someone made a sword sprite(s) and released it to the public. That would help a lot of people........ Now that I think about it, that would be perfect for C3! (Not that I could program a sword sprite)
The offsets were all -1, but the sides, top and bottom were 0. I tried your code, but that makes the coin counter reset. I want it to take away a certain amount of coins, not reset...

Also, may I know how offsets work in an ASM file? There is no option of offsets in an ASM file.
Originally posted by piranha productions
The offsets were all -1, but the sides, top and bottom were 0. I tried your code, but that makes the coin counter reset. I want it to take away a certain amount of coins, not reset...

Also, may I know how offsets work in an ASM file? There is no option of offsets in an ASM file.

Code
JMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV JMP SpriteH : JMP MarioCape : JMP MarioFireBall


Those labels represent the offsets. The ones which should be set come before the code and which should be clear at the end of the code.
smwcentral iconSorry to load two questions at once, but how do you change the current screen exit so you can warp somewhere else? ex:You are in a screen with an exit going to level 105 and you use a custom block to warp to level 2. When you go back to that screen after you come back to the screen by a door during that same level, you warp to level 105 via pipe. I think it would use the RAM addresses $19B8 and $19D8. How could you send the player back to the level entrance? (the place they come from when they enter the level from the ov) If any of these questions are answered, I would be very happy.
You know, it would be cool if someone made a sword sprite(s) and released it to the public. That would help a lot of people........ Now that I think about it, that would be perfect for C3! (Not that I could program a sword sprite)
How can I locate objects in ASM?
Like loading tile 130 and giving it some extra behaviors through LevelASM.
Code
LDY #$10       ;\ high byte
LDA #$30       ;| low byte
STA $1693     ;/ register


This will act like tile 130. Just insert your code after this and you should be ready to go.
Actually I was refering to something else. Let's say I want to locate tile 130 and making that tile slippery. (Of course with more settings to not turn on the slippery flag for the whole level) How would I go about doing that?
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 418
  • 419
  • 420