Keeping the overlays always on top when using the BG2: ''on top'' tag

Go down

20140425

Post 

Keeping the overlays always on top when using the BG2: ''on top'' tag Empty Keeping the overlays always on top when using the BG2: ''on top'' tag




Here's something I've requested yesterday that should be helpful to everyone that is using the BG2 on top tag in there dungeons!

SePH wrote:In my dungeons I've often used the ''BG2 on top'' feature. The biggest problem I'm having with this is that most of the time, as you move between rooms, the overlay on top disapears.

Here's an exemple:



Moving to the next screen, the overlay on top remains, but exiting that room it disapears as you move to the other one. Hopefully this is fixable, even if all BG2 on top rooms all need to be entered manually to get that effect everyhere.

Euclid wrote:Oh Nintendo you troll

Code:


$02/8B38 A6 A0       LDX $A0    [$00:00A0]   A:030E X:0608 Y:0004 P:envMxdizc
$02/8B3A E0 36 00    CPX #$0036              A:030E X:0037 Y:0004 P:envMxdizc
$02/8B3D F0 26       BEQ $26    [$8B65]      A:030E X:0037 Y:0004 P:envMxdizC
$02/8B3F E0 38 00    CPX #$0038              A:030E X:0037 Y:0004 P:envMxdizC
$02/8B42 F0 21       BEQ $21    [$8B65]      A:030E X:0037 Y:0004 P:eNvMxdizc
$02/8B44 AE 14 04    LDX $0414  [$00:0414]   A:030E X:0037 Y:0004 P:eNvMxdizc
$02/8B47 A0 16 00    LDY #$0016              A:030E X:0003 Y:0004 P:envMxdizc
$02/8B4A BF 4C 89 02 LDA $02894C,x[$02:894F] A:030E X:0003 Y:0016 P:envMxdizc
$02/8B4E F0 03       BEQ $03    [$8B53]      A:03FF X:0003 Y:0016 P:eNvMxdizc
$02/8B50 A0 16 01    LDY #$0116              A:03FF X:0003 Y:0016 P:eNvMxdizc
$02/8B53 C4 1C       CPY $1C    [$00:001C]   A:03FF X:0003 Y:0116 P:envMxdizc
$02/8B55 F0 0E       BEQ $0E    [$8B65]      A:03FF X:0003 Y:0116 P:envMxdizC
$02/8B57 A5 1C       LDA $1C    [$00:001C]   A:03FF X:0003 Y:0116 P:envMxdizC
$02/8B59 C9 17       CMP #$17                A:0317 X:0003 Y:0116 P:envMxdizC
$02/8B5B F0 06       BEQ $06    [$8B63]      A:0317 X:0003 Y:0116 P:envMxdiZC
$02/8B63 84 1C       STY $1C    [$00:001C]   A:0317 X:0003 Y:0116 P:envMxdiZC
$02/8B65 E2 10       SEP #$10                A:0317 X:0003 Y:0116 P:envMxdiZC


So in theory, you should be able to "replicate" this hack for every room with

$02/8B3D F0 -> 80
(0x10B3D F0 -> 80)

However, there must be a very good reason why it's done this way, as the result of no-branch is storing a value into $1C, which according to Math's docs it's

$1C Main Screen Designation ($212C)

For now, Seph, please apply the hack above and play around with the rom to see if there's any "weirdness" happening between transitions (check stairs too). I have a slight feeling by skipping the code it won't go from "on top" to something else properly should you need that. That being said, we know where the code is so we can "code" a workaround to specify all the rooms which you need this effect for.

At 0x10B3D, replace F0 with 80 and then the BG2 overlays will always stay on top when you guys are moving between rooms using that tag!

Haven't found any issues myself, but please report back if you find any oddities!

Special thanks to Euclid for this!!  Wink
avatar
Founder

Keeping the overlays always on top when using the BG2: ''on top'' tag Image212

Since : 2012-06-19

Back to top Go down

Share this post on: reddit

 
Permissions in this forum:
You cannot reply to topics in this forum