Saturday 28 March 2015

The Chromebook strikes back

I had some woes with the Ubuntu 14.10 install on my Acer C720 Chromebook. (See previous post) Even after things improved with fixing display polling and swapdisk usage issues, the compiz/unity managed to produce tiny hiccups and browsing could still bring the system to a standstill. I also encountered unexplainable behavior, such as Processing refusing to run sketches when on battery power. (Hey, I'm just describing what I've seen.)

Now I have both switched to a MyDigital 128GB SSD drive and installed Ubuntu/LXDE using this one weird trick. Now the ChromeOS and the LXDE happily co-exist and they can also share stuff in the Downloads folder. Yes, the desktop might look a bit bare but that's what I like nowadays.

Taking a screenshot using scrot, outputting to Downloads directory and adding the images to this very blog entry in the ChromeOS browser.

I expected the whole thing (both the SSD and the crouton install) to be difficult or timeconsuming but in fact it was all very simple. After you have the ChromeOS recovery USB stick, you can experiment with almost whatever and get your ChromeOS back if you mess things.

The new C720

On the positive side: I've encountered no speed hiccups, halts or other major problems. The touchpad works and I've yet to see any wifi problems either. The switch between the ChromeOS side and the LXDE sides is rapid and thus awesome. My Processing sketches run smoothly and browsing does not choke.


Now, when I turn on the computer, It'll go to ChromeOS after pressing CTRL+D at the start. There I press CTRL+ALT+t to invoke the chrosh developer shell, and type shell to get to the Linux terminal, where again sudo startlxde runs LXDE. It sounds like a rigmarole but I think in the end I'm at the desk faster than with the previous Ubuntu install, which, bear in mind, did not have the handy ChromeOS switch.

Some small issues:
  • Despite setting the keyboard layout via setxkbmap, Scandinavian characters don't either function or display universally. To an extent this was already a problem with the previous Ubuntu install.
    • It's a locale issue. File called /etc/default/locale ought to have LANG=en_US.utf8. The setxkbmap se can be inserted into /etc/xdg/lxsession/LXDE/autostart. These work after restarting.
  • Trying to add a Volume Control element into the bottom panel resulted in a non-response. Using alsamixer from the terminal I could at least alter the master volume level.
    • Erm, it does seem to add it now without problems. I don't know what's different.
  • Inserting USB sticks and SD cards don't seem to register well on the ChromeOS side, but it remembers to whine about them even if the devices have been both mounted and ejected on the LXDE desktop.
  • The filesystem seems to have a mistaken idea about the time/date of files from another system (memorystick etc), they can be two hours off. This goes so far that if a file brought from another computer is "in the future" it may not be shown in the desk windows.
  • The Chromebook does not have F11 or F12, which are often important keys in emulators. (Because old computers mostly had only F1-F10)
    • xmodmap -e "keycode 133 = F11" makes the Magnifying Glass key into F11, and xmodmap -e "keycode 49 = F12" will make the key below ESC into F12.
      • Putting these in the autostart (see above) seems to be a bit hit/miss. I might blame the crouton integration. (see below)
  • Some adventurous attempts at getting Steam to run on this setup resulted in the startlxde failing to take me to chroot, with message "unable to connect to X server: No such file or directory"
    • sudo sh -e ~/Downloads/crouton -n precise -u brought it back to life. (Where 'precise' is the name of the chroot in question.)
    • Tip: Perhaps it's too much to expect Steam to work on this install. Well, some people on the net have managed to do it.
  • It may be worth of note that copy/paste clipboard does not work between the ChromeOS and chroot side. 
    • Creative uses of the shared Download folder helps this somewhat. For example I can set up a textfile for the purposes of sharing snippets. The need does not come up that often, though.
    • A more definite solution comes out from loading the crouton integration from the Chrome Web store. It also needs the crouton extension, from the command line.
  • MIDI did not immediately work, this was due to some permission issues related to the drivers.
    • sudo setfacl -m u:yourusername:rw /dev/snd/*
  • If the chroot desktop offers to upgrade the distribution version, don't do it, it's a waste of time. It's a bit unclear how to proceed with a version upgrade.
So the Chromebook dualboot does require a bit of tinkering, but I'm already much happier with this than the previous Ubuntu install. Currently my uses for the LXDE side are fairly narrow and my first priority is not to make it into a modern desktop computer anyway. Plus that I'm a bit hesitant to install something that might compromise the smooth working of the desk. The ChromeOS side does certain things well enough.

Thanks again for marq for helping sort many of these issues out.

Monday 23 March 2015

Caverns of Larn on Linux?

I'm a bit surprised that Noah Morgan's Larn from 1986 is not directly available from Linux repositories. (I can get it for mac from Macports, for example.)

Yet, Larn can be compiled from the sources here. Extract the archive, then off to the /src directory and as they say sudo make and then sudo make install. Then run the ./larn.sh from directory above.

The compiler may miss the curses.h library, which can be installed with these helpful instructions.

For example,

$ sudo apt-get install libncurses5-dev libncursesw5-dev

The Larn version seems to be the real deal content-wise, though it plays slightly different to one I'm used to. Usually the game gives suggestions for descending staircases, entering buildings, opening doors, chests, praying on altars etc, here you have to use keys. I'm not sure if this can be configured from the command line or if it is defined or absent altogether in this source. More crucially, the version seems to be a bit more explicit about certain potion and scroll effects, which may have been silent in other versions.

Sadly I've found the Linux game to halt occasionally with no helpful output as to why. This has happened when dealing damage to a monster or falling into a pit.

Edit: This might be an adaptation of the DOS version of Larn. I'm more familiar with the Atari ST and Macintosh versions.


Some Larn hints for beginners

The game works with the typical hjklyubn direction keys. Use w to wield weapons, W to wear armour, T to take off armor. Comma key picks up objects, d drops them. Use q to quaff potions and r to read scrolls/books. The key c casts spells, which are three-letter combinations. You learn the spells from books. Casting spells reduces your "spell" count, but it will replenish automatically.

(In some versions you also need: E key to enter, < > climb stairs, O open doors/chests.)

Home, LRS office, DND store, College of Larn, Bank of Larn, Volcano, Dungeon Entrance, Trading Post and DND store.

From the top world you can enter various places. There are two dungeons, the dungeon proper and the Volcano. Don't enter the Volcano unless you know what you are doing, or have pretty much destroyed the dungeon first.

The very beginning: Sweep clean the first dungeon level before bothering to go down. There are no really dangerous monsters on level 1, just be a bit careful with slow hobgoblins (H) and multiple enemies. Remember, you have the magic missile spell ("mle") from the beginning, but don't trust it to work every time.

Low level characters: Don't open any chests, avoid the altars, don't wash yourselves in a fountain, don't pry off any jewels off thrones and don't open any doors if possible. You'll live longer. Go down only when you are at least level 3. Hopefully you can afford some weapon and armor, too. There you need to start using your "mle" spell actively, because letting the monsters close on you is never very wise.

Potions (!), Scrolls (?), Chest (C), Altar (A), Statue (&), Jewel (<), Staircase (%), Trap (^)
Still, it is sometimes unavoidable that you fall into a pit and soon after into a teleport trap, together these can easily drop you down 3 dungeon levels lower than you intended. A hellhound or a white dragon can easily kill a low-level or poorly equipped character. Then your prime imperative is to find the stairways up.


Later on...

Something that can mess your life early on are the potion and scroll effects, which you desperately need but are unknown to you. One viable strategy is to collect as many potions and scrolls as you can, and when you have 3400 gold, buy and read the Scroll of Identity and see what you have.

All rings and magic items carried bring a cumulative effect and work automatically without you having to "wear" them. Energy rings and rings of regeneration are highly desirable, the former brings back spells and the latter returns hit points faster.

Finding every trick for fund-raising and monster-killing is part of the game so I won't tell everything. Let's just say that visibility-enhancements are also desirable whereas powerful long range spells will give an enormous advantage.

And really, never open a door repeatedly without looking what the effect is.

Play Larn online at http://larn.orgMy views on the online version and some further gameplay notes here.
A later, more spoilerific post about the Larn Volcano Lottery here.

Friday 20 March 2015

Gimmick guns of the Spaghetti West

For the western film aficionado, It doesn't take too long to notice that Italian "spaghetti" westerns often have pretty colorful characters, scenery and items. Besides copious amounts of dynamite, acrobatics and warzone-levels of gunfire, sometimes what strikes as most unusual are the "signature" weapons, special weapons and hidden gimmick guns.

A gimmick gun is often presented as a reflection of the smarts of the character, a notion which may stupefy the modern viewer or the fan of US westerns. Whereas a gimmick gun would be really unprincipled for a hero in an american western, the "hehe, fooled you with my preparedness!" type of thinking is instead a sign of high sophistication in the Italian west.

Here are some examples. Click on the images to make them bigger!


Django's portable gatling gun (Django, 1966)

The scene where this gun is used pretty much set the standard for all subsequent "hidden gun turns tables on enemies" instances in Italian westerns.


The fact that the gun is carried in a coffin is a particularly Spaghetti touch, a cool idea less successfully varied in numerous films.

The belt appears not to need any feeding. Also, the barrels do not rotate, in fact the barrels are not laid out in a circular pattern at all and thus the front part resembles a Mitrailleuse.

Compare this to the more realistic depiction of the Hotchkiss machine gun in Bullet for the General (1966), oiling the clips and all.


Sabata's trick gun (Sabata, 1969) 

Sabata films are a treasure-trove of stupid guns, acrobatics and dynamite. This is a very James Bond-inspired, comic-book style film and perhaps the best in this sub-genre.

Lee Van Cleef's Sabata is equipped to the brim with tricks. For instance, he has an extra-long barreled rifle and a bag he uses as a shield and for setting gun-traps. Nearly all characters rely on tricks here, but Sabata out-wits them all.


Most inspiring is Sabata's tiny, seemingly four-barreled gun. It is strongly implied that the small size of the gun permits Sabata to draw much faster than his enemies. But the gun holds a secret. Should you be so silly to assume that Sabata can fire only four shots... a small panel flips out from the butt of the gun, revealing additional gun barrels! Sucks to be you!



Banjo's banjo-rifle (Sabata, 1969)

Banjo (William Berger) has a banjo-gun that is semi-realistic in the "hidden gun" category. The banjo simply holds a small rifle. It is less credible that the banjo would function as a good musical instrument, though? Not too sure where the empty shells are supposed to come out from.


The rifle resembles a Mare's Leg (a largely fictitious, "sawed-off Winchester"), but clearly the barrel has not been cut.


Trivia: the tune that Banjo plays is a melody from 3:10 to Yuma (1957). Why? Nobody knows.


Indio Black's harmonica gun (Adios Sabata/Indio Black, 1970)

Yul Brynner stars in this colorful and comic-book style Western. He brandishes a manually worked multi-chambered weapon that I initially thought was a completely made up concept. However harmonica guns were once an alternative to revolvers.


In dimensions it also resembles the Mare's Leg but it's not a cut Winchester. The last chamber usually holds a cigar, which Yul then coolly lights after killing all the enemies.


It's worth mentioning the same film also sports the "Flamenco of Death", where the dancer finishes the dance by launching a deadly stone from a dedicated stone-holder on the toe of his boot.


Doc Holliday's gun (Day of Anger, 1967)

Here the gun is not that gimmicky per se, but the film purports that the legendary gunslinger's gun embodies Holliday's gun skills, inherited through past use.

Also, the film has a great collection of "gun wisdom", for example by shortening a gun barrel a few millimeters it is possible to gain an edge when drawing on your opponent, etc.

There's also a sort of tournament duel on horseback with muskets, loaded on the go...


...one might say the film is about guns somehow...


Yeah, that's pretty safe to say.


7-barreled rifle (Hanging for Django, 1969)


Again we have William Berger, whose character this time holds something that might be a kind of a nock gun, although it doesn't make much sense to carry one around.


Machine gun (Return of Ringo, 1965)

What is that they are wheeling in... Another Maxim-wannabe or a Gatling? It's hard to see from this blurry image.


No, it's another composite of different ideas. At least here they acknowledge that the machine gun is a heavy thing and needs two people to operate it. But the barrel arrangement is more reminiscent of "organ guns", volley guns and other proto-machinegun evolutionary dead end designs.



Well, that's it for now. I'll update the list when I get more screenshots.

Monday 16 March 2015

Raspberry Pi 2 first sight


I've only barely had it up an running. Some quick comments.

I put the Raspbian Linux files on an already formatted micro SD card and booted the device. I used the same 5 V adapter that worked with my original Raspberry. I used a HDMI->DVI cable to get a picture out of a display.

It takes about 35 seconds to get to the password prompt, and under a minute I'm at the desktop, that's pretty good.
Trying desperately to make the desk look like an Atari ST.

The desk is smoother this time around, although apparently it has been changed anyway. The windows move around fine without clogging everything down. The browser is reasonably good and I can actually edit this blog post with no trouble. (Though I inserted the pictures later)

Casing? Why bother?
I have to say the Raspbian brings back the good ole days of tinkering and configuring your desktop appearance... There's something about those late 80's and early 90's flat-color graphical desktops that looks very trendy and appealing just now.

The obligatory spectrum emulator
This install came with ready-bundled software, most of which I'm not too excited about, such as the Scratch programming language and some Computer "Science" oriented stuff. That pesky Minecraft also makes an appearance. It's like the Doom of the current generation: it has to be converted onto whatever. It is pretty smooth though the drawing distance is obviously not enormous.

Well, I can hardly complain, it's a solid install that is designed to work well with the Raspberry Pi. In terms of robustness I'm somewhat more positive about this than some of my recent Chromebook/Ubuntu experiences. Time will tell...

This is what a desk looks like...
Edit: On the overall, I'd say the experience resembles an early 2000s laptop PC, even if a bit faster on some counts. The browser has occasionally crashed on me, but that's not unusual. I tried Midori too but it is quite slow. Hatari appears to give a passable Atari ST emulation speed.

For now

The four USB ports already introduced with the 1+ are very welcome, the change to microSD I'm not too fond about.

For something that cost €45 (and probably cheaper somewhere), it's pretty impressive. It remains to be seen whether I get to do anything special with it. For some people it's like an expanded Arduino, but despite the roughly similar form factor I don't see them as filling the same niche. Arduino helps even people like me to "get" electronics and build stuff, but with Pi these things work on another level. It's doubtful I ever do anything more than fool around with software and casemodding.

Thursday 5 March 2015

Atari ST



I had an Atari STE in the beginning of the 1990s and alongside with the Amiga it was my entry point to 16-bit computers.

The Atari ST and Atari STE

Powered with a Motorola 68000 chip, typically equipped with 512 or 1024 Kilobytes of memory and a 3.5 inch floppy disk drive. The display resolutions were 320x200 with 16 colours or 640x200 with 4 colours. Initially, these colours were selected from a total of 512, whereas the later STE extended this to 4096, as in an Amiga. With a special monochrome monitor you could have 640x400 black and white display. Sound came by courtesy of the Yamaha YM2149 chip or DMA sample playback on the Atari STE, which also brought in hardware scrolling.

More advanced models such as Mega ST, Atari TT and Atari Falcon would have better specs, but I'm only really talking about the ST/E.

You could plug a mouse and a joystick into it and play games or run programs. With the MIDI ports built-in, it became a cheap alternative for amateur and professional musicians alike.

A semi-naked Atari STE, with the disk drive removed.

The Atari ST desktop

The graphical desktop with the green background is called the GEM. The operating system is called TOS (Apparently, The Operating System). Both are included in the Read-Only-Memory, which is a bit unconventional but handy for a floppy-disk based user.

I have a bit mixed feelings about the GEM in its simplest forms. Funnily enough, it kind of resembles what we now have in touch screens: simple graphical means for launching apps, and not much else. In huge hindsight, the ST might have benefitted from having a BASIC in the ROM, 8-bit style, instead of this wonky desktop that cramped creativity.

Positively, as the GEM was stuck into the ROM it was really quite universal for Atari ST. With this in mind it was good that the GEM could be customized with software such as RAM disks, command shells, alternative file selectors, virtual hi-resolution etc. With some luck these could be integrated together with all properly written GEM software, adding more sophistication to the system than there seems to be.
Which isn't much, to be honest.
There were also full desktop alternatives such as KAOSdesk. For a graphic journey through the TOS versions and alternate desks go here.

Typically, a poor Atari user would have 3.5 inch floppy disks with 720Kb capacity. The Atari ST uses DOS-style filenames, with 8 letters and a 3-letter extension. So, TXT and DOC files can reasonably be expected to be text files. Rather generously, the GEM can display text-files and readmes without a separate program.

PRG, TOS and TTP (TOS-Takes-Parameters) files can be run as executables. The TTP file expects typed arguments which sometimes worked with ARC, LZH, LHA and ZIP archivers. (Or even ZOO... anyone remember ZOO?)

TOS/GEM upgrade

I just upgraded my STE ROM chips from 1.06 to 2.62, the final version for STE. The upgrade is not difficult but requires some soldering as the jumper settings have to be changed. This also limits somewhat the switching between ROMs. There are a lot of tiny improvements and the GEM feels generally slicker. Some incompatibility may arise, though.
The ROMs are under the floppy drive. The jumpers are on the right (here not set correctly)
WIth these earlier TOS versions, there is no multi-tasking, but there are some workarounds to this in the GEM environment. It can seem toy-ish compared to an Amiga Workbench, but if I had to pick between the two as purely floppy-based systems, I would prefer the Atari GEM.

Desk Accessories

Programs with the .ACC extension, when placed in the root directory of a floppy disk, will be run automatically upon booting and added to the list of resident "accessories".

These can be then called from the GEM top left menu. Control panel, calculators, tiny text editors, games and so on somewhat compensated for the lack of multitasking.

The AUTO folder

The auto folder was a neat way of auto-booting any file on disk without the need to edit any scripts. Create a folder named AUTO. Place an executable file inside it so your Atari ST will run it when booting. *.TTP and *.TOS filename extensions have to be changed to PRG.

If I remember correctly at least some TOS versions occasionally refuse to load the accessories, another glitch I think.

AUTOSTART.PRG

Sadly, the running order inside the AUTO folder depends mostly on which order the files were chucked there. A special software could be used for re-ordering them.

STE_FIX.PRG

One of the silly bugs in version TOS 1.06 in Atari STE messed with the resolution so that the medium resolution (the most useable for TOS) setting would not work when booting. Place the STE_FIX.PRG inside the AUTO folder mentioned above. Or get another version of TOS.

Command shell?

Sadly the GEM does not come with a command shell, more handy for many things. There are shells, though, and the GEM/TOS communicates quite well with them. The most extensive of them, the OKAMI shell, is a reasonable facsimile of a unix/linux type shell but this can be a bit too clever for its own good.

With OKAMI you can use ls, cd, more and so on for examining files and disk contents, but also more complex things like paths and shell scripts. OKAMI's a bit slow and cumbersome for floppy drive use on a standard Atari ST, and it takes nearly 100K so it does not boot instantly.

Games

What's good? Highly subjective. I maybe spent most time playing Larn, Midwinter, Knights of the Sky, Railroad Tycoon, M1 Tank Platoon, Damocles and Llamatron. A lot of people swear by Dungeon Master and Oids. Oh, and the games mentioned here are not particularly Atari ST-specific, as they were available for the Amiga and PC, too.

Recently I've played Larn and been able to get into M1 Tank Platoon too, Virus and Stunt Car Racer are not bad but honestly I'd say most 16-bit games, especially with 3D-graphics, are not highly playable.

SD card readers

It would be wise to throw away the floppy drive and get a card reader instead. A HxC floppy emulator does a pretty good job, whereas an Ultrasatan device can be more flexible for replacing a hard drive. (In fact, loading floppy games poses some, but not insurmountable, problems for the Ultrasatan)

HxC is simplicity itself: remove the internal floppy drive and connect the Floppy Emulator with the drive cable and the floppy drive power cable.

The Atari outputs composite video, but there is no direct connector for it.

Amiga/Atari ST combo mouse was a common sight in the past and should not be hard to get.


Here's a good site for deciphering all the connectors of an Atari ST. It seems a VGA for monochrome is not that hard to build, but the weird monitor cable plug may not be easily available.