Views: 854,448,776
9 users online: BoingBoing, codfish1002, containercore, Ice Man,  KevinM, LouisDoucet, MegaSonic1999, RaymanFan1995, RedCrescent96 - Guests: 29 - Bots: 70 Users: 47,161 (2,476 active)
Latest: migattenobenjai
Tip: Keep your graphics within a specific style. Don't mix cartoony sprites with detailed and realistic back/foregrounds!Not logged in.
More space in Mario's tilemap
Forum Index - SMW Hacking - SMW Hacking Help - More space in Mario's tilemap
Pages: « 1 »
Hi, im new here and i need help.

I hijacked some code in the game that's supposed to modify the ram adress $13E0 wich controls Mario's pose, but not to use the default poses of Super Mario World, I used values that weren't any pose, producing glitched graphics for mario, wich can be corrected to custom poses without overriding default poses by editing the table at $E00C (Mario's upper tile for each pose), the table at $E0CC (Mario's lower tile for each pose) and the table at $DFDA (Mario's 8x8 tiles for each pose). And I have a problem, I need 32(decimal) tiles for my new poses but i can't override any tile already present in the game. I have a few ideas but i don't know how to make them work. I could make the game load ExGFX80 instead of GFX32, put Mario's tiles in ExGFX80 and put the 32 tiles I need where the Yoshi tiles and animated stuff were, or i could make the game load Mario's tiles normally but when it needs to load one of the 32 new tiles, load from ExGFX80. Which routines do i need to hijack to solve this problem?

Thanks in advance!
What you can do (and what I did for the 32x32 tilemap patch) is just load directly from ROM and upload to VRAM. Saves the trouble of loading from ExGFX (which only allows half of half of half a bank's worth of graphics, not enough for Mario's GFX, and you'd also need to decompress the GFX file somewhere), the side effects being GFX32 is no longer used, and Mario's GFX are loaded a frame faster, resulting in some very minute oddities. To do this I hijacked MarioGFXDMA in all.log (located somewhere around $00A300, I honestly forgot).

After doing that you can just upload different graphics based on the current value of $13E0. Tilemap will need to be redone though, since $E00C/$E0CC will probably not be used; you can check out the 32x32 tilemap patch for reference (it does need updating though fgsfds).

(this question also probably would fit better in the Advanced section, since Mario's tilemap is one hell of a code)
That might be a little complicated, but i've got an idea: since it's too difficult to move Mario's tilemap to ExGFX, make the tiles used for animations under Mario's tiles move to ExGFX and make the actual animated tiles load from ExGFX, so we have free space for extra Mario tiles! But i need ExGFX that loads every level. What are pages 0xB until page 0x1A in the 8x8 editor in Lunar Magic, i could put the ExGFX there and make an Exanimation loading from there to replace the old animated tiles... I serioulsy need help here. I tried looking at the OAM in-game at the slots for Mario's upper and lower tiles. I was small Mario facing left. I got this:
Mario's upper tile: 23,a0,00,20
Mario's lower tile: 23,b0,02,20
The only thing i noticed is that Mario's upper tile's second byte is the number of the tile(small Mario's hat). Can someone explain me what does those bytes specify?
And by the way, I have no experience with VRAM, can someone explain that to me too?

Thanks in advance!
Replacing GFX33 with Mario's tiles will work, since that's what I did before loading directly from ROM. Also, pages B up are used for Global ExAnimations; you can indeed place stuff there, but keep in mind each GFX file is stored as is, no compression or anything.

OAM and Mario's tilemap are not directly related. Each OAM tile consists of 4 bytes: X position, Y position, tile #, and YXPPCCCT. The tile # corresponds to what you see in SP1-SP4. Mario's tiles are dynamically loaded into SP1, tiles 00 and 02 (hence the 00 and 02). Those tile numbers will never change.

VRAM is Video RAM; where graphics and tilemaps are loaded for the SNES to use. To access it you'll need DMA. There are better VRAM and DMA tutorials out there, so I won't try to explain it (I can't really :P )
I think i found the solution, but there are few things missing though...
I discovered page 0xB is ExGFX60 and loads for all levels! ^^ To clear space in GFX33 to use for Mario's tiles, since GFX33 is used for animtions in page 0x0 but only some of them are global, I put the global ones in ExGFX60 which loads for all levels and is used for global Exanimation. Then I made global Exanimation with the copied tiles in ExGFX60 override the tiles in 0x0 with loaded from GFX33, now they load from ExGFX60, clearing space in GFX33. Pretty clever right? I only found in GFX33 22 tiles wich were used in global animation in page 0x0 wich could be overriden, the tiles not used for global animation could not be overriden, causing the game load the same Exanimation for all levels, so now I have 22 free tiles to use for Mario... I still need more... Are there any unused tiles in GFX32 and GFX33 wich i can use? What are tiles A8E and 586?

All those X boxes are unused in the game; they were only there as placeholders, so you can overwrite those. I remember one of the gliding graphics was unused too, but forgot which one. Besides that, nothing much is unused; you'll have to sacrifice space.

And np :>
In addition to what I did, I could make Yoshi load his tiles from ExGFX60. But is that possible? If it is, where do i need to hijack?
OffTopic: In the ROM map i found these debug adresses: $CC85 and $CC86 wich if changed to F0 00 activate Free-Roaming mode. I tested and the only difference is that when Mario jumps he uses the speed jump frame and that he achieves max speed faster. What do they do aside that?

Thanks again!
I don't think Yoshi will be able to load from ExGFX60. He isn't really an animated tile. What you can do is do what I said in my first post, but for Yoshi instead; it should be easier since he only has a few tiles. It probably is possible with exanimation, just that it'll end up being similar to what I described.

For your second question, I think you mean $CC84 and $CC85. And free-roaming mode should allow you to move anywhere on screen, go through walls, etc.
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - More space in Mario's tilemap

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • Super Mario Bros. X Community
  • Mario Fan Games Galaxy