• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Completed Lagless Fountain of Dreams with Platforms!

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
Lagless Fountain of Dreams with Platforms!

Notice: Do not use this code in conjunction with other Lagless Fountain of Dreams codes. The water will become reanimated (causing a great amount of lag), have various flashing problems, and may crash your game.

Code:
$Fountain of Reduced Lag (NTSC 1.02) [Myougi, Zauron, UnclePunch]
041cc8ac fc000028
041cbe9c 60000000
041cbef0 60000000
04390838 60000000
041cbf54 60000000
This code:
  • Is rewritten from the ground up
  • Truely lagless, retains platforms with movement
  • Compatible with all Widescreen [16:9] Melee hacks
  • Freezes animation of fountain water, for lag reduction
  • Fixes water flashing issues present in Dan Salvato's version of the code
  • Completely removes both shiny reflection layer and texture reflection layer

 
Last edited:

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
Once again, a shout out to TruckJitsu for taking code that took a collaborative effort spanning two years to create into Faster Melee without giving any credit. Please remember to credit the creators of codes, no matter how small their contributions may seem.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Lagless Fountain of Dreams for 4+ Players or Dolphin Emulator
  • Always Lagless FoD when playing on Dolphin Emulator.
  • Console Lagless FoD when four or more players are in the match.
  • Character shadow render flag added to the water.
  • Fixed water color.
  • Addressed code in the OP causing a console crash.

upload_2017-6-22_23-49-15.png


Code:
$Lagless FoD 4 Player or Dolphin (1.02) [Achilles, Myougi, Dan Salvato]
C21CBB90 00000021
9421FFF8 3C608000
8063002C 546300C7
40820040 38800000
38C00000 3C608045
60633088 1CA40E90
7CA5182E 2C050003
41A20008 38C60001
38840001 2C040006
4082FFE4 38A00004
2C060004 41A00028
3CC0804A 80C6ED78
3CA00002 60A5AE44
7CA53050 88C50000
60C60004 98C50000
38A00008 48000035
7C6802A6 3863FFF4
8483000C 2C040000
4182007C 7CC5182E
90C40000 38000000
7C0027AC 7C0004AC
4C00012C 4BFFFFDC
4E800021 801CC8AC
EC0007FA FC000028
801CBE9C 4BFFC29D
60000000 801CBEF0
80840030 60000000
801CBF54 48000BC5
60000000 80390838
4BFFFE05 60000000
801CD250 48174F81
60000000 801CCDCC
387F01D4 480000B4
00000000 00000000
Code:
Lagless FoD for 4+ Players of Dolphin Emulator

inject @ 801cbb90

.macro overwriteEntry adr, orig, noLag
.long \adr
.long \orig
.long \noLag
.endm

.macro  adr_load reg, address
lis \reg, \address @h
ori \reg,\reg,\address @l
.endm

.macro  adr_blrl reg, address
lis \reg, \address @h
ori \reg,\reg,\address @l
mtlr \reg
blrl
.endm

.macro  word_load reg1, reg2, address
lis \reg2, \address @ha
lwz \reg1,\address @l (\reg2)
.endm

.set PlayersForLagless, 4

.set tableEnd, 0
.set tableEntryLength, 0xc
.set tableOrig, 4
.set tableNoLag, 8

.set OSBootInfo.consoleType, 0x8000002c
.set StageInfo.grGroundParam, 0x8049ED78
.set PlayerBlock.P1.Type, 0x80453088
.set PlayerBlock.Sizeof, 0xe90
.set PlayerBlock.Count, 6

.set MObj.RENDER_SHADOW, (1<<26)>>24    # 4...

START:
stwu sp,-0x8(sp)    # default code line

# Dolphin Emulator's Console Type is 0x10000006 = OS_CONSOLE_DEVHW3
word_load r3,r3,OSBootInfo.consoleType
rlwinm. r3,r3,0,3,3    # 0x10000000 = OS_CONSOLE_DEVELOPMENT (bit mask)
bne- NO_LAG            # lagless on Dolphin

li r4,0
li r6,0
adr_load r3,PlayerBlock.P1.Type

PLAYER_LOOP:
mulli r5,r4,PlayerBlock.Sizeof
lwzx r5,r5,r3
cmpwi r5,3
beq+ PLAYER_LOOP_CONTINUE
addi r6,r6,1
PLAYER_LOOP_CONTINUE:
addi r4,r4,1
cmpwi r4,PlayerBlock.Count
bne+ PLAYER_LOOP
li r5,tableOrig
cmpwi r6,PlayersForLagless
blt+ CONTINUE

NO_LAG:
# add shadow render flag to "still" water ground
# Note: The hardcoded subtraction offset could cause problems if
# structure of the FoD file internals were moved
word_load r6,r6,StageInfo.grGroundParam
adr_load r5, 0x0002ae44        # offset to base water image material struct render flags
sub r5,r6,r5
lbz r6,0(r5)
ori r6,r6,MObj.RENDER_SHADOW    # enable shadow render flag
stb r6,0(r5)
li r5,tableNoLag
CONTINUE:

bl TABLE
mflr r3
subi r3,r3,tableEntryLength
LOOP:
lwzu r4,tableEntryLength(r3)
cmpwi r4,tableEnd
beq- END
STORE_FLUSH_CACHE:
lwzx r6,r5,r3
stw r6,0(r4)
li r0,0
icbi r0,r4
sync
isync
b LOOP

TABLE:
blrl
# ADDRESS | ORIGINAL VALUE | LAGLESS VALUE
overwriteEntry 0x801cc8ac, 0xec0007fa, 0xfc000028
overwriteEntry 0x801cbe9c, 0x4bffc29d, 0x60000000
overwriteEntry 0x801cbef0, 0x80840030, 0x60000000
overwriteEntry 0x801cbf54, 0x48000bc5, 0x60000000
overwriteEntry 0x80390838, 0x4bfffe05, 0x60000000
overwriteEntry 0x801cd250, 0x48174f81, 0x60000000
overwriteEntry 0x801ccdcc, 0x387f01d4, 0x480000b4
.long tableEnd

END:

--------------

Code:
Always Lagless FoD w/ Character Shadows (1.02) [Achilles, Myougi, Dan Salvato]
C21CBB90 00000005
9421FFF8 3CC0804A
80C6ED78 3CA00002
60A5AE44 7CA53050
88C50000 60C60004
98C50000 00000000
041CC8AC FC000028
041CBE9C 60000000
041CBEF0 60000000
041CBF54 60000000
04390838 60000000
041CD250 60000000
041CCDCC 480000B4
 
Last edited:

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673


Code:
$Disable Player Reflections on FoD [UnclePunch]
04081148 38000000
Disables only the player reflections and keeps everything else in tact. Seems to provide the same performance increase as the other codes while keeping the appearance of vanilla FoD.

https://streamable.com/2cw8l
 
Last edited:

Zanthir

Smash Rookie
Joined
Dec 6, 2009
Messages
3
Location
Portland, OR, USA
How do you apply these codes? Also, I am dropping frames on Yoshi's Story too. Any help for that one?

[Edit: Nevermind. I found the Melee code manager. I thought it was a Dolphin setting or something. I see now we are just modding the iso (or it looks like there is another option too).]
 
Last edited:
Top Bottom