Dynamic Gravity [JoshuaMK]
#11
Btw, 0x80001790 is NOT a safe memory location to use in the Exception Vector area. You are editing an instruction responsible for Thermal Interrupt. I went ahead and added more ranges to the original thread covering this - http://mkwii.com/showthread.php?tid=1106
Reply
#12
(07-04-2019, 02:24 AM)Vega Wrote: Btw, 0x80001790 is NOT a safe memory location to use in the Exception Vector area. You are editing an instruction responsible for Thermal Interrupt. I went ahead and added more ranges to the original thread covering this - http://mkwii.com/showthread.php?tid=1106
Yeah I noticed that and fixed it over a day ago. The specific address is now at 0x80001798. Btw there seems to be a decent sized area of zeros that don't change at all in memory starting at around 0x80342000 and I was wondering if you could look into it to see if it might be another chunk of free memory space? Maybe this has already been looked into but I thought it was interesting.

(07-04-2019, 08:03 AM)JoshuaMK Wrote:
(07-04-2019, 02:24 AM)Vega Wrote: Btw, 0x80001790 is NOT a safe memory location to use in the Exception Vector area. You are editing an instruction responsible for Thermal Interrupt. I went ahead and added more ranges to the original thread covering this - http://mkwii.com/showthread.php?tid=1106
Yeah I noticed that and fixed it over a day ago. The specific address is now at 0x80001798. Btw there seems to be a decent sized area of zeros that don't change at all in memory starting at around 0x80342000 and I was wondering if you could look into it to see if it might be another chunk of free memory space? Maybe this has already been looked into but I thought it was interesting.
Btw my rewrite of the code is almost done(prob will be done the end of tomorrow) It will make all controllers work. I also download NTSC-J + NTSC-K ISOs so I can try to port codes myself. I plan to find a PAL version tomorrow.
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#13
Ye, MKWii will specifically have its own unused regions of static memory. I personally have no idea which areas of memory that will be. The Exception Vectors are good because they are universal for every Wii game. Fyi, the ranges listed on the thread ranging anywhere from 0x80000198 to 0x800012FF are basically never used in any other MKW cheat codes. There is more than enough space in those ranges.

Btw, do you plan on working more on your Extended Laps code after this? I really like that code.
Reply
#14
(07-04-2019, 01:46 PM)Vega Wrote: Ye, MKWii will specifically have its own unused regions of static memory. I personally have no idea which areas of memory that will be. The Exception Vectors are good because they are universal for every Wii game. Fyi, the ranges listed on the thread ranging anywhere from 0x80000198 to 0x800012FF are basically never used in any other MKW cheat codes. There is more than enough space in those ranges.

Btw, do you plan on working more on your Extended Laps code after this? I really like that code.
Yes I plan to work on the Extended Laps code once I'm done with this. One major problem with the extended laps code is that cpus make the counter rise, which then makes laps start counting far sooner than normal. One thing I did notice is that a human players address in register 3 during a lap count is always at the lowest value compared to the cpus. Generally speaking it goes like this:

0x80574848 CPU
0x805747C4 CPU
0x80574770 CPU
...
0x8057452F P1

The only problem with this is these addresses change after every race, so I can't use these to track human players. So unless there is something I'm missing, I will need to find a different way to track human players. Because I need only the human players to be able to count the laps up, and really importantly, I need to make each player have there own independent counter. I could achieve this fairly easily just as long as I can track each human player racing. Once I figure this out, there is one last problem with this code that I need to work out. And that is that as soon as you cross the start/finish line, and the lap doesn't count, the game immediately thinks you are now behind all the other racers, therefore putting you in last if you were in first previously, and putting 2nd into first and so on. For this I need to find a way to preserve positions. I could do this by finding where it is in code that determines what position you are in based on what lap you are on, and hook it to the value of what's in the milliseconds timer. That would be a rather easy fix, with the only hard part being finding that bit of code. Once that gets fixed I just need to figure out how to make TTs not work with this code. Then this code will be complete and ready for release.
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#15
I don't know how far you are on this code currently but I went ahead and chopped your source down a bit (for the 2nd ASM). Ofc, with any source changes, test them first in-game before applying changes in the original post. I changed the Exception Vector location to 0x80001798 so the 1st ASM will need to be adjusted for this. No need to give me any credits for this. I'm not overhauling the source, just taking out some redundancy. The source below is for NTSC-U, I'm too lazy to setup macros atm.


#########################
#Load Air Timer Value Into Register 11 #
#########################

lis r12, 0x8000
lwz r11, 0x1798 (r12)

############################################
#Compare r11 to Set Value and Branch to Normal Gravity if Less Than #
############################################

cmplwi r11, 30
blt- normal_value

############################
#Load Analog Stick Y Axis Byte Into Memory#
############################

lis r12, 0x8034 #NTSC-U used for compilation
ori r12, r12, 0xc203
lbz r11, 0 (r12)

#####################################
#Compare Y axis Byte to set values and Branch Accordingly#
#####################################

cmplwi r11, 0xe4
bgt- heaviest_value
cmplwi r11, 0xc9
bgt- heavier_value
cmplwi r11, 0xae
bgt- heavy_value
cmplwi r11, 0x20
blt- lightest_value
cmplwi r11, 0x3b
blt- lighter_value
cmplwi r11, 0x56
blt- light_value

################################
#Set New Value for Gravity and Branch to the End #
################################

normal_value:
lis r12, 0x3f80
b the_end

heavy_value:
lis r12, 0x3f95
b the_end

heavier_value:
lis r12, 0x3fb0
b the_end

heaviest_value:
lis r12, 0x3fc5
b the_end

light_value:
lis r12, 0x3f65
b the_end

lighter_value:
lis r12, 0x3f50
b the_end

lightest_value:
lis r12, 0x3f35

the_end:
stw r12, 0 (r31)
lfs f1, 0 (31)


C2000000 00000012 #no address assigned
3D808000 816C1798
280B001E 41800040
3D80803r 618Cxxxx #Change r value and xxxx values accordingly for region
896C0000 280B00E4
41810044 280B00C9
41810034 280B00AE
41810024 280B0020
41800044 280B003B
41800034 280B0056
41800024 3D80XXXX
48000030 3D80MMMM
48000028 3D80hhhh
48000020 3D80HHHH
48000018 3D80LLLL
48000010 3D80UUUU
48000008 3D80YYYY
919F0000 C03F0000
60000000 00000000
Reply
#16
(07-07-2019, 06:37 PM)Vega Wrote: I don't know how far you are on this code currently but I went ahead and chopped your source down a bit (for the 2nd ASM). Ofc, with any source changes, test them first in-game before applying changes in the original post. I changed the Exception Vector location to 0x80001798 so the 1st ASM will need to be adjusted for this. No need to give me any credits for this. I'm not overhauling the source, just taking out some redundancy. The source below is for NTSC-U, I'm too lazy to setup macros atm.


#########################
#Load Air Timer Value Into Register 11 #
#########################

lis r12, 0x8000
lwz r11, 0x1798 (r12)

############################################
#Compare r11 to Set Value and Branch to Normal Gravity if Less Than #
############################################

cmplwi r11, 30
blt- normal_value

############################
#Load Analog Stick Y Axis Byte Into Memory#
############################

lis r12, 0x8034 #NTSC-U used for compilation
ori r12, r12, 0xc203
lbz r11, 0 (r12)

#####################################
#Compare Y axis Byte to set values and Branch Accordingly#
#####################################

cmplwi r11, 0xe4
bgt- heaviest_value
cmplwi r11, 0xc9
bgt- heavier_value
cmplwi r11, 0xae
bgt- heavy_value
cmplwi r11, 0x20
blt- lightest_value
cmplwi r11, 0x3b
blt- lighter_value
cmplwi r11, 0x56
blt- light_value

################################
#Set New Value for Gravity and Branch to the End #
################################

normal_value:
lis r12, 0x3f80
b the_end

heavy_value:
lis r12, 0x3f95
b the_end

heavier_value:
lis r12, 0x3fb0
b the_end

heaviest_value:
lis r12, 0x3fc5
b the_end

light_value:
lis r12, 0x3f65
b the_end

lighter_value:
lis r12, 0x3f50
b the_end

lightest_value:
lis r12, 0x3f35

the_end:
stw r12, 0 (r31)
lfs f1, 0 (31)


C2000000 00000012 #no address assigned
3D808000 816C1798
280B001E 41800040
3D80803r 618Cxxxx #Change r value and xxxx values accordingly for region
896C0000 280B00E4
41810044 280B00C9
41810034 280B00AE
41810024 280B0020
41800044 280B003B
41800034 280B0056
41800024 3D80XXXX
48000030 3D80MMMM
48000028 3D80hhhh
48000020 3D80HHHH
48000018 3D80LLLL
48000010 3D80UUUU
48000008 3D80YYYY
919F0000 C03F0000
60000000 00000000
I can already tell that this will work, but I will test it anyway.
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)