News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Map expansion. Is it possible?

Started by JAM, July 26, 2015, 06:47:39 PM

Previous topic - Next topic

JAM

Hi, all.
I need help from gurus.
I was working on map expansion, to make every area have 2*2 or 4*1 map. I can expand map data to make them use 2nd bank for map inself and $800 more bytes for explorable array and even use more data in SRAM, but I failed on pause screen.

Is it ever possible to load 4*1 or 2*2 map to the pause screen?

Crashtour99

I know that Black Falcon managed to swap their orientation, so instead of having 2 screens side by side they were stacked vertically.

As far as expanding them, I think you may be out of luck.  The way that SM handled the map data was stupid (and wasted a lot of space hence why people would tend to get errors trying to make very large maps in older SMILE versions), and KejMap was broken, which is why Sadi made her save/load patch.  To my knowledge that's as good as you're going to get without rewriting a whole ton of stuff that probably wouldn't be worth it.

If your idea really needs more than 12 map screens you may want to reconsider, as that seems like it would be a dauntingly large game to play and might cause folks to get bored with it just because it takes forever to get somewhere in a world that huge.

JAM

Quote from: Crashtour99 on August 02, 2015, 01:31:21 AM
I know that Black Falcon managed to swap their orientation, so instead of having 2 screens side by side they were stacked vertically.
Yes, we talkied about that, but no luck with expansion.

Quote from: Crashtour99 on August 02, 2015, 01:31:21 AM
As far as expanding them, I think you may be out of luck.  The way that SM handled the map data was stupid (and wasted a lot of space hence why people would tend to get errors trying to make very large maps in older SMILE versions)
Yeah, Lagacy map, for example.

Quote from: Crashtour99 on August 02, 2015, 01:31:21 AM
and KejMap was broken, which is why Sadi made her save/load patch.
It's not broken. It's just allowing no more than $500 clusters (of $800 max available). For the really big hack, yes, Sadi made Save/Load, I made SuperMap, which are doing the same: saving up to $800 clusters to the SRAM.

I could work more on this and save even more, like $2000 clusters by expanding the SRAM. And I know how to do it. Not a big problem since actual maps can use more than one bank and even referring to them contains 3 bytes: Bank:Address.

Problem is in displaying such a big map on pause screen. That's it.

All I got so far by expanding Layer 1 twice big than normal is:

Crateria map on Layer 1, Norfair map on Layer 2 (next area after Crateria in the ROM).

From the RAM Map I know, that both layers are loading to $4000 temporarly and then stored to VRAM. Map to $6000, BG to $7000. Saving BG to $7800 or $8000 may solve this problem... but I don't know how to do it.

Quote from: Crashtour99 on August 02, 2015, 01:31:21 AM
If your idea really needs more than 12 map screens you may want to reconsider, as that seems like it would be a dauntingly large game to play and might cause folks to get bored with it just because it takes forever to get somewhere in a world that huge.
Oh, don't worry. I'm not planning 12 map screens per area. =) 3, maximum 4.

C'mon, guys. I need help with this one. Just imagine of ability of saving 2*2 or 4*1 map in SMILE.

Crashtour99

Well, it probably wouldn't be too difficult to actually get the data into VRAM properly, as well as reloading the stuff that you'd be overwriting temporarily while pausing.  Editing the scrolling routines for the map would be a bit trickier, but still could be done.

The part that I've no idea how to do would be changing how the tilemap data is read from VRAM to produce the image on screen, which you'd definitely have to do.
$5000 - $7BFF     CRE graphics (4 bit)
    $6000 - $6FFF     Layer 1 tilemap on pause screen (2x1 wide)
    $7000 - $77FF     Layer 2 tilemap on pause screen (1x1)
The layer 1 tilemap is already overwriting part of the CRE gfx, so yeah, it shouldn't be too hard to find out where it's doing that from, and just making it transfer more data to an earlier spot (starting the layer 1 tilemap @ $5000 should give you 4 screens available for an area map).
But, figuring out where and how that data is read to be displayed on the screen?  That's beyond my skills at the moment.  I mean, I sorta understand how it works for sprite tilemaps and OAM, but I've never looked into how it works with room mapping.

Scyzer

#4
Getting the game to read a 2x2 tilemap is easy. Fitting the extra 2 tilemaps into VRAM nicely is not.

    $0000 - $5FFF    Graphics on pause screen
    $6000 - $6FFF    Layer 1 tilemap on pause screen (2x1 wide) < this needs to be 2x larger.
    $7000 - $77FF    Layer 2 tilemap on pause screen (1x1)
    $7C00 - $7FFF    Misc. graphics
    $8000 - $8FFF    Layer 3 graphics

Moving the Layer 1 tilemap forwards to get extra space means cutting out half a page of GFX in the pause screen, a lot of which is actually used on the pause screen (map icons, as well as the select / start buttons). The solution to that would be to move the affected GFX to another page in the pause GFX and fix up the tilemaps for the sprites which use them.

The other option is to move the Layer 2 tilemap backwards by $1000 bytes. Unfortunately, some of the data after this is also used on the pause screen; it's the graphics used by the HUD. The solution to this method is to simply clear the HUD while paused (not a pretty solution though).

To repoint where data is saved to VRAM, look for JSL $8091A9. Before it should be writes to $2116 / $2117. They form the VRAM address. Remember that it's a word address, not a byte address.

Quote from: JAM on August 09, 2015, 12:20:19 AM
Just imagine of ability of saving 2*2 or 4*1 map in SMILE.

2x2 is the only option here. The SNES won't display all 4 tilemaps next to each other in a line.
To get the game to read a 2x2 tilemap on layer 1, just ORA #$03 (not STA) at $2107.

JAM

Scyzer
Thank you a lot!
That's exactly what I need.

ORA $#03 helped to expand the map view.

Well, I will try to relocate the Layer 2, I guess.