Ok, nice to know you appreciate it, but we can't have it not assembling properly. You did set XX to a value, right? Try #$E0, maybe #$D0 if you want a slightly higher arc. I copy-pasted the code I gave you and it works for me.
Open temp.txt (Sprite Tool should have made one if it didn't assemble) and tell me what it says.
I tested the code and it seems the sprite can only target Mario if it's throwing the hammer to the left. That's weird, I used the exact same code as in one of my own sprites, which works perfectly. I guess extended sprites do work differently. I'll get back in a bit, I'll have to check all.log. I'm at school now so I'll probably PM you in a few hours.
Ok, I figured it out. Replace the first code I gave you with:
LDA $14E0,x ;\
XBA ; | Load sprite's 16 bit X position
LDA $E4,x ;/
REP #$20 ; A 16 bit
SEC ;\ Subtract Mario's 16 bit X position
SBC $94 ;/
LSR A ;\ Divide by 4, you could do more or less if you wanted
LSR A ;/ Each LSR A divides the speed in 2
SEP #$20 ; A 8 bit << IMPORTANT
EOR #$FF ; Invert AFTER the LSR
Then replace the second piece of code (the one before STA $173D,y) with:
ADC #$C8 ; Base Y speed
CMP #$C0 ; Maximum Y speed, any more and it goes crazy
I put a cap on the Y speed to prevent the hammers from pretty much transcending the speed of light. I moved the EOR #$FF to after the LSR's, since they were essentially ASL's as it was before. I tested it and it works. The X speed should range #$40-#$C0 (maximum rightwards speed at throw - maximum leftwards speed at throw) and the Y speed should range #$18-#$C0 (maximum downwards speed at throw - maximum upwards speed at throw).We’re looking for level designers to work onExtra Mario World!
If the patch was accepted by the mods I find it hard to believe that it wouldn't work. How did you patch it? And what error messages did you get?We’re looking for level designers to work onExtra Mario World!
If you don't know much about ASM, you're probably gonna have a rough time (really, reading through all.log to find the right places to even put the code can be a pretty overwhelming task). I've had a bit of experience with these things in the past year though, so I could probably help you out, if you want, that is.We’re looking for level designers to work onExtra Mario World!
Ok, so I made this patch for you. It comes with pretty clear instructions and is quite customizible. If you have any questions, feel free to ask. Also, I'm not much good with drawing graphics, so you'll have to do that part yourself. If you need help changing the graphics during the floaty animations or something I can help you with that, too.
EDIT: I noticed and fixed a few bugs. Also I noticed that if you set !FloatSpeed to less than $10 (which is SMW's original float speed), sprites will not stand for Mario stomping them and hurt him instead.We’re looking for level designers to work onExtra Mario World!
I very recently made this patch. It makes it so that the cape basically acts like the acorn from NSMBU. If you know any ASM you could pretty easily edit a few things to get the desired result. If you don't, I can make a new version tomorrow.We’re looking for level designers to work onExtra Mario World!
1: I don't know how to apply this patch to my ROM. I don't know if I already said this but I have NEVER used ASM before. I tried to edit Hex Address 60 from 00 to 01 because I thought that's what is wanted me to do to doublejump, thinking it would help, but it started (in my case, Luigi) Mario on star road, in the middle X axis but really low Y axis.
2: Drawing graphics is fine for me, but is there a way to make the feather come out of the box like a mushroom would, simply popping out and rolling to one side?
3: A is Spinjump and B is regular jump, right? I use a gamepad F310 and I mapped the keys to whatever feels comfortable.
As someone already said, download asar. Then open it, type the patch name on the first line, then type your ROM name on the second line (you probably want to put everything in the same folder first). As for the rolling feather-thing, I'll fix that in the next update. I'll notify you when it's up.We’re looking for level designers to work onExtra Mario World!
I very recently made this patch. It makes it so that the cape basically acts like the acorn from NSMBU. If you know any ASM you could pretty easily edit a few things to get the desired result. If you don't, I can make a new version tomorrow.
The patch is open source, and can be found on my files. I made it for you, but anyone is allowed to use it, really.
To Von Fahrenheit:
I know this may be a bad time and place to say this, But I was trying to make an SMB3-accurate version of Raccoon mario (as well as optionally adding Hammer, Tanooki, and Frog) without powertool, And I think you may be the person to help me with that,
I tried and failed to make them myself even with the mess of (partly uncommented) code availible from the Disassembly
That's it, other than that.
I really don't know much about the powerups. I just read through all.log a bit and hijacked some code. For the SMB3-raccoon there's probably a patch for that already (unless you want to add it, not replace the cape). If you want to add as many powerups as you do, though, the best way would probably be to make a patch that adds a pointer table that the game would index with the value in $19. That way it would be very easy to add more powerups and change existing ones. I don't know how PowerTool does it, I've never used the thing. Anyway, I don't think anyone (read: I) will make a patch like that very soon. I might do it when I'm done with the demo of my hack.We’re looking for level designers to work onExtra Mario World!
Before I say anything else I'll go ahead and admit that I am not very experienced in the ways of custom music, so please excuse any silly mistakes on my part.
I downloaded the Yoshi's Island Soundtrack (by LadiesMan217) from the music section on the site. I only wanted the boss related songs in my hack, so I tried adding "Before Boss", "Boss (intro)", and "Boss Clear" to my addmusic list. I read the readme and also added the sample groups and copied the .brr folders to the samples folder. When I ran AddMusicK (version 1.0.1, found in the tools section on the site) it detected no errors. However, when I play the game it freezes at the title screen. It shows the Nintendo Presents logo as usual, starts playing the title screen song, then it goes silent and freezes when it would normally fade to the title screen.
Sorry for the wall of text.
TL;DR: What am I doing wrong!?We’re looking for level designers to work onExtra Mario World!
Yes, I agree it would be very weird for the soundtrack itself to cause that. I have a few patches applied to the ROM, but I never ran into any problems until I tried adding the YI songs. Come to think of it, the reason for the crash is probably a patch using forced freespace. It's possible AddMusicK tried claiming that particular section of the ROM, which then causes a crash when I JSL to it (I've had Lunar Magic do this to me in the past when inserting ExGFX). I'll try changing around some stuff tomorrow and post back then.We’re looking for level designers to work onExtra Mario World!
The generators didn't use X stack preserve. They uses the X other than the sprite table; use for the tiles to draw on the HUD.
The X register and sprite tables are not connected. You can do either without the other. The only reason we use X for sprite tables is that X is already loaded with the sprite index when the game calls the sprite code (that and the fact that some sprite tables are direct page, so Y can't properly index them, but whatever). But if you want to you very much can use Y to index sprite tables (very common when spawning a sprite) and you can also use X for other things, like indexing tables in other banks (which Y can't do) or other things.
Like you have already been told, though, it is good practice to keep track of the sprite index (original value of X at the start of the sprite routine) so you don't mess up other sprites.We’re looking for level designers to work onExtra Mario World!
To elaborate on what leod said, $15E9 contains the sprite index for the sprite that is currently being processed. So the opcode LDX $15E9 would restore X to its original value. It is not recommended to ever store anything to $15E9.We’re looking for level designers to work onExtra Mario World!
I'm trying to make this really sweet death animation for a boss. It involves a masking window on the sprite layer that covers the boss. I'm using HDMA with a RAM table to udate the window size so it looks like the boss fades away. At first I tried just writing to the left/right limit registers (2126/2127). That did nothing, however, so I checked regs.txt, which said these registers can not be written to outside of a blank.
I made an HDMA routine for it, thinking that H-blank would do. It still does nothing, however.
REP #$20 ; > A 16 bit
LDA #$2500 ;\ Register 2125, one register write once
STA $4340 ;/
LDA #$A407 ;\ Location of table within bank
STA $4342 ;/
LDY #$7F ;\ Source bank
STY $4344 ;/
SEP #$20 ; > A 8 bit
LDA #$10 ;\ Enable HDMA on channel 4
TSB $0D9F ;/
LDA #$2601 ; Register 2126, two registers write once
ADC #$10 ; Start at this scanline
STA $7FA407 ;\ Scanline count
STA $7FA409 ;/
LDA #$00 ;\
STA $7FA408 ; | No window on these scanlines
STA $7FA40A ;/
LDA !StunTimer ;\
EOR #$7F ; | Window height
LSR A ; |
STA $7FA40B ;/
CLC : ADC $00
LDA #$02 ;\ Enable the window on these scanlines
STA $7FA40C ;/
LDA #$DF ;\
SEC : SBC $01 ; |
STA $7FA40D ; | Disable the window for all scanlines below
LDA #$00 ; |
STA $7FA40E ;/
LDA #$00 ;\ End table
STA $7FA40F ;/
SEC : SBC $00
LDA $E4,x ;\ Window left position
STA $7FA417 ;/
CLC : ADC #$20 ;\ Window width
STA $7FA418 ;/
SEC : SBC $01
STA $7FA41C ; > End table
LDA #$10 ;\
STA $212E ; | Only mask the sprite layer
STA $212F ;/
!StunTimer is what controls the size of the mask.
TL;DR: How do I write to 2126/2127?We’re looking for level designers to work onExtra Mario World!
To get things started, you'll want one variable containing the boss' HP (usually this would be $1528,x) and one variable that indicates the boss is hurt/stunned (hint: $1540,x is decrements itself and is perfect for this). You'll want to store the boss' maximum HP to the Hp counter in the INIT routine to set things up.
For the movement, you can just copy-paste the code from Rip Van Fish. Before that, though, you'll want to put LDA !StunTimer : BNE NoMovement, where !StunTimer is whatever address you use to track how long the boss should be stunned after getting hit, and NoMovement is a label after the movement routine.
To make it 32x32, just add Xdisp to your graphics loop. It's four 16x16 tiles, so set up your tables like this:
Tilemap: db !Tile1,!Tile2
Xdisp: db $00,$10
Ydisp: db $00,$00
Then start off your graphics loop by setting some address (the X register is probably better) to 3. At the end of the graphics loop (before the JSL!) put INY#4 : DEX : BPL .Loop. .Loop is obviously the label you loop to. Note that you need the sprite index back in X before the JSL (I think, not sure).
Oh, yeah, the hitbox detection! There are routines for that in SMW, actually. They're located at $03B6F9, $03B6E5, and $03B72B. What you do is this:
JSL $03B6F9 ; Get sprite A clipping
LDX #$0B ; Start at highest sprite index
.Loop LDA $14C8,x
JSL $03B6E5 ; Get sprite B clipping
JSL $03B72B ; Check for contact
Instead of !MoreCode you put check if the sprite is a thrown object (probably means $14C8,x = $0A). If it is, decrement the boss' HP and store some value to the stun timer (to stun it, duh).
I think that's all. Hopefully it's helpful.We’re looking for level designers to work onExtra Mario World!
perhaps check in something like VSNES to see if your window is active. if it is, then it's a problem with your math
you may/may not want to mess with $212A/$212B as well (at least to see if it gives you anything different)
I have confirmed the window is not active (I think). It doesn't mask anything, and if I check bit 0 in 2125 it masks everything. I did as you said and checked in vSNES, which told me that my HDMA is active, 2126 = FF, 2127 = 00. This is obviously not a proper window. Well, this is weird. Does SMW do anything with the masking registers to disable them? 2127 SHOULD equal 2126 + 0x20, which it doesn't. Do I need to make a patch for this?
EDIT: I noticed something else in vSNES; it says 2125 is clear. That's weird. In the savestate I loaded I set 2125 to 03 to see if that did anything different, and something obviously happened, since it hid the entire sprite layer for those scanlines. Also the entire screen turns black when after the HDMA finishes and I disable it. The game doesn't crash, the screen just turns black until the OW is reloaded.We’re looking for level designers to work onExtra Mario World!
I tried your code, it did no good. I tried my own 4 registers write once routine; it did no good. I'm starting to think you can't do this from sprite routines? I have no idea why that would be, but it seems to be the case. Despite everything, nothing happens, and vSNES still tells me the following: 2125 = 00, 2126 = FF, 2127 = 00, 2128 = 00. This makes no sense to me; why does nothing happen!? I swear I'm gonna end up losing my hair over this. I still appreciate the help though, if you have any ideas as to why it might not work, I'd like to hear them.We’re looking for level designers to work onExtra Mario World!
Hmm, I went through the Scene Viewer in vSNES and that tells me that my HDMA is active and writing very much correct values to 2125 through 2127. It also says that windowing is disabled. I guess this means SMW does something to disable windows specifically. And yeah, I do have another HDMA active, which handles sprite color math on. I'll try doing it from outside of the sprite routine though.We’re looking for level designers to work onExtra Mario World!
[...] and one variable that indicates the boss is hurt/stunned (hint: $1540,x is decrements itself and is perfect for this).
How would I make it only be stunned for, say, 3 seconds (or 180 frames)? The description of it in the RAM map says it's used by Goombas and Mechakoopas for when to "get up" which is somewhere along the lines of 20 seconds.
The Goomba is actually only stunned for a little more than 6 seconds. It writes 0xFF (255) to the timer, which equates to 6,25 seconds. That is also the maximum amount. To stun your sprite for any number of seconds, write the amount of seconds times 60 to the timer. To stun it for 3 seconds, just do:
LDA #180 ; I would actually advise against using hex here
Note that you can't write values larger than 255 (FF), since the timer is only 8 bits large.We’re looking for level designers to work onExtra Mario World!