Hi guys.
I'm currently building a level taking place in an building, where some part of the level is seen through a security camera. Therefore, I'd like to use an HDMA gradient to mimic scanlines affecting all layers except 3, as that latter would be in front of everything and show the status bar + a sleeping security guard. Here's the concept screenshot:
The problem is, the closest I've been able to approach that result is this (test level):
(It can't be seen on the screenshot, but the layer 3 guard is behind the layer 2 background, and is affected by the fake scanlines)
As you can see, the status bar section (pre-IRQ) works fine, but the regular section (post-IRQ) always puts layer 3 in subscreen, despite the fact that I check the priority option in LM.
There's also some oddity with sprites: only palettes 4,5,6 and 7 are affected by the fake scanlines, while the others aren't.
So, my questions are:
- How can I solve the layer 3 problem and put layer 3 in front of everything ?
- Is it possible to edit which sprite palettes are affected by my effect and if yes how ?
For reference, this is the code I'm currently using. It's an unmodified output from EffecTool:
I'm currently building a level taking place in an building, where some part of the level is seen through a security camera. Therefore, I'd like to use an HDMA gradient to mimic scanlines affecting all layers except 3, as that latter would be in front of everything and show the status bar + a sleeping security guard. Here's the concept screenshot:
The problem is, the closest I've been able to approach that result is this (test level):
(It can't be seen on the screenshot, but the layer 3 guard is behind the layer 2 background, and is affected by the fake scanlines)
As you can see, the status bar section (pre-IRQ) works fine, but the regular section (post-IRQ) always puts layer 3 in subscreen, despite the fact that I check the priority option in LM.
There's also some oddity with sprites: only palettes 4,5,6 and 7 are affected by the fake scanlines, while the others aren't.
So, my questions are:
- How can I solve the layer 3 problem and put layer 3 in front of everything ?
- Is it possible to edit which sprite palettes are affected by my effect and if yes how ?
For reference, this is the code I'm currently using. It's an unmodified output from EffecTool:
Code
init: ; Code to be inserted INIT LDA #$17 ;\ BG1, BG2, BG3, OBJ on main screen (TM) STA $212C ; | LDA #$00 ; | 0 on main screen should use windowing. (TMW) STA $212E ;/ LDA #$00 ;\ 0 on sub screen (TS) STA $212D ; | LDA #$00 ; | 0 on sub screen should use windowing. (TSW) STA $212F ;/ LDA #$B7 ; BG1, BG2, BG3, OBJ, Backdrop, Half for color math STA $40 ;/ mirror of $2131 REP #$20 LDA #$3202 STA $4330 LDA #.RedGreenTable STA $4332 LDY.b #.RedGreenTable>>16 STY $4334 LDA #$3200 STA $4340 LDA #.BlueTable STA $4342 LDY.b #.BlueTable>>16 STY $4344 SEP #$20 LDA #$18 TSB $6D9F RTL