Language…
16 users online: Alex No,  AmperSam, Big Brawler, GiraffeKiller, Green, h.carrell, Hammerer, LadiesMan217, Mecke1990, Metal-Yoshi94, Ray Hamilton,  Segment1Zone2,  StayAtHomeStegosaurus, steelsburg, Tulip Time Scholarship Games, Zatara - Guests: 288 - Bots: 556
Users: 64,795 (2,369 active)
Latest user: mathew

Official Hex/ASM/Etc. Help Thread

  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 418
  • 419
  • 420
Code
LDX $15E9
LDA $9E,x
CMP #$75       ; Sprite Number
BEQ Shatter
;CMP #$74      ; Uncomment for more than one sprite.
;BEQ Shatter
RTL

Shatter:
LDA $0A		;\ 
AND #$F0	;| Update the position
STA $9A		;| of the block
LDA $0B		;| so it doesn't shatter
STA $9B		;| where the players at
LDA $0C		;|
AND #$F0	;|
STA $98		;|
LDA $0D		;|
STA $99		;/

; SHATTER CODE GOES HERE

RTL

and for custom sprites you use $7FAB9E,x isntead of $9E,x
I change my layout every 4-5 months
Thanks much, very helpful!
Okay, better idea. Silver Coin, passable block, but a counter in the status bar per level. like if you don't have the coin there's a dotted line, and if you do there's a little icon.
Does anyone know where exactly the code that checks the SRAM to see if a game file is completely clear is? I'm trying to find a section of code that runs once and ONLY once during the entire course of SMW: when starting a new game from an empty file.

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

I'm working on a hack! Check it out here. Progress: 64/95 levels.
If all you want is something that can only ever run once, you could fudge it by using the intro level.
I thought of that...intro level combined with LevelInitASM or something. But isn't there a piece of code in the original SMW that does that, too?

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

I'm working on a hack! Check it out here. Progress: 64/95 levels.
How can I check two RAM addresses at once and allow it to branch if BOTH addresses are the specified values? I could include two separate branches, one after the other, however, my code is too long and skips over certain commands, thus I need to find a way to trim it down.

Lemme write a pseudo-code of what I need:

Check condition 1 is a certain value
Check condition 2 is a certain value
Branch if both conditions are specified values
Any super elegant method will require bitmath, and very much depends on the value ranges of what you're working with. This will work when both values can be 00-FF:

Code
LDA $XX
CMP #$ZZ
BNE AT_LEAST_ONE_FALSE
LDA $YY
CMP #$ZZ
BEQ BOTH_TRUE
AT_LEAST_ONE_FALSE:

..

BOTH_TRUE:


If you have two flags where both can only be 00 or 01:

Code
LDA $XX
AND $YY
BEQ BLAH ; branch if at least 1 flag set to 01


First would be least elegant, second would be most.
Originally posted by Kaijyuu
codes


Awesome, tried your first method and it worked perfectly. Didn't think of doing it that way. Thank you. =)
Originally posted by imamelia
I thought of that...intro level combined with LevelInitASM or something. But isn't there a piece of code in the original SMW that does that, too?

Ah... I ran into something like that while documenting the file/player select screens. Lemme check...

Okay, the code at $009CF2 calls the routine at $009DB5, which does a number of undocumented things, but I'm pretty sure that after that routine, A will hold a nonzero value if the game selected is new. Knock yourself out.
Now with extra girl and extra hacker
Two Three small questions:

1: How can I make a "custom cfg" File from the blue switch AND making it uncarryable?

2:How can I change the dissassembly from "Mushroom Scale" to NOT "produce" and "erasing" normal blocks?

Thanks in advance

Edit: is there a way to make a "sticky block" like in the Blocksection, but in .asm format? Because this version is uneditable, and I don't know how to transform a bin Block in a asm Block...
1. You'd have to set it to being Uncarryable in the asm file IIRC.

2. You could probably take out the code where it does a JSL $00BEB0 with a value before it.

3. here is the asm file of it
I change my layout every 4-5 months
This question is somewhat embarrassing for me to ask, seeing as I know ASM fairly well, but this is something I just can't figure out. When making a patch, where is the best place to find free RAM? I know your first reaction is going to be to check the RAM map, and I have, but everything I've tried that claims to be empty is either used secretly or is set to 85 every frame. Does anyone here have a recommendation? I only need 4 or so bytes, but this seems harder to find than it should be.
Open your game in an emulator with a debugger/memory viewer, and look around for RAM that's always 55. That's the default that most emulators set uninitialized RAM to (it's more or less random in a real machine IIRC), and if you find a large chunk of it, it's likely free enough to use.
How can I prevent the brown used block to turn into a coin when pressed the p-switch?
Copy the brown used block tile in the Map16 editor into an empty field and change it's tile behavior to 130.
Oh sorry, I asked the wrong question. What I want to know is: Is it possible to make question blocks turn into block 130 instead of 132 ?
The question blocks should not turn into coins when they were used and a p-switch was pressed.
Someone knows how to make that this "edited" version of beezo dies without flipping vertically when jumped on?

the link :http://bin.smwcentral.net/29867/fly_guy.asm
Originally posted by dakress
Someone knows how to make that this "edited" version of beezo dies without flipping vertically when jumped on?


Try getting rid of this code:


Code
                    LDA $14C8,x
                    CMP #$02
                    BNE LOOP_START_2
                    STZ $03
                    LDA $15F6,x
                    ORA #$80
                    STA $15F6,x


You can find it under the heading that says "sprite graphics routine."


Does anybody have an aiming routine I could use? I'd use the default one that Magikoopas use but it's too inaccurate for what I'm trying to do.

EDIT: Alternatively, does anybody have an arctangent routine? That'd work just as well.
I should get a new layout.

Probably won't, though.
Originally posted by Kipernal
Does anybody have an aiming routine I could use? I'd use the default one that Magikoopas use but it's too inaccurate for what I'm trying to do.

As a matter of fact, the only thing wrong with the Magikoopa aiming routine is that it aims straight at Mario's top tile, making it miss when Mario is small. Using that routine but changing it to aim at a position one tile lower will make it always hit Mario.
My YouTube channel
Get the official ASMT resource pack here!

  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 418
  • 419
  • 420