Friday, March 28, 2008

AVGN: Double Vision Part 1

The Angry Video Game Nerd

(Watch out, GameTrailers as a site bleeds bandwidth.)

I've been watching this guy's videos for a while, and his most recent instalment takes a look at two of the Atari 2600's competitors: the IntelliVision and the ColecoVision.

I was practically raised on video games. I have very clear memories of playing games on my Atari 2600 and mucking about on the NES. I also remember having an IntelliVision, but the memories of this particular console are patchy at best. You can imagine my excitement when I saw this video posted up.

Already I'm spotting a few familiar titles: Zaxxon appears in the intro (though to be fair, Zaxxon appeared on a lot of platforms.) Space Battle with the funny dots drifting towards the clouds in a green field.

This first part talks about the IntelliVision. The console I recognised immediately. Well, that's not quite true. Really, the most distinct part of the IntelliVision are the controllers. They had a grid of metal-like buttons that "pop" when you press them, and a huge round... "thing" beneath that. Nobody forgets a controller like that.

The Nerd points out the IntelliVision's wood texture. I never remembered that, though it was something that I was proud that my Atari 2600 had. The 2600 is a real man's console, wood finish and all. The IntelliVision was always "the console with the big disc button."

The Nerd has a few complaints about the system. One of them is that, without instructions, they're difficult to understand how to play. Apparently, that didn't deter me from playing the games anyway. My experience boiled down to pressing random buttons and seeing what would happen on the screen, if anything. It's a legitimate complaint, compared to, say, the Atari 2600, which had a joystick controller that only had one button, versus the cluster on the IntelliVision controller. I think the games were actually more complex; probably a result of the developers having more buttons to play around with.

Speaking of the controller, that's another of his complaints: they suck. That I didn't notice as a child either, but when you're at the stage where any kinds of blinking, moving lights will amuse you, I suppose it slips by the radar. I don't remember putting much effort into doing well in these games. Since, as I implied before, Atari 2600 games were simpler, it was a lot easier to figure out how to score points and do better, so I put most of my effort into that.

The controller doesn't consist solely of the numbered buttons and the big disc thing. There's another four buttons stationed on the sides. They were tiny and black, and I never remember them doing anything useful, so I mostly ignored them.

Since the numbered buttons don't mean much by themselves, each game would come with a slide-in plastic card thing. What you'd do is slot it over the buttons from the top, and then you'd at least be able to tell what the buttons actually meant while playing the game. I always thought these were really cool, for no practical reason. I just liked seeing the funny little pictures on the thing. I only remember one picture, from one card: "PT Cruiser", with a picture of a small ship above it. Watching the video, I vaguely remember seeing a few more cards, like the one from Space Battle, with the funny triangles, but they never made much sense to me. As a kid, sometimes I'd just play around with the cards, cartridges be damned, just so I could muck around with the pictures.

Then the Nerd reaches for Advanced Dungeons and Dragons. I never had this game myself, but the limited visibility and exploration of dungeons immediately make me think of Neverwinter Nights, and Castle of the Winds.

I had a golf game. The Nerd doesn't cover it, which is just as well, because I remember not being able to hit anything. You wouldn't think that picking a club, hitting a stationary ball at some given strength would be that complicated, but I don't think I ever scored a single hole the entire time I had this game, and indeed the console itself.

Buzz Bombers. Didn't have this game myself, but it reminds me of Donkey Kong Jr. 3, where you're some guy with a spray can trying to get what I presume is Donkey Kong Jr. to the top by spraying him, but there are bugs all over the place trying to grab stuff from you. Now that I think about it, there's not that much resemblance.

And now the Nerd pulls out the "IntelliVoice voice synthesis module." What. The. Fuck. This box is totally new to me, I've never come across it in my life. This should be amusing. Only a handful of games supported it. This box, and indeed the whole console, was made by Mattel Electronics. If you were a kid like me, you remember having at least one speech-based toy made by these guys.

The first game that the Angry Video Game Nerd pops into this thing is B-17 Bomber. And the first thing that strikes me is the voice. Well, that'd be the first thing that strike anybody at that point, but I distinctly remember that exact same guy's voice in those Mattel speaking toys. Did they just hire the same old man for all of these things?

Another thing that sticks out is the terrible voice synthesis of everything after the "Mattel Electronics presents..." bit, which is to say the speech is horribly mauled, possibly "spoken" by another person. I use that word loosely, since it kinda sounds like the syllables were pulled from different parts of some recording. I wouldn't make a point of it, because the speech technology was fairly advanced for its time, but, like those Mattel speech-based toys, following the instructions are impossible because of the distortion.

My memories of the IntelliVision are vague at best. In fact, I don't even remember if I had this before, during or after I got my Atari 2600, which seems to dominate my memories. Probably just as well.

Good times.

Sunday, March 23, 2008

Arc + Emacs

So Paul Graham releases Arc, a new dialect of Lisp. It's been out for a little while now, so it's not exactly news, but the language itself is pretty cool. It seems to embrace the idea of programs rapidly changing, by making programs smaller.

So, how does one actually get to play around with Arc? The approach here will get you Arc running within Emacs so that you can send source from Emacs buffers into the running Arc.

Here's what I started off with:
  • Ubuntu 7.10
  • Emacs
  • git

1. Get Arc

Follow the instructions here to grab Arc via git: Git and the Anarki Arc repository: a brief guide. The files you pull will come out in a subdirectory named arc-wiki/.

For the interested, Anarki is the name of the community-maintained release of Arc. It has all of PG's work, plus some niceties. One of those niceties are a couple of Emacs elisp files that we'll be using to tie Emacs and Arc together.

2. Put stuff in your .emacs

Add this to your ~/.emacs:

;; Arc support
(add-to-list 'load-path "/path/to/arc-wiki/extras")
(autoload 'run-arc "inferior-arc"
"Run an inferior Arc process, input and output via buffer *arc*.")
(autoload 'arc-mode "arc"
"Major mode for editing Arc." t)
(add-to-list 'auto-mode-alist '("\\.arc$" . arc-mode))
(setq arc-program-name "/path/to/arc-wiki/")

Obviously, replace /path/to with the path from step 1.

By default, the Arc REPL prompt isn't read-only, which can be a bit strange. This will make it read-only:

(add-hook 'inferior-arc-mode-hook
(lambda ()
(set (make-local-variable 'comint-use-prompt-regexp) t)
(set (make-local-variable 'comint-prompt-read-only) t)))

If you use parenface for parenthesis dimming like I do, you can enable it for Arc buffers with this:

(add-hook 'arc-mode-hook
(paren-face-add-support arc-font-lock-keywords-2))
(add-hook 'arc-interaction-mode-hook
(paren-face-add-support arc-font-lock-keywords-2))

And if you use paredit, also as I do, then the following will enable that in Arc buffers:

(add-hook 'arc-mode-hook (lambda () (paredit-mode +1)))

3. Trying it out

In Emacs, find (C-x C-f) your way to a file ending with ".arc", then type M-x run-arc (or select Arc -> Run Inferior Arc), and presto! We're in business.

All the keybindings can be read straight out of /path/to/arc-wiki/extras/inferior-arc.el, but here's the main ones I use:
Send top-level form
C-x C-e
Send S-expression before point
C-c C-l
Load current Arc file (NB: can also unjam read-only prompt if that happens, even if the file is bogus)

Enjoy! Remember to git pull every so often to stay on the cutting edge.

Monday, March 17, 2008

Customised Xubuntu on USB Flash

I spent my holidays doing quite a few things. Making my own USB Flash drive portable Linux setup was one of them. I'm on the customised Xubuntu setup right now, in fact.

I started off with Ubuntu 7.10, already installed on my machine. Then I installed the Ubuntu Customization Kit via Synaptic. Torrenting a copy of Xubuntu 7.10 ISO, and I was ready to get to work. (I wanted to install the Xfce desktop environment with a stock Ubuntu 7.10 image, but in reality, getting that to fit in the space restraints was more work that it was worth.)

I then proceeded to customise the Xubuntu ISO by running UCK. Unfortunately, for Xubuntu, it'll download, which is big, bulky and already has a substitute on Xubuntu. If I had the patience to manually unpack the SquashFS image, chroot to the extracted file system's root and do the work manually, I'd do that instead in future.

After that, I had previously selected the option to customise the image, so the prompt to do that appeared at this point. Picking what I wanted was easy using Synaptic. I wanted to focus on getting some useful work done on the go, so amongst my package choices were:
  • sbcl
  • emacs
  • slime
  • git
  • subversion
  • emacs-w3m
  • build-essential (for basic C and C++ support)
  • vim
  • mzscheme
  • muse-el
  • 7zip
Emacs and vim? It's easier to do quick editing with vim, but I use emacs the rest of the time.

sbcl and mzscheme? I'm mostly learning Common Lisp, but with the release of Paul Graham's arc, the option of playing around with it was just too tempting to pass up.

git and Subversion? I prefer using git, but Subversion is what's used at my uni, so my portable distro wouldn't be worth much without it.

Confusingly conflicting package choices aside, all that stuff was still smaller than, which I never really liked anyway. Extraneous language packs also went away, along with a bunch of other miscellaneous things I never used.

From there, I let UCK do its job and repack the SquashFS tree, and was soon rewarded with a shiny new ISO. I backed that up in case I needed it again. At this point I could have burned it to a CD, but that wasn't what I was after.

Now for the USB Flash drive bit. I followed the instructions at USB Pen Drive Linux, with some adaptations. Since I already had Ubuntu as my desktop OS, I was able to format the Flash drive from my own terminal. Since I only needed the files from the ISO, I could just mount it like this:

$ cd /mnt/
$ sudo mkdir iso
$ sudo mount -o ro,loop -t iso9660 that_xubuntu_image.iso /mnt/iso

That made the ISO's files accessible from /mnt/iso/. The copying of the files was straightforward, and I just ignored any missing files.

One thing that isn't made clear on the USB Pen Drive Linux site is that if the USB Flash device hasn't already been made bootable in some way, you'll need to follow the instructions at the bottom of the page.

And that was it. I can pretty much take my desktop with me now, and any work that I save under this environment will be preserved. Funky, huh?

Thursday, March 6, 2008

Muse: Emacs personal wiki

If you make a lot of notes, and want them to be linked and have basic formatting, Emacs Muse will be pretty helpful.

A lot of resources about Muse go on about how Muse can be used to write stuff and publish it to various formats, e.g. HTML, LaTeX, PDF, and so on. What seems to be downplayed is the simple ability to organise notes in a personal wiki, which was something I was curious about, since Muse was pitched as the successor of EmacsWikiMode. This is what I'd like to focus on.

I run Xubuntu, so I merely had to install muse-el via Synaptic, and I was up and running. But where to go from there?

First, since making a note/page in Muse makes a file, I made a directory to store those files, ~/muse/.

Then find a new file in ~/muse/, and give it ".muse" as the extension. This should put you into Muse mode, and you can get started on your wiki.


There's a whole Info manual for this stuff, but for the impatient, here's the stuff I use:

* Heading 1
** Heading 2
*** Heading 3

**more emphasis**
***even more emphasis***



Links resemble MediaWiki's style of double square brackets, and less the WikiWords style that's common elsewhere. It's fine because I like the former better anyway.

[[Yarg]] will link to Yarg.muse in the same directory.

[[Yarg][Alternate link text]] does the same as above, but with "Alternate link text" as the linked text.

Edit an existing link by putting the point over it, and typing C-c C-e. This will bring up two minibuffer prompts for the link destination and link text.

You can also mess with the link source directly by using C-c C-l, which shows the raw wiki text of the document in Emacs.

Like a regular wiki, you can link to notes/pages that don't exist yet, and just press RET to visit them. S-RET does the same, but in a new window.


Lists are simple enough:

- Item a
- Item b
- Item c
- Sub item a
- Sub item b

1. Blah
- Mixing it up
- With different lists
2. Haha

Just type the first list item manually, and use M-RET to add items to the list.

Use C-> and C-< to indent and outdent a list item respectively.

That should be all that's needed to get started with Muse in Emacs.


What. The. Hell.

A classic game that I remember from my childhood. A classically confusing game. Nothing in this game makes sense.

The first thing that struck me when I fired up Pac-Land for the NES was the so-called publisher's logo. It must have been a very long time ago, because I don't recall any company by the name:


In case it isn't obvious, that's "NAMCO" with a 'T' tacked onto the end. Couple that with the "Pac" in Pac-Land, and that's classic IP stealing right there. (Update: Apparently, NAMCOT is a legitimate alternative name to NAMCO. See the comments.) That doesn't bother me too much, but it's always symptomatic of something far worse.

The gameplay. What's this thing supposed to be about? There's no mazes, no dots to collect, and apparently the only aim is to go from left to right, or from right to left. There's ghosts, and there's Pac-Man (even if he is adorned with a hat, for whatever reason), and that's about as far as the Pac-resemblance goes.

Here are the controls: A goes right, B goes left, and any press of the D-pad causes that yellow thing you're controlling to jump. What the hell. How can you screw up controls on the friggin' NES? There's only four buttons and a D-pad. The only way you could possibly screw this up is if you never saw what a NES controller looked like. Or if the "creators" hacked this abomination of a title out of something else, which would lead one to wonder how the original creators screwed it up.

It's so hilariously bad that it's good for five-minute time-wasting runs. If this wasn't on the NES, I would have no reason to play this. And yet since it is, I'm rather curious as to what happens at the end.

If there is an end.