+  RHDN Forum Archive
|-+  Romhacking
| |-+  General Romhacking
| | |-+  Pointer Problem
Pages: [1]
Author Topic: Pointer Problem  (Read 369 times)
Fenrir
Guest
« on: August 10, 2007, 08:21:51 pm »

I'm having trouble calculating an NES pointer. I'm calculating the pointer for the address 1A9C.

So here's what I did:

         
1A9C ----> subtracted 10 ----> 1A8C ----> dropped 10000th place (didn't exist) ----> 1A8C ----> split it in two ---->1A 8C ----> and reversed 'em
----> 8C 1A

Is that right? When I search for 8C1A, I get nothing.
Kitsune Sniper
Guest
« Reply #1 on: August 10, 2007, 08:48:43 pm »

Maybe it uses a different address. Some games subtract another value to get the correct address.

... What game is this, if I may ask?
Fenrir
Guest
« Reply #2 on: August 10, 2007, 09:02:35 pm »

Quote from: Kitsune Sniper on August 10, 2007, 08:48:43 pm
... What game is this, if I may ask?

Dragon Warrior I... It's the pointer to the main character's palette. I'm trying to make the townsfolk and main character use different palettes.
« Last Edit: August 10, 2007, 09:18:26 pm by Fenrir »
Disch
Guest
« Reply #3 on: August 10, 2007, 10:07:04 pm »

<plug>
http://www.romhacking.net/docs/353/
</plug>


PRG lies at $8000-FFFF, so your pointer probably would have to be within that range.

$1A8C maps to mirrored RAM (ie:  basically nothing).  So it's not suprising you didn't find such a pointer in the ROM.

try $9A8C ( "8C 9A" )


EDIT - although I'm not sure there would be a pointer to the main character's palette?  I guess it's worth checking, regardless
Fenrir
Guest
« Reply #4 on: August 11, 2007, 07:23:58 am »

Quote from: Disch on August 10, 2007, 10:07:04 pm
EDIT - although I'm not sure there would be a pointer to the main character's palette?  I guess it's worth checking, regardless

I don't think there is. I searched for 8C9A and found nothing. Is there no way to add another palette?
Disch
Guest
« Reply #5 on: August 11, 2007, 11:17:53 am »

Quote from: Fenrir on August 11, 2007, 07:23:58 am
Is there no way to add another palette?

This depends on what you mean.

The NES can only have 8 4-color palettes loaded at once.  4 of these are used for the BG (the map), and the other 4 are used for the sprites (objects moving on the map -- like townspeople, etc).

After briefly looking at DW... it appears that all 4 sprite palettes are used by townspeople.  Open up FCEUXD ingame and look at the PPU viewer to see the palettes.  (Top row is BG, bottom row is sprites)

Sprite palettes and who use them:

Pink, white, blue = used by the hero and other townspeople
pink, orange, green = used by some shopkeepers (guy in the bottom-left corner of the 1st floor of castle)
pink, white, grey = used by castle guards
pink, white, maroon = used by the king, and by some guards in towns.

So if you're looking to use a 5th palette to use alongside those 4... then no, there is absolutely no way to do that.  The 4 palette thing is a limitation of the NES -- nothing you can do to the ROM can bypass it.  (though it'd be possible to change the palettes for each map, so that different maps have different sprite palettes like in Final Fantasy... however this would probably require writing additional drawing routines and isn't really a beginner project -- I'm simply mentioning it for completeness)

What you could do, if you want, is change it so that townspeople only use 3 of the 4 palettes... leaving the first blue palette for the hero's sole use.  This could be done by finding the townspeople data in the ROM -- there's probably a value assigned to each of them (0-3) that picks which of those four palettes they use.  You may be able to find this data by corrupting.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC