News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Locating CI Palettes in an N64 ROM  (Read 1329 times)

DoomInAJar

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Locating CI Palettes in an N64 ROM
« on: February 10, 2019, 10:37:18 pm »
I'm learning how to replace sprites in an N64 ROM (specifically I'm looking at Pokemon Puzzle League); to do that, I first need to locate the sprites. I tried out Texture64 and was able to locate quite a few of them which are in either RGBA16 or RGBA32 format (pretty straight forward since sprites in these formats are a single flat array of RGBA bytes). The remainder of the sprites, I suspect, are either compressed or in CI8 or CI4 format. I'm going to start by checking for CI formats since (I assume) those will be more straight forward.

However, I'm not 100% sure where to start looking; namely, I need to find the palettes for the sprites. What's the best way to go about this? Is there maybe a common location for the palettes to be stored? Or would it be more worth my time to run it through a debugger and see what ROM addresses are getting loaded into Memory?

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7133
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Locating CI Palettes in an N64 ROM
« Reply #1 on: February 11, 2019, 01:04:26 am »
Wouldn't 16-bit and especially 32-bit be actual color data and thus not need palettes?
I'm assuming that means 16/32 bits per pixel, is what you're talking about.
(I mean I could be missing something since I never worked with N64 ROM hacking aside from a brief attempt to work on Custom Robo before getting stopped by what turned out to be partial ROM checksum protection)
"My watch says 30 chickens" Google, 2018

DoomInAJar

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Locating CI Palettes in an N64 ROM
« Reply #2 on: February 11, 2019, 06:17:10 pm »
Yeah, the 16-bit and 32-bit RGBA sprites don't have palettes. And you're correct, it's just 16 bits and 32 bits of RGBA values per pixel. It's the CI sprites that I'm looking for, which do have palettes.
As an aside, it's this document which I've primarily been referencing. I suppose that they could be YUV sprites as well, though it doesn't look like Texture64 supports that, and I'd rather know what I'm looking for before I try to add that functionality on my own.

adrien01

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Locating CI Palettes in an N64 ROM
« Reply #3 on: January 16, 2021, 03:54:07 pm »
Sorry to up this topic but here is the answer,

for answer your question, specifically for pokemon puzzle league almost all the time the palette was stored just before or just after the CI4 or CI8 texture.

For an exemple (on the french version of pokemon puzzle league) you can find the "3 2 1 READY" CI8 texture at 0xF7E78 and the CI palette at 0xF7C60.

I've already listed almost all the uncompressed textures in the french version of the game, don't hesitate to ask if you need them  ;)

As my knowledge there isn't YUV sprite in pokemon puzzle league, but a majority of textures are compressed