[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Plugin VMs (was Re: Squeak Porting advice ??)




Andrew, I believe I can help you somewhat, now that the pluginized VM is
nearly completed.

Possibly the hardest part of starting out on a port is the apparent
magnitude of the job, now that there seems to be serial ports, sockets,
sound output etc to write. Well, with a pluginized VM, the main chunk of
code no longer has any of that for you to worry about. You will still
need to work out the window related stuff, input events and files in
order to get a working system, but you won't have to worry about serial
ports at all unless and until you work out how to do the VM plugins and
the serial port code. The image can now happily live without them.

If you go to
http://sumeru.stanford.edu/tim/pooters/SqFiles/plugs/i686-Linux you will
find a tar.gz of an entire system aimed at (duh) i686 redhat linux. It
is possible you will have a machine to try this out on and see what is
what. You will also find a 'src' directory with a full set of source
files (use the makefiles etc from the tar.gz file) including the plugins
that work on linux. Note that not all the IO systems are there; there
was no support for serial or midi under linux and so no plugin is
required. You will need to alter:-
 - sqXWindow.c in ways I could not fathom, not being an X geek.
 - sqUnixDirectory.c to make sqVMSDirectory.c
 	Compare and contrast with other platform versions to really see what
 is needed. 
 - sqUnixExternalPrims.c to make sqVMSExternalPrims.c
 	simply returning 0 for
 	ioLoadExternalFunctionOfLengthFromModuleOfLength, ioLoadModuleOfLength
 	and ioLoadSymbolOfLengthFromModule and deleting the rest will probably
 	do the job.
 - sqFilePrims.c - hmm, could be tricky from the sound of it. I have to
 keep a quite different copy for my Acorn port, since Acorn has a truly
 dememented file system naming paradigm. One potentially useful idea is
 to copy what I do and translate the filename handed down to the prim
 from a unix-like form in the image to a OS form for the primitive.

there is also a Mac stuffit at
http://sumeru.stanford.edu/tim/pooters/SqFiles/plugs/Macintosh and of
couurse an Acorn version at
http://sumeru.stanford.edu/tim/pooters/SqFiles/plugs/AcornApp
There are also changesets and a workspace and README for truly
psychotically adventurous souls.

Note: there are still some wrinkles needing ironing out! No surprise
there...
a) sockets on linux do not completely work. Everything is fine when
loading the example squeak team gif or the midi demo files mentioned in
the workspaces. Scamper works just fine on webpages at www.squeak.org or
your local machine's Apache server, but not (for example) the
www.Apache.org site. Something is not working whne connecting to machine
asynchronously with a longish response time. Any socket gurus in need of
an excuse to demonstrate their expertise now have one.
b) similar problem on Mac. Gurus step forward!
c) Despite using the _exact same_ sockets file as Linux, the Acorn
network stuff has no apparent problems.
d) at least one Mac has problems with playing the Bach fugue example,
showing symptoms rather like the soundMixPlugin being absent. My
powerBook G3/400 has no problems with any sounds so far as I can tell.
e) This is not final code. I have to revise the plugin loading mechanism
a little to handle module init and shutdown cases.

tim


-- 
It is ten o'clock; do you know where your processes are?
Tim Rowledge: tim@sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>