High resolution ROM/RAM tiles attribute mode

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
Post Reply
User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

High resolution ROM/RAM tiles attribute mode

Post by Jubatian » Sun May 05, 2019 9:54 pm

Yet another video mode, experimenting towards something which could back a large game on a plain (no SPI RAM) Uzebox.

This is an 1 bit per pixel mode with attributes at 4.5 cycles / pixel, what sets it apart from the slightly higher resolution Mode 40/41/42 group are two important things:
  • RAM tiles! This mode can mix ROM and RAM tiles like most modes do for sprites.
  • It has 4bpp attributes without the Palette Buffer, so 256 bytes of RAM saved.
Otherwise I rather aimed towards sort of a blend between my more complex modes, there is no X scrolling, but Y scrolling, arbitrary splitting, and similar crazy stuff are there. The mode itself is about 10 KBytes (code tiles pushed to the max), for the tiles (ROM/RAM) uses Mode 40/41/42's format.
mode45_test_screenshot.png
Mode 45 test screen
mode45_test_screenshot.png (57.92 KiB) Viewed 978 times
There is no sprite engine yet, due to that this is 1bpp, sprites need different approaches. Much like on the ZX Spectrum or a Plus4 High-Res mode game. This mode indeed could be used for Spectrum or possibly Plus4 ports. Otherwise here is a concept of what I envision on this:
mode45_concept.png
1bpp RPG concept on Mode 45
mode45_concept.png (2.12 KiB) Viewed 978 times
The source is up in my GitHub fork: https://github.com/Jubatian/uzebox/tree ... ideoMode45

RAM layout is interesting as due to the tight constraints each row has to take a 256 byte memory bank, so 2K of RAM is used for the RAM tiles. However as the demo shows, it is perfectly possible to interleave Video RAM or Attribute RAM rows into it if less than 256 RAM tiles are needed (the implemented kernel functions still make it easy to plot stuff if speed is not a huge concern).

For Attributes I already provided a 3bit FG + 3bit BG option (8 FG colors and 8 BG colors), which can also be exploited further by appropriate palettes to fine-tune memory usage by freeing up bits within the Attributes RAM (for example to store game state related to the tile, passibility, things like that).

My goal, like the concept art shows, is an RPG, one which loads most of its data from SD card as needed. With this mode individual areas finally could fit well while the versatility of the mode, especially attributes, allow more diversity than higher color modes.

Maybe you might also see some uses for this mode, so anyway, here it is, yet another possibility!
Attachments
m45demo.uze
Mode 45 demo
(20.45 KiB) Downloaded 29 times

CunningFellow
Posts: 1174
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: High resolution ROM/RAM tiles attribute mode

Post by CunningFellow » Tue May 07, 2019 7:54 am

Nice.

It takes me 3 years to do a new video mode.

You are a coding machine.

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: High resolution ROM/RAM tiles attribute mode

Post by Jubatian » Wed May 08, 2019 9:40 pm

CunningFellow wrote:
Tue May 07, 2019 7:54 am
Nice.

It takes me 3 years to do a new video mode.

You are a coding machine.
I would rather say, desperate :D Trying to come up with something for a large game still working fine with that 4K RAM.

CunningFellow
Posts: 1174
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: High resolution ROM/RAM tiles attribute mode

Post by CunningFellow » Wed May 08, 2019 10:18 pm

What is your "ideal" video mode for this large game?

It sounds like low RAM usage may be one of the things and that is a hard one.

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: High resolution ROM/RAM tiles attribute mode

Post by Jubatian » Wed May 08, 2019 11:02 pm

CunningFellow wrote:
Wed May 08, 2019 10:18 pm
What is your "ideal" video mode for this large game?

It sounds like low RAM usage may be one of the things and that is a hard one.
Yes, low RAM usage is a primary concern, but low ROM usage is also important. I would like to get good diversity, attribute modes work well for that as they permit distinct colorations of the same tile, even on the same screen, but of course the cost then is that the attributes take RAM. However at 1bpp or 2bpp, it can still work out okay with sufficient RAM remaining for sprite blitting. The C64 scene shows that it is very much possible to be creative for art as well when you have attributes.

ROM usage comes in play when aiming for animating sprites, and having a good diversity of sprites with rich animations. These can not realistically be loaded off of SD apart from a few specific cases, but then taking away RAM from non-sprite graphics. So it is ideal to have plenty of ROM for sprites.

I think with the Uzebox's limitation, this is about the best if one wanted to have lots of loaded graphics, and I do want this for the RPG I envision. To be able to have a variety of environments, and a variety of art including battle graphics as one explored the world. With this mode it is realistic to have attributes and about 200 RAM tiles on a reasonably large screen to build up hi-res art (in about 3K). 2bpp would already suffer at this limiting the loadable geometry as RAM tiles are twice as big, although rather a matter of preferences. Mode 52 would work OK, I just didn't feel that comfortable with it, to be capable to exploit its capabilities by appropriate pixeling. 1bpp just feels more familiar in this regard, and has its definite retro aesthetic.

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests