new video mode...

The Oric video chip is not an easy beast to master, so any trick or method that allows to achieve nice visual results is welcome. Don't hesitate to comment (nicely) other people tricks and pictures :)
Post Reply
mmu_man
Flying Officer
Posts: 215
Joined: Thu Sep 21, 2006 7:45 pm
Location: 26000 Valence, FRANCE
Contact:

new video mode...

Post by mmu_man » Sun Oct 08, 2006 12:56 am

I saw some interesting things in recent demos, and wondered about a way to do similar stuff in text mode...
Came up with a funny text mode :
Image

Basically, the first char of the line switches to HIRES, the 2nd byte of each HIRES line has a color attribute, then the 3rd has the text attribute to go back to text (an optional 4th one has a alt charset attribute) :)

I think it could be used with more colors / interleaved colors like RGBRGBRG and matching alt charset, this gives a virtual 8 colors 2pixels / char...
about 15 to 20 lines (more means charset colision) of 40*2=80 8 color pixels... not counting the video-inversion bit every 2 pixel.

Using text mode means less data to handle (= higher frame rate).

http://revolf.free.fr/oric/clores/

User avatar
Dbug
Site Admin
Posts: 2366
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug » Sun Oct 08, 2006 12:13 pm

Cool :P .
Never got the idea to use alternate charset for that.

It looks like you found a variant of what I did for my STNICCC 2000 demo. It was my first practical use of the method after I discussed it on the newsgroup comp.sys.oric.

Image
The idea is that I set in the HIRES screen the folowing values:

RED INK
GREEN INK
BLUE INK
BLACK INK
RED INK
GREEN INK
BLUE INK
BLACK INK

Repeat 25 times and rince :)

Then I redefined the character set to get special "matrix" patterns that will intersect the ink attributes on each scanline:
0000 0%
0001 25%
0101 50%
1111 100%

idealy I should have the 75% but we do not have enough usable characters due to the fact that we can redefine only 4 characters every 5 since the 5th is overwritten by HIRES attributes changes.

So then by redefining characters it's possible to get something like:

SETPIXEL(X,Y,RED,GREEN,BLUE)

With RED, GREEN and BLUE being a value between 0 and 3, the ASCII code of the character to use is computed as:

36+RED+GREEN*5+BLUE*5*4

The C routine to redefine charsets:

Code: Select all

char TableDither[4]={0 +64,36+64,54+64,63+64};
 
void RedefinesChar()
{
  char	*adress=(char*)0xB400+8*36;	// 36
  for (char blue=0;blue<4;blue++)
  {
    char v_blue=TableDither[blue];
    for (char green=0;green<4;green++)
    {
      // Redefines 4 characters...
      char v_green=TableDither[green];
      for (char red=0;red<4;red++)
      {
        char v_red=TableDither[red];
        *adress++=64;
        *adress++=v_red;
        *adress++=v_green;
        *adress++=v_blue;
        *adress++=v_red;
        *adress++=v_green;
        *adress++=v_blue;
        *adress++=64;
      }
      // ...and skip the 5th
      adress+=8;
    }
  }
}
Really looking forward to anything you'll produce :)


There are a bit more stuff in this article.

mmu_man
Flying Officer
Posts: 215
Joined: Thu Sep 21, 2006 7:45 pm
Location: 26000 Valence, FRANCE
Contact:

Post by mmu_man » Sun Oct 08, 2006 8:44 pm

Oh right I was wondering where I had read that...
Yes I saw that demo, but I thought it was all done in hires.
One problem with alt charset is it's smaller. The resulting virtual resolution is smaller too. On the good side it's further away in memory, so we can use more lines before coliding with it.

mmu_man
Flying Officer
Posts: 215
Joined: Thu Sep 21, 2006 7:45 pm
Location: 26000 Valence, FRANCE
Contact:

Post by mmu_man » Sun Oct 08, 2006 8:46 pm

About the 75% issue, well I'm not sure the human eye is linear anyway, maybe it's better to have a log scale.

mmu_man
Flying Officer
Posts: 215
Joined: Thu Sep 21, 2006 7:45 pm
Location: 26000 Valence, FRANCE
Contact:

Post by mmu_man » Sun Oct 08, 2006 9:28 pm

Now I wonder what we could do by putting mixed alt/normal charset attributes on hires lines...
It could be used to do fast effect even on text screens, like 8-step transtions between charsets.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest