Close

Xorya Superdemo

A project log for XORYA - extremely low cost game console on PIC32

XORYA game console is just one chip PIC32MX170F256B (32-bit MIPS core, 256K flash, 64K data mem) in DIP28 package and a few other components

shaosSHAOS 11/08/2016 at 17:009 Comments

For people who didn't notice my little demo on Hackaday Superconference during last weekend - this is 5-minute video:

Source code of the demo: https://gitlab.com/shaos/xorlib/blob/master/examples/demo2016.c

This is a collection of some XORLib examples that I created since April 2015 plus couple new pieces of code combined into a single C-file (also 2 additional data files are required and of course XORLib - everything is there on GitLab). Enjoy ;)


UPDATE: Prebuilt binary in HEX form is available on GitLab:

https://gitlab.com/shaos/xorlib/tree/master/builds/demo2016-PIC32MX170F256B-O1

Discussions

Yann Guidon / YGDES wrote 11/09/2016 at 03:08 point

The last sequence... Is it what I think it is ?

  Are you sure? yes | no

SHAOS wrote 11/09/2016 at 14:17 point

and what is it? :)

  Are you sure? yes | no

SHAOS wrote 11/09/2016 at 17:49 point

If you are talking about rotating planet (aka "Moon") then I simply reused animation from my University Project from 1995:

I recompressed it to new format with 7 colors + transparency and simple RLE scheme (displayed with dithering when 2 vertical pixels represent dithered color).

  Are you sure? yes | no

Yann Guidon / YGDES wrote 11/10/2016 at 00:03 point

Oh that part was prerecorded ?

I thought it was easy to recompute it on the fly, I had seen some code in the '95s

The last sequence : I meant the B&W "snow"

  Are you sure? yes | no

SHAOS wrote 11/10/2016 at 00:59 point

Unfortunately I lost all my sources for that demo'95 so I used pre-recorded sequence that I re-compressed with lower resolution and smaller number of shades. Anyway I remember that it was heavy computation - terrain was computed for a few days with save points on 386DX40 machine...

About squares - it was simply random squares for widescreen TV with unproportional monochrome resolution 640x200 (so programmatically they are not squares at all):

for(y=0;y<200;y++)

    memset(xodirectline(y),0,80);

t1 = xoseconds();

t2 = t1 + 32;

while(t1 <= t2)

{

     int x1 = (rand()%90)*7+5;

     int y1 = (rand()%50)*4+1;

#if 0

     int c = rand()%3;

#else

     int c = ((rand()&63)>(t2-t1))?0:1;

#endif

     if(c==2) xorect(x1,y1,6,3,1);

     else

     {

      xoline(x1,y1,x1+5,y1,c);

      xoline(x1,y1+1,x1+5,y1+1,c);

      xoline(x1,y1+2,x1+5,y1+2,c);

     }

     t1 = xoseconds();

}

  Are you sure? yes | no

Yann Guidon / YGDES wrote 11/10/2016 at 01:18 point

I don't get your xo code but ok, it's not what I thought. I was fooled :-D

  Are you sure? yes | no

SHAOS wrote 11/10/2016 at 01:49 point

xo... is for XORLib functions:

xodirectline(int N) returns pointer to videobuffer of Nth line of the screen

xoseconds() returns value of counter of seconds

xorect(X1,Y1,X2,Y2,C) draws rectangular with color C

xoline(X1,Y1,X2,Y2,C) draws line with color C

  Are you sure? yes | no

SHAOS wrote 11/09/2016 at 02:56 point

Demo is in 640x200 monochrome mode with color burst enabled, so TV will see color in most 4-pixel combinations with effective resolution 160x200 pixels, but 1st scene (with my face avatar) is actually 160x400 because I used interlaced trick (works on most modern NTSC TVs) - quickly switching 2 images every frame to force TV to build full frame with better resolution - that's why it looks better than expected :)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 11/09/2016 at 03:02 point

WOW

  Are you sure? yes | no