Language…
7 users online: BUX88, DanMario24YT, Golden Yoshi, Hidincuzimsmokin, Ringo, Shiki_Makiro, Zavok - Guests: 203 - Bots: 237
Users: 64,667 (2,404 active)
Latest user: DarthHylian

Posts by Jagfillit

Jagfillit's Profile → Posts

http://bin.smwcentral.net/5453/fireball1.asm

I need a little help with this sprite. When inserted with spritetool, it gives an error, which, when ignored, produces the sprite, but it doesn't move. I'm sure I've made a stupid mistake, but I've been editing it for hours and haven't made any progress.
Originally posted by zKiP
I didn't read through your code, but what error is spritetool giving?


EDIT: I'm nuts with editing today.

I still need help with the patch I had here earlier, though I've fixed the errors from before, and narrowed down my problem to this section:

Code
CodeStart:
	LDA $170B,x   
	BEQ Return321
	LDY $9D
	BNE CODE_029B27           
	LDY $176F,x             
	BEQ CODE_029B27           
	DEC $176F,x 
CODE_029B27:
    	REP #$30
	LDA $170B,x
	ASL A
	TAY
	LDA ExPtr,y
	STA $00
	SEP #$30 
	LDX #$00
	JSR ($0000,x)
Return321:
	JML Return123

ExPtr:
	dw ExReturn,SmokePuff,ReznorFireball,FlameRemnant,Hammer,MarioFireball,Baseball,LavaSplash	;
	dw LauncherArm,UnusedExtendedSpr,CloudCoin,PiranhaFireball,VolcanoLotusFire,WigglerFlower	;
	dw SmokeTrail,SpinJumpStars,YoshiFireball,WaterBubble						;

With this, the game freezes as soon as an extended sprite is generated.

The problem is in some way I'm setting up my pointers. If I were to replace CODE_029B27 to Return321, with say "JSR SpinJumpStars" it would work, generating a spin jump star in place of every extended sprite.

I've seen the method I use up there work with other patches so I have no idea what I'm doing wrong.
Link 1
Link 2
And Link 3

They're not very exciting as is, but these are a patch that hijack the extended sprite pointers, allowing for custom extended sprites to be inserted. I've yet to successfully create a custom sprite, but perhaps someone smarter than me can make use of this.
Originally posted by Super J-fire_ice460
Is there a way by any chance that if you change Jagfillit's fire and thunder power up routine to have the effect of the ice power. Maybe if would work since it has the fireball routine.


Of course. It would just be a matter of changing the bit of code that kills a sprite to code that turns it into an ice cube sprite. mikeyk's Ice Blast and Ice Block sprites included with sprite tool already do that, so you could just cut and paste to get the sprite you want.
Replace this:
Code
DONT_CHANGE_DIR
		    JSR LABEL17		    ; kill sprite routine
		    LDA $03
		    CMP #$FF
		    BNE RETURN
		    LDA #$00		    ; \ set sprite into
		    STA $14C8,x		    ; / death mode (status=2)
RETURN
                    JSL $01802A             ; update position based on speed values
                    RTS


LABEL17           
		LDY #$0C		; load number of times to go through loop
KILL_LOOP	CPY #$00		; \ zero? if so,
		BEQ END_KILL_LOOP	; / end loop
		STZ $03
		DEY			; decrease # of times left+get index
		STX $06			; \  if sprite is
		CPY $06			;  | this sprite
		BEQ KILL_LOOP		; /  then ignore it
		LDA $14C8,y		; \  if sprite is not
		CMP #$08		;  | in a "tangible"
		BCC KILL_LOOP		; /  mode, don't kill
		LDA #$FF
		STA $03
		LDA $167A,y		; \  if sprite doesn't
		AND #%00000010		;  | interact with stars/cape/fire/bricks
		BNE KILL_LOOP		; /  don't continue
		LDA $166E,y             ; \ If
		AND #$20                ;  |  cape resistant
		BNE KILL_LOOP		; /  don't continue
		JSL $03B69F		; \
		PHX			;  | if sprite is
		TYX			;  | not touching
		JSL $03B6E5		;  | this sprite
		PLX			;  | don't continue
		JSL $03B72B		;  |
		BCC KILL_LOOP		; /
		LDA #$37	        ; \ play kill
		STA $1DFC		; / sound
		LDA $1656,y		; \  force sprite
		ORA #%10000000		;  | to disappear
		STA $1656,y		; /  in smoke
		LDA #$02		; \ set sprite into
		STA $14C8,y		; / death mode (status=2)
		LDA #$FF
		STA $03
END_KILL_LOOP	

with this:
Code
DONT_CHANGE_DIR
		    PHX
		    JSR LABEL17		    ; kill sprite routine
		    PLX
		    LDA $03
		    CMP #$FF
		    BNE RETURN
		    LDA #$00		    ; \ set sprite into
		    STA $14C8,x		    ; / death mode (status=2)
RETURN
                    JSL $01802A             ; update position based on speed values
                    RTS


LABEL17           
		LDY #$0C		; load number of times to go through loop
KILL_LOOP	CPY #$00		; \ zero? if so,
		BEQ END_KILL_LOOP	; / end loop
		STZ $03
		DEY			; decrease # of times left+get index
		STX $06			; \  if sprite is
		CPY $06			;  | this sprite
		BEQ KILL_LOOP		; /  then ignore it
		LDA $14C8,y		; \  if sprite is not
		CMP #$08		;  | in a "tangible"
		BCC KILL_LOOP		; /  mode, don't kill
		LDA #$FF
		STA $03
		LDA $167A,y		; \  if sprite doesn't
		AND #%00000010		;  | interact with stars/cape/fire/bricks
		BNE KILL_LOOP		; /  don't continue
		LDA $166E,y             ; \ If
		AND #$20                ;  |  cape resistant
		BNE KILL_LOOP		; /  don't continue
		JSL $03B69F		; \
		PHX			;  | if sprite is
		TYX			;  | not touching
		JSL $03B6E5		;  | this sprite
		PLX			;  | don't continue
		JSL $03B72B		;  |
		BCC KILL_LOOP		; /
		TYX
		LDA #$01		;change to ice block's sprite number
		STA $7FAB9E,x
        	LDA #$08                ; Normal status
        	STA $14C8,x              
		JSL $07F7D2             ; Reset sprite tables
        	JSL $0187A7             ; Get table values for custom sprite
        	LDA #$88                ; Mark as initialized
        	STA $7FAB10,x
		LDA #$9B
		STA $1540,x
        	LDA #$01                ; Play sound effect
        	STA $1DFC
		LDA #$FF
		STA $03
END_KILL_LOOP


For it to work you'll need to insert the ice block sprite as sprite 01, or whatever you change the number to.
Just a short example of what's possible with the patch.

I've noticed that direct ports of the extended sprites' routines don't always work like they should. Whether this is an effect of the patch's ASM, or the result of jumping out of the original bank (like how a normal RTS in the main code of a custom extended sprite crashes the game) I'm not sure. If someone has info on extended sprites that'll improve the patch, I'd be glad to hear it.
Is it normal to have xkas return "LDY *table name here*,x" as an invalid opcode? The code I'm using is straight from all.log, so I would think that it should work, but I'm not sure.
This looks quite promising so far. SML2 was one of my favorites, so I'll definitely check up on this.

Also, it reminds me that I need to fix up those old Ants.
Isn't that a creative title. Oh well.

I planned to have more to show...but my second project didn't go so well. Anyway, what I do have is my
Powerup Expansion Patch.
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/YxLvLKGmvh8&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/YxLvLKGmvh8&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
This patch makes originally unused values of $19 accessible, boosting the number of available powerups from 4 to 16 (by default). It was actually fairly simple, as I just had to hijack all the code that uses $19 as an index.

So far, it can:
-Run a routine every frame depending on the current powerup.
-Set whether Mario can spin jump with the powerup.
-Set hitbox sizes for each powerup.
-Determine what item to store to the itembox when touching the original powerup items.
-Set Mario's tilemap (Small, Big or Cape Mario) according to powerup.
-Set the number of frames to use when walking/running (small uses 2, all big forms use 3)
-Give Mario a unique palette for each powerup (thanks to Roy)

I aim to add more as well, such as using the cape with any powerup.

In addition to that, I've also been working on custom extended sprites, and fixed my ExSprites patch up a bit. The exsprites I've (mostly) finished can be seen in the video above. They are:

-The Iceball
It's fairly straightforward, just a mesh of mikeyk's Ice Blast and the original fireball.
-The Shieldball
A fireball that spins around Mario Mega Man style.
-The Hammer
The original hammer, minus the Mario hurt routine, plus a enemy kill routine.
-The Blue Shell
A version of the blue shell from NSMB. It forces Mario into a dash, bouncing off any walls it collides with. It falls off if Mario is hurt, or changes powerup.
-The Boomerang
A extended sprite version of ICB's normal boomerang projectile.

I will release these, and the patches, later on. On that note...where would I put exsprites up anyway? =P

EDIT: Downloads are up.
Originally posted by MrDeePay
You forgot the part where you on the side make me constantly replace monitors because you keep one-upping me with your damn power-ups!

Since I'm sure you know that not everyone uses the same item box format as in standard SMW (I wonder how... *cough*), I take it that you have an option to not allow sending items to the box.


I was planning to make something so incredibly awesome you'd come all the way to Jersey just to punch me in person...but it turns out I'm not that smart.

And actually, I hadn't thought of that. It should just be a matter of removing a line or two though.
Downloads are up. Included in the pack is the Powerup Expansion patch, the new ExSprite patches, readmes, and the extended hammer. All you should really need to edit in the Powerup Expansion patch (besides the powerup routines themselves) are the tables, so once you insert it, you're good to write #$04 through #$0F to $19 in any of your code. Keep in mind, any new ASM (patches, sprites, whatever) in the game that uses $19 as an index will need to have it's table(s) expanded as well. As for the actual powerup routines, "NewPowerups04" to "NewPowerups0F", it works just like LevelASM, so you can add any extra effects, like high jumping and the like.

The hammer is simply a txt file as there is no method of inserting it like Sprite Tool. You'll have to copy and paste each section of the file into the appropriate patch (each sections header tells you where to put it). The other exsprites are still in the works, being either glitchy (boomerang and the shell mostly) or just unfinished (the iceball and "shieldball" have one or two more features I'm adding), but will be released in time.

Originally posted by imamelia
1) The boomerang looks funny because it just X-flips. It should Y-flip as well, or else use a second tile.
2) How did you get the shield powerup to move in a circle? I and several other people have been trying to figure that out for quite a while. (And you should probably make its animation a bit smoother.


1) Yeah...That boomerang has been giving me trouble from the start. The GFX just now decided to stop working properly.
2) Actually, it doesn't move in a circle. It moves to one of eight points around Mario based on the frame. I don't know how to do circles either.

Originally posted by andy_k_250
Short of adding a dynamic 16x16 slot or two in SP1 or SP2 (so power-up graphics can be loaded globally) or adding player ExGFX that can be switched mid-level, I can't see much room for improvement here in the underlying structure.

I have to ask - how does the shell interact with Triangle Blocks? #w{=D}


I do have an idea of how I might bring in additional player GFX...However I'm not quite sure how I'd pull that off. I've already started poking around Mario's GFX routine, so that might be something to look for.

And...uh...I forgot all about the Triangle Blocks. Like DP said, the shell has no block interaction of it's own, using Mario's instead, so chances are it would start the wall-run, but either bounce of the wall...Or just appear to hover up the wall. It still needs work obviously.

Originally posted by SolidSnake141.35
Wow this is fine and dandy, quite polished. I like how the shell changes colors like a koopa going in a yellow shell, etc, when you get a star, that's pretty creative and I don't think a lot would think to add that in actually. The Megaman styled barrier is pretty creative itself.


Thanks. I've put probably the most effort into the shell, adding more details like that for fun.

Originally posted by Hobz
that was awesome. :D
unlike most powerups, yours arent unfair to no end. from what i saw, the leaf shield only can protect you for so long, the shell is (hopefully) uncontrollable, the hammer has a short radius, the boomerang has a short radius, and the ice flower is basically a fire flower.


The shield is actually very overpowered. However, I made it with the idea having a draw-back to it, such as decreasing your coins. The shell is supposed to be uncontrollable, though one of the many things I have to fix is that releasing Y (Which stops the shell), turning and holding Y will instantly get you back in the shell, meaning you can turn freely. The rest are mostly based on existing sprites by other hackers, so I that's really all them, in terms of fairness.
Originally posted by andy_k_250
Will this patch allow the new power-ups to be stored in the item box?


By itself, no. I'm sure there's a way to have the item box spawn custom sprites though, so that's another thing to put on my patching to-do list.

EDIT: In case anyone was wondering, my second project I intended to show was this:



That's right. A 24x32 (really 32x32 for simplicity's sake) player. So far I've only gotten the GFX portion down, however, I intend to do 24x32 tile interactions/hitboxes as well, though this is proving difficult. For example, slopes will either be registered as flat ground, or even air, and jumping against the left side of a block has Wario go through them and crash the game. I may even do a mini-hack if I'm successful with this.
Originally posted by Hobz
awesome player.
will he have any of warios moves (gotta have the dash at least)
keep up the awesome work :)


Of course. Can't have Wario without his moves. That's just not right.

What's great for me is that a few patches I can use to make them have been been showcased for this C3, like the SMB2-style carrying patch, and Ladida's Peach Bomber. Assuming I figure out out to switch player GFX on the fly, I might even do some of Wario's status effects for fun.
I'm working on documenting common subroutines for extended sprites. Here's what I have so far.

The GFX and position update routines should be used in most exsprites, the first GFX routine being there so they work in all necessary game modes. The object interaction routine is somewhat limited by itself, as it can't check what side the exsprite is hitting, so it's really only useful for fireball-like movement and/or bouncing off slopes.

Also, these routines are assuming the exsprites are using the fireball slots (#$08 and #$09), and might need adjustments to work with the other slots.
Extra Mario GFX slot for fun.

Like I said, not the best way to be going about it, but it works. Perhaps if I can figure out a way to decompress GFX in-game I'll release a patch or something.
It really wasn't too hard to do. The routine at $00F636 stores the lower bytes of pointers to Mario's decompressed GFX (which are located at $7E2000) to addresses $0D85 and $0D87. In addition, the bank byte for the pointers is loaded at $00A33F. Using incbin, I inserted a new GFX file for Mario in freespace and hijacked those routines to point to it or the originals based on current powerup.

If I could find a way to decompress GFX and have it written to $2000 during a powerup switch, it'd save a lot of space...But I honestly have little idea how such things actually work. Had the RAM map not had all the info I needed already on it, I'd have most likely been too confused by the DMA routine to figure this out.
I think more can definitely be done with the GFX. We don't have the limitations Nintendo had, so we really should be able to have more GFX readily available in-game, in any mode (the overworld could use some help in that department...and many other departments).

Originally posted by WhiteYoshiEgg
(...Now that I think of it, Mario's hitbox hasn't really been messed with either.)


I'm actually working on documenting the routines for his hitbox in addition to my projects that have been mentioned. It works by checking a number of points on Mario, apparently 6 points being the maximum. However, just changing these points won't help to do much besides make the hitbox smaller. It'll probably be a while before hackers can mess with that effectively.

Quote
Extended Sprite Tool


This is something I'd love to see. I have little knowledge of any kind of programming that could make something like this, but hopefully I can help to create it in some way.
Quote
I'm guessing by 'readily available in-game' you mean the amount of ExGFX slots or whatever you can assign to a level.


Well, yes, but I was thinking more along the lines of more "actual" slots for sprites/player GFX and such. I can't recall if anyone has done anything like that.

Quote
You are just about close to a levelasm like patch for extended sprites! I should do that, but I bet people would complain it isn't a tool.

Anyway, as far as I know, which admittedly isn't far, extended sprites don't have tweaker bits, don't have an init, don't really have anything to justify a full tool to insert


My patch for that actually is built from LevelASM. It's usable, but probably not as friendly towards those less experienced in ASM as a tool might be. You are right though; extended sprites are simple by nature, so aside from finding freespace and being user-friendly, a tool wouldn't help make the process much simpler...though it wouldn't hurt either.

A powerup tool like someone mentioned earlier would certainly be useful though.