Skip to content

Turbografx-CD · Graphics Hacking

Downtown Nekketsu Monogatari Compression

By Tomaitheous

River City Ransom · All hacks & resources →

About this project

Downtown Nekketsu Monogatari’s LZ77 compression scheme explained. (Also shows were the font for the in-game text is located.)

Original game requirements

See the release instructions.

Creator credits

Tomaitheous
Listed creator

RELEASE 1.0

Readme & instructions

[358]downtown_nekketsu_research.txt

Downtown Nekketsu Monogatari The game uses LZ77 compression for it's tiles, sprites, and possibly tilemaps. The header is 4 bytes long. first two bytes(word) = the number of uncompressed bytes third byte = ???, push onto the stack, pulled back after # of uncompressed byte reached. (Seems to de discarded afterwards - might be dependent on the code that calls the decompression routine.) fourth byte = nothing - skipped over by the decompression routine.

Read moreRead less
Downtown Nekketsu Monogatari
----------------------------

	The game uses LZ77 compression for it's tiles, sprites, and possibly tilemaps.


	The header is 4 bytes long.
	
		first two bytes(word) = the number of uncompressed bytes

		third byte = ???, push onto the stack, pulled back after # of uncompressed
		byte reached. (Seems to de discarded afterwards - might be dependent on the
		code that calls the decompression routine.)

		fourth byte = nothing - skipped over by the decompression routine.




	bit seven of the control byte:

		1= block transfer from a previous data location of the destination block.
		0= new data from the source to the destination block.

		if bit=0, then the value is & $7F then incremented by 1. This is the number 
		of bytes to read/transfer from source to destination.		

		if bit=1, then a subtraction address is built:

		bits 0-6 are stored into the MSB ZP variable.

		a new byte is read from the source string.

		bits 0-3 are added to 3 for the number of bytes to transfer.
		bits 0-7 are stored into LSB ZP variable (bits 0-3 are shifted out, see below).

		A 16bit right shift by 4 is performed on MSB/LSB, used to subtract from the
		current pointer, and stored in a temp ZP location (source address pointing 
		within the build area).

		That gives a sliding window of $800 bytes and a length of $12

	



	$6084 bank $74 and $46884 in ISO is the string for the second set of fonts (bottom of
	the screen text).

Download [358]downtown_nekketsu_research.txt ↓

FROM THE COMMUNITY

Player reviews

0 reviews
No ratings yet

Played this project? Tell other players how it holds up.

Your take on Downtown Nekketsu Monogatari Compression

Spam has been overwhelming. To help us approve your review, sign up and introduce yourself in the Introductions forum so we know you’re not a bot.

Sign in with your Retro Replay account to rate this project and share your experience.

Sign in to review