Category:DM-System2 BASIC
This page was last modified 17:26, 26 May 2023 by Mars2000you. Based on work by Gdx and Rderooy.

Contents

Description

DM-System2 BASIC is a BASIC extension that is provided with the Gigamix DM-System2 development kit.

This extension adds 68 new instructions, whose 20 require to install specific drivers.

On this page, these instructions are classified according to their purpose. For a general overview of all instructions in alphabetical order, see this page : DM-System2 BASIC Instructions.

Installation

Installation of the DM-System2 Basic

You need three files from the first disk of the DM-System2 package : DISKINST.BAS - DISKINST.BIN - DS2INST.DAT

Enter SCREEN0:WIDTH80:RUN"DISKINST.BAS" to install the DM-System2 BASIC

The installer includes CLEAR 200, &HD800 to extend the free MSX-BASIC memory, BLOAD"DISKINST.BIN",R to install the system and the CALL SYSON instruction to start it and initialise it.

Notes:
- if you attempt to reinstall DM-System2 while it is already installed, the error "File already exists" will occur.
- the Memory Disk, initialised by CALL MEMINI, is not supported by DM-System2. Disable it with CALL MEMINI (0) before installing DM-System2 or your data will be corrupted.

Installation of the drivers

By default, if you use the first disk of the DM-System2 package, the following drivers are installed: BGM-MGS, DEV-NORM, FNT-KROM, PCM-PSG and SE-NSE.

If you create your own installation disk, don't forget to put on the same disk different drivers, at least one per category (BGM, Device, Font, PCM, Sound Effect). So, you will be able to enjoy all the features of the DM-System2 Basic.

You can manually install your preferred driver in each category, check the DM-System2 Drivers page to know how to proceed. You can also use the DM-System2 Setup Utility (DS2SETUP.BAS), except for the Sound Effect driver.

Instructions with driver required

Music Playing

These instructions have a timer interrupt of 1/60 per second (in NTSC/PAL M). The instructions can be disabled or their effects can change according the driver specifications. You must refer you to the driver specifications to use these instructions.

Device Input

These instructions allow you to globally manage several input devices. Simply change the driver to manage another external device.

Kanji-ROM Characters Display

These instructions to display Kanji are delivered with conviction. You can display a variety of fonts just by changing the driver. Driver designed by default is the FNT-KROM driver (developed by Gigamix).

A seventh instruction was planned, but does not have been implemented.

PCM Playing

This instruction can play PCM from the MSX2. By changing the driver, it will be capable of playing a variety of sound sources. Driver designed by default is the PCM-PSG driver (developed by Kichi).

Sound Effect

Sound effect instructions are indispensable to made a game. The instructions can be disabled or their effects can change according the driver specifications. You must refer you to the driver specifications to use these instructions.

Instructions without driver required

Data Compression

These instructions use a technology called BPE compression that allows a high-speed decompression of data.

There are three tools to compress data to BPE format. Please check this page: DM-System2 Compression Tools

Image Processing

These instructions appreciably improve the image processing of the MSX-Basic.

Palette Processing & VDP Macro

These functions allows to make a maximum management of MSX2 palette. These possibilities are unthinkable with a standard MSX-BASIC program.

Pana Amusement Cartridge (PAC)

These instructions allow you to manage data from PAC.

Memory Mapper Control

This instruction allow you to freely access RAM above 64kB.

Binary System

VRAM can be a big storage place for data. These instructions allow you to use it as such

Memory Handling

These instructions allow you to read/write directly a byte or an address in main RAM, and even copy a block.

Calling Machine Language Routine

This instruction is easier than DEFUSR= to use CPU registers.

CPU Mode Switching

This instruction allow you to switch CPU mode on MSX turbo R.

Disk/File Operations

Trigonometric Functions

These trigonometric functions are a bit more evolved than those from MSX-Basic.

Pending Processing

Case Conversion

Only the uppercase conversion is available.

Characters Switching

Graphic Accumulator

The graphic accumulator can be useful to place a character on the screen for example.

DM-System2 Control

These instructions allow you to install, uninstall DM-system2 or get information about drivers.

DM-System2 Memory Map

Main-Ram Area description
0000h~02FFh Routines of slot change (same as Bios), etc
0300h~03FFh Information area for the initialization
0400h~21FFh BGM driver
2200h~27FFh Internal routines used by DM-System2
2800h~2BFFh Sound effect driver
2C00h~2FFFh PCM driver
3000h~3FFFh Free area for user
4000h~42FFh Call entry, etc
4300h~43FFh Information area
4400h~73FFh Internal routines used by DM-System2
7400h~75FFh Font driver 0.5
7600h~77FFh Font driver 2
7800h~79FFh Device driver
7A00h~7FFFh DM-System2 work area
8000h~F37Fh User's area
F380h~FD99h Variable and work area of MSX system
FD9Ah~FFC9h Hooks. H.TIMI (FD9Fh) is used by DM-System2 after the execution of CALL SYSON.
FFCAh~FFCEh Call entry of extended Bios
FFCFh~FFD8h Hooks for interrupts control
FFD9h~FFE6h Work area of interrupts control program
FFE7h~FFF6h Backup area of VDP registers (MSX2~)
FFF7h~FFF7h Slot number of main-Rom
FFF8h~FFF9h Reserved
FFFAh~FFFCh Backup area of VDP registers (MSX2+~)
FFFDh~FFFEh Backup area for the register SP
FFFFh Address to access secondary slots registers