Mario Kart Wii Gecko Codes, Cheats, & Hacks
Fun Fact about Broadway - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Hacks/Modding (https://mariokartwii.com/forumdisplay.php?fid=14)
+--- Forum: Coding & Hacking General Discussion (https://mariokartwii.com/forumdisplay.php?fid=23)
+--- Thread: Fun Fact about Broadway (/showthread.php?tid=1974)



Fun Fact about Broadway - Vega - 06-28-2022

Fun Fact about Broadway

Every Broadway processor in your Wii Console contains an 88-bit unique identifier known as the Chip ID. It is NOT the processor version (aka PVR). No two Broadway processors can possess the same Chip ID.

Due to being 88-bits in size, you need to access 3 Special Purpose Registers to retrieve the Chip ID. What's odd is that the Chip ID is mentioned nowhere in the Broadway manual. Not only that, Broadway manual doesn't even list the Chip ID's SPR numbers as being valid SPR numbers.

Since no two Broadway processors can have the same Chip ID, this value could be used as a part of a moderation/ban tool for future implementations of an MKWii online service.

The SPR's containing the Chip ID are 925, 926, 927. The names of the SPRs are ECID1, ECID2, and ECID3. You cannot write to these registers. Attempting to do so will not change the Chip ID plus an exception will occur.

Using SwareJonge's Draw-Text Code (based on Star/Rii's original Draw-Text code), I mocked up a simple code so you can see what your Chip ID is. Obviously, this won't work on Dolphin Emulator. Also, the processor on the Wii U is not a Broadway processor. It is still a PPC processor, but it is called Espresso. It is possible that Espresso has a unique Chip ID of some sorts and store it's Chip ID values to the same SPRs. If somebody can test this on the Wii U and let me know how it works, I would appreciate it. Anyway, here's a code to do that (NTSC-U, too lazy to port this).

NTSC-U
C2009640 00000011
9421FF80 BC610008
3FE08002 806D9FA0
3CA0802A 80A5307C
A0850004 A0A50008
63EC1D90 7D8903A6
4E800421 38600006
388000DC 38A00001
7CFDE2A6 54E7023E
7D1EE2A6 7D3FE2A6
48000015 25303858
20253038 58202530
38580000 7CC802A6
63EC1DF0 7D8903A6
4E800421 63EC1DD0
7D8903A6 4E800421
B8610008 38210080
81830000 00000000

Code:
#Address (NTSC-U) = 80009640

#Push Stack
stwu sp, -0x80 (sp)
stmw r3, 0x8 (sp)

#Set r31 for Direct Print Calling
lis r31, 0x8002

#Get current XFB (alternates between two FB's)
lwz r3, -0x6060 (r13)

#Get width and height for XFB
lis r5, 0x802A #Memory constant
lwz r5, 0x307C (r5) #Load XFB Width Height Pointer
lhz r4, 0x4 (r5)
lhz r5, 0x8 (r5)

#Change XFB for Direct Print (r3 = FB, r4 = Width, r5 = Height)
ori r12, r31, 0x1D90
mtctr r12
bctrl

#Setup Args for Direct Print
li r3, 6
li r4, 0xDC
li r5, 1

#Grab Chip IDs
#Chip ID is a 88-bit identifier
mfspr r7, 925
rlwinm r7, r7, 0, 8, 31 #CIDH
mfspr r8, 926 #CIDM
mfspr r9, 927 #CIDL

bl our_text
.string "%08X %08X %08X"
.align 2
our_text:
mflr r6

#Print to Screen
ori r12, r31, 0x1DF0
mtctr r12
bctrl

#Store Cache
ori r12, r31, 0x1DD0
mtctr r12
bctrl

#Pop Stack
lmw r3, 0x8 (sp)
addi sp, sp, 0x80

#Default Instruction
lwz r12, 0 (r3)