What to choose?

From MSX Game Library

You want to create an application for MSX and you don't know what to choose among all the possibilities offered by MSX and supported by MSXgl? Here's a summary of the possibilities and some advice to help you make your choice.

CPU & video processor

The first thing to choose is the MSX generation you're targeting for your application.

This determines three things:

  • The central processor (CPU) at your disposal (Z80 or R800),
  • The amount of available memory,
  • The video processor, which depends on the MSX generation or the presence of an extension.

The different generations of MSX:

Generation RAM CPU Video processor
Z80 R800 TMS9918 V9938 V9958 V9990#1
MSX1 8 KB#2 ✔️ ✔️ ✔️
MSX2 64 KB ✔️ ✔️ ✔️
MSX2+ 64 KB#3 ✔️ ✔️ ✔️
MSX turbo R 256 KB#3 ✔️ ✔️ ✔️ ✔️

Notes:

  • #1 The Yamaha V9990 video processor is available as an extension cartridge that can be plugged in any MSX.
  • #2 There are only a few MSX models with 8 KB RAM. On some official documents, the minimum RAM is noted as 16 KB, and this is the low limit for most MSX1s.
  • #3 Mapped memory

Available screen modes for each video processor:

MSX BASIC name VDP VDP
mode
Resolution
max
Mode Colors Sprites
MSX1 Screen 0 (W40) TMS9918 T1 40 x 24 Tile (256 patterns) 2 per screen, among 15 colors, fixed palette 32 sprites per screen, 4 per line, 1 color
MSX1 Screen 1 TMS9918 G1 32 x 24 Tile (256 patterns) 2 per tile, among 15 colors, fixed palette, 32 combinations per screen 32 sprites per screen, 4 per line, 1 color
MSX1 Screen 2 TMS9918 G2 32 x 24 Tile (3x256 patterns) 2 per tile's line, among 15 colors, fixed palette 32 sprites per screen, 4 per line, 1 color
MSX1 Screen 3 TMS9918 MC 64 x 48 Pseudo-bitmap 15 per pixel, fixed palette 32 sprites per screen, 4 per line, 1 color
MSX2 Screen 0 (W80) V9938 T2 40 x 26.5 Tile 4 per screen, among 16 colors, 512 colors palette 32 sprites per screen, 8 per screen line, 1 color per sprite line
MSX2 Screen 4 V9938 G3 32 x 26.5 Tile (3x256 patterns) 16 per pixel, 512 colors palette 32 sprites per screen, 8 per screen line, 1 color per sprite line
MSX2 Screen 5 V9938 G4 256 x 212 Bitmap 16 per pixel, 512 colors palette 32 sprites per screen, 8 per screen line, 1 color per sprite line
MSX2 Screen 6 V9938 G5 512 x 212 Bitmap 4 per pixel, 512 colors palette 32 sprites per screen, 8 per screen line, 1 color per sprite line
MSX2 Screen 7 V9938 G6 512 x 212 Bitmap 16 per pixel, 512 colors palette 32 sprites per screen, 8 per screen line, 1 color per sprite line
MSX2 Screen 8 V9938 G7 256 x 212 Bitmap 256 per pixel, RGB colors 32 sprites per screen, 8 per screen line, 1 color per sprite line
MSX2+ Screen 10 V9958 G7 + YJK + YAE 256 x 212 Bitmap 12499 colors (only luminescence change for 4 consecutive pixels) + 16 colors palette 32 sprites per screen, 8 per screen line, 1 color per sprite line
MSX2+ Screen 12 V9958 G7 + YJK 256 x 212 Bitmap 19268 colors (only luminescence change for 4 consecutive pixels) 32 sprites per screen, 8 per screen line, 1 color per sprite line
Any -- V9990 P1 256 x 212 Tile (2 layers) 15 colors per tile's pixel, 32768 colors palette 125 sprites per screen, 16 per screen line, 16 colors per pixel (4 palettes)
Any -- V9990 P2 512 x 212 Tile 15 colors per tile's pixel, 32768 colors palette 125 sprites per screen, 16 per screen line, 16 colors per pixel (4 palettes)
Any -- V9990 B1 ~ B6 256 x 212
~ 640 x 480
Bitmap 4, 16 colors (32768 colors palette) or 256, 32768 RGB colors 2 sprites per screen, 1 color


What CPU to choose?

For the main processor (CPU), the Z80 is the reference on MSX as it is compatible with all MSX models. The R800 is much more powerful, but is only compatible with the MSX turbo R. So, unless you want to create a game exclusive to the MSX turbo R, you should choose the Z80 (MSX1, MSX2 or MSX2+).

The Z80 is more than sufficient to create a wide range of games and tools (just look at the MSX1, MSX2 and MSX2+ software library), but if you want to create an application that requires a lot of computing power, such as real-time 3D, the R800 could be an relevant choice.

What video processor to choose?

The choice of graphics mode for your application, and therefore of video processor, depends entirely on the type of program you wish to create. It depends directly on the MSX generation you're aiming for, the number of colors you want, or the type of display you want (fixed screen, tile table, image, scrolling, etc.).

Note that all MSX models are retro-compatible, i.e. they are compatible with previous generations. The reverse is obviously not true. So, creating an MSX1 application allows you to be compatible with 100% of MSXs. But, for example, choosing MSX2 will cut you off from MSX1 users, but your application will work on MSX2+ and MSX turbo R.

Setting

In MSXgl, you choose the CPU and the video processor by defining your target Machine in your project configuration (project_config.js):

//-- Target MSX machine version (string)
//   - 1        MSX1
//   - 2        MSX2
//   - 12       MSX1 and 2 (multi support)
//   - 2K       Korean MSX2 (SC9 support)
//   - 2P       MSX2+
//   - 22P      MSX2 and 2+ (multi support)
//   - 122P     MSX1, 2 and 2+ (multi support)
//   - 0        MSX0
//   - TR       MSX turbo R
//   - 3        MSX3 (reserved)
Machine = "2";

Modules:

  • All graphic handling features are include into the vdp module.
  • If you'd like to use Yamaha V9990, you need to add the v9990 module. Please note that if you wish to use the V9990 external graphics processor, it will be added as a second graphics processor and will not replace the one on your MSX. You'll therefore have two graphics processors at your disposal. If you're testing your application on an emulator, you have the option of automatically adding a V9990 extension (only works on openMSX):
    EmulV9990 = true; //-- Add V9990 video-chip extension (boolean)
  • On MSX2, MSXgl offers an option for displaying a screen as tiles, while taking advantage of bitmap color modes (each pixel can have its own color). This "software tile" feature is handled by the tile module.

To add a module to your project, add it to the list in your project configuration:

//-- List of library modules to build (array)
LibModules = [ "vdp", "system", "bios", "print", "input", "memory" ];

See also:

Target media

MSXgl lets you create applications for a wide range of media:

  • ROM cartridge
  • Mapped-ROM cartridge (MegaROM),
  • MSX-DOS 1 or 2 disk,
  • Autoboot disk,
  • BASIC disk,
  • BASIC cassette.

What media to choose?

Each media has its advantages, and the choice depends on the type of application you want to create.

ROM cartridge:

  • Works on any MSX
  • A (plain) ROM cartridge can be from 16 to 64 KB in size.
  • 16 KB and 32 KB ROMs are very easy to use, but offer little space. They may be sufficient for a simple game on MSX1.
  • 48 KB ROMs require special handling, but are easy to use if you don't need BIOS features (which should be the case if you're using MSXgl).
  • The 64 KB ROMs are rather complex to use and offer little in the way of practical benefits.
  • See also: Create a plain ROM

Mapped-ROM cartridge:

  • Works on any MSX
  • A mapped ROM (aka MegaROM) has many advantages: it can hold a lot of data (up to 2 or 4 MB for classic mappers), and reading it is very fast.
  • There are several mapper formats for MSX and MSXgl support, the most common being: ASCII-8, ASCII-16, Konami K4 (without SCC) and Konami K5 (with SCC).
  • MSXgl even supports a new type of mapper (NEO-8 and NEO-16) that can store up to 64 MB of data.
  • Creating a mapped ROM is not very complicated, but it's best to plan in advance how you're going to organize your data.
  • See also: Create a mapped ROM

MSX-DOS 1 or 2 disk:

  • Works on MSX with a disk drive. Note that for using MSX-DOS 1 you need a MSX with at least 64 KB of RAM, and for MSX-DOS 2 you need at least 128 KB of mapped-RAM and a specific ROM (included in some MSX with a disk drive).
  • Floppy disks offer plenty of space (360 or 720 KB per disk), but loading data from disk is slow (especially compared to ROM).
  • MSX-DOS is a good choice for creating tools, as it's the OS preferred by MSX users for running tools.
  • The maximum size of a MSX-DOS main program is about 53 KB (including variables).
  • Even if this isn't a rational argument, the fact that all the latest MSX games were on floppy disk gives this media a special aura. It's up to you to decide what you want. :)

Autoboot disk:

  • Autoboot floppy disks have the same advantages as MSX-DOS floppy disks, but are quicker to start up because the program starts up directly without going through MSX-DOS. This gives a slightly more professional feel, rather than seeing the MSX-DOS start-up message before the application is launched.
  • The maximum size for autoboot main program is about 48 KB (excluding variables).

BASIC disk:

  • BASIC floppy disks are launched automatically from BASIC. They are of no particular interest.
  • The maximum size for autoboot main program is about 24 KB (excluding variables).

BASIC tape:

  • The maximum size for tape main program is about 24 KB (excluding variables). I have no idea how to load further data.
  • This is just for fun. :)

Setting

In MSXgl you select your target media by defining your Target in your project configuration (project_config.js). For example:

  • ROM_32K: For a cartridge with 32 KB ROM.
  • ROM_ASCII8: For a mapped-ROM cartridge using the ASCII-8 mapper.
  • DOS2: For a MSX-DOS2 floppy disk program.

The complete list of target medias can be found on this page: Target.