Language…
19 users online: Anas, AnunnakiGirl, CourtlyHades296, CroNo, DaveStateGaming, Green, Mohamad20ZX, Natsuz2, NewPointless, Papangu, SAMYR DUTRA ARAUJO, Scags, signature_steve, SomeGuy712x, StarWolf3000,  Telinc1, TheBubbster123, TrashCity, yoshisisland - Guests: 283 - Bots: 613
Users: 64,795 (2,369 active)
Latest user: mathew

How to Insert Layer 3 Backgrounds

I'm still having problems with the Layer 3 ExGFX, and I still can't find the right graphics I need.

About the former, do you think you can sort out the problems from this?

The Layer 3 ExGFX file

The Stim.asm file.

The graphics I'm using.
Super Mario World's Smaller Sequel:
Super Steppe 1 finished, Super Steppe 2 in progress
I believe !CodeFreeSpace needs to be less than $408000. Try moving it to a lower bank ($108000 - $3F8000).
I should get a new layout.

Probably won't, though.
It worked! Now, the level looks like this!



Even with Sprite Status Bar (here's my code, BTW).

This Layer 3 stuff is a problem in a half.

EDIT: There's also some sprite priority issues (sprites go behind the Layer 2 BG). Any help?
Super Mario World's Smaller Sequel:
Super Steppe 1 finished, Super Steppe 2 in progress
Originally posted by DonnyKD
It worked! Now, the level looks like this!



Even with Sprite Status Bar (here's my code, BTW).

This Layer 3 stuff is a problem in a half.

EDIT: There's also some sprite priority issues (sprites go behind the Layer 2 BG). Any help?


Looks like a minor graphics issue; whatever your background is using for the "blank" tile isn't really blank. Find whatever checkered tile it's using and erase it; that should solve the first problem.

As for the sprite status bar messing up; I'm not sure what's up with that. I don't know much about how the patch works.

And for the sprite priority, that's a common issue. There should be a patch for it somewhere (look around in this thread), but it will require you to give ? blocks and such priority.
I should get a new layout.

Probably won't, though.
The checkered titles seem to be with the Layer 3, possibly the .STIM file.

EDIT: Question, is it possible to use Layer 3 ExGFX with genericuploader and stuff?
Super Mario World's Smaller Sequel:
Super Steppe 1 finished, Super Steppe 2 in progress
Originally posted by DonnyKD
The checkered titles seem to be with the Layer 3, possibly the .STIM file.


I mean checkered graphics. As in, look inside any of your level's layer 3 ExGFX files and remove any checkered graphic tiles.

Originally posted by DonnyKD
EDIT: Question, is it possible to use Layer 3 ExGFX with genericuploader and stuff?


Yes. I'm not sure why you'd use Layer 3 ExGFX for that, though. Usually you'd use that for the tilemap, which is a whole other matter. This .stim method is fine for now.
I should get a new layout.

Probably won't, though.
Well, the checkered problem's fixed, the Status Bar problem, however, isn't.

Is there a way around this?
Super Mario World's Smaller Sequel:
Super Steppe 1 finished, Super Steppe 2 in progress
Originally posted by DonnyKD
Well, the checkered problem's fixed, the Status Bar problem, however, isn't.

Is there a way around this?


Yes.

I don't know what it is, though, besides finding what's wrong and fixing it. It might be worth it to make a separate topic somewhere else asking why it's not working since I don't have enough experience with the patch to know what's up.
I should get a new layout.

Probably won't, though.
Aye, I fixed the problem, I just had to replace the ASM file with a fresh new one.

Looks like I got everything I need, except two things:

1) I still got priority problems.

2) I wanna know how to edit the Sprite Status Bar so I can remove the bonus stars and move the coin counter/graphics.
Super Mario World's Smaller Sequel:
Super Steppe 1 finished, Super Steppe 2 in progress
Originally posted by DonnyKD
1) I still got priority problems.


Again, you're not the first to ask this. There should be a fix somewhere in the thread. In fact, here. Read the discussion that starts there.


Originally posted by DonnyKD
2) I wanna know how to edit the Sprite Status Bar so I can remove the bonus stars and move the coin counter/graphics.


And again, that's an issue with the Sprite Status Bar that I can't answer because I don't know enough about it. You'll have to dedicate a topic to it somewhere else.
I should get a new layout.

Probably won't, though.
For the priority problem: apply this patch. It hijacks the same place as the statusbar scanline patch so beware.

then just set $212C to 11 and $212D to 06 in levelasm.

this method does not require messing with pipe/block priorities, etc
Originally posted by Ladida
For the priority problem: apply this patch. It hijacks the same place as the statusbar scanline patch so beware.

then just set $212C to 11 and $212D to 06 in levelasm.

this method does not require messing with pipe/block priorities, etc


It works, but now the Layer 3 is in front of Layer 2, and if I try to put it behind it, the priority screws up again.

I fixed the Layer 2 priority problem (well, except for the Piranha Plants), but I've notice that sprites that come out of ? Blocks also screw up (screw up, as in, flicker) when something in Layer 3 passes it (in this case, a moving cloud).
Super Mario World's Smaller Sequel:
Super Steppe 1 finished, Super Steppe 2 in progress
I don't think this patch works well with hdma.asm/whatever you were using before; they may conflict a bit.
Thank you tons for the tutorial! However my layer 3 background seems to be scrolling vertically and horizontally too fast for my liking. Which part of the code would you alter to slow the scrolling down?
Originally posted by Kicezand
Thank you tons for the tutorial! However my layer 3 background seems to be scrolling vertically and horizontally too fast for my liking. Which part of the code would you alter to slow the scrolling down?


In your scrolling code, add more sequential LSRs to slow the background down (each one will slow it down by 50%).
I should get a new layout.

Probably won't, though.
I recently tried to insert a Layer 3 background. It works fine, but I have experienced two problems:
1. Some sprites appear behind layer 2 (e.g.: the jumping piranha plant). I've already tried to patch hdma.asm to the ROM, but it doesn't fix the problem, instead, it just worsens the glitch (Mario and all the other sprites appear behind layer 2). The glitch occurs even without the HDMA gradient on the BG.
2. I can't get the scrolling code working. I've put it both in level_init_code and level_code, but instead of fixing the scrolling and the vertical position it just makes the layer 3 disappear.
Any ideas?

Also, I'm using asar and uberASM instead of xkas and levelASM, even if I don't really think that could be the problem.
Moving both layer 2 and 3 on subscreen usually solves the first issue, for me. Try running this code in level init:

Code
LDA #%00010001		;\ Mainscreen = sprites and layer 1
STA $212C 		;/
LDA #%00000110		;\ Subscreen = layer 2 and layer 3
STA $212D		;/


As for the scrolling stuff, try using $1E and $20 instead of $1462 and $1464 respectively. Also I usually use ADC #$0060 or #$0038 instead of SBC #$0038, but I'm not sure if it's relevant, it depends on the wanted result to be fair.
Oh, thanks, it totally worked! There still is a little graphic issue, though. Looks like other users have experienced it but I honestly haven't understood very well what I should do.
Originally posted by Kipernal
Rip the layer 3 background's graphics. The best way to do this is to open up your save state with YY-CHR, and then to find the background's tileset.


The bolded part is what I'm stuck on. I loaded up my savestate into the program, but how do I "find the background's tileset"?
scroll down until you find VRAM/the graphics