Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2011-08-05 19:00:14

Miksy91
Member
Registered: 2010-10-16
Post 485/2,311

Gen II - Map Bank #3

Map bank number 03 (uses spritesheet of "Caves" as Mateo it wrote in his "useful 2nd gen stuff" thread) differs from the other map banks.
I noticed that you can likely put any sprite you want in map of map bank 3 and it will always be displayed correctly.

I was wondering what kind of code causes this.
Besides, no assembly code tells the game how many maps belong to each map bank, right ?
So basically, could maps from other map banks easily be moved to map bank three instead (would require lots of repointing, that's for sure though).


P.S
It was easily quessed that it wouldn't work but just by trying it out, I made map bank #26's spritesheet pointer point to the same place as map bank #3's does but sprites that don't belong to the spritesheet of map bank #3 aren't shown in a map of map bank 26.

Last edited by Miksy91 (2011-08-05 19:03:00)

Offline

#2 2011-08-05 22:31:16

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 872/3,474

Re: Gen II - Map Bank #3

Maps in any bank can do this, if the map type is set to "inside" or "cave" or "hideout". These load any sprites on the map. If it is set to "Outside - Towns" or "Outside - Routes" it will use the sprites from the spritesheet. If you look, the spritesheet for bank 3 is the sprites that are used in the national park, and maybe one or two other places.

This is actually what caused the bug in the christmas hack with the rockets in the forest not loading correctly, I forgot to add them to the spritesheet after i changed it to be an outside map.

Offline

#3 2011-08-06 06:38:27

Miksy91
Member
Registered: 2010-10-16
Post 488/2,311

Re: Gen II - Map Bank #3

Thanks for pointing that out !
I'm now able to take some sprites out of different spritesheets.

Besides, does anybody happen to know where in ram the sprites of the currently used spritesheet is stored ?
A part of a code in 05:41DD points to the pointer table of spritesheets but by taking a look at the data next to it, I found nothing related to loading currently used spritesheet in ram.

*I was planning to change the location so that more than 0xA sprites could be shown

Offline

#4 2011-08-06 08:28:50

Tauwasser
Member
Registered: 2010-10-16
Post 153/448

Re: Gen II - Map Bank #3

The data is here in a German ROM, so it probably matches North American roms:

D05F - D070 = Sprite-Set Data for Regular Sprites [PicNn][TileNn]... (9 Slots)

D071 - D074 = Sprite-Set Daten for front sprites [PicNo][TileNo]... (2 Slots)

cYa,

Tauwasser

Offline

#5 2011-08-06 08:43:33

Miksy91
Member
Registered: 2010-10-16
Post 489/2,311

Re: Gen II - Map Bank #3

Tauwasser wrote:

The data is here in a German ROM, so it probably matches North American roms:

D05F - D070 = Sprite-Set Data for Regular Sprites [PicNn][TileNn]... (9 Slots)

D071 - D074 = Sprite-Set Daten for front sprites [PicNo][TileNo]... (2 Slots)

cYa,

Tauwasser

Superb!
Found the asm for changing those, thanks.

Edit:
Didn't work though - I planned to make the regular sprites to be loaded to $DEC0 but each person turned just like player when I did it.
*[TileNn] bytes remained 00 although [PicNn] were loaded correctly to $DECO*

Last edited by Miksy91 (2011-08-06 09:07:59)

Offline

#6 2011-08-06 11:01:41

Tauwasser
Member
Registered: 2010-10-16
Post 155/448

Re: Gen II - Map Bank #3

Then you probably did not find all the code. All code for that is pretty much packed together, so you'll just have to did around there, or use breakpoints to find when the stuff is accessed. Or take a look at Crystals code.

cYa,

Tauwasser

Offline

Board footer

Powered by FluxBB