Banner
Views: 784,493,905
Time:
10 users online:  Atari2.0, CaptainCanuck87, chickaDEE Magazine, earthmeLon, FlazeBoom5628, h.carrell, kamekku14, niko, Sixcorby, Xyspade - Guests: 23 - Bots: 99 Users: 41,026 (1,548 active)
Latest: DVGames
Tip: Don't just modify the original SMW overworld; start from scratch.Not logged in.
Official Hex/ASM/Etc. Help Thread
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread
Pages: « 1 2404 405 406 407 408 409 410 411 »
It is possible to assign mario tiles (or any tile inside GFX32.bin) to custom sprites?
Originally posted by NaroGugul
It is possible to assign mario tiles (or any tile inside GFX32.bin) to custom sprites?

If you load a .bin with those tiles into one of the sprite slots, I don't really see a problem with that.
Originally posted by Darolac
Originally posted by NaroGugul
It is possible to assign mario tiles (or any tile inside GFX32.bin) to custom sprites?

If you load a .bin with those tiles into one of the sprite slots, I don't really see a problem with that.

i mean.. without loading it in the sprite slots..
just load directly from wherever mario tiles come from
Not without some serious trickery, no.

The thing about Mario's tiles is that they're loaded dynamically - every frame, the tiles needed for Mario are copied to the very top of SP1, and those are the tiles that are displayed. GFX32 is never in memory all at once.

(If you want your custom sprites to use whatever tiles Mario uses in each frame, then yeah, you can take them from SP1.)

--------------------


 
I dont know the code for the A button is on asm patches please help me
Alright, I got tired of whining for nothing and tried fixing the new patch's bug by adding some code (taken from the disassembly) that's supposed to make sure the star roads don't do the pipe/shrinking SFX alongside overworld pipes. Needless to say, the code is doing nothing so any help would be appreciated.

Code
;;;The code thus far;;;
HEADER
LOROM

!SFX1 = $01		;SFX used when entering Level
!Port1 = $1DFC

!SFX2 = $04		;SFX used when entering a Pipe
!Port2 = $1DF9

!base = $0000

if read1($00ffd5) == $23
	sa1rom
	!base = $6000
endif

ORG $049195
autoclean JML EnterPipe

ORG $0491E5
autoclean JML EnterLevel

freedata 

EnterPipe:		STA.w $0100|!base
			LDA.W $13C1
			CMP.B #$82              ; If standing on Pipe 	
			LDA #!SFX2		;  Make Pipe SFX
			STA.w !Port2|!base
			CMP.B #$5B              ; If not standing on Pipe
			BNE NEXT		; Ignore and Skip
NEXT:			JML $04F9A7

EnterLevel:		INC $0100|!base		;This one still works
			LDA #!SFX1		;No issues here
			STA.w !Port1|!base
			JML $04F8A5
End:
Your code might actually work if you branch after your CMP #$82.
Can't test right now cause I'm on my phone but as soon as i get home I'll check it

--------------------
My Youtube channel

Currently working on:
Project C

Finished project:
Originally posted by NGB
Your code might actually work if you branch after your CMP #$82.


It did actually! It helped me notice I messed up the code so it would do the opposite of what I wanted it to do, but thankfully that's something far easier to fix. Thanks! #smrpg{y}
I'm trying to insert smkdan's rocky wrench from SMB3, which isn't for PIXI in the first place. So I converted it with trashkas and still get issues when inserting.

ASM code

First I got
Code
sprites/rockywrench.asm:4: error: (E5059): Invalid label name. [DIR: = $03]

So I deleted the ":" because I feel like it shouldn't be here. I didn't get the error anymore so I guess it's ok.

Now I get
Code
sprites/rockywrench.asm:301: error: (E5088): Define 'WRENCHYDISP' wasn't found.

And there I'm kinda stuck. I feel like maybe
Code
WRENCHXDISP: db $02,$04
!WRENCHYDISP = $F6
!WRENCHTILE = $0A
!WRENCHPROP = 03
TILESCOUNT: db $01,$02	;2 no wrench, 3 with

should be before
Code
	ADC #!WRENCHYDISP

But I'm not sure.

Idea?

PS: it's probably not the last issue I get with it

--------------------
Super Mario Pants World by Romano338 - Playthough
Luigi's Lost Levels by Romano338 - Playthough
Baby Kaizo World by Romano338 [Cancelled] playthrough
Quick question. Trying to get a custom sprite with a specific set extra byte to spawn through a question block. Based on GPS' spawn_sprite_block routine I added the two lines I commented:


Code
		LDA !9E,x
		STA !7FAB9E,x
		LDA #$88
		STA !7FAB10,x
		LDA #$01		; extra byte set bit 1
		STA !7FAB40,x		; extra byte 1 address
		JSL $0187A7|!bank


and added this line to the GPS defines ($60A4 based on GIEPY's SA-1 defines)

Code
%define_sprite_table(sprite_extra_byte1, "7FAB40", $7FAB40, $60A4)


Sprite spawns properly but it's not detecting the extra byte. What am I missing? (Sprite is definitely set up correctly. Directly placing it with extension 01 works.)

Also I've been wondering why the routine stores #$88 into !7FAB10, from what I've gathered only bit 7 indicates a custom sprite. What's bit 4 for?

EDIT: Problem solved, it was an issue with the sprite, not the block. For some reason the init part which handles the extra byte was not loaded when spawned from the block even though $14C8 is set to 1.
Can someone help me? I'm trying to change some things on this RussianMan's sprite, but since I have no knowledgement of coding, I'm stucked.

No matter what I do, the sprite priority is always higher than any other blocks. I'm trying to use the muncher as a piranha and put it half inside a pipe, but the sprite is always in front of the pipe.

Another thing is: There's a way to change the 16x16 graphics to only 8x8? Will help me a lot.

EDIT: How to change the palette of a sprite too? I'm trying with CFG Editor but it never changes.
#yolo what the f * c k !
⠀⠀⠀⠀⠀a a a a a a a a a a
It's a secret shhh
Quote
is there's a way to change the 16x16 graphics to only 8x8? Will help me a lot.


find this section

Code
LDY #$02
LDA #$00

JSL $01B7B3|!BankB
RTS


and change LDY #$02 to LDY #$00

Quote
No matter what I do, the sprite priority is always higher than any other blocks. I'm trying to use the muncher as a piranha and put it half inside a pipe, but the sprite is always in front of the pipe.

Quote
How to change the palette of a sprite too? I'm trying with CFG Editor but it never changes.


muncher uses hardcoded properties, go and find

Code
!MunchProp = $3F


and change it, using YXPPCCC format. you can find details about it here. if you want it to appear behind everything, left digit should be 0. right digit can be the same as right digit in CFG file, $166E.

example:
Code
!MunchProp = $0A ;low priority, uses second graphics page, palette A


--------------------
Searching for GFX guy! Help me finish my player GFX! DM me for more details!
--------------------


Originally posted by RussianMan
Quote
How to change the palette of a sprite too? I'm trying with CFG Editor but it never changes.


muncher uses hardcoded properties, go and find

Code
!MunchProp = $3F


and change it, using YXPPCCC format. you can find details about it here. if you want it to appear behind everything, left digit should be 0. right digit can be the same as right digit in CFG file, $166E.

example:
Code
!MunchProp = $0A ;low priority, uses second graphics page, palette A



Thank you RussianBlackComedyMan. finally learned how to use YXPPCCCT (what a easy thing). But anyway, I changed the priority to 00 but the sprite keeps in front of the pipes. I could change only the palette.

Also, every hardcoded ASM uses the same type of code to apply properties? There's any way to find it even for someone that doesn't know nothing about coding?
#yolo what the f * c k !
⠀⠀⠀⠀⠀a a a a a a a a a a
It's a secret shhh
Quote
I changed the priority to 00 but the sprite keeps in front of the pipes.


you can try removing ORA $64 from this portion:

Code
LDX $15E9|!Base2
LDA !15F6,x
End:
ORA $64
STA $0303|!Base2,y


Quote
Also, every hardcoded ASM uses the same type of code to apply properties?


Yes, if it doesn't uses CFG settings, it just loads some value (usually fixed) and stores it. that depends.

Quote
There's any way to find it even for someone that doesn't know nothing about coding?


They are usually attached to the top for easier search, but sometimes can be found after main code and before GFX code. If it uses non-cfg value, well... you have to manually calculate YXPPCCCT.

--------------------
Searching for GFX guy! Help me finish my player GFX! DM me for more details!
--------------------


I would like help with ASM in YI.

I am using SPASM, and what I want to do is to make it so that once certain conditions are met (which I have set up) all sprites 0D0 that have spawned (these are screen exits to the right) will be removed. What code do I need to delete these sprites?
Thanks RussianMan, helped me a lot

Now I'm with problems with another thing. I'm using a patch that wrap vertically the sprites on the screen, but I want to use this only in specific levels. Tried to use it with UberASM but no success. How can I convert it?

Here's the code:
Code
header
lorom

org $008E9A		;status bar routine hijack, run every frame
	JSL MainCode	

org $00E9A1
	JML VertDisablewall

org $03B66E
	JSL Marionox		;;;;

org $03B6BB
	JSL Spritanox		;;;;

org $14E800
	db "STAR"
	dw CodeEnd-MainCode
	dw CodeEnd-MainCode^$FFFF

Marionox:
	ADC #$00
	PHA
	LDA $5B
	AND #$01
	BEQ .horz
	PLA
	AND #$01
	STA $08
	RTL
.horz
	PLA
	STA $08
	RTL

Spritanox:
	ADC $0F
	PHA
	LDA $5B
	AND #$01
	BEQ .horz
	PLA
	AND #$01
	STA $0A
	RTL
.horz
	PLA
	STA $0A
	RTL

MainCode:
	STA $00
	STZ $01

	LDA $5B
	AND #$01
	BEQ Return

	REP #$20
	LDA #$0020
	STA $1A
	;BRA SkipSpriteRun

	;LDA $1337
	PHX
	SEP #$20

	LDX #$00
SpriteLoop:
	LDA $14E0,x
	XBA
	LDA $E4,x
	REP #$20
	CMP #$0010
	BCS NoSpriteWrapL
	LDA #$0120
	BRA EndSprCycle
NoSpriteWrapL:
	CMP #$0121
	BCC EndSprCycle
	LDA #$0010
EndSprCycle:
	SEP #$20
	STA $E4,x
	XBA
	STA $14E0,x
	INX
	CPX #$0C
	BNE SpriteLoop

	LDX #$00
ExtSpriteLoop:
	LDA $1733,x
	XBA
	LDA $171F,x
	REP #$20
	CMP #$0022
	BCS NoExtSpriteWrapL
	LDA #$0110
	BRA EndExtSprCycle
NoExtSpriteWrapL:
	CMP #$0111
	BCC EndExtSprCycle
	LDA #$0023
EndExtSprCycle:
	SEP #$20
	STA $171F,x
	XBA
	STA $1733,x
	INX
	CPX #$0B
	BNE ExtSpriteLoop
	REP #$20
	PLX

SkipSpriteRun:
	LDA $94
	CMP #$0010
	BCS NoWrapL
	LDA #$0120
	STA $94
	SEP #$20
	RTL
NoWrapL:
	CMP #$0121
	BCC Return
	LDA #$0010
	STA $94
Return:
	SEP #$20
	RTL

VertDisablewall:
	LDA $5B
	BIT #$01
	BNE DoNoWrap
	LDA $7E
	CMP #$F0
	JML $00E9A5
DoNoWrap:
	JML $00E9FB

CodeEnd:
Very noob question here:

Can this tool convert PIXI sprites to SA-1? Becuase the readme suggest it's intended for Romi's Sprite Tool's sprites only (or that seems to me).
Layout made by MaxodeX
PIXI is just romi's Sprite Tool + local sprites (with no difference in the sprite code) and extra bytes so the only incompatibility (aside from sprites which are incompatibility in the first place anyway) are sprites which use extra bytes and even that can be easily fixed by replacing the extra bytes addresses with their SA-1 counters, assuming sprites with extra bytes don't support SA-1 natively in the first place (most of them do, in fact). In fact, it should work with sprites made for all tools assuming the sprite in question don't use features from newer sprite tools.

--------------------
Okay, my layout looks ugly.
I'm new to rom hacking. I've been able to successfully apply .asm patches using Maxkas on a Mac (ground pound), but it seems like some of the patches on this site either don't do anything or crash my emulator (wall kick). Is that a problem with the patch, or am I doing something wrong? In case you ask, I did double check if I needed to use 'xkas' or 'asar'.

I would like to use a customized version of the Yoshi Player Patch v1.11. I want the player to start as Mario in the first level but play as Yoshi for the rest of the game, and I want to add a couple Yoshi mechanics. Is this possible, given the layout of the rom's code (maybe replacing the Luigi player with Yoshi and forcing the player to use player 1 in level 1 and player 2 in levels 2+)? Are there resources/tutorials/tools specifically for writing patches?


Originally posted by rafreak15
I'm new to rom hacking. I've been able to successfully apply .asm patches using Maxkas on a Mac (ground pound), but it seems like some of the patches on this site either don't do anything or crash my emulator (wall kick). Is that a problem with the patch, or am I doing something wrong? In case you ask, I did double check if I needed to use 'xkas' or 'asar'.

I would like to use a customized version of the Yoshi Player Patch v1.11. I want the player to start as Mario in the first level but play as Yoshi for the rest of the game, and I want to add a couple Yoshi mechanics. Is this possible, given the layout of the rom's code (maybe replacing the Luigi player with Yoshi and forcing the player to use player 1 in level 1 and player 2 in levels 2+)? Are there resources/tutorials/tools specifically for writing patches?


1st question: Perhaps the patches aren't working because their syntax is for Asar and you're using xkas. Since Asar, in theory, runs on MAC, you could always try it and check if the patches applied work.

Now, the 2nd question: I believe it's possible, but... it would a hell of code to do, using the original patch and doing the necessary things. Also, for writing patches... Notepad++ is a good choice, since we have, with asar, a xml file that adds the syntax to Notepad++. As the ASM itself, this tutorial from Ersanio is a good start.

--------------------


Signed Major Flare, a.k.a Br OW Hacker.


Pages: « 1 2404 405 406 407 408 409 410 411 »
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2019 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 7

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented