Atari

From NetHackWiki
Jump to navigation Jump to search

Although Atari is better known for their historic game consoles, they also sometimes made computers. The Atari ST line of computers were capable of running ST Hack, a port of PC HACK 3.51.

The first official NetHack distribution to support the Atari ST was NetHack 3.0.0 in 1989. Support was dropped in version 3.3.0[1], but was "resurrected" in version 3.3.1 by Marvin.

The Atari ST continued to be supported all the way to 3.4.3. However the DevTeam doesn't know if NetHack 3.6.5 can compile or run on the Atari.[2]

Running under emulation

Screenshot of NetHack 3.4.3 running under Hatari.

Hatari provides a usable emulation of various Atari ST models. It requires a ROM to run, but EmuTOS provides legal ROM images sufficient to run NetHack.

The built-in video modes don't produce a good user experience. The color modes do not have sufficient resolution, and only show a tiny portion of the map. The monochrome mode refuses to load the tileset. A usable screen results with these options:

hatari --memsize 8 --harddrive disk --vdi true --vdi-planes 4 --vdi-width 640 --vdi-height 480

where the "disk" directory becomes an emulated file system, and contains an unpacked NetHack distribution. You will need an LHA-capable archive program to unpack the official distributions.

You can specify --mono instead of the VDI options, and enable TTY mode in NETHACK.CNF. The result emulates a video mode that would be possible on a real Atari ST. It produces the usual TTY output, with black text on a white background. It has no support for color, and supports ASCII only; the DECgraphics option is present, but produces an unreadable map.

TTY output in a color mode produces a chunky but readable font, and shows more of the map than the tileset, though still not all of the map.

These function keys are meaningful:

  • F2 toggles between the tiled and ASCII modes. You may need to use control-R to redraw the map after using F2.
  • F3 toggles the visibility of the cursor on the map.
  • F4 looks like it selects a font, but produces only an error "Fontselector not available!"

F11 and F12 are meaningful to Hatari; F11 toggles full screen mode, while F12 pops up a configuration menu (which seems to have some bugs; using command line options is recommended).

Font

A font is bundled with the Atari port as outdated/sys/atari/atarifnt.uue. The file is uuencoded, and once decoded, an ARC-compatible program is needed to extract the file HACKFNT.PRG.

The file appears to be a program that sets the default screen font. Two bitmap fonts are included in the program; one has 16 lines per character and one has 8. The 16-line bitmap begins at offset 0x038C in the file, and extends for 4096 bytes. It is organized as a raw monochrome bitmap, 2048 pixels wide and 16 pixels high. The 8-line bitmap appears after this, at offset 0x138C, and extends for 2048 bytes. It is 2048 pixels wide and 8 pixels high.

The 16-line font is shown below. The image is doubled in size for readability.

Atarifnt16.png

The font resembles the default Atari character set, except for NetHack-specific glyphs in positions 0xC0 through 0xDA.

No configuration to use the font seems to be present. A possible minimum configuation follows, using what some of the glyphs appear to be intended for. Add this to the symbols file to make it available.

start: AtariFont
    Restrictions: primary

    S_blcorn:               \xc0
    S_brcorn:               \xc1
    S_tlcorn:               \xc2
    S_trcorn:               \xc3
    S_tdwall:               \xc4
    S_tuwall:               \xc5
    S_trwall:               \xc6
    S_tlwall:               \xc7
    S_crwall:               \xd8
    S_vwall:                \xd9
    S_hwall:                \xda

    S_throne:               \xd0
    S_altar:                \xd1
    S_upstair:              \xd2
    S_dnstair:              \xd3
    S_upladder:             \xd4
    S_dnladder:             \xd5
    S_brupstair:            \xd2
    S_brdnstair:            \xd3
    S_brupladder:           \xd4
    S_brdnladder:           \xd5
    S_room:                 \xca

    S_pool:                 \xd6
    S_lava:                 \xd6
finish

References