Can't make transparency work

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
User avatar
beneficii
Posts: 127
Joined: Tue Jul 12, 2005 4:37 pm

Can't make transparency work

Post by beneficii »

I'm trying to make transparency work, but I can't get it to work. Here is the project:

https://drive.google.com/file/d/1FEokBc ... sp=sharing

To assemble this on Windows, download the WLA suite and add the WLA folder to PATH. Then run transscroll.bat.

I made use of this:

https://wiki.superfamicom.org/translucency

This:

https://en.wikibooks.org/wiki/Super_NES ... _Registers

As well as the SNES development manual.

What am I getting wrong?
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Can't make transparency work

Post by Bregalad »

Did you read my FAQ on the matter?

What part exactly "can't work"? You should include a description of what you're trying to do, what you're getting and why what you're getting is not what you expected.
User avatar
HihiDanni
Posts: 186
Joined: Tue Apr 05, 2016 5:25 pm

Re: Can't make transparency work

Post by HihiDanni »

Remember that there are several factors that control how the color math works:

- The layers you have enabled on the main screen
- The layers you have enabled on the sub screen
- The layers you have enabled for color math (yes this is a separate thing)
- Whether you are adding the fixed color or the sub screen
- The color math clipping setting for the color window

There might also be one or two other things I'm forgetting, but you should try to double check all of these.
SNES NTSC 2/1/3 1CHIP | serial number UN318588627
KungFuFurby
Posts: 275
Joined: Wed Jul 09, 2008 8:46 pm

Re: Can't make transparency work

Post by KungFuFurby »

I determined that your translucency was working correctly, and wasn't the actual problem: the problem lied in your setup of BG3. Specifically... the mist was somehow failing to display at all.

Specifically, your mist was failing to display due to a combination of your tilemap setup and the tile base address:
- Your mist palette was not being selected due to not having the correct palette ID set in all of the tilemap entries (they were using the same palette as the main palette: their palette IDs should be set to $04, or $1001 for an overall tilemap entry).
- Your mist BG was not displayed due to being sent to the wrong location: it should be sent to $4000, not $0400. Otherwise, you'd have to set up your tile IDs for the tilemap accordingly.

There is one other potential bug that you may not have noticed, and it's with your scrolling: the scroll register you write to is an 8-bit write-twice register, not a 16-bit write-once register.
Post Reply