News:

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

Main Menu

[SM] Layer 2 over BG Pointer

Started by Mettyk25jigsaw, October 06, 2015, 10:54:05 PM

Previous topic - Next topic

Mettyk25jigsaw

Hi, I have been trying to fiddle with the background, what I am wanting to do is find a way where you can have a room with BG data ptr loaded and a custom layer 2 (custom) bg at the same time in one room, so you can add bits and pieces in front of the bg data pointer by drawing/adding stuff in layer 2 (custom)...Anyone know of a way it can already be done OR can help me out if it's not too big of a task (like a simple piece of ASM perhaps)...Any help would be greatly appreciated, if possible...

Scyzer

It cannot be done. The SNES has 4 backgrounds or layers available:

BG0 is used for Layer 1, and supports 16 colours with 4 Bits Per Pixel
BG1 is Layer 2, also supporting 16 colours with 4BPP
BG2 is Layer 3 (or FX1), but only supports 4 colours with 2BPP.
BG3 cannot be used in Super Metroid.

Both a BG_Data pointer and Layer 2 of a room use BG1 of the SNES, so it's impossible to have both at once.


DSO

I've done this by using BG2/layer3 as the background. You need a custom FX A/B bit to make it work properly, and as Scyzer mentioned your selection of gfx is limited. But if you're good at working with it you can come up with some decent backgrounds even with 2bpp tiles. You'll see how it works once I rekt the competition going on.

Mettyk25jigsaw

Sounds good but unfortunately for what I was going to use it for, I need the full 16 colors...But it does sound interesting what you're doing...

Scyzer

And also doing it as DSO is, you don't get any usual FX like water or fog, and having cool FX like that adds far more depth to a room than a second background ever could IMO.

DSO