Mode 5 colour limitations?

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.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Mode 5 colour limitations?

Post by rainwarrior »

kulor wrote: Wed May 11, 2022 7:50 pmBut a battle screen background? I'm a little surprised nobody attempted it, given how many RPGs are on the thing.
That's definitely a place they could be done with fewer drawbacks, especially since a lot of the screen is covered by the text layer.
kulor wrote: Wed May 11, 2022 7:50 pmAlso worth noting mode 7 is equally limited with tile variety, maybe even moreso because you only get 256 tiles for a single layer. If devs were able to work around that and make good looking mode 7 stuff, I absolutely think they could've done the same for mode 5.
I mean, mode 7 graphics are very obviously blocky in most of their uses, but the novelty of arbitrary transformation was a hell of a good trade for that concession.

Kind of a funny comparison, since in that mode we absolutely can choose the scale of texel screen coverage, and get to trade that against map variety. Though, I think most of its uses are already weighted about as much toward finer resolution as they can be... the other way is probably just too blocky.
User avatar
kulor
Posts: 33
Joined: Thu Mar 15, 2018 12:49 pm

Re: Mode 5 colour limitations?

Post by kulor »

93143 wrote: Wed May 11, 2022 8:17 pm it would be a lot more useful if the SNES had more VRAM.
Won't argue there. Probably my #1 thing I wish they had done differently is they should have taken 64KB of that WRAM and put it into VRAM instead.
rainwarrior wrote: Wed May 11, 2022 9:06 pm I mean, mode 7 graphics are very obviously blocky in most of their uses, but the novelty of arbitrary transformation was a hell of a good trade for that concession.

Kind of a funny comparison, since in that mode we absolutely can choose the scale of texel screen coverage, and get to trade that against map variety. Though, I think most of its uses are already weighted about as much toward finer resolution as they can be... the other way is probably just too blocky.
I think mode 7 is usually blocky as a consequence of zooming it in a bunch, I.E. it's pixelation and not blockiness from a lack of tile variety. From what I've seen, mode 7 maps with 16x16 pixel metatiles aren't terribly uncommon despite the 256 tile budget, and the equivalent 32x32 metatiles for mode 5 (which would have the same tile budget cost) would be a pretty typical size in a regular low-res mode. In mode 7 you also have the added disadvantage of not being able to flip tiles at all, which means you're more likely to eat more tiles in your budget on the same elements in different directions...so with that and having multiple layers, I do think mode 5 would actually end up being easier to budget tiles for.
I'll defer to my pixel artist on that once he's had to deal with both, though!
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: Mode 5 colour limitations?

Post by Nikku4211 »

kulor wrote: Wed May 11, 2022 1:38 pm Wanted to elaborate on this, because after doing some more investigation, I'm definitely convinced VRAM is not a concern for mode 5. Something to consider is that character addressing still works in 8x8 tile chunks with 16x16 tiles, so the VRAM consumption of all the unique tiles you can address per-layer is actually the same regardless of if you use 8x8 tiles or 16x16 tiles, high-res or low-res.
For example, in mode 1, let's say you want as many unique tiles as possible for each layer. For each of the 4bpp layers, you need 1024x 8x8 tiles, which are 32 bytes each, for a total of 32KB VRAM, multiplied by two for the two layers. For the 2bpp layer, the tiles are 16 bytes each, so you need 16KB for that. Grand total is 80KB of VRAM use, which is more than you actually have, so you can't actually have the maximum number of unique tiles for all layers in mode 1.
In mode 5, because it's 16x16 tiles, you only get 256 unique tiles, as well as the probably-useless half-steps between unique tiles. For the 4bpp layer, you need 256x 16x16 tiles, which are 128 bytes each, for 32KB. For the 2bpp layer, they're 64 bytes each, so it's 16KB. Grand total is just 48KB, which is actually less than mode 1!
In fact, if you had 64x32 tilemaps for each of the layers, you could theoretically fill up your VRAM with 256 unique 16x16 tiles for the 4bpp layer, 128 unique 16x16 tiles for the 2bpp layer, and have your 8KB tilemaps and 16KB sprite space too. I think it's fair to say that "mode 5 uses too much VRAM" is a myth.
Well, you can actually use 16x8 tiles in mode 5, so you can get 512 unique tiles, provided you're using a converter that doesn't mess up 16x8 tilemaps(or make the tilemap manually or run something to correct the generated tilemap).

But anyways, since mode 1 with as many unique tiles as possible (AMUTAP) takes up around 80 kiB, most games don't do all-unique tiles, though I'm not sure how much games typically spend on VRAM for background graphics in gameplay, it depends on what kind of graphics the genre and art style of the game calls for I guess. A lot of artists that worked on SNES games generally already worked on games for other tile-based consoles, so they're typically going to think in terms of making a tileset to build tilemaps out of more than in terms of cramming a bitmap into a tileset.

If no layers share tilesets with each other, and you used 16x16 for both modes, mode 5 would certainly use less VRAM than mode 1 because there's only 1 4BPP layer in the former and there's 2 4BPP layers in the latter. But this would be if you're using the same set across both modes (as in different tilesets between layers, but same tilesets between modes), so the same tiles would be bigger on mode 1 and smaller on mode 5.

I guess you could say those who argue about mode 5's VRAM usage per layer aren't coming from the perspective of an artist used to drawing tilesets, more thinking like artists used to drawing bitmaps. If someone isn't familiar with drawing art, they're probably less familiar with drawing tilesets and constructing tilemaps out of it.
93143 wrote: Wed May 11, 2022 8:17 pm Counterpoint: BG character namebase is writable during HBlank.

This doesn't completely solve the problem, but it could be useful in certain scenarios, and it would be a lot more useful if the SNES had more VRAM.
I've seen the Shock diskmag on SNES do this in order to fit more unique tiles in mode 5.

It is mostly text, after all.

Though I haven't tried to read it on a real console, but the diskmag went on for 2 issues.
kulor wrote: Wed May 11, 2022 7:50 pm But a battle screen background? I'm a little surprised nobody attempted it, given how many RPGs are on the thing.
I bet it'd look like RPG Maker XP but with mixels.

At least somebody in the 21st century did attempt using mode 5 for dialogue boxes, with hi-res portraits, years ago. I think the RPG it was for was fluffy.
People at the forum thread criticised it because the resolution of the dialogue boxes (especially with the portraits) did not match the resolution of the rest of the screen. If it was 1995, I'm sure people would not make these same criticisms so long as the font was still easy to read even in RF, as modern retro gamers do look at it differently with their emulators running on their crisp, sharp monitors and their consoles hooked up through RGB SCART and external $calers hooked up to HDTVs.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Mode 5 colour limitations?

Post by rainwarrior »

Nikku4211 wrote: Wed May 11, 2022 11:45 pmAt least somebody in the 21st century did attempt using mode 5 for dialogue boxes, with hi-res portraits, years ago. I think the RPG it was for was fluffy.
Based on the description, you mean Ramsis' Furry RPG?
viewtopic.php?p=140174
User avatar
kulor
Posts: 33
Joined: Thu Mar 15, 2018 12:49 pm

Re: Mode 5 colour limitations?

Post by kulor »

Nikku4211 wrote: Wed May 11, 2022 11:45 pm Well, you can actually use 16x8 tiles in mode 5, so you can get 512 unique tiles, provided you're using a converter that doesn't mess up 16x8 tilemaps(or make the tilemap manually or run something to correct the generated tilemap).
To be clear, SNES character indices always work in increments of 8 pixels. That means, 1024x unique 8x8 tiles, 512x unique 8x16 tiles, or 256x unique 16x16 tiles are just different ways to add up to the same VRAM usage.
Nikku4211 wrote: Wed May 11, 2022 11:45 pm I bet it'd look like RPG Maker XP but with mixels.

At least somebody in the 21st century did attempt using mode 5 for dialogue boxes, with hi-res portraits, years ago. I think the RPG it was for was fluffy.
People at the forum thread criticised it because the resolution of the dialogue boxes (especially with the portraits) did not match the resolution of the rest of the screen. If it was 1995, I'm sure people would not make these same criticisms so long as the font was still easy to read even in RF, as modern retro gamers do look at it differently with their emulators running on their crisp, sharp monitors and their consoles hooked up through RGB SCART and external $calers hooked up to HDTVs.
We've had a lot of back-and-forth about mixels already, and I don't have a lot to add, aside from that I think it looks fine (really good, actually), and I believe a lot of other people will think the same. It would be a shame and a huge waste if nobody ever touched mode 5 because they thought everyone was going to whinge about mixels.
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Mode 5 colour limitations?

Post by creaothceann »

kulor wrote: Wed May 11, 2022 7:50 pm Could you recreate Narshe in mode 5 to the same level of detail? Probably not, but with all the layering and moving around you do in the overworld parts of that game, maybe mode 5 wouldn't really make sense there anyway. But a battle screen background? I'm a little surprised nobody attempted it, given how many RPGs are on the thing.
In horz. hi-res modes you can't really do color math (afaik), which would be important for a battle screen.
kulor wrote: Wed May 11, 2022 10:55 pm Probably my #1 thing I wish they had done differently is they should have taken 64KB of that WRAM and put it into VRAM instead.
WRAM is DRAM (dynamic RAM) - capacitors that need to be refreshed regularly. VRAM is SRAM (static RAM) that only consists of transistors. DRAM is usually cheaper and slower (which might be why the SNES runs VRAM at 5.37 (10.74?) MHz and WRAM at 2.68 MHz).

EDIT: That being said, is WRAM usually used to its full capacity? 128 KB seems a bit much for the ASM era, imo.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Mode 5 colour limitations?

Post by rainwarrior »

creaothceann wrote: Thu May 12, 2022 9:15 amIn horz. hi-res modes you can't really do color math (afaik), which would be important for a battle screen.
Colour math happens, but the sub-screen is visible as every odd column. Most uses of it would likely result in vertical stripes.
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: Mode 5 colour limitations?

Post by 93143 »

Well, yeah, that's what causes the hi-res in the first place.

Writing that quick test ROM last night, I figured out that even in Mode 5, you have to manually send BG1 to both the main screen and the subscreen if you want the hi-res to work properly. I knew it worked that way in pseudo-hires, but apparently even actual Mode 5 doesn't do it automatically.
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Mode 5 colour limitations?

Post by dougeff »

That's what I did on my test of Mode 5, put everything on both main and sub screens.

It's not clear to me if color math would work properly, but maybe color math with the fixed color would be ok.

Edit. I tested that. It works fine. Color math with the fixed color affects all pixels... and there were no stripes nor other problems.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: Mode 5 colour limitations?

Post by Nikku4211 »

rainwarrior wrote: Thu May 12, 2022 12:19 am Based on the description, you mean Ramsis' Furry RPG?
viewtopic.php?p=140174
Yeah that one with the kitteh or something.
kulor wrote: Thu May 12, 2022 8:11 am We've had a lot of back-and-forth about mixels already, and I don't have a lot to add, aside from that I think it looks fine (really good, actually), and I believe a lot of other people will think the same. It would be a shame and a huge waste if nobody ever touched mode 5 because they thought everyone was going to whinge about mixels.
I personally think authentic real hardware mixels look fine too.
They were everywhere on VCS, C64, and Intellivision, as well as some other consoles and computers from the '80s, so mixels is something I'd accept that retro consoles in general could incentivise.

It would be a waste to trade hi-res for consistently lo-res.

It's good to test market mode 5 and 6 lol.
creaothceann wrote: Thu May 12, 2022 9:15 am In horz. hi-res modes you can't really do color math (afaik), which would be important for a battle screen.
How important is it really?

You might want to use it for various effects, but do you really need those colour math effects instead of using other effects?
93143 wrote: Thu May 12, 2022 1:19 pm Well, yeah, that's what causes the hi-res in the first place.

Writing that quick test ROM last night, I figured out that even in Mode 5, you have to manually send BG1 to both the main screen and the subscreen if you want the hi-res to work properly. I knew it worked that way in pseudo-hires, but apparently even actual Mode 5 doesn't do it automatically.
I guess 'pseudo' hi-res isn't so pseudo after all...
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Mode 5 colour limitations?

Post by rainwarrior »

Nikku4211 wrote: Thu May 12, 2022 3:02 pm
creaothceann wrote: Thu May 12, 2022 9:15 amIn horz. hi-res modes you can't really do color math (afaik), which would be important for a battle screen.
How important is it really?

You might want to use it for various effects, but do you really need those colour math effects instead of using other effects?
Final Fantasy II or Secret of Mana do all their spells as opaque things.

Final Fantasy III and Chrono Trigger did a ton of additive fades and other blend effects for spells. (Especially the espers / combo abilities.)

Maybe those are good examples to compare to weigh the difference.
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: Mode 5 colour limitations?

Post by Nikku4211 »

rainwarrior wrote: Thu May 12, 2022 3:17 pm Final Fantasy II or Secret of Mana do all their spells as opaque things.

Final Fantasy III and Chrono Trigger did a ton of additive fades and other blend effects for spells. (Especially the espers / combo abilities.)

Maybe those are good examples to compare to weigh the difference.
The fact that Final Fantasy 4 and Secret of Mana SNES released to store shelves with opaque effects like that means it's not really necessary to use colour maths in battles.

It would be nice to have, but it's not necessary.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Mode 5 colour limitations?

Post by Pokun »

Yeah I mean many RPGs conveys battles mostly in text. Even late RPGs like Earthbound have super simple animations and non-existent backgrounds.
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: Mode 5 colour limitations?

Post by Nikku4211 »

Pokun wrote: Fri May 13, 2022 12:46 pm Yeah I mean many RPGs conveys battles mostly in text. Even late RPGs like Earthbound have super simple animations and non-existent backgrounds.
Well 'non-existent' backgrounds isn't exactly accurate(to Earthbound SNES), but okay.

I can see them working on mode 5, though that'd limit how trippy Earthbound SNES' battle backgrounds can be.

You just need a thick font for the text.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Mode 5 colour limitations?

Post by Dwedit »

Old games used "Psuedo Hires" mode to do 50% transparency with another layer, so on a consumer television connected by Composite, it won't look very high-res. But it does work fine for white text against a dark background, Secret of Mana's hires text was quite readable.

Meanwhile, In the vertical direction, interlacing will work its magic, and it will look double-resolution vertically.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Post Reply