Mario Kart 64 Hacking General Discussion « 1 ... 13 14 15 16 17 »
Users browsing this thread: 2 Guest(s)

(29-11-2016, 05:33 PM)queueRAM Wrote:
(29-11-2016, 08:02 AM)Nick Nelson Wrote:
I thought I would post this here. I was able to use the notes from queueRAM and shygoo to help me with this project, so I just wanted to thank them!


Thank you for posting this - it is absolutely beautiful! I really appreciate that you posted the source as well - very nice GUI and HUD makes every well polished. I think I'm going to spend some time studying your NEAT implementation and the neural network paper you cited. Was there anything that you learned about MK64 objects structures or level data along the way that would be useful to share here as well?


Maybe not a whole lot of stuff, but I did spend about 55 hours messing with the RAM. So give me some time and I'll go through my notes and post them.

Absolute insanity. I love it! Very nice work.

Since swapping around courses in the main course table wasn't working, I decided to dig into the code to see if it handled anything special on a per-course basis. I tracked down every instance where the course ID (0x800DC5A0) is referenced and documented them. There ended up being 170+ of them, so it's kind of a lot to digest. I'm attaching an armips assembly file which documents each of them and any tables they use. Some are data tables, some are jump tables, some are just basic branch switch statements.

Also, I confirmed that course ID = 0x14 is the Award Ceremony. Many of the tables contain 21 entries and special code exists for 0x14 and non-0x14 cases.

Since there are so many references, I'm going to need help tracking down what they are all used for. Next steps are taking a look at when this code is called at run-time, figuring out how the dynamically populated arrays are generated, and digging into the specific loading functions.

In addition to the main course table @ 802B8D80/122390, here are some of the other course-related tables (but all of the course-specific code is relevant):
Code:
​800DCBB4: table of array pointers (Mario Raceway uses 0x800DCB34, all others use 0x800DCAF4)
.org 0x800DCBB4 // 0DD7B4
.dw 0x800DCB34, 0x800DCAF4, 0x800DCAF4, 0x800DCAF4 // 00
.dw 0x800DCAF4, 0x800DCAF4, 0x800DCAF4, 0x800DCAF4 // 04
.dw 0x800DCAF4, 0x800DCAF4, 0x800DCAF4, 0x800DCAF4 // 08
.dw 0x800DCAF4, 0x800DCAF4, 0x800DCAF4, 0x800DCAF4 // 0C
.dw 0x800DCAF4, 0x800DCAF4, 0x800DCAF4, 0x800DCAF4 // 10
.dw 0x800DCAF4                                     // 14
// the two arrays:
.org 0x800DCAF4 // 0DD6F4
.dh 0x0014, 0x0005, 0x000A, 0x000F, 0x0014, 0x0019, 0x001E, 0x0023
.dh 0x001E, 0x0019, 0x0032, 0x004B, 0x0064, 0x007D, 0x0096, 0x00AF
.dh 0x0028, 0x001E, 0x003C, 0x005A, 0x0078, 0x0096, 0x00B4, 0x00D2
.dh 0x0032, 0x0028, 0x0050, 0x0078, 0x00A0, 0x00C8, 0x00F0, 0x0118
.org 0x800DCB34 // 0DD734
.dh 0x0014, 0x0005, 0x000A, 0x000F, 0x0014, 0x0019, 0x001E, 0x0023
.dh 0x001E, 0x0019, 0x002D, 0x0041, 0x005A, 0x0073, 0x008C, 0x00A5
.dh 0x0028, 0x0003, 0x0006, 0x0010, 0x002E, 0x0031, 0x003B, 0x0059
.dh 0x0032, 0x001E, 0x003C, 0x003F, 0x0049, 0x004E, 0x006C, 0x008A

Code:
​// 8000ACAC: table of halfwords at 800DCA20, gets multiplied by another number
.org 0x800DCA20 // 0DD620
.dh 0x0030, 0x0035, 0x0035, 0x0035 // 00
.dh 0x0035, 0x0035, 0x0035, 0x0035 // 04
.dh 0x0030, 0x0030, 0x0028, 0x0035 // 08
.dh 0x0035, 0x0026, 0x0035, 0x0035 // 0C
.dh 0x0035, 0x0035, 0x0035, 0x0028 // 10
.dh 0x0035                         // 14

Code:
​// 8000DD78: table of structs arrays at 800DCC08
// struct is 0x18 bytes, array of 7 per course = 168 bytes per course
// typedef struct {
//    u16 h00;
//    u16 h02;
//    float f04;
//    float f08;
//    float f0C;
//    float f10; // not sure where used
//      ??   14  // might be unused?
// } some_struct;
// some_struct data[COURSE_COUNT][7];
.org 0x800DCC08 // 0DD808
// 00: Mario Raceway
.dh 0x0028, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0109, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x011D, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x01A4, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 01: Choco Mountain
.dh 0x008C, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00A5, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x014A, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0226, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0253, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 02: Bowser's Castle
.dh 0x0032, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0096, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00C8, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0104, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x01B3, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 03: Banshee Boardwalk
.dh 0x006E, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00BE, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00FA, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x01DB, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0262, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 04: Yoshi Valley
.dh 0x0000, 0x0000 :: .float 0.8333333, -1533.0, -682.0, -103.0, 0.0
.dh 0x000A, 0x0000 :: .float 0.8333333, -1565.0, -619.0, -109.0, 0.0
.dh 0x0014, 0x0000 :: .float 0.8333333, -1529.0, -579.0, -109.0, 0.0
.dh 0x001E, 0x0000 :: .float 0.8333333, -1588.0, -534.0, -106.0, 0.0
.dh 0x0028, 0x0000 :: .float 0.8333333, -1598.0, -207.0, -105.0, 0.0
.dh 0x0032, 0x0000 :: .float 0.8333333, -1646.0, -147.0,  -93.0, 0.0
.dh 0x003C, 0x0000 :: .float 0.8333333, -2532.0, -445.0,  -90.0, 0.0
// 05: Frappe Snowland
.dh 0x0032, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0096, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0122, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x015E, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 06: Koopa Troopa Beach
.dh 0x003C, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0078, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00C8, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0118, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x01B3, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 07: Royal Raceway
.dh 0x0032, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0128, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0190, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x02EA, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 08: Luigi Raceway
.dh 0x0032, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00C8, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0131, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x01B8, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0203, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 09: Moo Moo Farm
.dh 0x0032, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x008C, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00E1, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x013C, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x01B2, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 0A: Toad's Turnpike
.dh 0x0032, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0096, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00C8, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00FA, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 0B: Kalimari Desert
.dh 0x0032, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x008A, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0118, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0194, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x01FE, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 0C: Sherbet Land
.dh 0x0032, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0096, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00C8, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00FA, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 0D: Rainbow Road
.dh 0x0032, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0096, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00C8, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00FA, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 0E: Wario Stadium
.dh 0x0032, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0096, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00C8, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00FA, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 0F: Block Fort
.dh 0x0014, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0028, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x003C, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0050, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0078, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x008C, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
// 10: Skyscraper
.dh 0x0014, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0028, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x003C, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0050, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0078, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x008C, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
// 11: Double Deck
.dh 0x0014, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0028, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x003C, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0050, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0078, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x008C, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
// 12: DK's Jungle Parkway
.dh 0x0032, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0096, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00BE, 0x0001 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x00FA, 0x0003 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
.dh 0x0000, 0x0000 :: .float 0.8333333, 0.0, 0.0, 0.0, 0.0
// 13: Big Donut
.dh 0x0014, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0028, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x003C, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0050, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0078, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x008C, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
// 14: Award Ceremony
.dh 0x0003, 0x0005 :: .float 1.25, 0.0, 0.0, 0.0, 0.0
.dh 0x0028, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x003C, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0050, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0064, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x0078, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0
.dh 0x008C, 0x0000 :: .float 1.0, 0.0, 0.0, 0.0, 0.0

Code:
​// table of halfwords at 800DD9D0 (8 per course)
.org 0x800DD9D0 // 0DE5D0
.dh 0x0258, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 00: Mario Raceway
.dh 0x02BC, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 01: Choco Mountain
.dh 0x030C, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 02: Bowser's Castle
.dh 0x02EE, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 03: Banshee Boardwalk
.dh 0x02B2, 0x02A8, 0x02B2, 0x0320, 0x0001, 0x0000, 0x0000, 0x0000 // 04: Yoshi Valley
.dh 0x02EE, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 05: Frappe Snowland
.dh 0x02BC, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 06: Koopa Troopa Beach
.dh 0x03E8, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 07: Royal Raceway
.dh 0x02DA, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 08: Luigi Raceway
.dh 0x0230, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 09: Moo Moo Farm
.dh 0x03E8, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 0A: Toad's Turnpike
.dh 0x02BC, 0x0001, 0x0001, 0x0001, 0x0226, 0x0000, 0x0000, 0x0000 // 0B: Kalimari Desert
.dh 0x02BC, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 0C: Sherbet Land
.dh 0x076C, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 0D: Rainbow Road
.dh 0x0640, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 0E: Wario Stadium
.dh 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 0F: Block Fort
.dh 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 10: Skyscraper
.dh 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 11: Double Deck
.dh 0x0370, 0x0001, 0x0001, 0x0001, 0x01F4, 0x0000, 0x0000, 0x0000 // 12: DK's Jungle Parkway
.dh 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000 // 13: Big Donut
.dh 0x01F4, 0x01F4, 0x01F4, 0x01F4, 0x0001, 0x0000, 0x0000, 0x0000 // 14: Award Ceremony

Code:
​// table of floats at 800DCAA0
.org 0x800DCAA0 // 0DD6A0
.float 0.3, 0.3, 0.2, 0.4 // 00: 0x3E99999A, 0x3E99999A, 0x3E4CCCCD, 0x3ECCCCCD
.float 0.0, 0.3, 0.5, 0.4 // 04: 0x00000000, 0x3E99999A, 0x3F000000, 0x3ECCCCCD
.float 0.7, 0.5, 0.5, 0.3 // 08: 0x3F333333, 0x3F000000, 0x3F000000, 0x3E99999A
.float 0.3, 0.4, 0.6, 0.1 // 0C: 0x3E99999A, 0x3ECCCCCD, 0x3F19999A, 0x3DCCCCCD
.float 0.5, 0.5, 0.1, 0.5 // 10: 0x3F000000, 0x3F000000, 0x3DCCCCCD, 0x3F000000
.float 0.5                // 14: 0x3F000000

Code:
​// float table @ 800DCA4C
.org 0x800DCA4C // 0DD64C
.float 50.0, 35.0, 35.0, 40.0 // 00: 0x42480000, 0x420C0000, 0x420C0000, 0x42200000
.float 35.0, 50.0, 50.0, 50.0 // 04: 0x420C0000, 0x42480000, 0x42480000, 0x42480000
.float 50.0, 50.0, 50.0, 50.0 // 08: 0x42480000, 0x42480000, 0x42480000, 0x42480000
.float 50.0, 50.0, 50.0, -1.0 // 0C: 0x42480000, 0x42480000, 0x42480000, 0xBF800000
.float -1.0, -1.0, 40.0, -1.0 // 10: 0xBF800000, 0xBF800000, 0x42200000, 0xBF800000
.float 40.0                   // 14: 0x42200000

Code:
​// byte table @ 800E7664
.org 0x800E7664 // 0E8264
.db 0x01, 0x01, 0x02, 0x03 // 00
.db 0x03, 0x01, 0x00, 0x02 // 04
.db 0x00, 0x00, 0x01, 0x00 // 08
.db 0x02, 0x03, 0x02, 0x04 // 0C
.db 0x04, 0x04, 0x03, 0x04 // 10

Code:
​// course ordering in cups table @ 800F2BB4
.org 0x800F2BB4 // 0F37B4
.dh 0x0008, 0x0009, 0x0006, 0x000B // LR, MMF, KTB, KD
.dh 0x000A, 0x0005, 0x0001, 0x0000 // TT, FS, CM, MR
.dh 0x000E, 0x000C, 0x0007, 0x0002 // WS, SL, RR, BC
.dh 0x0012, 0x0004, 0x0003, 0x000D // DK, YV, BB, RRd
.dh 0x0013, 0x000F, 0x0011, 0x0010 // BD, BF, DD, SS

Code:
​// table @ 802B8AD0
.org 0x802B8AD0 // 1220E0
.dh 0x0080, 0x10B8, 0x17F8, 0x00D8, 0x1BE8, 0x7DF8 // 00
.dh 0x00FF, 0x00FF, 0x00FF, 0x00FF, 0x00FF, 0x00FF // 01
.dh 0x0030, 0x0608, 0xC178, 0x0000, 0x0000, 0x0000 // 02
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 03
.dh 0x0071, 0x0046, 0x00FF, 0x00FF, 0x00B8, 0x0063 // 04
.dh 0x001C, 0x000B, 0x005A, 0x0000, 0x0063, 0x00A4 // 05
.dh 0x0030, 0x0698, 0xD378, 0x00D8, 0x1BE8, 0x7DF8 // 06
.dh 0x00EE, 0x0090, 0x00FF, 0x00FF, 0x00E0, 0x00F0 // 07
.dh 0x0080, 0x10B8, 0x17F8, 0x00D8, 0x1BE8, 0x7DF8 // 08
.dh 0x0000, 0x0012, 0x00FF, 0x00C5, 0x00D3, 0x00FF // 09
.dh 0x0000, 0x0002, 0x005E, 0x00D1, 0x0041, 0x0017 // 0A
.dh 0x00C3, 0x00E7, 0x00FF, 0x00FF, 0x00C0, 0x0000 // 0B
.dh 0x0080, 0x10B8, 0x17F8, 0x00D8, 0x1BE8, 0x7DF8 // 0C
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 0D
.dh 0x0014, 0x001E, 0x0038, 0x0028, 0x003C, 0x006E // 0E
.dh 0x0080, 0x10B8, 0x17F8, 0x00D8, 0x1BE8, 0x7DF8 // 0F
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 10
.dh 0x0071, 0x0046, 0x00FF, 0x00FF, 0x00B8, 0x0063 // 11
.dh 0x00FF, 0x00AE, 0x0000, 0x00FF, 0x00E5, 0x007C // 12
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 13
// table @ 802B8BCC
.org 0x802B8BCC // 1221DC
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 00
.dh 0x00FF, 0x00FF, 0x00FF, 0x00FF, 0x00FF, 0x00FF // 01
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 02
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 03
.dh 0x005F, 0x0028, 0x000F, 0x0000, 0x0000, 0x0000 // 04
.dh 0x0000, 0x0063, 0x00A4, 0x0000, 0x0000, 0x0000 // 05
.dh 0x0030, 0x0698, 0xD378, 0x0000, 0x0000, 0x0000 // 06
.dh 0x00FF, 0x00E0, 0x00F0, 0x0000, 0x0000, 0x0000 // 07
.dh 0x00D8, 0x1BE8, 0x7DF8, 0x0000, 0x0000, 0x0000 // 08
.dh 0x00FF, 0x00B8, 0x0063, 0x0000, 0x0000, 0x0000 // 09
.dh 0x00D1, 0x0041, 0x0017, 0x0000, 0x0000, 0x0000 // 0A
.dh 0x00FF, 0x00C0, 0x0000, 0x0000, 0x0000, 0x0000 // 0B
.dh 0x00D8, 0x1BE8, 0x7DF8, 0x0080, 0x10B8, 0x17F8 // 0C
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 0D
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 0E
.dh 0x00D8, 0x1BE8, 0x7DF8, 0x0000, 0x0000, 0x0000 // 0F
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 10
.dh 0x00FF, 0x00E0, 0x00F0, 0x0000, 0x0000, 0x0000 // 11
.dh 0x0016, 0x0091, 0x0016, 0x0000, 0x0000, 0x0000 // 12
.dh 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // 13


Attached Files
Size: 14.9 KB / Downloads: 55 .zip   mk64_course_refs.zip


There are many font and other texture tables in the ROM. I documented some of them in my previous mk64 asm examples post. However, here is a more complete overview.

Segment 0A contains the MIO0 and Raw textures and starts at ROM offset 0x729A30.
Segment 0B contains the TKMK00 textures and starts at ROM offset 0x7FA3C0.
Segment 02 contains the texture tables and is loaded at RAM 0x801978D0 from ROM offset 0x12AAE0. There, the following tables exist:
ROM Range      Seg 02 Range       Type  Description
12AAE0-12BFA8  02000000-020014C8  0x14  MIO0 8x8 fonts
12BFA8-12C084  020014C8-020015A4  0x14  TKMK00 gold and pink textures
12C084-12C46C  020015A4-0200198C  0x14  MIO0 IA16 text and graphics
12C46C-12C4CC  0200198C-020019EC   0x8  Seg02 List of some tables in 12C084-12C46C
12C4CC-12C60C  020019EC-02001B2C  0x14  TKMK00 character names
12C60C-12C92C  02001B2C-02001E4C  0x14  MIO0 Track thumbnails
12C92C-12CA84  02001E4C-02001FA4   0x8  Seg2 List of some tables 12C60C-12C92C
12CA84-12CB9C  02001FA4-020020BC  0x14  MIO0 IA16 border and trophies
12CB9C-12CBFC  020020BC-0200211C   0x8  Seg2 List of some tables 12CA84-12CB9C
12CBFC-12F078  0200211C-02004598  0x14  Raw font textures
12F078-12F0C8  02004598-020045E8  0x14  TKMK00 320x240 backgrounds
12F0C8-12F118  020045E8-02004638  0x14  Raw "Push Start" and copyright
12F118-12F2BC  02004638-020047DC  0x14  TKMK00 Menu headings
12F2BC-12F35C  020047DC-0200487C  0x14  Raw Green arrow
12F35C-12F53C  0200487C-02004A5C  0x14  TKMK00 Menu options
12F53C-12F62C  02004A5C-02004B4C  0x14  MIO0 and Raw player select menu border
12F62C-12FCA8  02004B4C-020051C8  0x14  TKMK00 track names
12FCA8-1311E8  020051C8-02006708  0x14  MIO0 character menu animations
1311E8-132128  02006708-02007648   0x8  Seg2 List character menu animations


Each 0x14 type table has the structure of:
struct {
  u16 type;    // 00 = TKMK00, 01 = TKMK00, 03 = MIO0, 05 = Raw??
  u16 todo02;  // unused?
  u32 segAddr; // segmented (0A or 0B) address
  u16 width;   // texture width
  u16 height;  // texture height
  u16 todo0C;
  u16 length;  // bytes of compressed data (although sometimes off)
  u16 todo10;
  u16 todo12;
}


Each 0x8 type table has the structure of:
struct {
  u32 segAddr; // segmented 02 address
  u32 todo04;  // TODO: some count? 0x3C, 0x32, 0x0A, 0x05, 0x02, 0x01
}


Furthermore, there is an array of segment 02 table pointers in ROM at 0xE86F8-0xE9040 and 0xE90C0-0xE912C
(This post was last modified: 27-03-2017, 11:53 AM by queueRAM.)

I wanted to ask if anyone is investigating how to get CPU-controlled players to fire blue, green and red shells. It would also be interesting that CPU controlled players could use turbo mushrooms. The CPU currently has as a form of attack the use of the star and as a form of defense bananas and fake item and ghost.It would be interesting if this could make the difficulty of MK64 increase a little.If someone got this should be In the editing tools.

(04-08-2017, 06:44 PM)SATURN_81 Wrote: I wanted to ask if anyone is investigating how to get CPU-controlled players to fire blue, green and red shells. It would also be interesting that CPU controlled players could use turbo mushrooms. The CPU currently has as a form of attack the use of the star and as a form of defense bananas and fake item and ghost.It would be interesting if this could make the difficulty of MK64 increase a little.If someone got this should be In the editing tools.


Well i know they have the ability to do it but i wasn't programmed into the game for some reason, plus the red shells in this game isn't the best

Hello there! My name is Alex, I am a Masters student who is currently writing a dissertation about the mechanical value of the Blue Shell in Mario Kart, and my research has lead me here. Apologies if this is the wrong place to enquire, but I didn't wish to be so bold as to start my own thread!

I've been dabbling with MK64 for a month or two now, and I'm still struggling to see if the things I want to do are entirely feasible, and I was wondering if any of you would be able to help me? Essentially, I'm looking to do the following:

- Remove the Blue Shell from the item rotation/add the Blue Shell to the CPUs item rotation (pretty much just altering the tables the items are picked from)
- Track the racers positions throughout the race (finding their x & y co-ordinates perhaps?)
- Give the player any item they wish at runtime

I think it's possible to do all of these in theory, but I've been having some issues finding the memory locations for these various variables. Would anyone be able to provide me with some advice? Your support would be greatly appreciated!

(03-01-2018, 07:17 PM)UndeniablyAlex Wrote: Hello there! My name is Alex, I am a Masters student who is currently writing a dissertation about the mechanical value of the Blue Shell in Mario Kart, and my research has lead me here. Apologies if this is the wrong place to enquire, but I didn't wish to be so bold as to start my own thread!

I've been dabbling with MK64 for a month or two now, and I'm still struggling to see if the things I want to do are entirely feasible, and I was wondering if any of you would be able to help me? Essentially, I'm looking to do the following:

- Remove the Blue Shell from the item rotation/add the Blue Shell to the CPUs item rotation (pretty much just altering the tables the items are picked from)
- Track the racers positions throughout the race (finding their x & y co-ordinates perhaps?)
- Give the player any item they wish at runtime

I think it's possible to do all of these in theory, but I've been having some issues finding the memory locations for these various variables. Would anyone be able to provide me with some advice? Your support would be greatly appreciated!


Hi Alex. Interesting topics. I know this thread is quite long, but I think most of the information you are looking for is contained within it. I'll point you to some resources that you can hopefully make use of. Let us know if you have any further questions.

Regarding item rotation, there are different probabilities for each item given the modes and placement. You can view orbitaldecay's post here, but high-level overview is:
orbitaldecay Wrote:
​?????? 801A7A90 Item Table (GP Human) - 8 Entries
?????? 801A7DB0 Item Table (GP Computer) - 8 Entries
?????? 801A80D0 Item Table (VS 2 Player) - 2 Entries
?????? 801A8198 Item Table (VS 3 Player) - 3 Entries
?????? 801A82C4 Item Table (VS 4 Player) - 4 Entries
?????? 801A8454 Item Table (Battle) - 1 Entry


Regarding racer positions, vexiant had some good information here:
vexiant Wrote:
​Player data

Pointers to the 8 individual drivers are at 0x800DC4DC. Each driver structure appears to be 3544 bytes long.
Code:

struct mk64_player
{
   float unkn;
   u32 u1;
   u32 u2;
   u32 u3;
   u32 u4;

   float x, y, z;
   u16 u5;
   u16 rotation;

   float unkn;

   float x_accel, y_accel, z_accel;
};


Last, regarding player inventory:
orbitaldecay Wrote:
MEM 0x80165F5E: Player 1 Inventory

(04-01-2018, 04:56 AM)queueRAM Wrote:
(03-01-2018, 07:17 PM)UndeniablyAlex Wrote:
Hello there! My name is Alex, I am a Masters student who is currently writing a dissertation about the mechanical value of the Blue Shell in Mario Kart, and my research has lead me here. Apologies if this is the wrong place to enquire, but I didn't wish to be so bold as to start my own thread!

I've been dabbling with MK64 for a month or two now, and I'm still struggling to see if the things I want to do are entirely feasible, and I was wondering if any of you would be able to help me? Essentially, I'm looking to do the following:

- Remove the Blue Shell from the item rotation/add the Blue Shell to the CPUs item rotation (pretty much just altering the tables the items are picked from)
- Track the racers positions throughout the race (finding their x & y co-ordinates perhaps?)
- Give the player any item they wish at runtime

I think it's possible to do all of these in theory, but I've been having some issues finding the memory locations for these various variables. Would anyone be able to provide me with some advice? Your support would be greatly appreciated!


Hi Alex. Interesting topics. I know this thread is quite long, but I think most of the information you are looking for is contained within it. I'll point you to some resources that you can hopefully make use of. Let us know if you have any further questions.

Regarding item rotation, there are different probabilities for each item given the modes and placement. You can view orbitaldecay's post here, but high-level overview is:
orbitaldecay Wrote:
​?????? 801A7A90 Item Table (GP Human) - 8 Entries
?????? 801A7DB0 Item Table (GP Computer) - 8 Entries
?????? 801A80D0 Item Table (VS 2 Player) - 2 Entries
?????? 801A8198 Item Table (VS 3 Player) - 3 Entries
?????? 801A82C4 Item Table (VS 4 Player) - 4 Entries
?????? 801A8454 Item Table (Battle) - 1 Entry


Regarding racer positions, vexiant had some good information here:
vexiant Wrote:
​Player data

Pointers to the 8 individual drivers are at 0x800DC4DC. Each driver structure appears to be 3544 bytes long.
Code:

struct mk64_player
{
   float unkn;
   u32 u1;
   u32 u2;
   u32 u3;
   u32 u4;

   float x, y, z;
   u16 u5;
   u16 rotation;

   float unkn;

   float x_accel, y_accel, z_accel;
};


Last, regarding player inventory:
orbitaldecay Wrote:
MEM 0x80165F5E: Player 1 Inventory


Thanks so much for your help queueRAM! I'll read through the thread with a fine tooth comb now (I had glanced over the first few pages to double check I wasn't completely off-base with what was possible!), and I shall get get back and post some details when I've progressed with my experiment details and if I have any other questions Smile

Many thanks again, I'll be sure to reference you if I can!

Hey all!

Apologies if I'm just making a series of rookie mistakes (quite new to this and still getting to grips with the toolset itself)

So I'm trying to get to the item table so that I can edit the values themselves, ideally testing it by setting all of the variables to the same thing (01 for banana or something), but when I get to the address storing the pointer to the item table, trying to go to that address $884C6C4C, I go past the end of the file.

[Image: AIdddk1.png]

Am I doing something wrong, or using the wrong program? I'm currently working with ROM Disassembler, Project64 and Cheat Engine.

Many thanks!

Mario Kart 64 Hacking General Discussion « 1 ... 13 14 15 16 17 »
Users browsing this thread: 2 Guest(s)