Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 646
» Latest member: Luca1337
» Forum threads: 1,815
» Forum posts: 14,000
Full Statistics
|
Online Users |
There are currently 102 online users. » 0 Member(s) | 100 Guest(s) Bing, Google
|
Latest Threads |
Allow Pausing Before Race...
Forum: Offline Non-Item
Last Post: Vega
8 hours ago
» Replies: 0
» Views: 17
|
Top 10 Most Influential C...
Forum: Coding & Hacking General Discussion
Last Post: Vega
Yesterday, 03:27 PM
» Replies: 2
» Views: 7,355
|
Show Ice Cube on Online P...
Forum: Online Non-Item
Last Post: _Ro
Yesterday, 08:23 AM
» Replies: 0
» Views: 35
|
CPU Control Cycler [Ro]
Forum: Offline Non-Item
Last Post: _Ro
Yesterday, 07:56 AM
» Replies: 7
» Views: 1,013
|
Thunder Cloud Effect Modi...
Forum: Offline; Item
Last Post: JerryHatrick
01-10-2025, 11:13 PM
» Replies: 11
» Views: 1,096
|
MKW Coder/Developer of th...
Forum: Coding & Hacking General Discussion
Last Post: Vega
01-10-2025, 09:10 PM
» Replies: 10
» Views: 13,849
|
Make it to 10,000
Forum: General Discussion
Last Post: Vega
01-10-2025, 08:15 PM
» Replies: 7,338
» Views: 5,671,788
|
Miniturbos and Inside Dri...
Forum: Coding & Hacking General Discussion
Last Post: JerryHatrick
01-10-2025, 09:54 AM
» Replies: 1
» Views: 859
|
Code request???
Forum: Code Support / Help / Requests
Last Post: DrTap
01-09-2025, 06:06 PM
» Replies: 3
» Views: 4,959
|
CPUs/Online Players Have ...
Forum: Visual & Sound Effects
Last Post: Zeraora
01-09-2025, 02:26 AM
» Replies: 2
» Views: 516
|
|
|
Which license to choose? |
Posted by: Vega - 08-31-2019, 10:39 PM - Forum: General Discussion
- Replies (3)
|
|
I have made a program. Regarding the source code (all handwritten by me), which license do you guys prefer/use? Right now my source is private, I will release it once I figure out what license to use.
The only requirement I want is that whoever posts the source code (like on other sites) or posts any modification of the source, has to credit me. Which license would do the best job at that? (BSD, GPL, MIT, Apache, etc)
Wasn't sure which forum to place this thread under, so I threw it in General Discussion.
|
|
|
Thwomp Anti-Freeze [MrBean35000vr] |
Posted by: Star - 08-29-2019, 08:09 PM - Forum: Online Non-Item
- Replies (5)
|
|
Thwomp Anti-Freeze [MrBean35000vr]
(NTSC-U)
C2753B3C 00000005
2C030000 4182000C
81830000 48000014
7D8802A6 398C0034
7D8803A6 4E800020
60000000 00000000
(PAL)
C2760A88 00000005
2C030000 4182000C
81830000 48000014
7D8802A6 398C0034
7D8803A6 4E800020
60000000 00000000
(NTSC-J)
C27600F4 00000005
2C030000 4182000C
81830000 48000014
7D8802A6 398C0034
7D8803A6 4E800020
60000000 00000000
(NTSC-K)
C274EE48 00000005
2C030000 4182000C
81830000 48000014
7D8802A6 398C0034
7D8803A6 4E800020
60000000 00000000
Code Creator: MrBean35000vr
|
|
|
Invalid Friend Code Anti-Freeze [MrBean35000vr] |
Posted by: Star - 08-29-2019, 07:48 PM - Forum: Online Non-Item
- No Replies
|
|
Invalid Friend Code Anti-Freeze [MrBean35000vr]
(NTSC-U)
045C5DDC 4BFFFFC4
045C5DE4 4BFFFFBC
(PAL)
045D2EF8 4BFFFFC4
045D2F00 4BFFFFBC
(NTSC-J)
045D27D4 4BFFFFC4
045D27DC 4BFFFFBC
(NTSC-K)
045C1094 4BFFFFC4
045C109C 4BFFFFBC
Code Creator: MrBean35000vr
|
|
|
Mii Structure |
Posted by: Vega - 08-29-2019, 01:09 PM - Forum: Resources and References
- No Replies
|
|
This is a full breakdown of what bits, bytes, words, etc effect every aspect of a Mii.
Credits to the Arduino Project for this info.
A Mii is a total of 0x4A bytes in size.
// addr: 0x00 & 0x01 0D D2 0000 1101 1101 0010
invalid:1 ;--| = 0 = valid // doesn't seem to have any effect?
isGirl:1 ;---| = 0 = male // gender
month:4 ;----| | = 0011 = 3 = march // birthday month
day:5 ;---------| | = 01110 = 14 // birthday day
favColor:4 ;----------------| | = 01001 = 9 // 0 - 11 Keep in this range or else things can go wrong
isFavorite:1 ;--------------------| = 0
// addr: 0x02 through 0x15 name[MII_NAME_LENGTH]; 00 41 00 6C 00 62 00 65 00 72 00 74 00 20 00 45 00 00 00 00 Albert E
// addr: 0x16 height; // 0 - 127
// addr: 0x17 weight; // 0 - 127
// addr: 0x18 - 0x1B
miiID1; // Unique Mii identifier. Seems to increment with time. Also can
miiID2; // be used to change colour of Mii Trousers (see 'See Also' links)
miiID3;
miiID4;
// addr: 0x1C through 0x1F
systemID0; // Checksum8 of first 3 bytes of mac addr
systemID1; // mac addr 3rd-to-last byte
systemID2; // mac addr 2nd-to-last byte
systemID3; // mac addr last byte
// addr: 0x20 & 0x21
faceShape:3; // 0 - 7
skinColor:3; // 0 - 5
facialFeature:4; // 0 - 11
unknown:3; // Mii appears unaffected by changes to this data
mingleOff:1; // 0 = Mingle, 1 = Don't Mingle
unknown:1; // Mii appears unaffected by changes to this data
downloaded:1; // If the Mii has been downloaded from the Check Mii Out Channel
// addr: 0x22 & 0x23
hairType:7; // 0 - 71, Value is non-sequential with regard to page, row and column
hairColor:3; // 0 - 7
hairPart:1; // 0 = Normal, 1 = Reversed
unknown:5;
// addr:0x24 through 0x27
eyebrowType:5; // 0 - 23, Value is non-sequential with regard to page, row and column
unknown:1;
eyebrowRotation:4; // 0 - 11, Default value varies based on eyebrow type
unknown:6;
eyebrowColor:3; // 0 - 7
eyebrowSize:4; // 0 - 8, Default = 4
eyebrowVertPos:5; // 3 - 18, Default = 10
eyebrowHorizSpacing:4; // 0 - 12, Default = 2
// addr: 0x28 through 0x2B
eyeType:6; // 0 - 47, Value is non-sequential with regard to page, row and column
unknown:2;
eyeRotation:3; // 0 - 7, Default value varies based on eye type
eyeVertPos:5; // 0 - 18, Default = 12
eyeColor:3; // 0 - 5
unknown:1;
eyeSize:3; // 0 - 7, Default = 4
eyeHorizSpacing:4; // 0 - 12, Default = 2
unknown:5;
// addr: 0x2C & 0x2D
noseType:4; // 0 - 11, Value is non-sequential with regard to row and column
noseSize:4; // 0 - 8, Default = 4
noseVertPos:5; // 0 - 18, Default = 9
unknown:3;
// addr: 0x2E & 2F
lipType:5; // 0 - 23, Value is non-sequential with regard to page, row and column
lipColor:2; // 0 - 2
lipSize:4; // 0 - 8, Default = 4
lipVertPos:5; // 0 - 18, Default = 13
// addr: 0x30 & 0x31
glassesType:4; // 0 - 8
glassesColor:3; // 0 - 5
unknown:1; // when turned on mii does not appear (use not known)
glassesSize:3; // 0 - 7, Default = 4
glassesVertPos:5; // 0 - 20, Default = 10
// addr: 0x32 & 33
mustacheType:2; // 0 - 3
beardType:2; // 0 - 3
facialHairColor:3; // 0 - 7
mustacheSize:4; // 0 - 8, Default = 4
mustacheVertPos:5; // 0 - 16, Default = 10
// addr: 0x34 & 0x35
moleOn:1; // 0 = No Mole, 1 = Has Mole
moleSize:4; // 0 - 8, Default = 4
moleVertPos:5; // 0 - 30, Default = 20
moleHorizPos:5; // 0 - 16, Default = 2
unknown:1;
// addr: 0x36 through 0x49 creatorName[MII_CREATOR_NAME_LENGTH];
|
|
|
All About Bit Rotation |
Posted by: Vega - 08-28-2019, 03:34 PM - Forum: PowerPC Assembly
- Replies (4)
|
|
All About Bit Rotation
For Advanced ASM Coders
Chapter 1: Overview
If you have been making codes, even for a tiny bit, you have definitely came across an instruction like this...
rlwinm r0, r5, 3, 0, 28
This is a bit rotation instruction. There are 3 major bit rotation instructions...
- rlwnm - Rotate Left Word Then And w/ Mask
- rlwinm - Rotate Left Word Immediate Then And w/ Mask
- rlwimi - Rotate Left Word Immediate Then Insert Mask
These rotation instructions are like PowerPC's Swiss army knife. They can do many tasks such as multiply, divide, shift, rotate, clear, clear then shift, etc. The instructions can also be used to check for negative values, check for alignment, etc. With these instructions being so useful, it's recommended you at least learn a little bit about bit rotation.
Even though there are only 3 major rotating instructions (aka standard mnemonics), there are many simplified mnemonics available.
Chapter 2: Basic Bit Clearing
There is a simplified mnemonic of rlwinm for clearing bits. Clearing a bit simply means setting it to 0.
clrlwi rD, rA, XX
clrrwi rD, rA, XX
clrlwi is Clear Left Word Immediate. This instruction will clear the upper (left-hand) bits (starting at bit 0 going right) of rA, via the XX value (XX value range is 1 thru 31), and the result is placed in rD.
clrrwi is Clear Right Word Immediate. This will clear the lower (right-hand) bits (starting at bit 31 going left) of rA, and place result in rD.
Let's say we have a value in r5 and that value is 0x1AAB000F. This in binary is...
0001 1010 1010 1011 0000 0000 0000 1111
If we execute a Clear Right instruction of "clrrwi r5, r5, 22", we will need to zero-out the lower/right-hand 22 bits of r5. The 10 upper/left-hand bits are left alone. r5's result in binary would now be..
0001 1010 1000 0000 0000 0000 0000 0000
The bits in blue were the bits that were cleared by the instruction. Convert the result back to hex, and r5 is now 0x1A800000. Notice how the 3rd digit of r5 went from A to 8. This is because bits 8 thru 11 went from 1010 (0xA) to 1000 (0x8).
Chapter 3: Basic Bit Shifting
Clearing was easy enough, let's dive in bit shifting. Instead of zero-ing out bits, we will 'move/shift' them. We can shift them either left or right.
Here are two basic shifting instructions...
slwi rD, rA, XX
srwi rD, rA, XX
The XX value designates how many bits to shift by, XX can be anything from 1 to 31. There are also these shifting instructions..
slw rD, rA, rB
srw rD, rA, rB
It's the same thing as before but the amount to shift is in a source register instead of an immediate value.
Let's go over the execution of a srwi instruction. Let's say r5 has a value of 0x0000FE1F. This in binary is...
0000 0000 0000 0000 1111 1110 0001 1111
Take note of the purple '1'. If we execute the instruction of "srwi r5, r5, 15", r5's result in binary is...
0000 0000 0000 0000 0000 0000 0000 0001
r5's result is 0x00000001. Notice where the purple '1' is at now. It was moved/shifted to the right by 15 bits. For rightward shifts, whatever bits that went beyond bit 31 are thrown away. Same rule applies if you were shifting bits toward the left and they went beyond bit 0. Notice the bits in blue. These zero bits were placed in because bits on the lefthand side went missing due to the rightward shift. You can call the zero bits the "replacement bits". For slw, slwi, srw, and srwi, the replacement bits are always zero.
Let's take a look an at example shifting left...
Example: "slwi r6, r6, 2" r6 starts off as 0x80000007. Binary form is...
1000 0000 0000 0000 0000 0000 0000 0111
After instruction is executed. The result in binary is...
0000 0000 0000 0000 0000 0000 0001 1100
Hex result is 0x0000001C. The red 1 is thrown away because it was shifted beyond bit 0. The three green 1's are shifted accordingly, and the blue bits are the replacement bits.
There's still another shifting instruction that is available to use. It is however not a simplified mnemonic of rlwinm, but it should be talked about here. It is a standard-mnemonic instruction.
srawi rD, rX, rXX
This is Shift Right Algebraic Word Immediate. It operates just like srwi, however when the register bits are shifted to the right, bit 0's value (before the shift) will be copied and used as the replacement bits into any new bit slots that were opened up on the left hand side due to the rightward shift. Confused? Let's over go an example:
srawi r0, r3, 3
Pretend r3 starts off as 0xFFFFFFF0.
r3 in binary is...
1111 1111 1111 1111 1111 1111 1111 0000
Take note of bit 0 in green. It's value will be use as the 'copy value' for new bit slots that will be opened up by the rightward shift.
Now let's say we execute the instruction. r3 in binary form is...
1111 1111 1111 1111 1111 1111 1111 1110
Notice bits 0 thru 3 are in orange. These bits are the replacement bits and are copies of bit 0's value (what bit 0 was before the rightward shift).
r3 as a result = 0xFFFFFFFE.
Chapter 4: Multiply/Divide Conversions
Shifting left/right can be used as a tool for multiplying and dividing if and only if the multiplier/divisor is a power of 2. It's suggested you use the shifting instructions instead of the multiply/divide equivalents as this boosts performance of Broadway.
Multiply Conversion (XXX is a power of 2):
mulli rD, rA, XXX = slwi rD, rA, BB
Divide (unsigned/logical) Conversion (rB's value is a power of 2):
divwu rD, rA, rB = srwi rD, rA, BB
Divide (signed) Conversion (rB's value is a power of 2):
divw rD, rA, rB = srawi rD, rA, BB
XXX/rB conversion to BB formula
2 = 1
4 = 2
8 = 3
16 = 4
32 = 5
64 = 6
128 = 7
256 = 8
etc etc...
Chapter 5: Disassembling rlw Type Standard Mnemonics... (Pt 1: rlwinm and rlwnm)
Dolphin displays all bit-rotating instructions in their standard mnemonic form. So does all PPC Disassemblers. This can be frustrating as some bit clearing/shifting instructions are easier to read in their simplified mnemonic form.
rlwinm r0, r5, 3, 0, 28
At this point, you are probably thinking what the hell the values 3, 0, and 28 are used for.
The 3 is called the 'SH'. It's the amount of digits to rotate to the left. Rotating is DIFFERENT than shifting. You still shift to the left, but whatever bits that are shifted leftward past bit 0, are cycled back and looped back into the lower/righthand bits, instead of being thrown away. Thus, bits are rotated in a counter-clockwise manner. For example if you rotated a value by 1 bit. Bit 0 now goes to Bit 31. Bit 1 to 0. Bit 2 to 1, etc etc.
Here's a picture of shifting left vs rotating left~
The 0 in our rlwinm instruction is the 'MB' (Mask beginning), and the 28 is the 'ME' (Mask end). The MB and ME creates a string of 1's aka a Mask. The MB is the bit where the mask (string of 1's) begins, the ME is the bit where the mask (string of 1's) ends.
So an MB of 0 with an ME of 28 means that bits 0 thru 28 are all set to 1, and all other bits (29, 30, 31) are set to 0. In binary form our Mask is this...
1111 1111 1111 1111 1111 1111 1111 1000
In hex form, that value would is 0xFFFFFFF8. Fyi: Instead of using decimal values to show MB/ME in the rlwinm instruction, you can also show the Mask in full Hex form like this...
rlwinm r0, r5, 3, 0xFFFFFFF8
Let's say we have the value 0x81234567 in r5, and we executed the rlwinm from above. What we do first is ROTATE all the bits of r5 leftward/counter-clockwise by 3.
Before rotation (each quad group of bits are color coded to help you visual the rotation)~
1000 0001 0010 0011 0100 0101 0110 0111
After rotation~
0000 1001 0001 1010 0010 1011 0011 1100
As you can see bit 0 is now bit 29! So the result in hex is now 0x091A2B3C. We take this current temporary rotated result, and logically AND it with our Mask (0xFFFFFFF8).
The final result (r0) is 0x091A2B38. For the rlwnm instruction (Rotate Left Word Then And w/ Mask) it's the same procedure except instead of using an immediate value for the initial rotation, that value resides in a second source register.
Chapter 6: Disassembling rlw Type Standard Mnemonics... (Pt 2: rlwimi)
The 3rd 'rlw' type standard mnemonic is rlwimi. Rotate Left Word Immediate Then Mask Insert. This still involves rotating the bits but there is no logical AND'ing.
This instruction is going to be a bit difficult to explain as it even took me a while to figure this out and there is no really good information anywhere on the net explaining this instruction in a 'noob sense'. Let's look at an example instruction...
rlwimi r6, r4, 2, 0, 29
So you should already know that we will rotate the contents of r4 by 2 bits. Let's say BEFORE the rotation, r4 is this...
0x4455AA01
In binary that is....
0100 0100 0101 0101 1010 1010 0000 0001
After rotation, r4 is now...
0001 0001 0101 0110 1010 1000 0000 0101
Which in hex is 0x1156A805. We know that the mask (0, 29) is 0xFFFFFFFC. With the rlwimi instruction, there is NO logical ANDing. What we need to do is look at what is CURRENTLY in r6 (the Destination Register).
Let's say r6 is 0x0000FFFF. Binary form is...
0000 0000 0000 0000 1111 1111 1111 1111
With our 0xFFFFFFFC mask, if a bit in the mask is 1, then whatever bits are in our rotated r4 register will replace whatever bits are in r6. If a bit in the mask is 0, then those bits in r6 are preserved (not replaced by bits in r4!)
With all of that being said, that means r6's bits 30 & 31 do NOT change. And the bits 0 thru 29 of our rotated r4 data replaces bits 0 thru 29 of r6. r6 will thus equal (in binary)..
0001 0001 0101 0110 1010 1000 0000 0111
Which in hex is 0x1156A807. The bits in BLUE are the blues that were used/replaced by the rotated r4 value. The bits in RED were the bits that were preserved (not replaced).
If you have a rlwimi instruction where the destination register is same as the source register (let's say r4). Then the Mask comparison is done w/ old r4 (BEFORE the initial rotation).
Chapter 7: Simplified Mnemonic List
Name = Simplified Menomnic = Standard Menomic
Extract & Left Justify Word Immediate = extlwi rD, rA, n, b (n > 0) = rlwinm rD, rA, b, 0, n - 1
Extract & Right Justify Word Immediate = extrwi rD, rA, n, b (n > 0) = rlwinm rD, rA, b + n, 32 - n, 31
Insert From Left Word Immediate = inslwi rD, rA, n, b (n > 0) = rlwimi rD, rA, 32 - b, b , (b + n) - 1
Insert From Right Word Immediate = insrwi rD, rA, n , b (n > 0) = rlwimi rD, rA, 32 - (b + n), b, (b + n) - 1
Rotate Left Word Immediate = rotlwi rD, rA, n = rlwinm rD, rA, n, 0, 31
Rotate Right Word Immediate = rotrwi, rD, rA, n = rlwinm, rD, rA, 32 - n, 0, 31
Rotate Word Left = rotlw rD, rA, rB = rlwnm rD, rA, rB, 0, 31
Shift Left Word Immediate = slwi rD, rA, n (n < 32) = rlwinm rD, rA, n, 0, 31 -n
Shift Right Word Immediate = srwi rD, rA, n (n < 32) = rlwinm rD, rA, 32 - n, n, 31
Clear Left Word Immediate = clrlwi rD, rA, n (n < 32) = rlwinm rD, rA, 0, n, 31
Clear Right Word Immediate = clrrwi rD, rA, n (n < 32) = rlwinm rD, rA, 0, 0, 31 - n
Clear Left And Shift Left Word Immediate = clrlslwi rD, rA, b, n, (n ≤ b ≤ 31) = rlwinm rD, rA, n, b - n, 31 - n
• Extract — Select a field of n bits starting at bit position b in the source register; left or right justify
this field in the target register; clear all other bits of the target register.
• Insert — Select a left- or right-justified field of n bits in the source register; insert this field starting
at bit position b of the target register; leave other bits of the target register unchanged.
• Rotate — Rotate the contents of a register right or left n bits without masking.
• Shift — Shift the contents of a register right or left n bits, clearing vacated bits (logical shift).
• Clear — Clear the leftmost or rightmost n bits of a register.
• Clear left and shift left — Clear the leftmost b bits of a register, then shift the register left by n bits. This operation can be used to scale a (known non-negative) array index by the width of an element.
Chapter 8: Important Note regarding Dolphin
Dolphin displays a hexadecimal mask in parenthesis for every rotate instruction in it's Code View. However, it is not the typical hex mask value you would use for anding (rlwinm) or masking (rlwimi). Dolphin's mask is a display of the bits before the rotation that would make it into the mask.
Chapter 9: More Examples
To clear a specific bit (i.e. clearing just bit 21 of r3)
rlwinm r3, r3, 0, 22, 20 #mask of 0xFFFFFBFF
To overwrite a single bit of the Destination Register using what is in the Source Register. (r3's bit 16 value overwrites r12's bit 16 value
rlwimi r12, r3, 0, 16, 16 #mask of 0x00008000
Regardless of what value bits 30 & 31 were beforehand. Flip them, and re-insert. Register in question will be r4 with using r0 as a scrap register
not r0, r4
rlwimi r4, r0, 0, 30, 31
To swap the upper and lower 16 bits (of r3)
rlwinm r3, r3, 16, 0, 31 #mask of 0xFFFFFFFF
simplified mnemonic: rotlwi r3, r3, 16 or rotrwi r3, r3, 16
To take a byte and copy it to another place in the same register (r3 used for example)
0x12345678 --> 0x12347878
rlwimi r3, r3, 8, 0x0000FF00
simplified mnemonic: insrwi r3, r3, 8, 16
To extract a byte and cut-paste it to another place in the register and all other data in the register is wiped
0x12345678 --> 0x00000034
rlwinm r3, r3, 16, 24, 31 #mask of 0x000000FF
simplified mnemonic: extrwi r3, r3, 8, 8
NOTE: PowerPC does not come with clrlw/clrrw (clear left word / clear right word) instructions.
To achieve a 'clear left word' (ex: clrlw rD, rA, rB), execute these two instructions...
slw rD, rA, rB
srw rD, rA (rD from the slw), rB
For a 'clear right word', you do the opposite...
srw rD, rA, rB
slw rD, rA (rD from the srw), rB
And that's it! Still confused? Don't be afraid to ask questions!
Credits to NXP (AN2491 pdf file) for Chapter 7 info.
|
|
|
Permanent Bullet Bill Particle Effect [Landon] |
Posted by: Vega - 08-27-2019, 08:26 PM - Forum: Offline Non-Item
- No Replies
|
|
Permanent Bullet Bill Particle Effect [Landon]
Your character will constantly puff smoke out. If using offline, it effects the CPUs as well. If using online, the effects only show on your screen.
NTSC-U
C2699670 00000002
38000001 981E007E
60000000 00000000
PAL
C269DAF8 00000002
38000001 981E007E
60000000 00000000
NTSC-J
C269D164 00000002
38000001 981E007E
60000000 00000000
NTSC-K
C268BEA0 00000002
38000001 981E007E
60000000 00000000
Source:
li r0, 1
stb r0, 0x007E (r30)
Code creator: Landon
|
|
|
Globe Control [Vega] |
Posted by: Vega - 08-26-2019, 05:57 PM - Forum: Online Non-Item
- Replies (3)
|
|
Globe Control [Vega]
Video - https://www.youtube.com/watch?v=G8KSd_2peMk
This code will allow you to use the motion of your analog stick on your controller (or the motion of your Wii Wheel) to direct the spin of the globe at the WiFi main menu. The further the motion of the stick/wheel, the faster the globe will spin. Player1/Port1 only.
NTSC-U
04748A74 60000000
04748A88 60000000
C2748AAC 0000000E
3C60809C 80638F4C
E1830034 118C64A0
E1BE00CC 3D404333
9141FFFC C161FFFC
11405850 11AD602A
108D5840 4185002C
108D5040 4184002C
108D58C0 41850014
108D50C0 40840020
11AD5C60 48000018
11AD5460 48000010
FDA05090 48000008
FDA05890 F1BE00CC
C03E00CC 00000000
PAL
0474DFB4 60000000
0474DFC8 60000000
C274DFEC 0000000E
3C60809C 8063D70C
E1830034 118C64A0
E1BE00CC 3D404333
9141FFFC C161FFFC
11405850 11AD602A
108D5840 4185002C
108D5040 4184002C
108D58C0 41850014
108D50C0 40840020
11AD5C60 48000018
11AD5460 48000010
FDA05090 48000008
FDA05890 F1BE00CC
C03E00CC 00000000
NTSC-J
0474D620 60000000
0474D634 60000000
C274D658 0000000E
3C60809C 8063C76C
E1830034 118C64A0
E1BE00CC 3D404333
9141FFFC C161FFFC
11405850 11AD602A
108D5840 4185002C
108D5040 4184002C
108D58C0 41850014
108D50C0 40840020
11AD5C60 48000018
11AD5460 48000010
FDA05090 48000008
FDA05890 F1BE00CC
C03E00CC 00000000
NTSC-K
0473C374 60000000
0473C388 60000000
C273C3AC 0000000E
3C60809B 8063BD4C
E1830034 118C64A0
E1BE00CC 3D404333
9141FFFC C161FFFC
11405850 11AD602A
108D5840 4185002C
108D5040 4184002C
108D58C0 41850014
108D50C0 40840020
11AD5C60 48000018
11AD5460 48000010
FDA05090 48000008
FDA05890 F1BE00CC
C03E00CC 00000000
Code creator: Vega
Code credits: Seeky (inputdata.h), Atlas (Change Earth Rotation)
#Sources
#RAM Writes (nops)
#Addresses
#NTSC-U 80748A74 80748A88
#PAL 8074DFB4 8074DFC8
#NTSC-J 8074D620 8074D634
#NTSC-K 8073C374 8073C388
#1st RAM Write changes stfs f1, 0x00D0 (r3) to a nop
#2nd RAM Write changes stfs f0, 0x00D0 (r3) to a nop
#These are done to prevent the default lateral nonstop spin of the globe.
#Start Assembly (C2)
#Address Ports
#NTSC-U = 80748AAC
#PAL = 8074DFEC
#NTSC-J = 8074D658
#NTSC-K = 8073C3AC
#Region Compilation Setting
.set region, '' #Fill in E, P, J, or K within the quotes for your region when Compiling! Lowercase letters can also be used.
#Region Depedent Statements
.if (region == 'E' || region == 'e') # RMCE
.set inputbase, 0x809B8F4C
.elseif (region == 'P' || region == 'p') # RMCP
.set inputbase, 0x809BD70C
.elseif (region == 'J' || region == 'j') # RMCJ
.set inputbase, 0x809BC76C
.elseif (region == 'K' || region == 'k') # RMCK
.set inputbase, 0x809ABD4C
.else # Invalid Region
.err
.endif
#Register Notes
#r3 is safe for use
#r30 + 0xCC = longitude spot in memory
#r30 + 0xD0 = latitude spot in memory
#f10 = -179 (both ps's)
#f11 = 179 (both ps's)
#f12 ps0 = stick X initially when loaded, then becomes stick Y
#f12 ps1 = stick Y initially when loaded, then becomes stick X
#f13 ps0 = longitude
#f13 ps1 = latitude
#Load Pointer from InputBase
lis r3, inputbase@ha #ha to account for 16-bit offset signage
lwz r3, inputbase@l (r3)
#Load Stick X and Stick Y floats as Paired Singles
psq_l f12, 0x0034 (r3), 0, 0
#Flip the paired segments so Stick X effects Lat and Stick Y effects Long
ps_merge10 f12, f12, f12
#Load Longitude & Latitude from Memory
psq_l f13, 0x00CC (r30), 0, 0
#Set 179.0 as a constant in f11, Set -179 as a constant in f10
lis r10, 0x4333 #179
stw r10, -0x4 (sp)
lfs f11, -0x4 (sp) #place 179 in both ps segments of the FPR
ps_neg f10, f11 #place -179 in both ps segments of the FPR #Can't use fneg because it will only change ps0 of f10. We need both ps's of f10 with -179.
#Adjust the Longitude & Latitude simultaneously depending on their respective Stick X and Stick Y values
ps_add f13, f13, f12
#
#Check Longitude (ps0 f13) against 179
ps_cmpo0 cr1, f13, f11
bgt- cr1, longhilo
#Check Longitude (ps0 f13) against -179
ps_cmpo0 cr1, f13, f10
blt- cr1, longlohi
#Check Latitude (ps1 f13) against 179
ps_cmpo1 cr1, f13, f11
bgt- cr1, lathilo
#Check Latitude (ps1 f13) against -179
ps_cmpo1 cr1, f13, f10
bge- cr1, update #No flipping on long or lat needed, simply update values
#
#latlohi
ps_merge01 f13, f13, f11 #keep lat unchanged, change long from -180 to 179
b update
lathilo:
ps_merge01 f13, f13, f10 #keep lat unchanged, change long from 180 to -179
b update
longhilo:
fmr f13, f10 #change long from 180 to -179; fmr only effects ps0 so lat remains unaffected by this instruction, yay.
b update
longlohi:
fmr f13, f11 #change long from -180 to 179; fmr only effects ps0 so lat remains unaffected by this instruction, yay.
#Update the Longitude & Latitude in memory
update:
psq_st f13, 0x00CC (r30), 0, 0
#Default Instruction
lfs f1, 0x00CC (r30)
|
|
|
No Globe At WiFi Main Menu [Vega] |
Posted by: Vega - 08-26-2019, 05:54 PM - Forum: Online Non-Item
- No Replies
|
|
No Globe At WiFi Main Menu [Vega]
NTSC-U
04748AA8 60000000
PAL
0474DFE8 60000000
NTSC-J
0474D654 60000000
NTSC-K
0473C3A8 60000000
'Source'
A bl to a required function call is nop'd.
Code creator: Vega
Code credits: Atlas (Change Earth Rotation Speed)
|
|
|
Opposite Globe Rotation [Vega] |
Posted by: Vega - 08-26-2019, 05:53 PM - Forum: Incomplete & Outdated Codes
- No Replies
|
|
Opposite Globe Rotation [Vega]
NOTE: Outdated by Atlas's Change Earth Rotation Speed Code
At the WiFi Main Menu, the globe will rotate the opposite direction.
NTSC-U
04748A9C 60000000
PAL
0474DFDC 60000000
NTSC-J
0474D648 60000000
NTSC-K
0473C39C 60000000
'Source'
fneg f1, f1 is nop'd
Code creator: Vega
Code credits: Atlas (Change Earth Rotation Speed)
|
|
|
Globe Doesn't Rotate [Vega] |
Posted by: Vega - 08-26-2019, 05:52 PM - Forum: Incomplete & Outdated Codes
- No Replies
|
|
Globe Doesn't Rotate [Vega]
NOTE: Outdated by Atlas's Change Earth Rotation Speed Code
NTSC-U
04748AA4 FC210828
PAL
0474DFE4 FC210828
NTSC-J
0474D650 FC210828
NTSC-K
0473C3A4 FC210828
'Source'
fmuls f1, f1, f0 changed to fsub f1, f1, f1
Code creator: Vega
Code credits: Atlas (Change Earth Rotation Speed)
|
|
|
|