News:

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

Main Menu

So bank $83...

Started by PHOSPHOTiDYL, August 29, 2017, 05:04:00 PM

Previous topic - Next topic

PHOSPHOTiDYL

Say you use rain as your fx but replace the $D950 rain code with $DB08 fog code.

Kinda looks like snow...
I'll leave it at that.


LoROM

;===============================================================================================;
;-----------------------------------------------------------------------------------------------;
ORG $838000 ;//[FX1/DDB]
padbyte $FF : pad $83ABF0
;-----------------------------------------------------------------------------------------------;
ORG $83ABF0 ;//[fx maps bank $8A (ORG $89AC31 : LDA $ABF0,y)]
dw $0000 ;//00 = No FX1
dw $8000 ;//02 = Lava
dw $8840 ;//04 = Acid
dw $9080 ;//06 = Water
dw $98C0 ;//08 = Spores
dw $A100 ;//0A = Rain
dw $A940 ;//0C = Fog
dw $0000 ;//0E = Unused
dw $0000 ;//10 = Unused
dw $0000 ;//12 = Unused
dw $0000 ;//14 = Unused
dw $0000 ;//16 = Unused
dw $0000 ;//18 = Unused
dw $0000 ;//1A = Unused
dw $0000 ;//1C = Unused
dw $0000 ;//1E = Unused
dw $0000 ;//20 = BG Scroll
dw $0000 ;//22 = Unused
dw $0000 ;//24 = BG Glow
dw $9080 ;//26 = *4 Statues* (water)
ORG $83AC18 ;//[fx layer code bank $88 (ORG $89AC48 : LDA $AC18,y)]
dw $B278 ;//00 = No FX1 (RTL)
dw $B279 ;//02 = Lava
dw $B2A1 ;//04 = Acid
dw $C3FF ;//06 = Water
dw $DA11 ;//08 = Spores
dw $D950 ;//0A = Rain
dw $DB08 ;//0C = Fog
dw $B278 ;//0E = Unused
dw $B278 ;//10 = Unused
dw $B278 ;//12 = Unused
dw $B278 ;//14 = Unused
dw $B278 ;//16 = Unused
dw $B278 ;//18 = Unused
dw $B278 ;//1A = Unused
dw $B278 ;//1C = Unused
dw $B278 ;//1E = Unused
dw $A7D8 ;//20 = BG Scroll
dw $A61B ;//22 = Unused (seems bugged)
dw $B07C ;//24 = BG Glow
dw $DB8A ;//26 = *4 Statues*
dw $D8DE ;//28 = *Ceres Ridley*
dw $D928 ;//2A = *Ceres Mode 7*
dw $DDC7 ;//2C = Haze
;-----------------------------------------------------------------------------------------------;
ORG $83AC46     ;//[fx palette pointers (ORG $89AC67 : LDA $AC46,y)]   
dw AREA_FXPAL_00 ;//CRATERIA ;{66 AC}
dw AREA_FXPAL_01 ;//BRINSTAR ;{86 AC}
dw AREA_FXPAL_02 ;//NORFAIR ;{A6 AC}
dw AREA_FXPAL_03 ;//WRECKEDSHIP ;{C6 AC}
dw AREA_FXPAL_04 ;//MARIDIA ;{E6 AC}
dw AREA_FXPAL_05 ;//TOURIAN ;{06 AD}
dw AREA_FXPAL_06 ;//CERES ;{26 AD}
dw AREA_FXPAL_07 ;//DEBUG ;{46 AD}
ORG $83AC56    ;//[fx animated tiles pointers (ORG $89AC9D : LDA $AC56,y)]         
dw AREA_FXTILE_00 ;//CRATERIA ;{76 AC}
dw AREA_FXTILE_01 ;//BRINSTAR ;{96 AC}
dw AREA_FXTILE_02 ;//NORFAIR ;{B6 AC}
dw AREA_FXTILE_03 ;//WRECKEDSHIP ;{D6 AC}
dw AREA_FXTILE_04 ;//MARIDIA ;{F6 AC}
dw AREA_FXTILE_05 ;//TOURIAN ;{16 AD}
dw AREA_FXTILE_06 ;//CERES ;{36 AD}
dw AREA_FXTILE_07 ;//DEBUG ;{56 AD}
ORG $83AC66 ;//[pointers to pointers to fx1 (loaded from bank $8D)]
AREA_FXPAL_00:
dw $F765 ;//[POINT_CRATERIA_FXPAL_00] ;{65 F7}
dw $FFE5 ;//[POINT_CRATERIA_FXPAL_01] ;{E5 FF}
dw $FFE9 ;//[POINT_CRATERIA_FXPAL_02] ;{E9 FF}
dw $FFD9 ;//[POINT_CRATERIA_FXPAL_03] ;{D9 FF}
dw $FFDD ;//[POINT_CRATERIA_FXPAL_04] ;{DD FF}
dw $FFE1 ;//[POINT_CRATERIA_FXPAL_05] ;{E1 FF}
dw $FFED ;//[POINT_CRATERIA_FXPAL_06] ;{ED FF}
dw $F781 ;//[POINT_CRATERIA_FXPAL_07] ;{81 F7}
AREA_FXTILE_00:
dw $8257 ;//[SPIKES(H)] ;{57 82}
dw $8251 ;//[SPIKES(V)] ;{51 82}
dw $825D ;//[OCEAN] ;{5D 82}
dw $8263 ;//[LAVA] ;{63 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
AREA_FXPAL_01:
dw $F775 ;//[POINT_BRINSTAR_FXPAL_00] ;{75 F7}
dw $F77D ;//[POINT_BRINSTAR_FXPAL_01] ;{7D F7}
dw $F781 ;//[POINT_BRINSTAR_FXPAL_02] ;{81 F7}
dw $F779 ;//[POINT_BRINSTAR_FXPAL_03] ;{79 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
AREA_FXTILE_01:
dw $8257 ;//[SPIKES(H)] ;{57 82}
dw $8251 ;//[SPIKES(V)] ;{51 82}
dw $8281 ;//[MOUTH??] ;{81 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
AREA_FXPAL_02:
dw $F761 ;//[POINT_NORFAIR_FXPAL_00] ;{61 F7}
dw $F785 ;//[POINT_NORFAIR_FXPAL_01] ;{85 F7}
dw $F789 ;//[POINT_NORFAIR_FXPAL_02] ;{89 F7}
dw $F78D ;//[POINT_NORFAIR_FXPAL_03] ;{8D F7}
dw $F791 ;//[POINT_NORFAIR_FXPAL_04] ;{91 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
AREA_FXTILE_02:
dw $8257 ;//[SPIKES(H)] ;{57 82}
dw $8251 ;//[SPIKES(V)] ;{51 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
AREA_FXPAL_03:
dw $F76D ;//[POINT_WRECKEDSHIP_FXPAL_00] ;{6D F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
AREA_FXTILE_03:
dw $8257 ;//[SPIKES(H)] ;{57 82}
dw $8251 ;//[SPIKES(V)] ;{51 82}
dw $8275 ;//[TREADMILL(R)] ;{75 82}
dw $827B ;//[TREADMILL(L)] ;{7B 82}
dw $826F ;//[MONITOR] ;{6F 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
AREA_FXPAL_04:
dw $F795 ;//[POINT_MARIDIA_FXPAL_00] ;{95 F7}
dw $F799 ;//[POINT_MARIDIA_FXPAL_01] ;{99 F7}
dw $F79D ;//[POINT_MARIDIA_FXPAL_02] ;{9D F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7} 
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
AREA_FXTILE_04:
dw $8257 ;//[SPIKES(H)] ;{57 82}
dw $8251 ;//[SPIKES(V)] ;{51 82} 
dw $8287 ;//[QUICKSAND(CEILING)] ;{87 82}
dw $828D ;//[QUICKSAND(FALLING)] ;{8D 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
AREA_FXPAL_05:
dw $F761 ;//[POINT_TOURIAN_FXPAL_00] ;{61 F7}
dw $F7A1 ;//[POINT_TOURIAN_FXPAL_01] ;{A1 F7}
dw $F7A5 ;//[POINT_TOURIAN_FXPAL_02] ;{A5 F7}
dw $FFC9 ;//[POINT_TOURIAN_FXPAL_03] ;{C9 FF}
dw $FFCD ;//[POINT_TOURIAN_FXPAL_04] ;{CD FF}
dw $FFD1 ;//[POINT_TOURIAN_FXPAL_05] ;{D1 FF}
dw $FFD5 ;//[POINT_TOURIAN_FXPAL_06] ;{D5 FF}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7} 
AREA_FXTILE_05:
dw $8257 ;//[SPIKES(H)] ;{57 82}
dw $8251 ;//[SPIKES(V)] ;{51 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
AREA_FXPAL_06:
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
AREA_FXTILE_06:
dw $8257 ;//[SPIKES(H)] ;{57 82}
dw $8251 ;//[SPIKES(V)] ;{51 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
AREA_FXPAL_07:
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
dw $F745 ;//[POINT_BLANK_FXPAL] ;{45 F7}
AREA_FXTILE_07:
dw $8257 ;//[SPIKES(H)] ;{57 82}
dw $8251 ;//[SPIKES(V)] ;{51 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}
dw $824B ;//[UNUSED] ;{4B 82}

ORG $83AD66 ;//[Free Space ($xxxx bytes)]
padbyte $FF : pad $848000

Vener

Very cool stuff here ; thanks to this .

I searched FX1 routines for years !
Since you are gone deep into FXs , maybe you could say : I try to use Water FX AND Fireflea FX at the same time in some rooms . As i just saw this topic , i easily found Firefle and water FX :

Fireflea FX code :

(04:307C): This code is called from 01:AC3C: (dw 7C B0)

  08           PHP
  C2 30        REP #$30
  A9 06 00     LDA #$0006
  8D 78 17     STA $1778   <Brightness loop counter for firefly rooms. 6 frames per index increment.
  9C 7A 17     STZ $177A   <Brightness loop index for firefly rooms. Indexes 88:B058,X
  22 35 84 88  JSL $888435 <Set up a DMA entry. Arguments are stored after the JSL that calls this: values for 4300/4301 (2 bytes total), 2 byte pointer to plm-esque instruction list
  dw 42 11     1142
  dw AC B0     B0AC
  A9 00 00     LDA #$0000
  8F 00 9E 7E  STA $7E9E00 <about layer 3 or 2 ...
  9C 7C 17     STZ $177C   <unknown but related to brightness
  9C 7E 17     STZ $177E   <Brightness base index for firefly rooms. Indexes 88:B070,X. Intended as increments of 2.
  A9 18 00     LDA #$0018
  8D 80 17     STA $1780   <unknown
  AF 58 B0 88  LDA $88B058
  8D 82 17     STA $1782   <unknown , could be related to ennemie AI
  28           PLP
  6B           RTL


Water FX code :

(04:43FF): this code is called from 01:AC1E: (dw FF C3)

  A9 28 C4     LDA #$C428
  8D 6C 19     STA $196C    <FX3 something. Need to look into. (Causes rumbling)
  AD 78 19     LDA $1978    <FX3 height (average?) (measured from top of room down)
  8D 5E 19     STA $195E    <Actual FX3 height
  22 35 84 88  JSL $888435  <Set up a DMA entry. 
  dw 42 11     1142
  dw 56 D8     D856
  AD 7E 19     LDA $197E    <FX3 'C'. Bitflags: 0 = FX3 flows left, 1 = bg heat effect, 2 = 'line shift'? (Water does not affect Samus), 3 = unknown, 6 = Big FX3 tide, 7 = Small FX3 tide (priority over 6)
  29 02 00     AND #$0002
  F0 08        BEQ #$08 +
  22 35 84 88  JSL $888435  <Set up a DMA entry. 
  42 0F
  47 D8
+ 22 65 D8 88  JSL $88D865
  6B           RTL


In first , i tried to set Water in FX1 , then called Fireflea with a FX2 code from bank $8F that JSL to it .
No freezing , but it just remove the water at all , and clear pallete blends .

So , i tried to use the unused FX1 #22 by changing it's pointer to a new code where i jumbled both codes to one .
No freezing , but it do the same as above .. Could you tell me why those two FXs cut themselves ?
 

PHOSPHOTiDYL

At a glance, & going through the code, (H)DMA entries, final answer.

I only know there's a source/dest, not a clue how to use it myself...




Mettyk25jigsaw

I tried Putting Rain and spores together several weeks back, looks even more as snow I reckon.