Enhanced ARX True High Resolution Display Driver

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
stefano
Posts: 569
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Enhanced ARX True High Resolution Display Driver

Post by stefano »

It surely flickers a lot, but a photo hides the problem :P
z88dk_gray_zx81_mandelzoom.jpg

Code: Select all


#include <stdio.h>
#include <math.h>
#include <gray.h>


float a,b,c,d,e,g,h,i,j;
int x,y;
int xmax,ymax;
int k;
float l,m,n,o,p;

void main()
{

 	g_clg(G_WHITE);

	xmax=255;
	ymax=63;

	a=0.10167; //b=0.1077;
	b=0.105;
	c=-0.60767; d=-0.6055;
	e=4.0;

	g=(b-a)/(float)xmax;
	h=(d-c)/(float)ymax;
	
	for(y=ymax; y>0; y--)
	{
	  j=(float)y*h+c;
	  for(x=xmax; x>0; x--)
	  {
	     i=(float)x*g+a;
	     k=0;
	     l=0.0; m=0.0; n=0.0; o=0.0;
l110:	     k++;
	     if (k<100)    // Iterations   (if you have time, raise to 150 or more)
	     {
		p=n-o+i;
		m=2.0*l*m+j;
		l=p;
		n=l*l; o=m*m;
		if ((n+o)<e) goto l110;
		g_plot (15+x,y,k&3);
	     }
	  }
	}
while (1) {}
}


EDIT: re-tuned to reduce the computation depth. Still very slow !

zcc +zx81 -subtype=grayarx -clib=arx64 -create-app -lm gmandel.c
arx_graymandel.p.gz
(2.22 KiB) Downloaded 4 times


zcc +zx81 -subtype=gray -clib=wrx64 -create-app -lm gmandel.c
wrx_graymandel.p.gz
(2.17 KiB) Downloaded 5 times
Last edited by stefano on Wed Apr 24, 2024 2:30 pm, edited 1 time in total.
User avatar
stefano
Posts: 569
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Enhanced ARX True High Resolution Display Driver

Post by stefano »

The fractal program is cool but very slow. It probably takes some day to complete on a regular zx81, I'm tuning it to restrict the execution time a bit.
User avatar
stefano
Posts: 569
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Enhanced ARX True High Resolution Display Driver

Post by stefano »

All, I've updated the libraries already in the Z88DK tree.
On any problem I can get back to it and try to tune it better.
The sampler archive I've posted some time ago is still very close to the current tuning, if something looks wrong please check the latest test cases before complaining.
I can obviously rebuild some example program you liked more, but you can do it yourself now, we fixed lib3d.lib too.
User avatar
stefano
Posts: 569
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Enhanced ARX True High Resolution Display Driver

Post by stefano »

I've noticed that ARX graphics driver is still unstable when used in 64 rows mode if the break detection is excluded.
I'm investigating.
In attachment a bouncing balls demo in 64rows mode (runs much faster than on a full graphics page). The ARX version incorporates the BREAK detection as a workaround.
bounce_arx.p.gz
(1.9 KiB) Downloaded 6 times
bounce_wrx.p.gz
(1.82 KiB) Downloaded 6 times

EDIT - The mentioned problem with the ARX / 64 rows / no BREAK mode is now solved. I'm not updating the examples, they're still a valid rapresentation of the current driver status.
Post Reply