Sprite compression help

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
LucianoTheWindowsFan
Posts: 25
Joined: Mon Jun 22, 2020 9:39 am

Sprite compression help

Post by LucianoTheWindowsFan » Mon Jul 20, 2020 2:05 pm

How do I compress sprites? I wanted to save space.

User avatar
dougeff
Posts: 2712
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Sprite compression help

Post by dougeff » Mon Jul 20, 2020 9:44 pm

You could try the LZ4 code used by LibSFx.

https://github.com/Optiroc/libSFX/tree/ ... ckages/LZ4

Compressed by this code...

https://github.com/lz4/lz4/releases

Decompress to $7f0000, then copy to VRAM.
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
Nikku4211
Posts: 69
Joined: Sun Dec 15, 2019 1:28 pm
Location: Bronx, New York
Contact:

Re: Sprite compression help

Post by Nikku4211 » Tue Jul 21, 2020 10:13 am

I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.

LucianoTheWindowsFan
Posts: 25
Joined: Mon Jun 22, 2020 9:39 am

Re: Sprite compression help

Post by LucianoTheWindowsFan » Wed Jul 22, 2020 2:54 pm

dougeff wrote:
Mon Jul 20, 2020 9:44 pm
You could try the LZ4 code used by LibSFx.

https://github.com/Optiroc/libSFX/tree/ ... ckages/LZ4

Compressed by this code...

https://github.com/lz4/lz4/releases

Decompress to $7f0000, then copy to VRAM.
I was working on "Fox Chat" for the SNES and I compressed the graphics of the title screen to save space using this method, so how I can make it show in game instead of garbage?

User avatar
Nikku4211
Posts: 69
Joined: Sun Dec 15, 2019 1:28 pm
Location: Bronx, New York
Contact:

Re: Sprite compression help

Post by Nikku4211 » Thu Jul 23, 2020 1:59 pm

LucianoTheWindowsFan wrote:
Wed Jul 22, 2020 2:54 pm

I was working on "Fox Chat" for the SNES and I compressed the graphics of the title screen to save space using this method, so how I can make it show in game instead of garbage?
Whenever you compress, you have to decompress the compressed data into RAM in order to show those graphics.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.

LucianoTheWindowsFan
Posts: 25
Joined: Mon Jun 22, 2020 9:39 am

Re: Sprite compression help

Post by LucianoTheWindowsFan » Thu Jul 30, 2020 12:20 pm

Nikku4211 wrote:
Thu Jul 23, 2020 1:59 pm
LucianoTheWindowsFan wrote:
Wed Jul 22, 2020 2:54 pm

I was working on "Fox Chat" for the SNES and I compressed the graphics of the title screen to save space using this method, so how I can make it show in game instead of garbage?
Whenever you compress, you have to decompress the compressed data into RAM in order to show those graphics.
I did put the compressed graphics but it looks like frickin' garbage in my game, I used ca65, the decompression code for ca65?
Attachments
SNES_10_000.png
SNES_10_000.png (3.4 KiB) Viewed 576 times

Post Reply