SqueakNOS is back!

2006-05-16 23:12:55 - gera

After almost 5 years of official inactivity, SqueakNOS, apparently, has come back from its ashes. This article will try to describe what we are releasing today as a bootable ISO image, talk a little bit about how we got here and a little bit about what's coming next. And quite probably, about some other related things too.

Today, in SqueakNOS-16-May-2006.iso you'll find:

  • a bootable ISO image for PC computers (better playable with vmware).
  • the .image and .chages files corresponding to that SqueakNOS.
  • the C sources and everything you should need to rebuild it.

    During this 5 years SqueakNOS has seen some activity from people not originally related to it, and although we never forgot about this project, this activity was what finally helped us move forward. Thanks a lot to everybody who sent emails and kind words, and specially to those who got dirty into our ugly code and successfully tried to make it come back.

    Lots of things happened in the world, and we thought we would take advantage of them. First, and most important, GRUB, and of course, vmware. Also the Squeak source tree is quite nicely arranged, and the community is much more organized with SqueakPeople, SqueakMap, Monticello, etc. Some of this things we already took advantage from, and some we still have to learn how they work.

    GRUB

    The original bootloader was a mutant born from LILO, linux boot loader and our fingers. It was really a mess, we changed it to overcome an image size limit it impossed, and modified it to initialize the video mode before jumping to the interpreter. Now, we are using GRUB (Legacy) instead of this mutant. We also had to modify GRUB Legacy, but it's a lot cleaner than our original code, and if GRUB Legacy was not dead, our code would make into the standard GRUB release. We'll work on using GRUB2, but there are some things that we need which are still missing (we'll probably implement them).

    GRUB already did all this, except for a small detail.

    VMWare

    We were using VMWare originally in 2001, but now it's more easy to use (VMPlayer is even free to use and quite small for what it does). We are testing everything with VMWare player on Linux, but we successfuly tried it on VMWare on windows and Virtual PC on Mac OSX. We also booted it natively on some boxes, with different results.

    Squeak native sourcecode

    We are so incredibly happy that we started it all again from scratch (no kidding). Already changing to a new bootloader was big enough a change to push us start from scratch. But also the rearrangement of the sourcecode in subversion was so nice that we wanted to join it. We tried not to touch anything in the Common sources, nor in the generated code. And we managed to do it! We created a new platform (SqueakNOS) next to unix, Max OS, RiscOS, Common and win32 in our local copy of the main trunk. To createa a new image we open Squeak and with VMMaker generate everything (only internal plugins are supported of course), and compile. This results in a SqueakNOS.obj which we move to a boot directory where we just "make SqueakNOS.iso". If you want to change the .image, you just move the new one to boot/iso.template, and that's it. As you can see, recompiling SqueakNOS and rebuilding an .iso must be really easy.

    We'd love to get help here, specially in rearranging our source code so it looks more like other Squeak ports, and to check if the platform support is Ok as we implemented it (we know some things are not Ok).

    Squeak community

    Here we got lost. We asked around a few friends, and all recomended to start with a release and an article in SqueakPeople. Latter we'll update the swiki (this time in Squeak's main swiki, so it doesn't get lost), and upload the sources and other things somewhere, but we first need to understand what goes where. So all this'll take some time.

    What's already here?

    Not much yet, but already enough :-)

    SqueakNOS is booting, GRUB gives us a nice 1024x768x32 color screen (this is hardcoded somewhere in the .c source code, so even if you change it with GRUB, SqueakNOS will think it's still that resolution). It already has all the primitives it has in its previous life, and some more. IRQs are handled correctly, and can be handled from Squeak (in fact, that's the only way to do it). When you boot the image you should see a quite standard Squeak (Squeak3.8-6665full), with some add ons. You can open this very same image from a real squeak, and wonder around. There you'll find the source for the SqueakNOSPlugin implementing the primitives, and the class Computer. Although the IRQs and hardware port access are working correctly, keyboard and mouse are not yet implemented (sorry). It'll take a bit more (unless you do it!). It shouldn't bee too complicated, and in fact, it could be ported from the older version quite easily (although we prefer to reimplement it, at least in part).

    When you open SqueakNOS, you'll see lots of things, and you'll see also that if you press a key its scancode will show up in the Transcript. This is what we used to verify that IRQs and ioports are working.

    This is pretty much it. We believe that everything needed to start playing inside Squeak is already done, and now everything missing should be done inside Squeak!

    Near future

  • Of course, make it available in a more Squeakish form (SqueakMap? Monticello? Subversion? ???)
  • Write a serie of small articles, or diary entries describing most of what we did to reimplement it. We did it all in small steps, so we think it'll be a nice serie of articles.
  • Implement PCKeyboard and mouse first!
  • Implement serial port support
  • Implement some kind of file system support over serial ports (vmware lets you set up virtual serial ports, which can be used to connect the inner world to the outer world)
  • Our final short term goal is to be able to develop SqueakNOS from within SqueakNOS. With sources, changes and everything.

    Although we think this could be contributed, we saddly think it'll be a lot easier for us to do it given that it involves going out and in of Squeak for every small test.

    Mid term future

  • Add support for other hardware devices.
  • Start trying with other hardware platforms (PowerPCs on Powerbooks/eBooks)
  • Add networking capabilities (independently of the hardware support)

    Here's where we think the community can help a lot.

    How to try it

    If you have VMWare (player or other), get the ISO and boot it, it should just work. We included a VMWare configuration file in the package. It takes a while to load the image, after this you should see the video mode changing. If you are going to try it in a different "hardware", there's something you may need to change.

    The video mode must be set using GRUB, and depending on the hardware, video memory's address may change.

    To know what video mode you should set, enter GRUB's console (press Esc before GRUB starts), and then in GRUB use 'c' to get a console. The command vbeprobe will list all available video modes. Find one saying 1024x768x32, take note of the mode number (left) and the video address (right). In vmware they should be 0x141 and 0xf0000000 respectively. Exit GRUB's command shell and edit ('e') the entry saying (Squeak.image+Graphics mode), in the first line change the video address, and in the line starting with setvbe change the video mode. That should be all you need.

    No promesses are done here, please, as usual, don't believe anything we say...

    Comments

    The New Announcements List
    2006-05-17 20:25:33 - KenCausey Damned cool!
    2006-05-18 00:56:46 - mikevdg
    Hurray!
    2006-05-19 08:54:05 - cdegroot
    QEMU
    2006-05-19 21:12:25 - Jecel
    Congrats!
    2006-05-25 06:43:27 - rca
    More news
    2006-05-28 21:00:47 gera
    Feedback 2006-05-29 12:10:08 rca
    Thanks for feedback!
    2006-05-29 15:02:03 gera