Romhacking.net

Romhacking => ROM Hacking Discussion => Topic started by: marioxb on July 09, 2021, 06:15:49 am

Title: Can't find graphics in Kid Niki (compressed?)
Post by: marioxb on July 09, 2021, 06:15:49 am
Hey there. I looked at the Japanese and US versions of Kid Niki for the NES and I can't find the graphics with YY-CHR. Can someone take a look and see if maybe they are compressed? Just seems strange, since both sequels graphics are right out there in plain sight.
Title: Re: Can't find graphics in Kid Niki (compressed?)
Post by: FlashPV on July 09, 2021, 10:00:25 am
Yes, it use some form of RLE, only "00" and "FF" octets are compressed if I recall correctly.
Ex: 000000000->0004, FFFFFF->FF03
Title: Re: Can't find graphics in Kid Niki (compressed?)
Post by: marioxb on July 09, 2021, 09:13:36 pm
Ah, ok. Thanks. Any idea how to uncompress?
Title: Re: Can't find graphics in Kid Niki (compressed?)
Post by: Jorpho on July 10, 2021, 01:02:50 am
If M. FlashPV is correct, you would probably want to write some sort of script in your least favorite programming language that reads out the data from the ROM and expands all byte pairs of the form 00xx and FFxx.
Title: Re: Can't find graphics in Kid Niki (compressed?)
Post by: marioxb on July 10, 2021, 10:39:28 am
If M. FlashPV is correct, you would probably want to write some sort of script in your least favorite programming language that reads out the data from the ROM and expands all byte pairs of the form 00xx and FFxx.

Yeah, not really worth it for me to learn programming just to edit some graphics. Was hoping there was some sort of tool. Thanks though!
Title: Re: Can't find graphics in Kid Niki (compressed?)
Post by: Cheesman on August 20, 2021, 11:58:15 am
The game does not use CHR but you could make it using uncompressed CHR and you only need to know some 6502 assembly. You probably know the basics about the NES. So we change the INES header to use 256 KB of CHR.

infos about iNES: ( https://wiki.nesdev.com/w/index.php/INES )

Code: [Select]
4E45531A 100011 = 4E45531A 102011

Infos about MMC1: ( https://wiki.nesdev.com/w/index.php?title=MMC1 )

You don't have the uncompressed GFX but you can copy paste the needed GFX from Video RAM to the end of the ROM. After we will look at how the game did load the GFX from PRG ROM and change that routine to a Bank swap routine. With this you should also be able to add extra animations if you like them.

Here is a basic hack with this changes. Game = Kid Niki - Radical Ninja (U) (PRG 1) [!] :File CRC32: F33D193
https://www.dropbox.com/s/e87xr06c51c0vkw/Kid%20Niki%20-%20Radical%20Ninja%20ExpandToCHRStart.ips?dl=0

I will get you a assambler for the NES and add the basic code we need to change. I like to point out that I do not know much about the game. I think it should be a easy task but we will see.

We will also add basic cheats to test the changes we make. This should be a good task to get into hacking and learn skills to your pocked.
Title: Re: Can't find graphics in Kid Niki (compressed?)
Post by: KingMike on August 20, 2021, 01:56:31 pm
Converting to CHR-ROM does have the potential of being much harder than writing a de/re-compressor (especially for such a simple form of compression).

When games load to CHR-RAM, they can write wherever they want and do not have to follow CHR-ROM bank boundaries at all.

But maybe for being such an early game, it won't try anything particularly tricky that would throw off a hack.