Windows Magnetic

An interpreter for Magnetic Scrolls adventures

Magnetic 2.3 by Niclas Karlsson, David Kinder, Stefan Meier and Paul David Doherty.
Windows Magnetic by David Kinder.
Web: http://www.davidkinder.co.uk/
Email: davidk@davidkinder.co.uk

Magnetic is an interpreter for the games written between 1985 and 1991 by Magnetic Scrolls, a text adventure producer based in London, England. Although they only produced seven games they have acquired legendary status for text adventures of as good a quality as Infocom accompanied by exceptional graphics.

Magnetic is released under the terms of the GNU General Public License. See the file COPYING that is included with this program for details.

The most recent release of Magnetic can always be downloaded from the IF Archive, the central site on the Internet for text adventures and related interpreters, compilers and other tools.

Getting Started

It is illegal to play Magnetic Scrolls games if you do not own the original packages. Their games, sadly enough, have been unavailable for years, and your only choice may be downloading them from the Internet. Having said this, you should get hold of the following:

  • Story Files
  • Graphics Files
  • Hint Files
  • Title Screens
  • Documentation from the Original Packages


Story Files

The Magnetic Scrolls games as originally distributed were in a somewhat complex data format, different for most platforms, without a clear distinction between the interpreter code and the data for the game. The interpreter uses its own story file format, identified by the file name extension ".mag".

The story files can be downloaded from Stefan Meier's Magnetic Scrolls Memorial web site.

Magnetic has been successfully tested with story files created from Amstrad CPC, Acorn Archimedes, Commodore 64, MS-DOS, Spectrum and Spectrum +3 versions of the games. Programs are supplied to extract the story files from the Commodore 64 and MS-DOS versions.

Currently the Amiga, Atari ST, Apple Macintosh and Sinclair QL releases of the games are not supported. This is because the games were originally written in native machine code for Motorola 68000 based systems (which all the above computers are). When porting to other systems Magnetic Scrolls implemented a limited subset of 68000 machine code as an emulator on the target system; it is this limited subset which the Magnetic interpreter implements.

Magnetic Scrolls also released versions for at least the Apple II and Atari XL. Currently, we have not developed any tools to extract the data from such versions, nor have we located all the versions for these machines. If you have an emulator image or an original version for one of these machines, please contact the Magnetic development team.


Graphics Files

The Magnetic Scrolls adventures were as well known for the quality of their graphics as of their text. The Magnetic interpreter supports graphics files (".gfx") which can be created from the Amiga releases. The graphics files can be obtained from the Internet, from Stefan Meier's Magnetic Scrolls Memorial.

The format of Magnetic's graphics files differs between the original and Magnetic Windows ("Wonderland" and "Collection Volume 1") releases, therefore a story file created from an original release cannot be used with a graphics file from a Magnetic Windows release, and vice versa.

Included with the interpreter are GfxLink and GfxLink2, tools to build graphics files from the original Amiga releases of the Magnetic Scrolls games. GfxLink and GfxLink2 (discussed below) are Win32 console programs, so must be run from an MS-DOS prompt under Windows. To use GfxLink, supply as arguments the directory containing the Amiga files and the output graphics file name, e.g.

    GfxLink C:\UAE\Games\ThePawn Pawn.gfx
The graphics files needed for "Wonderland" and the games in "Collection Volume 1" are somewhat different from those produced by GfxLink; instead GfxLink2 must be used. Firstly, you need an Amiga hard-drive installation of the game, and during installation must have selected the option to expand the compacted graphics files. If you choose this option, two extra files ("user.rsc" and "user.rdf") are created by the installer. Then to use GfxLink2, supply as an argument the full path to the "user.rsc" file, e.g.
    GfxLink2 C:\UAE\Games\Wonder\user.rsc
If GfxLink2 detects "Wonderland", the file "wonder.gfx" will be created; if "Collection Volume 1" is detected, the files "corrupt.gfx", "fish.gfx" and "guild.gfx" will be created.


Music Files

The last Magnetic Scrolls game, "Wonderland", came with several pieces of MIDI music that are played at points during the game. The Magnetic interpreter supports a music file (with the same name as the game file, but ending in ".snd") which can be created from the Amiga or MS-DOS releases. The music file can be obtained from the Internet, from Stefan Meier's Magnetic Scrolls Memorial.

Included with the interpreter is SndLink, a tool to build the music file from the original Amiga or MS-DOS releases of "Wonderland". SndLink is a Win32 console program, so must be run from an MS-DOS prompt under Windows. To use SndLink, supply as an argument the location of the "all.rsc" file from the installation of "Wonderland", e.g.

    SndLink -p C:\UAE\Games\Wonderland\all.rsc


Hint Files

The Magnetic Windows releases of the Magnetic Scrolls adventures ("Wonderland" and "Collection Volume 1") come with online hints, which can be accessed by entering "hint", "hints" or "help" at the input prompt. The Magnetic interpreter supports these hints by looking for a file with the same name as the story file, but with the extension ".hnt". The hint files can be obtained from Stefan Meier's Magnetic Scrolls Memorial.


Title Screens

The Amiga versions of some of the games (as well as the MS-DOS and Archimedes versions of "Wonderland") featured colourful title screens, and some Amiga versions also featured title music. Magnetic supports these title pictures and music, the files for which can be obtained from the Magnetic Scrolls Memorial web page. The title files should have the same name as the game file, except that the picture files must end in ".png" and the music files in ".mp3". The titles appear whenever a new game is loaded into Magnetic.


Documentation from the Original Packages

To prevent software pirates from spreading their programs, Magnetic Scrolls added password protection to most of their games. However, the extraction programs will offer to remove this type of protection. Despite this, most games still cannot be won without the original documentation, since it often contains vital clues. Stefan Meier's Magnetic Scrolls Memorial web page offers a wide range of scanned material from the original packages.


Menus and the Toolbar

Windows Magnetic provides the following menu items, the most commonly used of which also appear on the toolbar:

File/Open New Game... Ctrl+O
Opens a file open dialog to choose a new game to be loaded. Any game currently in memory will be lost if a new game is selected. The names of the four most recently loaded games are shown just above the Exit item in this menu and can be selected directly. A new game can be loaded at any time.

When loading the game file (e.g. "Pawn.mag"), the interpreter will also try to load a graphics file of the same name but with the extension ".gfx" (i.e. "Pawn.gfx" in this example), and a hint file of the same name but with the extension ".hnt". If the graphics file is found then the pictures are displayed in the main or a separate window, depending on the options selected. If the hint file is found then the interpreter will provide a hints dialog for the game when "hint" is entered as a command.

File/Script... F5
Opens a file save dialog to select a file to save the script of the current game to. The script contains all text output by the game and commands input by the user. Select this item again to turn scripting off.

File/Record... F6
Opens a file save dialog to select a file to save command input to. This file will contain the text of all commands input by the user. Select this item again to turn recording off.

File/Playback... F7
Opens a file open dialog to select a command input file, which will usually have been produced using the Record menu item. The game will play back all the commands in the file as if the user had typed them in.

File/Exit Alt+F4
Exits the interpreter.

View/Toolbar
Turns the toolbar at the top of the interpreter window on and off.

View/Status Bar
Turns the status bar at the bottom of the interpreter window on and off.

View/Font... Ctrl+F
Opens a font dialog, which determines the font to be used for the game text.

View/Options... Ctrl+T
Opens the options dialog.

View/Scrollback Ctrl+L
Opens the scrollback dialog, which shows all the text printed since the current game was loaded.

Help/Magnetic Help F1
Opens this help window.

Help/About Magnetic
Opens the About dialog, which shows the version number and credits for this version of Windows Magnetic.


Editing Keys

When a Magnetic Windows game is started, graphics are not initially visible. To turn the graphics on, enter the command "graphics on" at the input prompt.

When Magnetic is waiting for input from the user, the following keys have special meanings:
Delete | Delete the character under the cursor.
Backspace | Delete the character to the left of the cursor.
Home | Move the cursor to the start of the input line.
End | Move the cursor to the end of the input line.
Cursor Left | Move the cursor to the left.
Cursor Right | Move the cursor to the right.
Cursor Up | Show the previous input in the input history.
Cursor Down | Show the next input in the input history.
Ctrl+V | Paste the contents of the clipboard into the input line.

The hotkeys assigned to menu items are given here.


Changing Options

From the Options dialog, you can change the following options of Windows Magnetic.

Show pictures
If None, no pictures are displayed. If Separate Window, pictures are displayed in a child window. If Main Window, pictures are displayed in the top half of the interpreter window. Note that graphics will only appear if an appropriate graphics file has been found.

Scale pictures
This number determines the size of the displayed pictures. If the factor is greater than one, the pictures are scaled up; if less than one, they are scaled down. Non-integer values are allowed and valid scale factors must be in the range of 0.5 to 5.0.

Gamma correction
This number determines the gamma correction applied to pictures. A value of 1.0 means no gamma correction; values less than 1.0 will make the picture darker and values greater than 1.0 will make the picture lighter. Non-integer values are allowed and the value must be in the range of 0.5 to 5.0.

Colours
Clicking on the appropriate button opens colour dialogs to set the text, background and graphics background colours of the main interpreter window.

Show hints in a separate window
If selected, hints are shown in a separate hint window, otherwise the hints appear in the main text window.

Scripts wait for animations
If selected, the replaying of scripts pauses to allow animations to finish.

Make randomness predictable
If selected, the interpreter’s random number generator is seeded from a fixed value, rather than a value determined when the game is started. This option is only of use when debugging the interpreter.

Random seed
If the above option is selected, this is the seed value of the interpreter’s random number generator. This option is only of use when debugging the interpreter.


Revision History

Magnetic 2.3, Windows release 15
  • Support for high DPI and changing DPI with Windows 10: if the DPI is changed (from the Display settings app, or by moving the window from one monitor to another with a different DPI) then the interpreter rescales itself appropriately.
  • The icon and toolbar have been redrawn for a more modern look.
  • The option to specify the scaling applied to the title pictures has been removed: the interpreter now works out an appropriate scaling for itself.
  • The previous sound playing logic, which used the Amp11 library for MP3 and DirectMusic for MIDI, has been replaced by simpler calls to Windows' Media Control Interface.
Magnetic 2.3, Windows release 14
  • Added support for playing MIDI music from Wonderland.
Magnetic 2.2, Windows release 13
  • Fixed a crash on closing the window when the interpreter is waiting to show more text.
Magnetic 2.2, Windows release 12
  • Further improvements to the interpreter's appearance under Windows Vista.
Magnetic 2.2, Windows release 11
  • Minor improvements to the interpreter's appearance under Windows Vista.
Magnetic 2.2, Windows release 10
  • Corrected the file dialogs to use the Windows 2000/XP look.
Magnetic 2.2, Windows release 9
  • Corrected dialog problems with large fonts.
Magnetic 2.2, Windows release 8
  • Corrected the icon registered for .mag files.
Magnetic 2.2, Windows release 7
  • The hints window can now wrap lines of text wider than the window.
  • Added an option to control whether a separate hint window is used.
  • Added support for Windows XP look and feel.
  • Converted this file to HTML Help format.
Magnetic 2.1, Windows release 6
  • Hint files are now supported.
Magnetic 2.0, Windows release 5
  • New release 2.0 of Magnetic.
  • Added an option to have the pictures appear in the main window.
  • Added an option to a set a gamma correction value for the pictures.
Magnetic 1.0, Windows release 4
  • Title music (stored in MPEG Layer 3 files) is now supported.
Magnetic 1.0, Windows release 3
  • Title pictures are now supported.
Magnetic 1.0, Windows release 2
  • Magnetic now works when started with a filename from the command line.
  • Added Microsoft Office style toolbar and menus.
  • Added an options dialog, with options to scale pictures and set the text and background colours.
  • Added a scrollback dialog.
Magnetic 1.0, Windows release 1
  • First release.


Credits

Niclas Karlsson nkarlsso@abo.fi
Development of the Magnetic interpreter.

David Kinder davidk@davidkinder.co.uk
Magnetic 2.x development, Windows, MS-DOS (32-bit) and Amiga ports.

Stefan Meier stefan.meier@if-legends.org
Magnetic 2.x development, JMagnetic Java port and the Magnetic Scrolls Memorial web site.

Paul David Doherty pdd@if-legends.org
Magnetic 2.x development, story file extraction, help and testing.

Stefan Jokisch
MS-DOS (16-bit) port.

Torbjörn Andersson
Unix/Gtk port.

Simon Baldwin
Glk port.

Rochus Boerner
Title screen pictures.

For comments and bug reports, our thanks go to Toine de Greef, Jacob Gunness, Kai Hesse and Miron Schmidt.

Windows Magnetic uses libpng by Guy Eric Schalnat, Andreas Dilger, Glenn Randers-Pehrson, and others, and zlib by Jean-loup Gailly and Mark Adler. Images are scaled using code written by Eran Yariv.


.topic 1
Determines whether either no pictures are displayed, pictures are displayed in a separate window,
or pictures are displayed in the top half of the interpreter window.
Note that graphics will only appear if an appropriate graphics file has been found.
.topic 2
This number determines the size of the displayed pictures. If the factor is greater than one,
the pictures are scaled up; if less than one, they are scaled down. Non-integer values are
allowed and valid scale factors must be in the range of 0.5 to 5.0.
.topic 3
Clicking on this button opens a colour dialog to set the text colour of the main interpreter window.
.topic 4
Clicking on this button opens a colour dialog to set the background colour of the main interpreter window.
.topic 5
This number determines the gamma correction applied to pictures. A value of 1.0 means do nothing;
values less than 1.0 will make the picture darker and values greater than 1.0 will make the picture
lighter. Non-integer values are allowed and the value must be in the range of 0.5 to 5.0.
.topic 6
Clicking on this button opens a colour dialog to set the colour used as the background for pictures.
This colour is only used when Pictures is set to Main Window.
.topic 7
Determines if the interpreter’s random number generator is seeded from an arbitrary or fixed value,
and, in the latter case, what that fixed value is. This option is only of use when debugging the
interpreter.
.topic 8
If this checkbox is selected, the replaying of scripts pauses to allow animations to finish.
.topic 9
If this checkbox is selected, hints for the Magnetic Windows games are shown in a separate window.


Commodore 64 Story Files

Story files can be created by extracting the data from C64 disk images (i.e. files representing the contents of the games released for the Commodore 64). These files are identified by having a file name ending with ".d64". Disk images for "The Pawn", "The Guild of Thieves", "Corruption", "Jinxter" and "Fish!" can be found on the Internet on numerous C64 web sites.

To convert these files to the interpreter's own format the Xtract64 program, which is included with this interpreter, must be used. Xtract64 is a Win32 console program, so must be run from an MS-DOS prompt under Windows. Run Xtract64 without any arguments to read a help screen. The syntax is:

    Xtract64 disk1.d64 disk2.d64 game.mag
For example, for "The Pawn", the command line might be:
    Xtract64 pawn1.d64 pawn2.d64 pawn.mag


MS-DOS Story Files

Story files can be created by extracting the data from both the original MS-DOS releases and the later "Magnetic Windows" releases of "Wonderland" and "The Magnetic Scrolls Collection, Volume 1". The latter of these comprised new versions of "The Guild of Thieves", "Corruption" and "Fish!".

To convert these files to the interpreter's own format the XtractPC (for the original releases) or XtractMW (for the "Magnetic Windows" releases) programs, which are included with this interpreter, must be used. XtractPC and XtractMW are Win32 console programs, so must be run from an MS-DOS prompt under Windows. Run XtractPC or XtractMW without any arguments to read a help screen.

The syntax for XtractPC is:

    XtractPC game game.mag
where "game" is the full path to the data files, minus any trailing numbers. For example, the data files for "The Pawn" are called "pawn1" to "pawn6". If these files are in a directory "c:\Games\Magnetic\Pawn", the command line might be:
    XtractPC c:\Games\Magnetic\Pawn\pawn Pawn.mag
The syntax for XtractMW is:
    XtractMW game.rdf game.mag
where "game.rdf" is the full path to the game’s main rdf file ("all.rdf" for "Wonderland"; "corr.rdf", "fish.rdf" and "guild.rdf" for the games in "Collection Volume 1"). For example, for "Wonderland", the command line might be:
    XtractMW c:\Games\Magnetic\Wonder\all.rdf Wonder.mag