What's new

N64 Pointers

HyperHacker

Raving Lunatic
Does anyone know how pointers generally work in N64 ROMs? Say there was data at 0x112233, what would the pointer be?
 

aprentice

Moderator
HyperHacker said:
Tried it. Actually searched for just 112233 as well as 332211.

well, "just in the rom" it would be at 0x112233.. I think you're confused, are you looking for data in a rom?
 

Quvack

Member
It really depends on the game itself and how stuff is layed out/programmed. Say with a games script you can have the script starting at 0x123456, and then you'll have a pointer table which points to all the starts of dialogs in the script, so if the pointers value is 00 0A or something the value could be 0x123460, at least this is how im going from what I've hacked around with in n64 :) Its really dependant on the game itself though, and how the rom is swapped, etc..
 
OP
HyperHacker

HyperHacker

Raving Lunatic
Well, I'm mainly looking at Mario Kart 64, and later Mario 64. What I'm looking for is pointers in the ROM pointing to data in the ROM.

Also, if anyone knows how to convert N64's 16-bit colour to RGB, feel free to post it, I'm having a lot of problems with it.
 
Last edited:

TheBench

New member
RRRRRGGGGGBBBBBA for palette colors usually.
As for the ROM, it wouldn't be 8XXXXXXX in the ROM, although of course references to RAM in the ROM would be 8XXXXXXX. ROM addresses could be either just their address, or possibly BXXXXXXX.
 
OP
HyperHacker

HyperHacker

Raving Lunatic
Bah, it's still not working.
Code:
B = ((X And 62) \ 2) * 8
G = ((X And 1984) \ 64) * 8
R = ((X And 63488) \ 2048) * 8
N64Colour = B + (256 * G) + (65536 * R)

[edit] Also, how does 8-bit colour work? A palette index?
 
Last edited:

TheBench

New member
I've not seen any 8-bit color in my experience, they're usually 8-bit indexes to a 16-bit or 32-bit palette. Although N64 texture stuff is different for many games.
 
OP
HyperHacker

HyperHacker

Raving Lunatic
Mario Kart 64's course maps seem to use an 8-bit format. I suspect it's a palette index. I render it as 00ggbbrr (R = (X And 3) * 8, G = ((X And 12) / 4) * 8, B = ((X And 48) / 16) * 8), and everything always shows up red.
 

Doomulation

?????????????????????????
Forgive me for my intrusion here... I really don't know anything about pointers, but... if a byte contains the format 00GGBBRR, wouldn't it be more proper to use the following formula:

Visual Basic:
G = (BYTE And &HFF0000) \ 16
B = (BYTE And &HFF00) \ 8
R = (BYTE And &HFF)

C:
R = (BYTE & 0xFF0000) >> 16;
B = (BYTE & 0xFF00) >> 8;
R = (BYTE & 0xFF);

? This makes sense to me as I've done this before. Your formula... it makes no sense at all!
 

Top