Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Unrestricted hires colour mode! (albeit just a *tiny* bit letterboxed..)
2015-01-23 07:59
ChristopherJam

Registered: Aug 2004
Posts: 1380
Unrestricted hires colour mode! (albeit just a *tiny* bit letterboxed..)

I've been spending a few weeks on and off experimenting with how sequences of hires pixels behave, and as something of a side effect I've reached a startling conclusion.

If you layer seven hires sprites over a multicolour sprite over a multicolour bitmap, with the just that final sprite set to a lower priority than the bitmap foreground colours, I'm pretty sure you can have a 24x1 pixel area of any pixel any colour.

It's easily done for a palette of 11 colours as so:
BBbbbbbbbbbbbbbbbbbbBBbb # background layer: two pixels from $d800 & $d802, rest from $d021
 00112233445566778899    # MCM sprite layer. Note odd x-position -> half pixels peek out from under fg
  ff  ff  ff  ff  ff  ff # bitmap fg layer
  s   s   s   s   s   s  # hires sprite layer. 's' where layer's always opaque, space where it is optional


So, any of the pixels whose x%4 is 0 or 1 can be any of the 7 hires colours or any of the three MCM sprite colours, or $d021
any pixels where x%4==2 can be any one of the 7 hires sprite colours (so ensure those 7 include the up to six represented here)
any pixels where x%4==3 are unrestricted

For 16 colours it's more complex. I have a algorithm that will deal with any sequence for which all sixteen colours are present in the first 16 pixels (ie the first 16 are just a permutation), which chooses from about 50 different layouts depending on the last 8 colours and where they can be found in the first 16.

I've yet to generalise to all 16^24 possibilities, but have also yet to find a sequence that cannot be represented. lp_solve and gprolog have both failed me, as they grind to a halt if I try to describe the general problem.

Would anyone care to prove me right or wrong about the general case being solvable (preferably with either an algorithm or a counter example)? I'm having trouble concentrating on anything else while this is still an open question.


Not sure whether this belongs in Coding or Pixeling; posting here because it's pretty impractical for artwork. Still, it's trivially stretchable to full screen height, so perhaps it would be good for a narrow area of vertical 'raster bars' :D
 
... 25 posts hidden. Click here to view all posts....
 
2015-01-23 14:28
Joe

Registered: Apr 2002
Posts: 224
I'd still prefer someone would make editors of the underlay/overlay sprites+bitmap mode Algorithm introduced some years back. Could be really useful in ordinary demos (loading time etc).

But.. I support all and every attempt in breaking the boundaries as long as the final result doesn't become interlaced or too small...
2015-01-23 14:29
Oswald

Registered: Apr 2002
Posts: 5022
I mean it could make a loaderpart or something if Y stretched :)
2015-01-23 14:37
Jammer

Registered: Nov 2002
Posts: 1289
This thing loosely reminded me of my idea for Lemmings port for C64, this time without reversed background/sprite use and narrow playfield ;) Mostly about writing more Lemmings into single sprites and distributing sprites wisely around with multiplexing. Maybe even a bitmap background could be possible in this case? :D Of course there would be some flickering on characters, but NES games also suffered similar problems and they passed anyway :D
2015-01-23 14:59
ChristopherJam

Registered: Aug 2004
Posts: 1380
@Dane - I'm mostly posting here rather than in the pixeling forum because it doesn't seem like a very practical result at all :)

Could perhaps have multiple rows separated by black lines or stretch, but it would still only be three chars wide.
2015-01-23 16:19
Ninja

Registered: Jan 2002
Posts: 406
This calls for Copyfault as the problem should please his interest in GFX modes and mathmatical problems :)
2015-01-24 03:00
chatGPZ

Registered: Dec 2001
Posts: 11127
you forgot "practically useless" =)
2015-01-24 03:21
ChristopherJam

Registered: Aug 2004
Posts: 1380
@Groepaz - I got as far as "pretty impractical" in the OP, but concur that that was something of an understatement :D
2015-01-24 03:39
ChristopherJam

Registered: Aug 2004
Posts: 1380
@Jammer I've had related thoughts myself.. The reversal in the official port's still a brilliant idea, mind.
2015-01-25 20:26
Digger

Registered: Mar 2005
Posts: 421
I can imagine having restrictionless twister upscroller using this mode if combined with FLI. Should be enough rastertime to push all the pixels, providing you'll somehow solve your LUTs ChristopherJam :)
2015-01-26 20:54
ChristopherJam

Registered: Aug 2004
Posts: 1380
@DGGR, pushing the pixels should be fine, however the palette is a different issue.

I've just implemented a solution finder, and I've discovered that while it's almost certainly safe to have a constant background colour and four constant hires sprite colours, I would still need to be able to change three hires sprite colours and all three sprite multicolours every line for complete freedom, and probably some $d800 colours as well - a minimum of 36 cycles, probably more like 42 or 48. Seeing as the sprite DMA alone would be taking 19 cycles per line, I can't see that working.

Enough 'difficult' colours in common between all the candidate lines for the upscroller and perhaps something could be done - it's getting a little far away from the original unrestricted concept, but would certainly make for a more interesting effect :)

ps - python 3's "yield from" is magical!
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Unlock/Padua/Albion
cba
Acidchild/Padua
CA$H/TRiAD
Skate/Plush
t0m3000/ibex-crew
Marq/Fit^Lieves!Tuor..
E$G/hOKUtO fOrcE
Guests online: 148
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Graphicians
1 Sulevi  (10)
2 Mirage  (9.8)
3 Lobo  (9.7)
4 Mikael  (9.7)
5 Archmage  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.06 sec.