MSX BASIC: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
→‎Versions of MSX BASIC: Fixed several mistakes
Line 31: Line 31:
Every new version of the MSX computer was bundled with an updated version of MSX BASIC. All versions are [[backward compatible]] and provide new capabilities to fully explore the new and extended hardware found on the newer MSX computers.
Every new version of the MSX computer was bundled with an updated version of MSX BASIC. All versions are [[backward compatible]] and provide new capabilities to fully explore the new and extended hardware found on the newer MSX computers.


=== MSX BASIC 1.0 / 1.1 / 1.2===
=== MSX BASIC 1.0 ===
* Bundled with MSX 1.0 / 1.1 / 1.2 computers
* Bundled with [[MSX1]] computers
* 16 KB in size
* 16 KB in size
* No native support for floppy disk requiring the Disk BASIC cartridge extension (4 KB overhead)
* No native support for floppy disk requiring the Disk BASIC cartridge extension (4 KB overhead)
Line 42: Line 42:
* Full support for hardware sprites and [[interrupt]]-driven automatic [[collision detection]]
* Full support for hardware sprites and [[interrupt]]-driven automatic [[collision detection]]
* Full support for the [[General Instruments AY-3-8912|General Instruments AY-3-8910]] [[Programmable Sound Generator]] (PSG)
* Full support for the [[General Instruments AY-3-8912|General Instruments AY-3-8910]] [[Programmable Sound Generator]] (PSG)

Note that the Brazillian MSX "clones" by Sharp and Gradiente show other versions of MSX-BASIC (on the Sharps even called HOT-BASIC), but they're basically just unlicensed MSX BASIC 1.0.


=== MSX BASIC 2.0 / 2.1 ===
=== MSX BASIC 2.0 / 2.1 ===
* Bundled with MSX 2.0
* Bundled with [[MSX2]] computers
* 32 KB in size (First 16 KB directly available, second 16 KB in other slot and has to be paged in/out for usage)
* 32 KB in size (First 16 KB directly available, second 16 KB in other slot and has to be paged in/out for usage)
* Added support for new available screen modes (''Note: the 424 lines can only be displayed in interlace mode''):
* Added support for new available screen modes (''Note: the 424 lines can only be displayed in interlace mode''):
Line 54: Line 56:
* Added support for multicolored sprites (16 colors)
* Added support for multicolored sprites (16 colors)
* Added support for hardware accelerated graphics functions (copy, fill, blittering, etc.)
* Added support for hardware accelerated graphics functions (copy, fill, blittering, etc.)
* Added support for using the lower 32K RAM of the computer (not directly visible because the BIOS and BASIC interpreter ROMs take over the addressing space) as a limited RAM disk (only certain types of files could be saved).
* Added support for using the lower 32K RAM of the computer (not directly visible because the BIOS and BASIC interpreter ROMs take over the addressing space) as a limited RAM disk (only certain types of files could be saved). MSX BASIC 2.1 supports using the memory mapper (if available on the machine) to expand this RAM disk to almost 90kB.

MSX BASIC 2.1 exists on computers Yamaha YIS-805<ref>{{cite web|url=http://www.leningrad.su/museum/show_calc.php?n=218|title=Yamaha YIS-805 (Soviet Digital Electronics Museum)|author=Sergei Frolov|accessdate=2011-04-06|date=April 2011}}</ref> and Sanyo MPC-2300<ref>{{cite web|url=http://www.leningrad.su/museum/show_calc.php?n=396|title=Sanyo MPC-2300 (Soviet Digital Electronics Museum)|author=Sergei Frolov|accessdate=2011-04-06|date=April 2011}}</ref> with Cyrillic keyboard and Cyrillic symbols support.
MSX BASIC 2.1 exists on computers like the Philips MSX2 machines (except for the VG 8230), the Yamaha YIS-805<ref>{{cite web|url=http://www.leningrad.su/museum/show_calc.php?n=218|title=Yamaha YIS-805 (Soviet Digital Electronics Museum)|author=Sergei Frolov|accessdate=2011-04-06|date=April 2011}}</ref> and Sanyo MPC-2300<ref>{{cite web|url=http://www.leningrad.su/museum/show_calc.php?n=396|title=Sanyo MPC-2300 (Soviet Digital Electronics Museum)|author=Sergei Frolov|accessdate=2011-04-06|date=April 2011}}</ref>.


=== MSX BASIC 3.0 ===
=== MSX BASIC 3.0 ===
* Bundled with MSX 2.0+ (plus)
* Bundled with [[MSX2+]] computers
* 32 KB in size (First 16 KB directly available, second 16 KB in other slot and has to be paged in/out for usage)
* 32 KB in size (First 16 KB directly available, second 16 KB in other slot and has to be paged in/out for usage)
* Added command '''SET SCROLL''' for smooth, hardware based scrolling in BASIC
* Added command '''SET SCROLL''' for smooth, hardware based scrolling in BASIC
Line 67: Line 70:


=== MSX BASIC 4.0 ===
=== MSX BASIC 4.0 ===
* Bundled with MSX Turbo R (only released in Japan)
* Bundled with the Panasonic FS-A1ST [[MSX turbo R]] model
* Added support for screen modes of 512 x 512 (16 colors out of 512) and 256 x 212 (19268 colors)
* Added '''_PAUSE''' command to make delays in BASIC independent of the current CPU and clock
* Added '''_PAUSE''' command to make delays in BASIC independent of the current CPU and clock
* Added extra commands for the [[Pulse-code modulation|PCM]] device ('''_PCMPLAY''', '''_PCMREC''')
* Added extra commands for the [[Pulse-code modulation|PCM]] device ('''_PCMPLAY''', '''_PCMREC''')


=== MSX BASIC 4.1 ===
=== MSX BASIC 4.1 ===
* Bundled with Panasonic FS-A1GT MSX Turbo R model
* Bundled with the Panasonic FS-A1GT [[MSX turbo R]] model
* Added [[MIDI]] extensions
* Added [[MIDI]] extensions



Revision as of 20:15, 15 October 2014

MSX BASIC
Paradigmimperative
Designed by?
DeveloperMicrosoft Corporation
First appeared1984
Stable release
4.1 /  ?
Typing discipline?
OSOptional; Any suitable OS is O.K.
LicenseMS-EULA
Websitewww.microsoft.com
Major implementations
?
Dialects
?
Influenced by
GW-BASIC
Influenced
Vilnius BASIC

MSX BASIC is a dialect of the BASIC programming language. It is an extended version of Microsoft Standard BASIC Version 4.5, and includes support for graphic, music, and various peripherals attached to MSX Personal Computers. Generally, MSX-BASIC is designed to follow GW-BASIC, which is one of the standard BASICs running on 16-bit computers.[1] During the creation of MSX-BASIC, a major effort was made to make the system as flexible and expandable as possible.

Distribution

MSX BASIC version 3.0

MSX BASIC came bundled in the ROM of all MSX computers. At system start-up MSX BASIC is invoked, causing its command prompt to be displayed, unless other software placed in ROM takes control (which is the typical case of game cartridges and disk interfaces, the latter causing the MSX-DOS prompt to be shown if there is a disk present which contains the DOS system files).

When MSX BASIC is invoked, the ROM code for BIOS and the BASIC interpreter itself are visible on the lower 32K of the Z80 addressing space. The upper 32K are set to RAM, of which about 23K to 28K are available for BASIC code and data (the exact amount depends on the presence of disk controller and on the MSX-DOS kernel version).

Development Environment

MSX BASIC development environment is very similar to that of the Dartmouth Time Sharing System associated with Dartmouth BASIC. It has a command line-based Integrated Development Environment (IDE) system; all program lines must be numbered, all non-numbered lines are considered to be commands in direct mode (i.e., to be executed immediately). The user interface is almost completely command line, except for the function key shortcuts at the bottom and an initial copyright notice at the top of the screen.

Versions of MSX BASIC

Every new version of the MSX computer was bundled with an updated version of MSX BASIC. All versions are backward compatible and provide new capabilities to fully explore the new and extended hardware found on the newer MSX computers.

MSX BASIC 1.0

  • Bundled with MSX1 computers
  • 16 KB in size
  • No native support for floppy disk requiring the Disk BASIC cartridge extension (4 KB overhead)
  • Support for all available screen modes:
    • Screen 0 (text mode 40 x 24 characters)
    • Screen 1 (mixed text mode 32 x 24 characters, sprites and colored custom characters)
    • Screen 2 (high resolution graphic mode 256 x 192 pixels, 16 colors)
    • Screen 3 (low resolution graphic mode 64×48 - 4×4 pixel blocks over the screen 2 resolution)
  • Full support for hardware sprites and interrupt-driven automatic collision detection
  • Full support for the General Instruments AY-3-8910 Programmable Sound Generator (PSG)

Note that the Brazillian MSX "clones" by Sharp and Gradiente show other versions of MSX-BASIC (on the Sharps even called HOT-BASIC), but they're basically just unlicensed MSX BASIC 1.0.

MSX BASIC 2.0 / 2.1

  • Bundled with MSX2 computers
  • 32 KB in size (First 16 KB directly available, second 16 KB in other slot and has to be paged in/out for usage)
  • Added support for new available screen modes (Note: the 424 lines can only be displayed in interlace mode):
    • Updated Screen 0 (text mode 80 x 24)
    • Screen 5 (graphic mode 256 x 212/424 pixels, 16 colors out of 512)
    • Screen 6 (graphic mode 512 x 212/424 pixels, 4 colors out of 512)
    • Screen 7 (graphic mode 512 x 212/424 pixels, 16 colors out of 512)
    • Screen 8 (graphic mode 256 x 212/424 pixels, 256 colors, no palette)
  • Added support for multicolored sprites (16 colors)
  • Added support for hardware accelerated graphics functions (copy, fill, blittering, etc.)
  • Added support for using the lower 32K RAM of the computer (not directly visible because the BIOS and BASIC interpreter ROMs take over the addressing space) as a limited RAM disk (only certain types of files could be saved). MSX BASIC 2.1 supports using the memory mapper (if available on the machine) to expand this RAM disk to almost 90kB.

MSX BASIC 2.1 exists on computers like the Philips MSX2 machines (except for the VG 8230), the Yamaha YIS-805[2] and Sanyo MPC-2300[3].

MSX BASIC 3.0

  • Bundled with MSX2+ computers
  • 32 KB in size (First 16 KB directly available, second 16 KB in other slot and has to be paged in/out for usage)
  • Added command SET SCROLL for smooth, hardware based scrolling in BASIC
  • Added support for new available screen modes:
    • Screen 10 (graphic mode 256 x 212/424 pixels, 12499 YJK at once + 16 colors out of 512 RGB in ML)
    • Screen 11 (graphic mode 256 x 212/424 pixels, 12499 YJK at once + 16 colors out of 512 RGB)
    • Screen 12 (graphic mode 256 x 212/424 pixels, 19268 YJK at once)

MSX BASIC 4.0

  • Bundled with the Panasonic FS-A1ST MSX turbo R model
  • Added _PAUSE command to make delays in BASIC independent of the current CPU and clock
  • Added extra commands for the PCM device (_PCMPLAY, _PCMREC)

MSX BASIC 4.1

Extensions of MSX BASIC

Since MSX BASIC was meant to be expandable from inception, it was possible to write add-on modules quite easily. Support for specific hardware was commonly added by means of expansion cartridges, which also served as the interface to the hardware in question. MSX Disk-BASIC is an example, bundled in the cartridge that provides the hardware interface to the disk drives, it adds commands to access the floppy disk drives.

Exploring the MSX BASIC extensibility it was possible to extend MSX BASIC solely via software. A very interesting extension to the MSX BASIC 1.0/1.1 was Screen IV, a tweak of MSX BASIC adding the mixed graphic/text mode Screen 4 (hence its name Screen IV), with 64 x 24 characters and Screen 2 resolution for graphics (256 x 192 pixels, 16 colors).

References

  1. ^ Tom R. Halfhill (January 1985). "MSX Is Coming - Part II: Inside MSX". Retrieved 2010-10-31.
  2. ^ Sergei Frolov (April 2011). "Yamaha YIS-805 (Soviet Digital Electronics Museum)". Retrieved 2011-04-06.
  3. ^ Sergei Frolov (April 2011). "Sanyo MPC-2300 (Soviet Digital Electronics Museum)". Retrieved 2011-04-06.

External links

  • MSX.bas - A Portuguese website focusing completely on development in MSX-BASIC.