contrapunctus, by Christopher League
 

GeekOS in VGA

The first week of classes seemed to go okay. I’m excited about exchanging code with students using Subversion. Not for group projects, mind you, but in place of downloading my support code and stubs, then emailing back their solutions.

Today I’ve been toying with GeekOS, trying to increase my understanding, and look for other projects to do with it. When I was taking and teaching OS at Maryland, I recall doing much lower-level projects: video and keyboard drivers, getting the task switching code to work, etc. Finally understanding the task switching mechanism was a big eureka moment, I believe. I kept trying to figure out how to jump to the next task in the queue, when really what you do is return to it. From the point of view of each task, it makes a call to the Yield() function, and then sometime later, returns from it. The whole trick is to do the context and stack switch and make the call from one task return to another.

Anyway, GeekOS seems to be designed for higher-level projects now, because the video, keyboard, and task-switching code is all in place from the start. But of course, that doesn’t prevent me from clearing it away, down to just the bootstrap code, and taking my students along on that journey.

Next week, I’m going to talk about PC video modes, and how to write characters and attributes (colors) to video memory. So today I started playing with basic VGA modes, the simplest standard one being 320×200 with 256 colors, also known as mode 13h. I imported some bitmap font code from the Linux console drivers, hacked on the screen.c driver a bit, and now I have GeekOS running in VGA:

That’s a 6×11 font, and seemed to be the best-looking choice with the limited resolution and non-square pixels of mode 13h. But it’s parameterized well enough that I can change a few definitions and employ other fonts stolen from Linux. Here’s a more typical 8×8:

Kind of deliciously chunky, and takes me back to those early days of the PC, when many graphical programs had text that looked about like this. Linux also has a 4×6 font, which is pretty much unreadable, but at least you get 80 columns:

(All of the screen-shots are shown here at 67%, so click through to see the actual size.)

A perverse level of virtualization

So here I am installing a VNC client on my Powerbook so I can connect to my desktop Linux at work and control a VMware installation running Windows XP. And on that virtual XP? I’m running a GeekOS kernel on Bochs.

Just thought I’d share. Although I’d never personally choose XP for anything, I must admit that it has been convenient to be able to run it in VMware, just so I can see what kind of environment the majority of my students are using, and what problems they may run into. All the software I require for my courses is cross-platform, because I don’t want to be tied to anything. I even can cross-compile GeekOS on my PPC Mac and run it on Bochs there.

I managed to get a virtual XP running on my Linux desktop at work, but so far it doesn’t work at home… and that Linux machine at home is so underpowered at this point, I’m not sure I’d want it on there anyway. So using VNC to connect to it from elsewhere made sense.

More on GeekOS later, but so far hacking it is definitely fun. Learned more about segmentation registers on Intel this week than I ever needed to know.

Tramps and thieves

Ah, the League family tree. One of my father’s hobbies is genealogical research. Sometime back I posted about how I am a descendant of King William I, via my mother’s side of the family. Of course, that and $4 will get you a cup of coffee, as they say.

Anyway, the crimes of royals are well-documented, but my father’s side of the family is more… shall we say… colorful? He spent an industrious day at the Maryland state archives last week, browsing police records from South Baltimore during the years 1867–1902. In only 4 hours of research, and looking at a relatively narrow time period and geographical bounds, here’s what they found. Everything below is quoted from my father, so when he says ‘grandfather’, add a ‘great-’ to get relations relative to me.

  • Edward League Nov 27, 1895 7:18 PM Disorderly conduct. Fined $1.00.
    (I am not sure who this was. I have no record of him in my database. He could be in my database under a different given name. However, I suspect that he is related to us, because he was a League from South Baltimore and every other League I have ever found in South Baltimore is related to us).
  • John League (age 33) August 30, 1895 5:15 PM Assaulting with the intent to commit rape on Lizzie Kreamer age 8 years. Released to court.
    (This was my Grandfather League’s cousin).
  • August Geisler (age 23) Jan 26, 1893 9:34 PM Disturbing public worship. Fined $10.00 and court costs. Committed. Released the next day. In other words, he slept it off in the tanker.
    (This was my Grandmother League’s uncle).
  • George Geisler (age 19) Oct 24, 1893 being on B&O cars without authorization. Fined $0.50, plus court costs of $1.70.
    (This was my Grandmother League’s uncle).
  • Thomas League (age 19) Sept 21, 1895 12:40 AM Disorderly conduct.
    (This was my Grandfather League’s older brother).
  • Thomas League (age 33) Sept 25, 1881 Disturbing the peace, using loud and profane language on the streets. Committed and afterwards released on bail to keep the peace and pay costs of $1.95.
    (This was my Great Grandfather)
  • George (age 43) & Annie (age 17) Geisler, July 28, 1881. Assaulting and beating Elizabeth Faulk. Each released for court.
    (This was, most-likely, my Grandmother League’s Grandfather and Aunt. It could have been her Uncle George instead of her Grandfather, but Uncle George was only 7-8 years old at the time, so I suspect it was his father, George).
  • John J. League (age 51 ) May 28/29, 1887 Larceny of three ducks valued at $0.45. Property of Jos Grimm of 611 Light Street. Committed for court. Note: John lived at 317 Light Street. So, after he took the ducks, he didn’t have to walk too far to get home.)
    (This was my Grandfather League’s Uncle).
  • George H. League (age 23) June 22/23. 1887 Selling a hired wagon, valued at $40.00 with intent to defraud the owner, William Robinson. Committed for court.
    (This guy was a very distant relative. Thank goodness, I would not want his actions to besmirch our good name.)
  • William League (age 22) Jul 14, 1887 4:00 PM hauling offensive matter through the streets in an open cart. Released for hearing.
    (This was my Grandfather League’s cousin)
  • James League (age 27) Jul 1887 Disturbing the public peace. Fined $1.00 and released.
    (I think this guy was only a distant relative).
  • Louis H. Bennett (age 39) Nov 12, 1902 Disturbing the peace at 308 S. Hamburg Street. Complainant John J. League. Charges dismissed.
    (Louis Bennett and John J. League were brothers-in-law. Louis was married to John’s sister Catherine. Both of these guys were my Grandfather League’s uncles. By the way, they lived together with their families at this address).
  • Thomas League (age 17) Oct 6, 1893 1:27 AM Burglariously entering the store of Samuel Gross at 316 Light Street with the intent to steal. Committed for court. On Oct 17th, he was sentence to 60 days in the house of corrections.
    (This was my Grandfather League’s older brother. By the way, at the time of the attempted robbery, he lived at 317 Light Street, which was right across the street from the store he tried to rob.)
  • Walter Bennett (age 15) Dec 6, 1893 being on B&O cars without authorization, committed to 30 days in the house of corrections.
    (This was my Grandfather League’s cousin).

Saint-Saëns on Simpsons

I missed a big chunk of yesterday’s Simpsons because it was delayed by some silly game and the DVR is not smart enough to compensate.

But in what I saw, the Aquarium by Camille Saint-Saëns (from Le Carnaval des Animaux — that link is to the iTunes Music Store) played a significant role. It was the soundtrack during the home movie. (I wish I could say I identified the piece on my own, but the closed-captions gave it away. In fact, they’re often helpful for decoding cultural references in the Simpsons, e.g.: [March theme from The Great Escape (1963) playing.])

It occurred to me that I don’t have much Saint-Saëns in my collection. Now, I’m not typically an enormous fan of French impressionists — in music or painting — and I guess I sometimes lump Camille in with Debussy and Ravel. Maybe not an entirely accurate classification, but I’m not a musicologist. Anyway, I certainly enjoy the Saint-Saëns Organ Concerto. In fact, I thought I had a copy, but if so, it never made its way onto my hard disks. (My grandmother was a big fan of that piece, having encountered it in the France part of Epcot… I believe it’s the soundtrack during the simulated lift up La Tour Eiffel. Took us several visits to identify it when I was a kid.)

No, it turns out the only Saint-Saëns in my collection is The Swan from Carnaval — probably the most famous piece therein, and part of some other compilation — and a Havanaise for violin and orchestra. Will have to remedy that.

Happy 2007

The holidays were good this year. The fridge is packed with food from last night’s fest. My head is still a little cloudy. I have a stack of new books to read, a new digital SLR camera — maybe I can start posting new photos here more regularly — and several interesting projects to work on before classes begin again in two weeks.

One is the final draft of our paper on type-based compression of XML. It was accepted, so I’ll be going to Utah in March to present. One review in particular was extremely helpful, and I’m looking forward to studying what he/she wrote more closely, and chasing some more references.

I’ll be submitting my tenure portfolio in the Fall of this year. Hard to believe I’m in year 5 already. This past semester was busy as hell — good in some ways, and frustrating in others. There are a few unfinished administrative things — “open loops” in David’s jargon — that are nagging at me. Hopefully I can knock them out of the way and they don’t interfere with the more interesting projects.

And let’s hope that “Web 2.0” (among other things) inspires more students to come back to computing in ’07.