Lens of truth

Go down

Lens of truth Empty Lens of truth

Post by Conn Sun 17 Nov 2013 - 8:22

I was looking at the asm by xaserle and this brought me to an idea
Code:

ORG $0288FD ; go to the code that branches behin the dungeon map load if player didn't press X
BRA $1C ; make it always branch, so map isn't loaded anymore

ORG $068365 ; go to a originally JSL that is executed every frame
JSL $3FA600 ; overwrite it (originally JSL $099F91)

ORG $03FA600 ; go to expanded space to write our routine

LDA $1B ; load data that tells us whether we are in a building or not
AND #$01 ; are we in a building?
BEQ $1A ; if not, don't use the x-button-secret, edited from 12 to 1A
LDA $F2 ; load unfiltered joypad 1 register (AXLR|????)
CMP #$50 ; X and R buttons pressed?
BNE $06 ; if not, go to enable BG2
LDA $7EF353 ; load ram mirror slot, added
CMP #$02 ; compare to value 02 (have mirror is 02, no mirror is 00), added
BNE $06 ; if not value 02, go to enable BG2, added
LDA $1C ; load layer flags
AND #$FD ; disable BG2 (0xFD = 11111101)
BRA $04 ; go to store layer flags
LDA $1C ; load layer flags
ORA #$02 ; enable BG2 (0x02 = 00000010)
STA $1C ; store layer flags

JSL $099F91 ; at first execute original code

RTL
The code isn't bad at all, but I think the normal x-button map feature is disabled.

I think I could couple it to Euclid's L-button press superbomb code:
- check if superbomb or mirror at $0202 - equipped
- check if inside dungeon
- check if bg2 enabled/disabled and then make the opposite (disable it if enabled, enable if disabled)

So if you think this would be a good idea, I can adopt this code to the complete items hack with L-marker (with or without upgrade function, e.g., small fairy, second magic mirror in chest...?).

I also saw that on PU list for Euclid is a stopwatch. Is with this also a lens of truth adopt for PU meant?
Conn
Conn

Lens of truth Image212

Since : 2013-06-30

Back to top Go down

Lens of truth Empty Re: Lens of truth

Post by Conn Sun 17 Nov 2013 - 18:07

I was examining the code a bit, and it's quite simple, also without having to renounce on the x-button map when coupling it to Euclid's superbomb L-button check.

However, I am a bit aware of that this code is useful. It's a fabulous idea, but there are some problems; it disables bg2 but most (if not all) dungeon bg is stored on bg2. I could map it on bg1 (then e.g., translumescent water vanishes what is not bad), but then also the lower floor of caves vanish (with bg2 the upper floor).

Can somebody clear me up here whether a hack could/would be useful?
Conn
Conn

Lens of truth Image212

Since : 2013-06-30

Back to top Go down

Lens of truth Empty Re: Lens of truth

Post by Puzzledude Sun 17 Nov 2013 - 18:43

Sure it would be useful. The current version was made, since indoor maps are always inacurate or bugged or very difficult to make/edit, thus most Z3 hacks simply remove the (annoing) indoor maps.

Regarding the bg-s. Most rooms look quite non-aesthetic if any of the bg-s is disabled, thus this function is meant to be used only at indoor bridges and with the pressing of more then one button, and usually that those buttons must be pressed while the effect is on, so that you can not hold them for long - meaning getting out of the non-aesthetics fast.
Puzzledude
Puzzledude

Lens of truth Image213

Since : 2012-06-20

Back to top Go down

Lens of truth Empty Re: Lens of truth

Post by Conn Sun 17 Nov 2013 - 20:40

ok I guess most of the indoors must be remapped to only use one bg and only stuff you want to hide needs to be put below another bg. It's a bit unfortunate that the aesthetic things are persistent in native roms, otherwise I'd spend more time to make it a somewhat "real item".
Conn
Conn

Lens of truth Image212

Since : 2013-06-30

Back to top Go down

Back to top

- Similar topics

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