Code Request (Force Backwards Camera on DS Twilight House)
#1
Hi. I am in the process of attempting to recreate Mario Kart DS Missions in Mario Kart Wii's Mission Mode. It has been going very well so far, However I could not manage to recreate Mission 1-6. Where you have to drive backwards out of Luigi's Mansion.



The closest thing to this is the "Force Looking Backwards" code. My request is a code that enables this code, but only when playing on the DS Twilight House slot. 

The reason for it being DS Twilight House is that I plan to recreate the Missions on N64 Banshee Boardwalk and the track will use the SNES Ghost Valley 2 slot
Reply
#2
Try this. It works for me on the Wii (USB Loader GX, default VBI hook). Haven't bothered trying it on Dolphin.

Code creator: Vega
Credits: JoshuaMK (Force Looking Backwards)

NTSC-U
C28529C8 00000006
3D808059 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C721C 93861758
60000000 00000000

Source:
Code:
#NTSC-U = 808529C8

lis r12, 0x8059 #First half address of instruction location to modify

cmpwi r28, 0x26 #Check selected battle map to value of Twilight House
bne+ reset_camera #If not equal, don't execute code

lis r11, 0x4800 #New instruction value to write to static memory; force camera backwards
ori r11, r11, 0x003C
b the_end

reset_camera:
lis r11, 0x4182 #Default instruction value
ori r11, r11, 0x0070

the_end:
stw r11, 0x721C (r12) #Update instruction in static memory responsible for the camera hack
stw r28, 0x1758 (r6) #Default Instruction, store battle map value to memory
Reply
#3
(07-18-2020, 09:02 PM)Vega Wrote: Try this. It works for me on the Wii (USB Loader GX, default VBI hook). Haven't bothered trying it on Dolphin.

Code creator: Vega
Credits: JoshuaMK (Force Looking Backwards)

NTSC-U
C28529C8 00000006
3D808059 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C721C 93861758
60000000 00000000

Source:


#NTSC-U = 808529C8

lis r12, 0x8059 #First half address of instruction location to modify

cmpwi r28, 0x26 #Check selected battle map to value of Twilight House
bne+ reset_camera #If not equal, don't execute code

lis r11, 0x4800 #New instruction value to write to static memory; force camera backwards
ori r11, r11, 0x003C
b the_end

reset_camera:
lis r11, 0x4182 #Default instruction value
ori r11, r11, 0x0070

the_end:
stw r11, 0x721C (r12) #Update instruction in static memory responsible for the camera hack
stw r28, 0x1758 (r6) #Default Instruction, store battle map value to memory


Thanks, But I already found a solution.
Reply
#4
(07-18-2020, 09:02 PM)Vega Wrote: Try this. It works for me on the Wii (USB Loader GX, default VBI hook). Haven't bothered trying it on Dolphin.

Code creator: Vega
Credits: JoshuaMK (Force Looking Backwards)

NTSC-U
C28529C8 00000006
3D808059 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C721C 93861758
60000000 00000000

Source:
Code:
#NTSC-U = 808529C8

lis r12, 0x8059 #First half address of instruction location to modify

cmpwi r28, 0x26 #Check selected battle map to value of Twilight House
bne+ reset_camera #If not equal, don't execute code

lis r11, 0x4800 #New instruction value to write to static memory; force camera backwards
ori r11, r11, 0x003C
b the_end

reset_camera:
lis r11, 0x4182 #Default instruction value
ori r11, r11, 0x0070

the_end:
stw r11, 0x721C (r12) #Update instruction in static memory responsible for the camera hack
stw r28, 0x1758 (r6) #Default Instruction, store battle map value to memory

Hi again. Do you think you would be able to make a PAL Version of this? I don't have enough asm knowledge to do it myself.
Reply
#5
Here's the code with all versions ported

NTSC-U
C28529C8 00000006
3D808059 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C721C 93861758
60000000 00000000

PAL
C283D0E8 00000006
3D80805A 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C2254 93861758
60000000 00000000

NTSC-J
C283C754 00000006
3D80805A 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C1BD4 93861758
60000000 00000000

NTSC-K
C282B4A8 00000006
3D808059 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C02AC 93861758
60000000 00000000

Code:
#NTSC-U = 808529C8
#PAL = 8083D0E8
#NTSC-J = 8083C754
#NTSC-K = 8082B4A8

.set region, '' #e p j or k

#First half address of instruction location to modify

.if (region == 'E' || region == 'e')
lis r12, 0x8059
.elseif (region == 'P' || region == 'p')
lis r12, 0x805A
.elseif (region == 'J' || region == 'j')
lis r12, 0x805A
.elseif (region == 'K' || region == 'k')
lis r12, 0x8059
.else # Invalid Region
.err
.endif

cmpwi r28, 0x26 #Check selected battle map to value of Twilight House
bne+ reset_camera #If not equal, don't execute code

lis r11, 0x4800 #New instruction value to write to static memory; force camera backwards
ori r11, r11, 0x003C
b the_end

reset_camera:
lis r11, 0x4182 #Default instruction value
ori r11, r11, 0x0070

#Update instruction in static memory responsible for the camera hack

the_end:
.if (region == 'E' || region == 'e')
stw r11, 0x721C (r12)
.elseif (region == 'P' || region == 'p')
stw r11, 0x2254 (r12)
.elseif (region == 'J' || region == 'j')
stw r11, 0x1BD4 (r12)
.elseif (region == 'K' || region == 'k')
stw r11, 0x02AC (r12)
.else # Invalid Region
.err
.endif

stw r28, 0x1758 (r6) #Default Instruction, store battle map value to memory
Reply
#6
(07-28-2020, 11:20 PM)Vega Wrote: Here's the code with all versions ported

NTSC-U
C28529C8 00000006
3D808059 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C721C 93861758
60000000 00000000

PAL
C283D0E8 00000006
3D80805A 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C2254 93861758
60000000 00000000

NTSC-J
C283C754 00000006
3D80805A 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C1BD4 93861758
60000000 00000000

NTSC-K
C282B4A8 00000006
3D808059 2C1C0026
40A20010 3D604800
616B003C 4800000C
3D604182 616B0070
916C02AC 93861758
60000000 00000000

Code:
#NTSC-U = 808529C8
#PAL = 8083D0E8
#NTSC-J = 8083C754
#NTSC-K = 8082B4A8

.set region, '' #e p j or k

#First half address of instruction location to modify

.if (region == 'E' || region == 'e')
lis r12, 0x8059
.elseif (region == 'P' || region == 'p')
lis r12, 0x805A
.elseif (region == 'J' || region == 'j')
lis r12, 0x805A
.elseif (region == 'K' || region == 'k')
lis r12, 0x8059
.else # Invalid Region
.err
.endif

cmpwi r28, 0x26 #Check selected battle map to value of Twilight House
bne+ reset_camera #If not equal, don't execute code

lis r11, 0x4800 #New instruction value to write to static memory; force camera backwards
ori r11, r11, 0x003C
b the_end

reset_camera:
lis r11, 0x4182 #Default instruction value
ori r11, r11, 0x0070

#Update instruction in static memory responsible for the camera hack

the_end:
.if (region == 'E' || region == 'e')
stw r11, 0x721C (r12)
.elseif (region == 'P' || region == 'p')
stw r11, 0x2254 (r12)
.elseif (region == 'J' || region == 'j')
stw r11, 0x1BD4 (r12)
.elseif (region == 'K' || region == 'k')
stw r11, 0x02AC (r12)
.else # Invalid Region
.err
.endif

stw r28, 0x1758 (r6) #Default Instruction, store battle map value to memory
Wow, Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)