IIgs Mandel demo

Viewing 0 reply threads
  • Author
    Posts
    • #2177
      AxelAxel
      Keymaster

      During the course of rewriting the Transputer occam Mandelbrot code, the IIgs Mandelbrot demo program (in ORCA/C) itself was heavily rewritten, too. Here’s the download (.2img image).

      In it’s current beta stage it now offers the options to load external Transputer binaries (mandel.t8 and mandel.t4) as well as keep using the internal code as a fall-back and allows to load a bitstream simulation file, as if it would come from a Transputer.
      The latter is buggy – and I’ve been scratching my head for days why it’s creating an offset after plotting the 5th row of the fractal.

      Here’s a  test – green lines work, red ones don’t – so where’s the difference between read and fread?

      #include <stdlib.h> 
      #include <stdio.h> 
      #include <fcntl.h> 
      #include <orca.h> 
      #include <quickdraw.h> 
      
      #define MAXCOL 16 
      #define MAXITER 32 
      
      void main() 
      { 
      int file, x, y; 
      // int x, y;
      // FILE *file;
      char line[320]; 
      
      file = open("stream.bin", O_RDONLY|O_BINARY); 
      //file = fopen("stream.bin", "rb");
      
      SetPenSize(1,1); 
      startgraph(320); 
      
      for(y=0; y<200; y++) { 
        read(file, line, 320); 
        // fread(line, 1, 320, file);
        for(x=0; x<320; x++) { 
          if(line[x] == MAXITER) { 
            SetSolidPenPat(0); 
          } else { 
            SetSolidPenPat(line[x] % MAXCOL); 
          } 
          MoveTo(x,y); 
          LineTo(x,y); 
        } 
      } 
      close(file); 
      //fclose(file);
      getchar(); 
      endgraph(); 
      } 
      WIP

      The tool is far from being finished – just started to drill myself into the GS/OS resource matter – oh my.  How hard can it be to create a menu and some alert-boxes?!?!?
      Yes I’ve tried Genesys, Design Maker and Foundation already… while Genesys is actually quite usable it genereates outdated System 5.x code you have to manually correct… the others weren’t much fun to work with…

      ToDo’s
      • Don’t reload the T-binary after a new area was selected.
      • There must be a faster way to plot the data than MoveTo()/LineTo()…
      • Change the hard-coded slot, so it runs with any (chosen) slot.
      • Add menus and all that fancy stuff
Viewing 0 reply threads
  • You must be logged in to reply to this topic.