Banner
Views: 236,512,585
Time: 2013-05-24 06:34:20 AM
10 users online: Amos Defamos, o Dotsarecool, EddyCartoon, Egadd, HyperMario, K1ngHacks, Kazeshin, metalgearhunter, Torchkas, WhiteYoshiEgg - Guests: 17 - Bots: 14Users: 22,876 (1,272 active)
Latest: Hero9292
Tip: The lowest row of 16x16 tiles in a level do not appear. Avoid having a low platform that looks like a bottomless pit.
Official Hex/ASM/Etc. Help Thread
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread
Pages: « 1 ... 291 292 293 294 295 ... 319 320 »
Color math can only be applied to layers on the main screen (and sprites).
Move everything to the main screen, but only have layer 3 (and the backdrop) be affected:

LDA.b #%00011111
STA $212C
LDA.b #%00000000
STA $212D
LDA.b #%00100100
STA $40

This worked for me. Not sure if $44 should be set or not (I don't even know what it does :P )
Last edited on 2012-04-03 11:18:14 AM by Ladida.
$44's description is kinda weird, but this is what regs.txt says:

Originally posted by regs.txt
2130 wb+++- CGWSEL - Color Addition Select
ccmm--sd

cc = Clip colors to black before math
00 => Never
01 => Outside Color Window only
10 => Inside Color Window only
11 => Always

mm = Prevent color math
00 => Never
01 => Outside Color Window only
10 => Inside Color Window only
11 => Always

s = Add subscreen (instead of fixed color)

d = Direct color mode for 256-color BGs
Last edited on 2012-04-03 12:46:26 PM by wiiqwertyuiop.
Seems you only really need it for color windows then. For color math (like you're doing, WYE), it's unecessary.
Thanks guys. I'm rather familiar with main/sub screen and CGADSUB registers, but didn't know that a layer had to be on the main screen for color addition to work.

Moving everything to the main screen was no problem, but didn't quite solve it either - color math still doesn't apply to layer 3. Oddly enough, things seem to work fine when I try it on layer 2 instead.

My current settings:

Code
$212C: #%00011111 (#$1F) $212D: #%00000000 (#$00) $40: #%01000100 (#$44) (#$42 for layer 2 works fine, #$44 doesn't) $44: #%00000010 (#$02)


Could trying to use it on the overworld be the cause?
Last edited on 2012-04-03 02:12:10 PM by WhiteYoshiEgg.
do #%00100100 for $40, not #%01000100. That way, the background gradient is participating as well (unless you actually wanted it as #%01000100)

Though you may be right; SMW might be setting some weird stuff on the overworld. In that case, I'm not sure what you could do.
Originally posted by jesus
Hey, me again.

(etc.)


Little programming protip: Start simple and add features once you get the simple thing working. First try just making it scroll upwards at a completely constant rate, ignoring the fact that it the graphics will loop incorrectly (because you can fix that later). Then, once you've gotten that working, you can try fancy-ifying how the scrolling works to make it go faster or slower depending on Mario's position. I don't have time too look over your code in-depth right now, but I'd recommend trying this out first and see what you can do.

I'd also highly recommend using a debugger; it will tell you when and where your code isn't doing what you want.
Originally posted by Kipernal
Originally posted by jesus
Hey, me again.

(etc.)


Little programming protip: Start simple and add features once you get the simple thing working. First try just making it scroll upwards at a completely constant rate, ignoring the fact that it the graphics will loop incorrectly (because you can fix that later). Then, once you've gotten that working, you can try fancy-ifying how the scrolling works to make it go faster or slower depending on Mario's position. I don't have time too look over your code in-depth right now, but I'd recommend trying this out first and see what you can do.

I'd also highly recommend using a debugger; it will tell you when and where your code isn't doing what you want.


Thats exactly what I did. I started out with code that just made layer 3 rise at a constant rate, got it to work, then built up to this. I can post the code that does work alongside the code that doesn't if it helps.
An OAM (?) question which will hopefully be easy to answer:

How can I make a sprite tile move beyond the left edge of the screen? Making its X position zero makes it appear exactly at the screen edge, not farther left like I want it to, and going one lower (making it #$FF) makes it appear beyond the right edge.
Seeing how SMW is able to do that to sprite tiles, I'm certain it's possible one way or another. (Also note that I'd like to do this in a patch, not a sprite's code.)

...did anyone get that?
Yes, easy indeed. Take a look at $0420; setting the high bit of the position will move it leftwards. It's a bit backwards, but it's how it works.
Last edited on 2012-04-08 01:48:38 PM by Alcaro.
I am trying to get a few special items in the Status Bar's Item Box. I am using Davros' SMB3 Treasure Chest Sprite to do it. For one, I am able to get the Spring Board to go into the Item Box perfectly fine, but it is displayed as a green Question Block until it is released by pressing Select. This seems to be unaffected by any patches fixing garbled graphics in the item box. Anyone know how I could get it to look normal in the Item Box?

I am also trying to get a blue P-Switch in the Item Box, but it doesn't seem to work. Is the P-Switch incompatible with the Item Box, or am I doing something wrong?

Thanks for any help in advance.
How do I check which direction mario is facing?
Originally posted by iRhyiku
How do I check which direction mario is facing?



Use $76.
Last edited on 2012-04-09 02:40:10 PM by wiiqwertyuiop.
Originally posted by wiiqwertyuiop
Originally posted by iRhyiku
How do I check which direction mario is facing?



Use $76.



That's it thank you :-)
Originally posted by Yoshi Master
-snip-


To fix the item box graphics, use this patch. I'm not sure what "doesn't seem to work" means with the blue p-switch.
Originally posted by MarioEdit
Originally posted by Yoshi Master
-snip-


To fix the item box graphics, use this patch. I'm not sure what "doesn't seem to work" means with the blue p-switch.

Thanks for replying.

The ItemFix.asm doesn't fix the Springboard issue, as stated in the readme. As for the P-Switch issue, I just can't get the P-Switch to go into the Item Box. I'm pretty sure I have the correct sprite number in my Chest sprite's code, but when I touch the chest nothing appears in my item box. When I hit select, I hear the drop down noise, but nothing happens.
The graphics for the springboard don't show up correctly because, unless you do a significant amount of ASM work, the sprite tile shown in the item box is always a single 16x16 tile, and the springboard is composed of four 8x8 tiles. If you reserve a few extra tiles for a full 16x16 springboard in SP1/SP2, then you can make it display correctly.

As for the P-switch not working, presumably that is because all sprites normally drop from the item box in status 08. The P-switch, however, doesn't have any code for that status; it starts out in status 01 (init) like any other sprite, but then it goes directly to status 09 (stunned) instead of 08 (main). So you'd want to use this patch to make it drop in status 01 or 09. Unfortunately, the P-switch also normally sets its color depending on its X-position when placed in the level, so even just dropping it in status 01 most likely wouldn't make it show up correctly. You could, however, use one of the P-switch custom sprites and, with the linked patch, make that drop from the item box instead. Alternatively, you could use one of the "effects" available in that patch (they run code when the item drops instead of spawning a sprite) to spawn the P-switch and set the necessary sprite tables manually.
How can I set mario's Y-speed for a certain amount of frames i.e no up down movement for about 3F frames..

EDIT:
also what is some unused SRAM addresses, I found a few in the RAM map, but these are used by the DOKIDOKIPANIC/SMB2 health.

Thanks
Last edited on 2012-04-11 07:45:40 AM by iRhyiku.
Originally posted by iRhyiku
How can I set mario's Y-speed for a certain amount of frames i.e no up down movement for about 3F frames..


Set some sort of timer that increases every frame, then at certain frames set his Y speed.


Originally posted by iRhyiku
EDIT:
also what is some unused SRAM addresses, I found a few in the RAM map, but these are used by the DOKIDOKIPANIC/SMB2 health.


Slogger shows some of them:

Quote
0x380200 0x708000(!) 0x8000
0x388200 0x718000(!) 0x8000
0x390200 0x728000(!) 0x8000
...
I guess that is pretty stupid now that I think about it :v
Last edited on 2012-04-11 09:17:48 AM by wiiqwertyuiop.
Originally posted by wiiqwertyuiop
Originally posted by iRhyiku
EDIT:
also what is some unused SRAM addresses, I found a few in the RAM map, but these are used by the DOKIDOKIPANIC/SMB2 health.


Slogger shows some of them:

Quote
0x380200 0x708000(!) 0x8000
0x388200 0x718000(!) 0x8000
0x390200 0x728000(!) 0x8000
...

Excuse my language, but what the hell are you smoking? Slogger doesn't even try to look at SRAM. Those addresses are padding in the ROM (they don't map to anywhere in the SNES address bus) and nothing else.
Inspect the .srm files in a hex editor, keep track of it through external methods, or pick a slot and hope you're lucky (if you don't have the SMB2 health patch, you can use those; there's plenty of patches that default to the same addresses, and that is totally safe as long as you're not using both at the same time). There are no automated ways to find free SRAM, just like there's no way to detect free RAM.
Pages: « 1 ... 291 292 293 294 295 ... 319 320 »
Forum Index - SMW Hacking - General 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 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 29

Menu