Banner
The Old-School Level Design Contest ends in
11 DAYS, 16 HOURS, 7 MINUTES AND 15 SECONDS
Views: 891,932,106
Time:
14 users online: Adriel_Isaque, Chondontore, Cornerstone01, FYRE150, Gamma V,  idol,  JamesD28, Koopster, levelengine, SAMYR DUTRA ARAUJO, SiameseTwins, SimFan96, SJandCharlieTheCat, VLSkoot - Guests: 81 - Bots: 59 Users: 50,038 (2,322 active)
Latest: xXx_W33DL0V3R_xXx
Tip: Check the Documents section. Tutorials and other useful information can be found there.
Not logged in.
Layer 3 not visible
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Layer 3 not visible
Pages: « 1 » Link
Hello, I have an issue with color math, layer 3, and layer 2.
Code
	LDA #$01
	STA $3E

	LDA #$22
	STA $44

	LDA #$15
	STA $212C
	LDA #$02
	STA $212D

	LDA.b #$B5
	STA $40

This code is in place in order to create a layer 2 spotlight, giving this effect. However, layer three does not show in the BG, and instead looks, with layer 2 disabled, like this. I believe this may be indicative of a larger problem, and related to this patch which creates a layer three status bar.

Here's a patch of the ROM so you can see what it looks like. Just enter the level then the door in order to get to the sublevel.

Thanks for the read, any and all help woll be appreciated.
If you set $40 to #$B1, rather than #$B5 it will show up.
Originally posted by Medic
If you set $40 to #$B1, rather than #$B5 it will show up.

Nope, that does nothing.
It most certainly does, look closer... the layer is there, just not very visible. Although I am unsure of what effect you are going for, so... if you could describe or make a picture of what the layer 3 background is supposed to look like, that would be helpful.
See how layer 2 appears, ah, normal in this video? Like that. Yaknow, visible behind the spotlight with all it's colors and everything affected by the color math.
Okay got it and you should realize you are trying to write to regs outside a blank which for many regs including the main/subscreen designations you cannot do (assuming this is in levelasm) so you need to use SMW's mirrors instead which would make your code:

Code
LDA #$15
STA $0D9D
LDA #$02
STA $0D9E
LDA.b #$C5
STA $40
RTS


(i dont think you need to mess with $3E or $44)

Maybe some sprites will not entirely work with this but I believe that can be worked around.
Cool, that works as intended. Thanks!
Color math and sprites work not quite as expected on the SNES. It only functions on sprites that use palette C, D, E or F. There is a different way to do it but it would affect Mario too and I tried it and it made him black so you probably don't want that one. Replace #$C5 with #$D5 (enable translucency on sprites). Any sprite that uses palette 8,9,A,B will not be affected and show up normally, while C,D,E,F will be affected (so you might need to insert some edited stuff for this).

(smh ninja'd by an edit?? i'm leaving this up in case the reason you edited that out wasn't because you figured it out already)
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Layer 3 not visible

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

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


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks