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: 1409
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
2015-01-23 08:39
ChristopherJam

Registered: Aug 2004
Posts: 1409
Oh, and here's an example layout for the 'arbitrary first 16, distinct final eight' case:

|00'  '  '  |  '  'dd'ff|  '  '33'  |  # MCM bmp bg layer
| 1'14'45'5 |  '  '  '  |  '  '  '  |  # MCM mob layer
|  '33'  '77|88'aa'  '  |22'55'  '  |  # MCM bmp fg layer
|  '2 '  '6 | 9' b'c 'e |b '6 '9 'ac|  # hires mob layer

|01 23 45 67 89 ab cd ef b2 65 93 ac|  # displayed colours
2015-01-23 11:14
Oswald

Registered: Apr 2002
Posts: 5094
nice find, something for HCL :)
2015-01-23 11:58
HCL

Registered: Feb 2003
Posts: 728
Me!? :)
2015-01-23 13:18
ChristopherJam

Registered: Aug 2004
Posts: 1409
Thanks, @Oswald.
Help me, @HCL, you're my only hope :D
2015-01-23 14:18
Dane

Registered: May 2002
Posts: 423
But when would 16col unrestricted in such a small area be useful?

Fiddling with bitmap, sprites and priority to get unusual graphic modes is usually my cup of tea. :)
2015-01-23 14:28
Joe

Registered: Apr 2002
Posts: 229
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: 5094
I mean it could make a loaderpart or something if Y stretched :)
2015-01-23 14:37
Jammer

Registered: Nov 2002
Posts: 1335
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: 1409
@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: 411
This calls for Copyfault as the problem should please his interest in GFX modes and mathmatical problems :)
 
... 25 posts hidden. Click here to view all posts....
 
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
MWR/Visdom
Guests online: 110
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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