MTropolis/Adding Games

From ScummVM :: Wiki
< MTropolis
Revision as of 08:20, 28 August 2022 by OneEightHundred (talk | contribs) (Created page with "This page describes guidelines for adding detection entries for mTropolis titles, and also describes file type behavior so that detection entries play nice with the mTropolis...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page describes guidelines for adding detection entries for mTropolis titles, and also describes file type behavior so that detection entries play nice with the mTropolis engine's boot code.

Reading MTropolis/Common_Files_in_mTropolis_Software is recommended.


Types of files

mTropolis games are loaded using a mTropolis Player executable combined with a "resource" folder containing plug-ins and the title data segments.

The player executable

There is one player executable, it should be included in detection as it contains cursor resources. The default names are "MTPLAY31.EXE" for Windows 3.1, "MTPLAY32.EXE" for Windows 95/NT, and "mTropolis Player" for Macintosh, but the game can rename the player executable to anything. Only add the highest supported architecture if there are multiple player executables.

This is auto-detected as MTFT_PLAYER.

The game data segments

A mTropolis project consists of a main segment and additional segments. Macintosh projects may not have a file extension, in which case the type is determined by the Macintosh file type code.

It is possible for a game to have multiple projects.

Main segment+Additional segment identification is as follows:

Macintosh type codes:

  • mTropolis 1.x Macintosh project: MFmm+MFmx
  • mTropolis 2.x Macintosh project: MFmm+MFxm
  • mTropolis 2.x cross-platform project: MFmx+MFxx

Windows extensions:

  • mTropolis 1.x Windows project: .MPL+.MPX
  • mTropolis 2.x Windows project: .MFW+.MXW
  • mTropolis 2.x cross-platform project: .MFX+.MXX

The main segment is detected as MTFT_MAIN and additional segments as MTFT_ADDITIONAL.

Extensions

Extensions have a 3-character extension where the last 2 characters correspond to the architecture: "31" for Windows 3.1, "95" for Windows 95/NT, "PP" for PowerPC Macintosh, and "68" for 68k Macintosh. The first character of the extension varies and is inconsistent, it appears to be for convenience only and not something that affects how the file is loaded. First characters are typically "X" or "E" for code extensions, "C" for cursor packs, and "R" for resources.

Extensions are automatically detected as the MTFT_EXTENSION type.

Which files to include?

Always include the player executable, any data segments, and any extensions with cursor resources (in the resource fork on Macintosh versions, or as PE resources on Windows).

If an extension does not have cursor resources, but has some other use, then you should include the extension, but you should set the file type to MTFT_SPECIAL. Failure to do this will result in the boot code raising a warning.

If an extension is only used for code, then it should not be included in detection.

If it looks like an extension might contain data needed by the game, but you're not sure, then add a commented-out detection line until its usefulness can be determined.


When to specify file type in the detection table?

If a file is one of the types specified above, but does not meet the proper criteria for auto-detection, then you should specify the file type in the detection table. This includes any data-fork-only detection for Macintosh versions because auto-detection for Macintosh versions requires that the files are in MacBinary format to extract the file type.

If a file is required, but does not obey the generic load process (i.e. because it's an archive, or a plug-in that contains embedded data, but no cursors), then you should specify its type as MTFT_SPECIAL.

If a file does meet the auto-detection criteria, then you can leave its file type as 0 (MTFT_AUTO).