Dawnmist's Angband Stuff

Since I'm toying with getting angband working on the N900, I figured I'd better have a page to store the status of the Maemo 5 port. Particularly as once it's working, I don't want to have to manually keep making tons of updates - I'd rather let people know WHAT I did so if I get exhausted and vanish someone else can pick up where I leave off.

Note that there is NO SOUND in this release - I'll try to get my hands on the separate Debian angband-audio package for maemo, but until then it'll be a silent game. They pulled the old stuff out to meet the Debian free guidelines, and are intending to provide the upgraded sounds as a separate package. You can of course manually copy the old sound files into the /opt/share/angband/xtra/sound directory yourself to get sound.

Required terminal bugfix

The osso-xterminal/libvte installed by default in Maemo 5 has a bug that causes it to send something odd for keys like the Enter and Backspace keys. In the ncurses version of angband, this results in the inability to press 'Enter' during quantity prompts - hence the user is NEVER able to buy things, set options such as delay time, etc.

The libvte library bug is reported at https://bugs.maemo.org/show_bug.cgi?id=6009, and a bugfix deb is provided with that bug report (currently at https://bugs.maemo.org/attachment.cgi?id=2705). Download that, and install as root with "dpkg -i libvte4_0.16.14-0mh9.m5_armel.deb".

Angband 3.1.2v2 version: SDL

Angband 3.1.2v2 : Install by downloading and sending to the package manager. My source/working code: angband_3.1.2v2_maemo.tar.gz, and diffs for the 3 git repository fragments are maemo.diff, maemo-debian.diff, and maemo-debian-common.diff.

Angband Init Screen Angband 8x8 tilesAngband 8x8 tiles fullscreenAngband Ascii

Built from the Debian git repository source for 3.1.2v2 with a few modifications (SDL font/window size, install to /opt rather than /usr, add a menu entry and icon, add a few macros), this version works for the N900 in SDL. The menu icon may not show until you've either rebooted the N900, or installed another package in the package manager.

ASCII, 8x8 tiles, 16x16 tiles 32x32 tiles and bigtile modes are all supported. By default it opens windowed, but you can toggle fullscreen using the Options menu. To get a larger window in fullscreen, grab the bottom right corner of the angband window and drag.

The curses (terminal) version is broken when colour is used (TERM=xterm or TERM=rxvt) - it starts up witha white background, and segfaults at the end of the Initialization screen. You can get black-and-white curses version running by using:

TERM=vt100 /opt/games/angband -mgcu 

"TERM=linux" works and actually shows colours...but the colors are wrong (like solid white walls on white background...). I'd suggest that if you want ASCII, you should use the SDL version for it.

New Macros for the SDL version

The SDL version of angband has NO access to the on-screen keyboard, which means at a minimum there is no access to the ESC key (required to get out of any menu or to leave a shop!), or to the angle or curly brackets (stairs and inscriptions). Access to these has been created by adding a few macros.

Using keys that need the function/shift keys - you have to hold the function key down while pressing the keystroke (it doesn't latch like maemo native programs do). As a result, using the numbers like "1" is somewhat awkward, so the following macros are also available for convenience:

Angband 3.1.1 version: NCurses & SDL

Angband 3.1.1 (v1626) : Optified version compiled from source code from the current Ubuntu deb.

To install, download the deb file, and install (as root) with "dpkg -i angband_3.1.1.1626-1_armel.deb". It won't install through the package manager, because it's still using the default debian/ubuntu category.

Note: I haven't updated the maintainer fields in these trial debs...so the maintainer info is pointing to the debian maintainer. Don't be surprised if they go "what?" if you attempt to contact them about any Maemo-related problems!

With the fixed libvte installed, ncurses angband appears to be fully working. To run it:

The on-screen keyboard (terminal version ONLY) for keys such as "<", ">", "`", is accessed by pressing the blue function arrow THEN the CTRL key. Use ` or the terminal's toolbar ESC as the ESC key.

For the SDL version you'll need to create the macros and set the font size/window size yourself manually - I worked them out after building this deb. Fullscreen settings are odd in 3.1.1 -you can change TO fullscreen in-game, but changing BACK to windowed mode results in the window going nuts. If you need to change back to windowed mode, edit the sdlinit.txt file (see below) with a text editor outside the game and restart the game.

SDL Window Settings

Stored in the file "~/.angband/Angband/sdlinit.txt"

Resolution = 800x480
Fullscreen = 0
Graphics = 1
Bigtile = 0

Window = 0
Visible = 1
Left = 0
Top = 13
Width = 800
Height = 410
Keys = 1024
Font = 9x15b

<Rest of the file unchanged>

The rest of the windows are not displayed, so I've not changed anything there. The Graphics options are 0 = no graphics, 1 = 8x8 tiles, 2 = 16x16 and 3 = 32x32.


Create a game, and save options to file. This will store the file in "~/.angband/Angband/<filename>" e.g. "~/.angband/Angband/User.prf"

Open this file in a text editor, and at the bottom add:

## Maemo N900 key mappings ##

# Bind angle directions to shift-arrow key for convenience
# Shift-up = left-up (7)

# Shift-right = right-up (9)

# Shift-down = right-down (3)

# Shift-left = left-down (1)

# Bind up/down stairs to CTRL-left/CTRL-right arrows, and inscribe/
# uninscribe to CTRL-up/CTRL-down
# CTRL-up = inscribe ({)

# CTRL-right = go down stairs (>)

# CTRL-down = uninscribe (})

# CTRL-left = go up stairs (<)