I won't delete this time! (sprite stuff)

Share and discuss all facets of DKC ROM hacking...

I won't delete this time! (sprite stuff)

Postby rainbowsprinklez » October 23rd, 2019, 12:29 am

Last time I deleted my post prematurely. I feel it's best to be straightforward. I am working on editing sprites for dkc2. Thank you, Quaraage, for your editor. It is great. My problem is (much like dkc1) colors are used for multiple things. If I change Diddy's shirt yellow, his mouth turns yellow too. I could understand why this was a problem in DKC1 (16) but why in DKC2 (128)? How can I point to a different color for his mouth or dixie twirl? Thanks in advance.
Veteran Venturer
Bananas received 110
Posts: 596
Joined: 2016

Re: I won't delete this time! (sprite stuff)

Postby Kingizor » October 23rd, 2019, 1:05 am

You have sprite entries in OAM. The entry contains position and so on, but also points to a tile (or multiple tiles) in VRAM that contains the shades. The OAM entry will also declare which "palette" of 16 colours to use for those tiles. The tile shades are used as a lookup in CGRAM when deciding which colours to use. Unlike backgrounds, sprites are always always always 4bpp and therefore 16 colours. (colour 0 is always transparent so it's really 15 colours, but...)

Different OAM entries can use the same palette, so if you change one colour you might find (and have found) that it can affect other things too. It can depend on how things are structured too, We think of Diddy as one sprite, but he might actually be made up of several distinct sprites and so on.

I'd be inclined to modify the palette directly and live with the mouth and shirt being the same colours.

An alternative would be to modify the tiles themselves, so the mouth uses a different shade from the shirt, but that's a lot more work and your options are still rather limited. There would be a lot of tiles with pixels to change.

If you do want to play around with tiles.. YY-CHR is rather old but has traditionally been popular for this sort of thing. There is a more recent GIMP plugin that is very good. The sprites aren't compressed as far as I recall so that's one good thing, but you'd still have to locate them though. Most of the modern debugging emulators will at least include a tile viewer.

Although maybe there is an easier way. :scratch:
Trailblazer
Bananas received 77
Posts: 248
Joined: 2010

Re: I won't delete this time! (sprite stuff)

Postby rainbowsprinklez » October 23rd, 2019, 3:50 am

Kingizor, look at this! This is one of the reasons I like Geiger's so much!

Spoiler!
$80/F2FB A9 1E 00 LDA #$001E A:2200 X:0020 Y:1E78 P:envmxdIzc
$80/F2FE 8D 05 43 STA $4305 [$80:4305] A:001E X:0020 Y:1E78 P:envmxdIzc
$80/F301 BD 24 0B LDA $0B24,x[$80:0B44] A:001E X:0020 Y:1E78 P:envmxdIzc
$80/F304 8D 02 43 STA $4302 [$80:4302] A:6574 X:0020 Y:1E78 P:envmxdIzc
$80/F307 BD 26 0B LDA $0B26,x[$80:0B46] A:6574 X:0020 Y:1E78 P:envmxdIzc
$80/F30A E2 20 SEP #$20 A:A1FD X:0020 Y:1E78 P:eNvmxdIzc
$80/F30C 8D 04 43 STA $4304 [$80:4304] A:A1FD X:0020 Y:1E78 P:eNvMxdIzc
$80/F30F EB XBA A:A1FD X:0020 Y:1E78 P:eNvMxdIzc
$80/F310 8D 21 21 STA $2121 [$80:2121] A:FDA1 X:0020 Y:1E78 P:eNvMxdIzc
$80/F313 A9 01 LDA #$01 A:FDA1 X:0020 Y:1E78 P:eNvMxdIzc
$80/F315 8D 0B 42 STA $420B [$80:420B] A:FD01 X:0020 Y:1E78 P:envMxdIzc
$80/F318 C2 20 REP #$20 A:FD01 X:0020 Y:1E78 P:envMxdIzc
$80/F31A 60 RTS A:FD01 X:0020 Y:1E78 P:envmxdIzc


Just a simple look at the registers at the time show me exactly where this is. 0xfd6574

Ewwww. The formatting here is horrendous.

https://imgur.com/a/oXVNZuT
Veteran Venturer
Bananas received 110
Posts: 596
Joined: 2016

Re: I won't delete this time! (sprite stuff)

Postby rainbowsprinklez » October 24th, 2019, 11:55 am

Kingizor,
I went against your really good advice (good because that was tedious af) and changed every frame. Guess I couldn't live with it :D I used Quaraage's gfx editor... that thing is really good! after using that all day, only gripe would be the lack of an undo button. Also, good for you for using C#! That is my favorite programming language! I fixed all of Diddy's mouth frames and the Dixie twirl frames. Just so nobody has to do this for a hack again, I am sharing a patch of the ROM with all the tiles edited.

http://www.mediafire.com/file/2a8uzu1y5sl8b4x/Dkc2_-_template.ips/file (don't use this one unless you want a pink shirt Diddy :kiddysad: )
Veteran Venturer
Bananas received 110
Posts: 596
Joined: 2016


Return to ROM Hacking

Who is online

Users browsing this forum: No registered users and 6 guests