Subject: Re: Looking for a X11R5 Xcfbpmax X server PMAGB-BA for NetBSD-current
To: None <mhitch@lightning.oscs.montana.edu>
From: D. Sean Davidson <davidson@ZK3.DEC.COM>
List: port-pmax
Date: 01/16/1997 09:39:31
> 
> >  I think I got it running once, but I had to make a patch to the executable.
> >There was some code added to the server that was supposed to handle the
> >display size dynamically, but I think it was buggy.  I was able to locate
> >the code sequence in the binary and patch it to something that worked.
> 
> >net2$ cmp -l Xcfbpmax.orig Xcfbpmax
> >  2291 244 246

Thanks Michael.  That did it.

Here is the little program I put together to fix up the binary I got
from
ftp://ftp.unit.no/pub/NetBSD/arch/pmax/X11R5.

#include <fcntl.h>
#include <unistd.h>


main(int argc, char *argv[])
{
        int i, j;
        long k;
        unsigned char buf[512];

        i = open(argv[1], O_RDWR);
        printf("open = %d\n", i);

        k = lseek(i, 2290, SEEK_SET);
        printf("lseek = %lu\n", k);

        j = read(i, buf, 1);
        printf("read = %d\n", j);
        printf("data = %o\n", buf[0]);

        k = lseek(i, k, SEEK_SET);
        printf("lseek = %lu\n", k);

        buf[0] = 0246;
        printf("data = %o\n", buf[0]);

        j = write(i, buf, 1);
        printf("write = %d\n", j);

        j = close(i);
        printf("close = %d\n", j);
}