News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Challenge mode.

Started by PHOSPHOTiDYL, November 21, 2017, 06:45:27 AM

Previous topic - Next topic

PHOSPHOTiDYL

So I made a patch that makes for an increased challenge for your next playthrough.
It doesn't use any free space, & is compatible with every hack.

What does it do exactly??

Samus starts with a broken short charge beam, aka you can't fire without being fully charged.
Equipping charge beam will grant you long beam powers.
Equipping spazer will grant you faster charge time.
Equipping plasma beam will grant you the power beam.

This makes it so collecting charge beam early on doesn't just nullify the patch.
You'll have to decide between spazer or plasma, unless your playing hyper metroid.

Unfortunately, the code just won't work with hyper beam, so mother brain is significantly harder without.
Long beam code overwrites the old beam firing code, & leaves no free space.
The new beam firing code overwrites unused debug code, & leaves some room to attempt some hyper beam fix.

It's compatible with literally every hack.
I spent 20 min fighting kraid in super metroid ice, couldn't spam timed shots from the far platform, & actually died once.
The time it takes to kill spore spawn in vanilla was time spent getting morph & saving in super metroid rebirth.
Ammo becomes much more important, so more exploration may be required.

Again, it is not working with hyper beam.
There are some charge sound issues.

Why a new thread??

Idk try it with your favorite hacks & post your clear times.

LoROM

;//[2017 PHOSPHOTiDYL]
;//[charge beam = long beam][plasma beam = power beam][spazer = faster charge]
;===============================================================================================;
;-----------------------------------------------------------------------------------------------;
ORG $91E4F4 ;//[this is for mother brain/hyper beam]
dw $E60B ;//$E5F0 (enables hyper beam, instead point to rts)
;-----------------------------------------------------------------------------------------------;
ORG $90A4F5 ;//[pseudoscrew]
LDA $0CD0 : JSR ChargeTimers
ORG $90A744 ;//[]
LDA $0CD0 : JSR ChargeTimers
ORG $90C0B3 ;//[bombspread]
LDA $0CD0 : JSR ChargeTimers
ORG $91D750 ;//[charge release]
LDA $0CD0 : JSL JumpFrom : NOP : BMI $56

ORG $90AF32 ;//[handles current projectiles]
JSR LongBeamCode ;//JSR $B16A
ORG $90B123 ;//[???]
JSR LongBeamCode ;//JSR $B16A

ORG $90B80D ;//[($007A bytes) This is the old charge routine (PERFECT COMBO!)]
;//[LONG BEAM ($005C bytes)]
LongBeamCode:
LDA $09A6 : AND #$1000 : BNE VanillaCode ;//[ITEM CHECK] charge beam is long beam
LDX $0DDE : LDA $0C18,x : AND #$0010 : BEQ UnchargedLong
LDA $0B64,x : SEC : SBC $0AF6 : CMP #$FFA0 : BMI NotVanilla ;//chargedshotleft
CMP #$0060 : BPL NotVanilla ;//chargedshotrite
LDA $0B78,x : SEC : SBC $0AFA : CMP #$FF88 : BMI NotVanilla ;//chargedshotup
CMP #$0068 : BPL NotVanilla : BRA VanillaCode ;//chargedshotdown
UnchargedLong:
LDA $0B64,x : SEC : SBC $0AF6 : CMP #$FFC0 : BMI NotVanilla ;//regularleft
CMP #$0040 : BPL NotVanilla ;//regularrite
LDA $0B78,x : SEC : SBC $0AFA : CMP #$FFA8 : BMI NotVanilla ;//regularup
CMP #$0048 : BMI VanillaCode ;//regulardown
NotVanilla:
JMP $B17E ;//clean up projectile
VanillaCode:
JMP $B16A ;//vanilla ($B16A-B183)

;//[CHARGE TIMERS FOR CALLS OUTSIDE BANK $90 ($0017 bytes)]
JumpFrom:
JSR ChargeTimers : RTL
ChargeTimers:
PHA : LDA $09A6 : BIT #$0004 : BEQ VanillaCharge ;//[ITEM CHECK] spazer is faster charge
PLA : CMP #$001E : RTS
VanillaCharge:
PLA : CMP #$003C : RTS

;//[FOR NEW CHARGE ROUTINE]
LolSpace:
LDA $0CD0 : JSR ChargeTimers : RTS
;-----------------------------------------------------------------------------------------------;
ORG $90DDCF ;//[ran if samus isn't running]
JSR NewBeamFire ;//JSR $B80D
ORG $90DD61
dw NewBeamFire
ORG $90DD67
dw NewBeamFire

ORG $90E759 ;//[DEBUG REMOVAL ($009C bytes)]
;//[BROKEN CHARGE BEAM ($0093 bytes)]
NewBeamFire:
PHP : REP #$30 ;//start it
LDA $0CD0 : STA $0DC2 ;//vanilla
LDA $09A6 : BIT #$0008 : BNE ChargeBeam ;//[ITEM CHECK] plasma beam is power beam
BrokenCharge:
LDA $8B : AND $09B2 : BEQ $02 : BRA NextCheck ;//if not holding fire...
JSR LolSpace : BPL Charged
;//LDA $0CD0 : JSR ChargeTimers : BPL Charged ;//large timer for broken charge beam (same as sba timer)
RegularShot:
LDA $8B : AND $09B2 : BEQ ClearEnd ;//if not holding fire, clear charge & end it
LDA $0B5E : BEQ NextCheck ;//branch if not firing already
JSR LolSpace : BPL Charged
;//LDA $0CD0 : JSR ChargeTimers : BPL Charged ;//if overcharged, fire charged shot
NextCheck:
LDA $8B : AND $09B2 : BEQ ExtraCheck ;//if not holding fire, skip timer increase
LDA $0CD0 : INC A : STA $0CD0 : BRA EndIt ;//else increase charge timer
ExtraCheck:
LDA $0CD0 : BEQ EndIt : JSR ChargeTimers : BPL ClearEnd ;//this is necessary
Charged:
JSR LolImSmart : JMP $B986 ;//zero charge, fire charged shot
ClearEnd:
JSR LolImSmart : JSL $91DEBA ;//clear everything charge related
EndIt:
PLP : RTS ;//end it
ChargeBeam:
LDA $0A1E : BNE AnotherCheck ;//eff off hyper
LDA $0B5E : BEQ AnotherCheck ;//branch if not firing already
JSR LolSpace : BPL Charged : BRA Uncharged
;//LDA $0CD0 : JSR ChargeTimers : BPL Charged : BRA Uncharged ;//timer for regular charge beam
AnotherCheck:
LDA $8B : AND $09B2 : BEQ SameCheck ;//if not holding fire
JSR LolSpace : BPL Special
;//LDA $0CD0 : JSR ChargeTimers : BPL Special ;//sba timer
INC A : STA $0CD0 : BRA EndIt ;//bugfix to not fire one shot b4 holding charge
SameCheck:
LDA $0CD0 : BEQ EndIt : JSR ChargeTimers : BPL Charged ;//regular charged shot timer
Uncharged:
JSR LolImSmart : JMP $B88F ;JMP $B887 ;//zero charge, fire uncharged shot (power beam magic)
Special:
JSR $CCC0 : BCC EndIt : BRA ClearEnd ;//sba code
LolImSmart:
STZ $0CD0 : JSR $BCBE : RTS
dl $EAEAEA,$EAEAEA,$EAEAEA ;//this doesn't work with hyper beam...
;-----------------------------------------------------------------------------------------------;
;===============================================================================================;









PHOSPHOTiDYL

#1
Added something small for this.
Even though it's a "broken" charge beam, it still does charge beam damage & uses the charge beam sprites.

This makes it so until charge beam is actually collected, charged shots will do uncharged damage.
Also, it will use uncharged beam sprites for the charged shots, which is pretty cool & gives me a bunch of ideas...

Fits right at the end of bank $93.
Maybe spazer should be long beam+wide beam now?...

LoROM

;===============================================================================================;
;-----------------------------------------------------------------------------------------------;
ORG $93802C : JSR Proj_DMG

;//[damage mod]
ORG $93FFF0
Proj_DMG:
LDA $09A6 : BIT #$1000 : BNE $04 ;//charge beam check
;//LDA $C3A1,y : RTS : LDA $C3C1,y : RTS ;//splazma patch
LDA $83C1,y : RTS : LDA $83D9,y : RTS ;//vanilla
;-----------------------------------------------------------------------------------------------;
;===============================================================================================;


Best I could do for the sound bug is set it so the charge sound doesn't play until fully charged.
You can now time your shots & just never have it play though...

JSR LolSpace @ $90BB3B.

Maybe switch faster charge to plasma as well...
Seems like a decent balance.

Also moving the JSL $91DEBA from ClearEnd to LolImSmart fixes some palette issues.

PHOSPHOTiDYL

#2
Traced that sound bug. Anyone want to take a stab at it here's some vanilla.
It's the initial charge sound. Adding a check for if fire is held won't work.

The beam code defies all logic, else I would have just hijacked it instead of moving the whole thing.

LoROM

;//[INITIAL CHARGE BEAM SOUND : LDA #$0008 : JSL $80902B]
ORG $90BB30 : LDA $0CD0 : CMP #$000F : BPL $03 : JMP $BBB0 : CMP #$0010 : BNE $07 : LDA #$0008 : JSL $80902B

;//[RESUMING CHARGE BEAM SOUND : LDA #$0041 : JSL $80902B]
ORG $90F4BF : LDA $0CD0 : CMP #$0010 : BMI $07 : LDA #$0041 : JSL $80902B : CLC : RTS
ORG $90F517 : LDA $8B : BIT $09B2 : BEQ $0F : LDA $0CD0 : BMI $07 : LDA #$0041 : JSL $80902B : CLC : RTS
ORG $90F580 : LDA $8B : BIT $09B2 : BEQ $07 : LDA #$0041 : JSL $80902B

;//[CLEAR SOUNDS : LDA #$0002 : JSL $809021]
ORG $90B89E : STZ $0DC0 : LDA #$0002 : JSL $809021 : PLP : RTS
ORG $90B995 : STZ $0DC0 : LDA #$0002 : JSL $809021 : PLP : RTS
ORG $90F1B6 : LDA $0CD0 : CMP #$000F : BMI $07 : LDA #$0002 : JSL $809021 : JMP $F19E
ORG $90F48A : LDA $8B : BIT $09B2 : BNE $0F : LDA $0CD0 : CMP #$0010 : BPL $07 : LDA #$0002 : JSL $809021 : CLC : RTS