Language…
6 users online: DashGamer, drkrdnk, Enan63, futhark, gr8fulAF,  Nanako - Guests: 262 - Bots: 400
Users: 64,795 (2,377 active)
Latest user: mathew

Official Hex/ASM/Etc. Help Thread

  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 418
  • 419
  • 420
JSL $01A7DC only seems to make him jurt you if he hasn't been hit yet. If he has, then he starts going through you again.
the table used by the sprite to store HP must be used for another prupose in that routine
In that case, then, what should I do differently so that he hurts you on contact all the time?
you fix the previous stuff by locating the table that store the HP to store it to another table(look at the RAM map to find some mostly unused one), I belive the table is $c2 but I'm not too sure.

Also, your post make it sound like you want us to do it for you>_<
Huh? I was only asking what it was I needed to do next. I was never trying to get people to do stuff for me.

Anyway, thanks. I'll try that in the morning. It's about 12:30 AM in my timezone, so I'll be hitting the hay soon.
well, the code it's supposed to amke mario "cape swing damage" if he touches an enemy at max speed, but It doesn't works.
There isn't another way to make what I'm trying?
thanks for your help, anyways


Check my profile to see the updates of smheroes!
It is my turn to ask a question now!


I have a DMA code (Channel 1) that uploads Layer 3 tiles to the screen, shows them up and stuff (NOT a code to upload custom layer 3 tiles to the tilemap.) I have a problem with it though:

When I use it in a normal level, it works correctly

When I use it in the title screen, it won't work at all.

someone can help me Can someone help me making it show up? I'll post the code here if needed.
My blog. I could post stuff now and then

My Assembly for the SNES tutorial (it's actually finished now!)
Okay, can someone else help me out with a sprite?


Code
	PHX
	LDA #EVENT_TO_CHECK
	PHA
	AND #$07
	TAX
	PLA
	LSR A
	LSR A
	LSR A
	TAY
	STZ $00		;generate mask, due to lack of absolute addressing for blocks
	SEC
LOOP
	ROR $00
	DEX
	BPL LOOP	;X = shift count	
	LDA $1F02,y
	AND $00		;mask
	BNE EVENTSET
	PLX
	JSR DOWN_GEN
	RTL

EVENTSET
	PLX
	JSR UP_GEN
	RTL


SNN got me that code for making the Door Generator sprite generate a block depending on the status of an event. I've been trying to modify it to react to a certain RAM address instead, but when I get back to the level after said address is set to the right value... The screen goes black. The game crashes, essentially. D:

Code
	STZ $00		;generate mask, due to lack of absolute addressing for blocks
	LDA $0662
	CMP #$00
	BNE EVENTSET
	JSR DOWN_GEN
	RTL

EVENTSET
	PLX
	JSR UP_GEN
	RTL


And more:

Code
UP_GEN              LDA $AA,x
                    BNE RETURN
                    STZ $14C8,x             ; destroy the sprite
                    
                    LDA $E4,x               ; \ setup block properties
                    STA $9A                 ;  |
                    LDA $14E0,x             ;  |
                    STA $9B                 ;  |
                    LDA $D8,x               ;  |
                    STA $98                 ;  |
                    LDA $14D4,x             ;  |
                    STA $99                 ; /
                    
                    PHP
                    REP #$30                ; \ change sprite to block 
                    LDA.W #UPPER_DOOR_TILE  ;  |
                    STA $03                 ;  |
                    JSR SUBL_SET_MAP16      ;  |
                    PLP                     ; / 
		                          
		    JSR SUB_SMOKE

RETURN              RTS                     ; return


Code
DOWN_GEN            
		    LDA $AA,x
                    BNE RETURN
                    STZ $14C8,x             ; destroy the sprite
                    
                    LDA $E4,x               ; \ setup block properties
                    STA $9A                 ;  |
                    LDA $14E0,x             ;  |
                    STA $9B                 ;  |
                    LDA $D8,x               ;  |
                    STA $98                 ;  |
                    LDA $14D4,x             ;  |
                    STA $99                 ; /
                    
                    PHP
                    REP #$30                ; \ change sprite to block 
                    LDA.W #LOWER_DOOR_TILE  ;  |
                    STA $03                 ;  |
                    JSR SUBL_SET_MAP16      ;  |
                    PLP                     ; / 
		                          

RETURN              RTS                     ; return


Then there's the smoke-generating routine...I doubt the problem is THERE...
<Adam> I feel like smwc is a prostitute now, because we put up a porn ad for money
I'd answer Lucario's question, but we already talked and stuff in IRC and I was kind of having the same problem, so yeah.

Anyway, quick question of my own. Know how you can use the "Midway Point Passed" checkbox on levels on the overworld so that, after the level is beaten, the midway point was set permanently? Is it possible at all to do this within a level, or is there some specific table where these midway things are stored? I have no idea about it, to be honest.

Thanks.
Originally posted by Ersan
It is my turn to ask a question now!


I have a DMA code (Channel 1) that uploads Layer 3 tiles to the screen, shows them up and stuff (NOT a code to upload custom layer 3 tiles to the tilemap.) I have a problem with it though:

When I use it in a normal level, it works correctly

When I use it in the title screen, it won't work at all.

someone can help me Can someone help me making it show up? I'll post the code here if needed.


I can probably use it, Because I need to make the status bar in Layer 2. (Or use both Layers 3 and 4.)
I seem ti have an ASM problem of my own.
I tried to make the mouser sprite work with the level ender sprite but but the level ender sprite actives before the boss fight can even start.
how do I fix it?
Originally posted by Hamtaro126
I can probably use it, Because I need to make the status bar in Layer 2. (Or use both Layers 3 and 4.)


Do you ask for my code or something? >_>

Also, if you use Layer 4, you need to use Mode 0, which forces all Graphics to go 2bpp format or something. Unless you use IRQ or HDMA...

Anyways, here is the code:

Code
<xmp>MarioAbove:
		PHP
		REP #$20	 ;16bit A 

		LDY #$80	 ; 
		STY $2115 

		LDA #$5900	 ;VRAM layer 3. I set a random location and it shows up
		STA $2116 	 ; 

		LDY #$01 	 ;2 regs write once alternate 
		STY $4310	 ; meaning this will write to $2118 and then $2119 back and forth 

		LDY #$18	 ;
		STY $4311	 ; Base register = $2118 

		LDA.w #DATA&$FFFF ; local portion of the tiles's location 
		STA $4312 

		LDY.b #DATA>>16  ; Bank portion of the tile's location 
		STY $4314

		LDA #$003C	;Transfer amount 
		STA $4315 	; 

		LDY #$02 
		STY $420B	;starts transfer on DMA channel 0 

		SEP #$20
		PLP
		RTL



DATA:
; TIle number, property, tile number, property etc
db $2F,$0C,$1B,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C
db $1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C
db $1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C,$1C,$0C

MarioBelow:
MarioSide:
SpriteV:
SpriteH:
MarioCape:
MarioFireBall:
RTL</xmp>

Unexpected end tag (</xmp>) at 1571, expected </pre>
My blog. I could post stuff now and then

My Assembly for the SNES tutorial (it's actually finished now!)
What do I have to write (ASM) to make a block turn into the next tile in the Map16 (Or, if that's easier, into tile 25)?
It should execute some code and after that, it should be invisible and not do anything.


 
im a impatient





Be patient next time ~ Ersan
Wow... you've been waiting a whole 16 hours!!!!!!!!!!!!!!!!





Please get a clue and realize that no one is obligated to help you. The notion that people have been making you wait to make you upset is absurd as well.
Code
LDA $15
AND #$08
BEQ Code1Z
AND #$04
BEQ Code2Z
STZ $7D
RTS

Code1Z
LDA $13
LDA #$15
STA $13E0
BCC Code1A
LDA $C100
CMP #$7F
BEQ Code1B
INC $C100
LDA #$0F
STA $7D

Code1A
RTS

Code1B
LDA #$00
STA $7D
RTS

Code2Z
LDA $13
BCC Code2A
LDA #$FE
STA $13E0
LDA $C100
CMP #$80
BEQ Code1B
DEC $C100
LDA #$F0
STA $7D
RTS

Code2A
LDA #$02
STA $13E0
RTS


Basically, you should go up if you press Up and down if you press Down (along with some additional stuff, determine your position and those of blocks). The block is not entirely complete with every feature, but even THIS fails to work. Someone help me out? I'm branching in a wrong way, so how do I do it?
--------> Don't follow "Find Roy's Dignity", my hack. Because it's pretty outdated. <--------
Code
header
lorom
org $05B10C
JSL Duck

Duck:
LDA $13E0 ;
CMP #$38 ;If you aren't ducking
BNE Return ; Return
LDA #$C0
STA $1490
RTS
Return:
RTS ; Complete the code


This code SHOULD make the player invincible while they are ducking. However, it just crahsed the game. What needs fixing? (I'm assuming it's the org part, but I don't know.)
Originally posted by Parabuzzy
Code
header
lorom
org $05B10C
JSL Duck

Duck:
LDA $13E0 ;
CMP #$38 ;If you aren't ducking
BNE Return ; Return
LDA #$C0
STA $1490
RTS
Return:
RTS ; Complete the code


This code SHOULD make the player invincible while they are ducking. However, it just crahsed the game. What needs fixing? (I'm assuming it's the org part, but I don't know.)


Hmm... I'm not an expert in this but did you traced it through the debugger? There's some code missing, I just don't exactly know what. XD | The org part tells where you want the code to be inserted. Search an empty string in your rom with a hex editor, then convert the starting adress in Lunar Adress and the result is the number you add after "org".

Also, don't forget, if the code goes over 5 bytes, you have to add a NOP or more depending on how much bytes it is.
Originally posted by Parabuzzy
Code
header
lorom
org $05B10C
JSL Duck

Duck:
LDA $13E0 ;
CMP #$38 ;If you aren't ducking
BNE Return ; Return
LDA #$C0
STA $1490
RTS
Return:
RTS ; Complete the code


This code SHOULD make the player invincible while they are ducking. However, it just crahsed the game. What needs fixing? (I'm assuming it's the org part, but I don't know.)


I hope you had a backup. You corrupted some routine.

Put "ORG $1FB000" before "Duck:" (the label)

You can change $1FB000 to an SNES PC address which has free space.

Now patch it to the ROM.
My blog. I could post stuff now and then

My Assembly for the SNES tutorial (it's actually finished now!)
Code
header
lorom
org $05B10C
JSL Duck
org $1FB000
Duck:
LDA $13E0 ;
CMP #$38 ;If you aren't ducking
BNE Return ; Return
LDA #$C0
STA $1490
RTS
Return:
RTS ; Complete the code


Okay, so this is what it looks like now. I added the org $1FB000 right before the duck label, like you said. When I patch this to a clean, unmodified ROM, it doesn't even make it to the "Nintedno Presents" logo. If I patch it to any modified ROM, it will make it all the way to the intro screen, but crashed right before displaying the welcome message.
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 418
  • 419
  • 420