Language…
25 users online: bMatSantos, bradcomp, DanMario24YT, DashGamer, eltiolavara9, Gorry, GRIMMKIN, hhuxy, iRhyiku, Knight of Time, lo fang 123, Michel2023, Nayfal, nonamelol1, playagmes169, prisvag, Serena, ShadowMistressYuko, Shomi,  shovda, SMW Magic, steelsburg,  Tahixham, TheXander, Tulip Time Scholarship Games - Guests: 298 - Bots: 382
Users: 64,795 (2,375 active)
Latest user: mathew

Small Insignificant Data

Originally posted by imamelia
They don't seem to go the other direction when you change that, though. They appear, but they don't go right instead of left...unless you do this:

org $01D6F0
db $B4,$E4,$29,$10,$4A,$4A,$4A,$4A,$9D,$7C,$15
db $80,$14,$EA,$EA,$EA,$EA,$EA,$EA,$EA,$EA,$EA,$EA

That way, the sprites start out going right or left depending on their X positions.

Sorry for the bump, but I believe this is relevant enough to warrant it. I just applied this to the SMWCP Base ROM, and all it did was make all chainsaw sprites go right. None went left. At all. Could you please fix this so it would make any sprite labelled as going right actually go right while left goes left, instead of both going right? :/
<Adam> I feel like smwc is a prostitute now, because we put up a porn ad for money
While examining the score sprite routines ($02ADA4) I think it's rather obvious that score sprites with values above $10 were originally intended to give mario coins. For starters, there's the 'CoinsToGive' table which is only read from an unreachable address, and then at the very bottom of the GFX routine, there's a check on the sprite number. If the number is less than $11, the code returns, but if it's greater, one more tile is drawn. I think this used to be a coin tile.
Now with extra girl and extra hacker
You can see this code in action here at about 1:40. Nintendo likely removed it because SFC R&D couldn't find a way to make the SNES Hardware support more than 512 sprite tiles without blowing up in their faces. (I think this oddity suggests that the SNES would've been able to have more sprite tiles...)
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
It definitely looks like those coin-giving things were planned for-final, look:



where one of the frames used by the "stunned" Beach Koopa and the one to its left are obviously tiles designed for those sprites, even though the 5 and 25 tiles are styled slightly differently to the normal score tiles.
There was a signature here.


It's gone now.
Like I said, Nintendo had to scrap the idea because they couldn't make the SNES support more than 512 sprite tiles.
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
I discovered two vaguely interesting and unusual things about the vertical fireball/Podoboo (sprite 33). First, did anyone ever wonder just why it freezes the game when sprite buoyancy isn't turned on? It's because of this snippet of code in its INIT routine:

Code
CODE_01E05B:        B5 D8         LDA RAM_SpriteYLo,X       
CODE_01E05D:        18            CLC                       
CODE_01E05E:        69 10         ADC.B #$10                
CODE_01E060:        95 D8         STA RAM_SpriteYLo,X       
CODE_01E062:        BD D4 14      LDA.W RAM_SpriteYHi,X     
CODE_01E065:        69 00         ADC.B #$00                
CODE_01E067:        9D D4 14      STA.W RAM_SpriteYHi,X     
CODE_01E06A:        20 40 91      JSR.W CODE_019140         
CODE_01E06D:        BD 4A 16      LDA.W $164A,X             
CODE_01E070:        F0 E9         BEQ CODE_01E05B


To put it simply, the code moves the sprite down a tile until it touches lava or water. But to add more detail...well, the sprite's initial Y position is already saved in $1528,x/$151C,x. (That's how it determines how high to jump.) Here, the sprite gets moved down a tile, then the object contact routine is run, then $164A,x is checked. $164A,x is often used to check if a sprite is in water or lava; if it is nonzero, then the sprite is in water or lava. However, this only works if sprite buoyancy is on. The init routine here keeps moving the sprite down until $164A,x is nonzero, but if sprite buoyancy is off, then $164A,x is never set at all. And if this occurs, then the code gets sent into an infinite loop.

The other thing I noticed...well, while disassembling the sprite, I noticed that it references $C2,x several times. But it never stores anything to that sprite table, nor does it change it in any way; it just loads and compares it. This would make sense if there were another sprite that shared its code with that one, but the only other sprite that fits the bill is sprite B5, the so-called "sinking fireball used in boss battles", and its init routine just returns, so it never changes $C2,x either. BUT...take a look at this piece of code:

Code
CODE_03A800:        A9 33         LDA.B #$33                
CODE_03A802:        99 9E 00      STA.W RAM_SpriteNum,Y


Yes, it's the Podoboo being spawned from somewhere. This is part of the code that handles the Bowser fight scene, in case you're wondering. (By now, you might know where I'm going with this.) Well, guess what occurs soon after that?

Code
CODE_03A825:        F6 C2         INC RAM_SpriteState,X


Yes, Bowser spawns sprite 33, but in sprite state 01, which means that it acts completely different from the normal one we place in Lunar Magic. What it acts like is...the fireballs that fall from the sky in between fight rounds. Where does sprite B5 come into play? It doesn't. Nowhere in the entire code of SMW is sprite B5 even used at all, unless I just suck at finding things. My hypothesis is that sprite B5 was originally supposed to be a close variant of sprite 33 with $C2,x nonzero and a few other settings slightly altered (the spawning routine also messes with some of the Tweaker values, enabling the sprite to interact with objects and changing its clipping value), and it would be the flame spawned during the Bowser battle, but it never made it into the final version of SMW.

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

I'm working on a hack! Check it out here. Progress: 64/95 levels.
It falls faster, too. Maybe that's why it got removed?
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
Interesting discovery. I was helping someone with a layer 2 issue, and while trying to find a solution I discovered whenever you enter a Layer 2 sublevel from a Layer 1 main level, Layer 2 moves by Exactly the same amount it did in the previous level. This obviously applies to all levels too. Also, Variable-scrolling rate scrolls at HALF the speed of Layer 1 (although you probably already knew that). Maybe Nintendo coded it this way so the backgrounds were consistent?
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
Ooh, I think I remember that causing trouble for me during the vanilla contest...

Well, I have another interesting, quirky thing to show that I found out through sprite disassembly.

Code
CODE_01E51E:        C9 30         CMP.B #$30                
CODE_01E520:        F0 0B         BEQ CODE_01E52D    
CODE_01E522:        C9 32         CMP.B #$32                
CODE_01E524:        D0 1C         BNE CODE_01E542           
CODE_01E526:        AD BF 13      LDA.W $13BF               
CODE_01E529:        C9 31         CMP.B #$31                
CODE_01E52B:        D0 15         BNE CODE_01E542           
CODE_01E52D:        BD 40 15      LDA.W $1540,X             
CODE_01E530:        F0 10         BEQ CODE_01E542           
CODE_01E532:        C9 01         CMP.B #$01                
CODE_01E534:        D0 04         BNE CODE_01E53A           
CODE_01E536:        22 4E C4 03   JSL.L CODE_03C44E         
CODE_01E53A:        A9 02         LDA.B #$02                
CODE_01E53C:        9D 02 16      STA.W $1602,X


This code checks the sprite number of the Dry Bones. Normally, sprite 30 throws bones but doesn't stay on ledges, and sprite 32 stays on ledges but doesn't throw bones. This is key. Here, if the sprite number is 30, the code jumps right to the check to see if the throw timer has reached 01, but if it is 32...it checks the overworld level number. The three lines beginning at CODE_01E526 essentially make sprite 32 also throw bones if the overworld level is 31, which equals level 10D, which is Bowser's Castle. You can see this in action if you take door 6 in the castle. I never even noticed that those two Dry Bones in there were both staying on ledges and throwing bones, nor did I notice in Lunar Magic that their sprite number was 32, not 30.

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

I'm working on a hack! Check it out here. Progress: 64/95 levels.
Originally posted by imamelia
I never even noticed that those two Dry Bones in there were both staying on ledges and throwing bones, nor did I notice in Lunar Magic that their sprite number was 32, not 30.

Interesting. That makes one wonder if there are any other special cases hidden in the ROM.
Originally posted by imamelia
The three lines beginning at CODE_01E526 essentially make sprite 32 also throw bones if the overworld level is 31, which equals level 10D, which is Bowser's Castle.


Huh, I always wondered why the Stay-on-Ledges Dry Bones in one of my levels, which just so happened to be 10D, threw bones. That certainly explains a lot. I recall finding it rather quirky at the time, but never bothered to look into it.
Originally posted by Smallhacker
Originally posted by imamelia
I never even noticed that those two Dry Bones in there were both staying on ledges and throwing bones, nor did I notice in Lunar Magic that their sprite number was 32, not 30.

Interesting. That makes one wonder if there are any other special cases hidden in the ROM.


Well there's things like the monty moles and other sprites where they act different (faster) outside of yoshi's island and stuff.
I own a community of TF2 servers!

ASMT - A new revolutionary ASM system, aka 65c816 ASseMbly Thing
SMWCP - SMW Central Presents a Product- tion long name

frog

http://esolangs.org/wiki/MarioLANG
You know, you can just CTRL+F '$13BF' for that kind of stuff inside all.log, anyway.
For example, level 13 leading to the secret exit normally.

Code
CODE_00CA08:        AD BF 13      LDA.W $13BF               
CODE_00CA0B:        C9 13         CMP.B #$13                
CODE_00CA0D:        D0 03         BNE CODE_00CA12           
CODE_00CA0F:        EE D5 0D      INC.W $0DD5            

--------> Don't follow "Find Roy's Dignity", my hack. Because it's pretty outdated. <--------
In Level Mode 0E 1UP Mushrooms appear behind Layer 2 when spawning. This may affect other sprites that appear behind Layer 1 as well.
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
The big boo boss uses cluster sprite tiles, and those are the same ones the ghost ceiling uses.

also if you set the feedback too high on echoes and then use a rewind (at least in ZSNES) the echo won't play anymore. Savestates don't do this.

Not sure ifeveryone knew that though
Discovered a gem of stupidity yesterday.

As some of you may know, the overworld music doesn't play after beating certain castles. (This is because Mario auto-moves onto a different map and playing half a second of music before switching to something else was apparently not something they wanted.)

So, disable music after certain levels have been beaten. How would a normal programmer do that?

Answer: Create a blacklist containing the level numbers where music shouldn't be played. Simple.

How did Nintendo do it?

Check if a cutscene played. If not, play music. Otherwise, disable the music, unless the current level number is found in a whitelist, i.e. a list of levels where the "disable music after cutscene" rule doesn't apply.

Brilliant.

Although, what makes it even more brilliant is what the whitelist actually contains:

Valley Fortress, Donut Secret House, Wendy's Castle, Chocolate Fortress, Forest Fortress, Roy's Castle, Front Door, Back Door, Larry's Castle, Valley Fortress, Lemmy's Castle.

So, in this list, 7 out of the 11 levels either don't play a cutscene or don't even return to the overworld, making their presence in this list, and indeed the list itself, utterly pointless.

And, in case anyone is interested, here's some brief notes I posted on IRC:

Originally posted by Smallhacker
Cutscene check at $04/8DDF. (Set $04/8DE5 to $80 to completely disable the music muting) At $04/8E1A, it checks if the level has been beaten. At $04/8E22, it iterates through a list (16-bit for some reason) located at $04/8D74 containing the levels to disallow muting for. $04/8E38 is where the submap-appropriate music is loaded.
Why did Nintendo even bother doing this when they could've made a shorter list with only the levels that DON'T play music and use the space saved to unpair the scale platforms like they originally intended to or something? On that note I smell a new feature or two in the next LM...
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
Level modes 03-06 don't load their own graphical data for the object layers.
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
You know the entry in the RAM map for $7EC800? You know how $7ED000 and onward are used in the overworld for a different purpose? Well, apparently, so is $7EC800-$7ECFFF:

Code
CODE_048E94:        BF 00 C8 7E   LDA.L $7EC800,X           
CODE_048E98:        29 FF 00      AND.W #$00FF              
CODE_048E9B:        8D C1 13      STA.W $13C1           


Here, $7EC800 seems to be used as a table for Layer 1 tiles. I found this when I was investigating $0EF5 and $0EF6 (anyone know anything about either of those RAM addresses?). The same thing happens at $049027.

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

I'm working on a hack! Check it out here. Progress: 64/95 levels.
Hmm...
I wonder if these two are related...
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel