This might be a little long, but please bear with me to understand the settings.
I'm trying to render a FF5 scene - Map with an ID 63 - North Mountain Fifth Station. Here is part of the map that I try to reconstruct:
The scene is in Mode 1 with 3 layers (BGs):
- Layer 1 (BG1) - the green summit
- Layer 2 (BG2) - the background
- Layer 3 (BG3) - the white clouds
*Layer 3 is in front of all (PPU register $2105)
In order to compose that scene, the games uses 3 PPU registers:
$212C Main Screen: L1 & L2
$212D Sub Screen: L1 & L3
$2131 Colo Math: affects L1 & L2. The math itself is half of addition
* for now we don't care about the other layers - Sprites
According to that video: https://www.youtube.com/watch?v=zcoU6-9_fDM
If Main render to a pixel from L1 we can have the following output:
- L1 (math) L1 => (L1 + L1) : 2 = L1
- L1 (math) L3 => (L1 + L3) : 2
If Main render to a pixel from L2:
- L2 math L1 => (L2 + L1) : 2
- L2 math L3 => (L2 + L3) : 2
Let me paraphrase above 4 cases:
- L1 -> result is L1 unmodified (opaque) - OK
- (L1 + L3):2 -> result is 50% transparent L3 over L1 (a 50% transparent cloud over a summit) - OK
- (L2 + L3):2 -> result is 50% L3 over L2 (a 50% transparent cloud over the background) - OK
- (L2 + L1):2 -> result is 50% L1 over L2 (the summit 50% transparent over the background) - PROBLEM!!!
The last combination never occur on the picture. Actually what we see on the picture are cases where L2 is unmodified (opaque).
My question is WHY? What went wrong? Do I miss something?