Difference between revisions of "MTropolis/Adding Games"

From ScummVM :: Wiki
Jump to navigation Jump to search
(Mentioned some extension quirks)
m (OneEightHundred moved page MTropolis/Detection Guidelines to MTropolis/Adding Games: File manifests are handled differently now)
(No difference)

Revision as of 01:16, 23 September 2022

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.

Note that there appears to be a lot of quirky variation with extensions. It appears that mFactory may have been somewhat hands-on with their users and provided custom or pre-release plug-ins, and sometimes there are variations between the Macintosh and Windows releases of the same game, so there is not a consistent pattern in which extensions have necessary data.

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.

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.

Extensions included in the detection tables with the MTFT_EXTENSION type are expected to have standard resources, which currently means cursors. You can check if a Macintosh-version extension has cursors using ResEdit on a Mac, or if a Windows-version extension has it by using a tool such as Resource Hacker. If an extension is detected as MTFT_EXTENSION but does not have standard resources, the boot code will raise a warning.

Which files to include?

Always include the player executable, any data segments, and any extensions with standard resources.

If an extension does not have standard resources, but has some other use, then you should include the extension, but you should set the file type to MTFT_SPECIAL.

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

When to specify file type in the detection table?

If a file is one of the types specified above, but won't be detected as the correct type due to the extension or file type code mismatching, 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 an extension doesn't have standard resources, its type should be MTFT_SPECIAL.

If a file is required for some reason other than mentioned above (including things like installer archives), 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).