Language…
9 users online: abhinavkrishna123, autisticsceptile1993, CONLUSH666, DanMario24YT, Fiblizo, Green, Orange_Crow2, signature_steve,  StayAtHomeStegosaurus - Guests: 96 - Bots: 249
Users: 64,667 (2,405 active)
Latest user: DarthHylian

Official Hex/ASM/Etc. Help Thread

  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 418
  • 419
  • 420


The data send hex command ($F9) lets you send two bytes of data to the RAM at any point in the song, you should be able to use that as a way to tell when the song has reached a certain point as opposed to a timer.
Note: I only know this works in AMK and AMM, not sure about the older ones.

Alternatively, you can send the song's position to RAM using the SNES sync command ($F4) and compare that to a value, though that's a bit harder to use.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
youre missing a db $42 at the top
How can I missed it? <_<
My block works now but it acts like a conveyor belt.
what is it supposed to do
Spin_Block? #w{=|}

Edit:
I need them to make the firts castle level because you can only spin jump after you beat the first Castle and you need them the spin jump and before beating the Castle you need those blocks.
Hey, so, a friend was teaching me how to do sprites, and so far it wasn't that hard, however, he went to god-knows-where so there were some points that he didn't explained me. The most important was to set the clipping/hitbox to a sprite. I know that needs to be done in the cfg, but I don't really know what value to put there... I downloaded this and to be honest, I don't understand that much what they mean, so I'm stuck.

Edit: Basically, I'm asking if there's a more clear documentation about clipping values that doesn't rely on images.

If it helps, I'm trying to make a sprite whose hitbox is 16x8 (x,y). Thanks in advance.
In those pictures, the dark blue box is the 16x16 which corresponds to the sprite's actual X and Y positions. The red dots correspond to the corners of the rectangular interaction area. The light blue region is just filler, so you can ignore that.

For the 16x8 hitbox, I don't actually think there's a clipping which is very suitable. It'd be best to use the custom clipping patch.
I have a question for the people using RPG Hacker's VWF patch.
I recently noticed that the $EE command (for editing colors) doesn't seem to work properly in BSNES for me. I set it to palette 6 color 3 which would be the light blue from the status bar (the reserve item box) like it was done in the readme for example, but the command doesn't change the color as it should, meaning I always get the light blue and nothing else.

However, this (tiny) issue only turns up in BSNES, not in ZSNES or SNES9x (meaning I get the colors I want in these emulators).
I was just wondering if someone else who uses the tool can confirm it or if it's something else somehow.

PLX after the gfx "Loop"
(line 106)
Problem one solved but it still crashes.
In your INIT routine, you need to set the data bank (otherwise, the LDA PSwitchPal,y won't work correctly), and it needs to end in RTL, not RTS.

Code
	PHB
	PHK
	PLB

	...

	PLB
	RTL
Originally posted by MarioE
In your INIT routine, you need to set the data bank (otherwise, the LDA PSwitchPal,y won't work correctly), and it needs to end in RTL, not RTS.

Code
	PHB
	PHK
	PLB

	...

	PLB
	RTL

Thanks for pointing out about the RTL. Anyway, I ripped this init code from adress x844E/$01844E of the rom and because of the jumping to codes (dw $yyxx or db $xx,$yy) mostly sprites ends with an RTS and my sprite is nearly ready.
I am a double poster.

Anyway, I'd know, how to make custom layer 3 interactions.
I am a double poster.

Anyway, I'd know, how to make custom layer 3 interactions.
Originally posted by MarioFanGamer659
I am a double poster.

Anyway, I'd know, how to make custom layer 3 interactions.


no need to double post. what kind of interaction do you want exactly? generally when people do layer 3 interaction they are just comparing its x or y position with the x or y position of the player. In other words, just a giant horizontal or vertical line that does something when passed. That will look something like this:

Code
	REP #$20			; make A 16-bit
	LDA !Layer3Pos			; = $22 or $24 depending on what you want
	CLC
	ADC !Offset			; = some constant 16-bit value
	CMP !PlayerPos_Level		; = $7E or $80
	BCS +				; or BCC
	;
	;some kind of interaction
	;
	+
	SEP #$20			; make A 8-bit


Note this will still work with layer 3 scrolling since !Layer3Pos will be updated by any scrolling routine.

------

Now for my own question: I'm trying to use the bounce unrestrictor patch to make a sprite generate blocks wherever it goes. The routine I have is
Code
	LDA !RAM_SprFlags,x		; if the sprite is in the air
	AND #$02			; generate the tile adjacent
	LSR				; to the normal one (dont use #$xxFF)
	CLC
	ADC !VAL_Map16High		; = #$03
	STA $0661
	LDA !VAL_Map16Low		; = #$AC <- want tile 03AC
	STA $0660
 	LDA #$FF			; bounce unrestrictor says to store #$FF here
	STA $9C				; and the values of 066x will be used instead
	JSR $00BEB0

There are two problems. The first is that the map16 tiles are being generated at the players position, not the sprites position. The second is that I am not getting the map16 tile I want (its generating one of the unused tiles)

Any idea how to fix this?
you need to make sure, that your sprite is centered on a block position
Code
LDA $D8,x		;
AND #$0F		; if the sprite is centered on a tile...
STA $00			;
LDA $E4,x		;
AND #$0F		; both horizontally and vertically...
ORA $00			;
BNE DontGenerateTile	;


you also need to set the blocks postion ($9A and $98) to where the sprite is.
Code
LDA $E4,x		;
STA $9A			;
LDA $14E0,x		;
STA $9B			;
LDA $D8,x		;
STA $98			;
LDA $14D4,x		;
STA $99			;


after that goes your routine to generate the block.
I don't know how to do that though. You could try the "Change Map16 number code from the code library"
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
I think it's better to do this:

Code
	LDA $14E0,x
	XBA
	LDA $E4,x
	REP #$21
	ADC #$0008
	AND #$FFF0
	STA $9A
	SEP #$20

	LDA $14D4,x
	XBA
	LDA $D8,x
	REP #$21
	ADC #$0008
	AND #$FFF0
	STA $98
	SEP #$20


That way it'll generate at the center of the 16x16 sprite you are using, and it'll always try to generate the tile. (I believe that's how large it is since you asked about exact 16x16 object interaction in #serioushax)
Originally posted by MarioE
I think it's better to do this:

Code
	LDA $14E0,x
	XBA
	LDA $E4,x
	REP #$21
	ADC #$0008
	AND #$FFF0
	STA $9A
	SEP #$20

	LDA $14D4,x
	XBA
	LDA $D8,x
	REP #$21
	ADC #$0008
	AND #$FFF0
	STA $98
	SEP #$20


That way it'll generate at the center of the 16x16 sprite you are using, and it'll always try to generate the tile. (I believe that's how large it is since you asked about exact 16x16 object interaction in #serioushax)


Thanks, that works really well.

The problem with the exact 16x16 thing is that when the sprite falls off a ledge, it isn't exactly aligned with the tiles it is generating. so you get something looking like this:


Code
[ ][ ][ ]
[====][ ]
      [ ]
      [ ]	<- blocks
      [ ]
     (s)	<- falling sprite


which is very bad for what I am trying to do (flowing water).
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 418
  • 419
  • 420