News:

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

Main Menu

Looking for that fog fx edit...

Started by PHOSPHOTiDYL, December 17, 2019, 02:18:49 PM

Previous topic - Next topic

PHOSPHOTiDYL

Offering a frozen space pirate hitbox fix. $0047 bytez bank $B2.

Looking for the code to set different fog speedz in the fx editor, & the patch w/sound & glow when morphing/unmorphing.




PHOSPHOTiDYL

This is that speedbooster code from projectbase for those sick shinespark puzzlez...

Thanks to begrimed for project base & the metroid construction team.

LoROM

org $948884 : jsr $b1f0
org $948E92 : nop : nop

org $94b1f0 ;//[$007c bytez]
lda $0a1c : cmp #$00c9 : beq + : cmp #$00ca : beq $4f : lda #$0001 : rts
+ lda $8b : bit $09b0 : bne + : lda #$0001 : rts
+ lda #$0009 : sta $0a28 : dec a : sta $0a1e : lda #$0001 : sta $0a1f
lda #$0009 : sta $0b42 : lda #$fffe : sta $12 : stz $14 : jsl $949763
lda #$0001 : sta $0a6e : sta $0b3c : lda #$0402 : sta $0b3e : stz $0b36
lda #$a337 : sta $0a58 : lda #$e913 : sta $0a60 : rts
lda $8b : bit $09ae : bne + : lda #$0001 : rts
+ lda #$000a : sta $0a28 : lda #$0004 : sta $0a1e
lda #$0001 : sta $0a1f : jmp $b21c
padbyte $ff : pad $94b270


PHOSPHOTiDYL

I'll ask here instead of a new thread.

Anyone have any idea on how to "freeze" an enemy w/o ice beam??
I'm changing the shot ai but the game freezing instead...

PHOSPHOTiDYL

Still looking for that morph glow patch.

I already posted all my code, maybe I can help in return??

benox50

#4
Quote from: PHOSPHOTiDYL on July 02, 2020, 02:35:23 AM
Still looking for that morph glow patch.

I already posted all my code, maybe I can help in return??

Morph Flash ? Its public, but stupidly hard to find:

lorom

!timer = $1F60 ;unused stack

org $91FDE7    ;unmorphin'
JSR CHECKA

org $91ECFE      ;morphin'
JSR CHECKA

;org $91FFEE

;FREESPACE:
;STA $0B00
;JSL CHECK
;RTS


org $A0870D ;main hijack point, runs every frame

JSR $FD60


org $A0FD60 ; push stuff in case it's needed later
PHA : PHX : PHY
JSL MORPH_FLASH
PLY : PLX : PLA
INC $1842 ;pull stuff after the routine is run and do what the hijack jump overwrote
RTS

org $91FFFB ;little free space
CHECKA:
JSL CHECKB
RTS

org $85A000
CHECKB:
        STA $0B00 ;add back what we overwritted
PHA : CMP #$0007 : BNE +
LDA #$0015 : STA !timer
; LDA #$001C
; JSL $809143
; LDA #$0040
; JSL $8090C1 ;play sound
; LDA #$0044
; JSL $8090C1 ;play sound
+
PLA : RTL

MORPH_FLASH:

        LDA !timer : BEQ QUIT : BMI QUIT        ;should the timer ever be negative, go as well
        CMP #$0016 : BCS QUIT        ;if the timer is greater than 8 for any reason, get the hell outta here!
        DEC a           ;subtract 1 to save us an additional table entry
        ASL a
        TAX             ;used as an index now
        LDA $09A2       ;equipped items
        AND #$0021      ;wipe out the other items
        BEQ NORMAL      ;if it's equal we have power suit
        BIT #$0020      ;check for gravity suit
        BNE GRAVITY
        BIT #$0001      ;check for varia suit
        BNE VARIA


print " Power Suit ", pc
NORMAL:
        LDA #$0000      ;normal suit
        BRA FLASH

print " Grav Suit ", pc
GRAVITY:
        LDA #$0200      ;to get 9A20
        BRA FLASH

print " Var Suit ", pc
VARIA:
        LDA #$0100      ;to get 9920

FLASH:
        STA $12         ;temporary
        LDA FLASH_PATTERN, x    ;load palette pointer from pattern table (timer used as index)
        CLC
        ADC $12                 ;add our values for suit palette addresses
        TAX                    ;now we have a source pointer in X
        LDY #$C180              ;now we have a destination pointer in Y
        LDA #$0020              ;how many bytes to transfer (palette lines are 0x20 bytes each)
        MVN $9B7E               ;9B is the bank where the charge palette is, 7E is RAM
;       JSR FLASH_STORE         ;no need for this, so you can get rid of that
        DEC !timer              ;decrease timer
QUIT:                           ;at the end, pull stuff that was once pushed (very important)
        RTL                     ;end

;9820 is the start of normal suit charge palette
;9920 is the start of varia suit charge palette, 0x9820 + 0x0100
;9A20 is start start of gravity suit charge palette 0x9820 + 0x0200



FLASH_PATTERN:

    DW $9820        ; palette line 0x0, regular palette
    DW $9840        ; palette line 0x1
            DW $9840        ; palette line 0x1
            DW $9840        ; palette line 0x1
    DW $9860        ; palette line 0x2
            DW $9860        ; palette line 0x2
            DW $9860        ; palette line 0x2
    DW $9880        ; palette line 0x3
            DW $9880        ; palette line 0x3
            DW $9880        ; palette line 0x3
    DW $98A0        ; palette line 0x4
            DW $98A0        ; palette line 0x4
                DW $98A0        ; palette line 0x4
    DW $98C0        ; palette line 0x5
            DW $98C0        ; palette line 0x5
        DW $98E0        ; palette line 0x6
                DW $98E0        ; palette line 0x6
        DW $9900        ; palette line 0x7
                DW $9900        ; palette line 0x7
        DW $98A0        ; palette line 0x4
                DW $98A0        ; palette line 0x4


Also someone posted the enemy freezing without ice thing earlier in Hex edits, might be moehr,

Edit*
ah, here we go, not same but can start searching there in asm:
ORG $A09594:
NOP : NOP

enemies won't unfreeze when the ice beam is unequipped; however, they will be ugly if you unequip it

useful if you're editing other things to freeze enemies, not useful if you don't like broken paletting

PHOSPHOTiDYL

Thanks!! I've been looking for morph flash forever...

PHOSPHOTiDYL

Anyone know how to do rapid fire with power beam??

Mentlegen

#7
Smile 2.5 has a beam editor feature, in which you can change the time between shots. Projectiler can also do this iirc. Tweaking the speed and acceleration of shots and the cooldown to a certain ratio will yield rapid fire.

If you are still looking for different fog speeds,I believe that's the "different fx tilemaps" patch on the main site. The first three tiles of a room can be given BTS values in order to affect the FX3

https://metroidconstruction.com/resource.php?id=165