How many fullscreen 256 colour images?

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
iNCEPTIONAL

How many fullscreen 256 colour images?

Post by iNCEPTIONAL »

How many fullscreen 256-colour images with no repeated tiles could the largest commercially available SNES cart have?

I'm just imagining fitting some kind of slightly interactive visual novel on a SNES cart with a bunch of lovely Mode 3 high colour images throughout.

Now, I guess in reality there'd also have to be space reserved for music, game code and so on too, but it's just a thought exercise, so don't have to get too into the weeds with the other details.
Last edited by iNCEPTIONAL on Mon Jul 04, 2022 11:54 pm, edited 1 time in total.
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: How many fullscreen 256 colour images?

Post by Nikku4211 »

Depends on if they share the same 256-colour palette or not. If so, 109 256x224 8BPP bitmaps I guess, under 6 MiB with nothing else in the cart. If there's no palette sharing, then around 108 256x224 8BPP bitmaps.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: How many fullscreen 256 colour images?

Post by jeffythedragonslayer »

How did you derive 108/109?
User avatar
rainwarrior
Posts: 8733
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: How many fullscreen 256 colour images?

Post by rainwarrior »

6 megabyte cart divided by: 256 x 224 pixels at 8 bits per pixel
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: How many fullscreen 256 colour images?

Post by jeffythedragonslayer »

Ah. That gives you exactly 4 kilobytes left for the code and music. Good luck! :lol:
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: How many fullscreen 256 colour images?

Post by Dwedit »

Compression may be possible for 256 color images, something like APACK could work on a SNES. But it would only help for data which is LZ compressable (sequences of bytes that have been seen before in that image).
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: How many fullscreen 256 colour images?

Post by jeffythedragonslayer »

Has anyone ever tried using GIF compression on the SNES? It's 256 colors.

APACK link: https://arxiv.org/abs/2201.08830
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: How many fullscreen 256 colour images?

Post by lidnariq »

There's lots of palettized formats over the years, not just GIF.

In general, these things don't compress particularly well, 50% at best on typical images that actually use most of the colors.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: How many fullscreen 256 colour images?

Post by jeffythedragonslayer »

Ok so expanding on Nikku's calculation, by sacrificing one of those 109 images, you can have 256*224/512=112 more unique copies of CGRAM to load in on a per-image basis. You can eek out 32 more bytes per palette from that by compressing away the infamous bit of confusion. Nobody better discover that that bit secretly comes by to haught my dreams now.
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: How many fullscreen 256 colour images?

Post by 93143 »

The largest commercial games were Tales of Phantasia and Star Ocean, and Star Ocean had an S-DD1. IIRC the compression algorithm used with the S-DD1 was reportedly optimized for SNES bitplane graphics.

As for "commercially available", the dev manual describes a couple of 8 MB configurations, including the SA-1's Super MMC capability. The Super FX and S-DD1 may have supported more than that based on speculative pin identifications. It's entirely possible that you could get something like 300 images onto a cart without exceeding the parameters of Nintendo's official cartridge offerings, and closer to twice that before you outgrow the S-DD1's pinout.
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: How many fullscreen 256 colour images?

Post by calima »

A while back after finishing AI: Somnium files, I thought it would totally work on a N64. You could even fit about 3 hours of speech in there. Then I found out the game has 15 hours of speech, haha :D

Anyway, more on topic: go make the SNES Ace Attorney already :beer:
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: How many fullscreen 256 colour images?

Post by Dwedit »

That's a different Apack, you want this one: https://ibsensoftware.com/products_aPLib.html

I've written an apack/aplib decompressor for ARM7 and Z80 so far, and if you can do it on the Z80, you can probably do it on the 6502 as well.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: How many fullscreen 256 colour images?

Post by Oziphantom »

for compression c64 land has tonnes of them.
for best compression but slow ALZ64 https://csdb.dk/release/?id=77754
for speed and compression ration Exomizer is mostly king https://bitbucket.org/magli143/exomizer/wiki/Home

the 6502 code would work as is, but you can probably do some fairly simple 65816 ports to improve decomp performance some more.
Revenant
Posts: 462
Joined: Sat Apr 25, 2015 1:47 pm
Location: FL

Re: How many fullscreen 256 colour images?

Post by Revenant »

I wrote an Exomizer decompressor for the SNES a few years ago: https://gist.github.com/devinacker/b365 ... 33f15ef284

It's a bit larger than the stock 6502 version, but uses 16-bit operations where possible and also has some other options for tuning performance. Currently it depends on libSFX for some convenience macros, but shouldn't be that much trouble to modify for use with ca65 by itself (or possibly other assemblers).
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: How many fullscreen 256 colour images?

Post by Oziphantom »

2018, is that exo 2 or exo 3?
Post Reply