Wednesday, November 3, 2010

Computer Hardware Tutorial, Computer Hardware Basics

Computer Hardware Tutorial Latest News Update About Computer Hardware Tutorial, Computer Hardware Basics: The MSX is a home computer system much like the AppleII, ZX Spectrum, Amstrad CPC, BBC and Commodore 64. Home computers were first developed in the 70′s to be able to compete with the hugely expensive PCs that were available at the time. Home computer systems were relatively cheap and could easily outperform the PCs in terms of graphics, sound and versatility. Read more below on how to actually use games, disks and files on these (old) wonderful computer systems.

The MSX standard was created by ASCII in conjunction with other big companies like Philips, Sony, Panasonic and quite a few others. Even Microsoft was involved and back then Bill Gates vigorously supported the MSX standard all over the world � except for the US/Canada where it formed a direct competition to the PC for which Microsoft also created software.

So MSX was a way to try to do away with the huge amount of different incompatible computer-systems back in the day where standardization was something unheard of, it was quite successful in doing so and became the no1 computer standard for quite some time. Currently in the Netherlands and Brazil an active � but slowly diminishing � user base exists creating new software and even new hardware for the system.


There are a huge amount of games available on the MSX platform, which later branched of into MSX1 and the backwards compatible MSX2 standards. Quite a few of the games can also be found on the Colecovision home console and the Sega Master System. Not surprising as the hardware used in these machines is virtually identical. Games came on cartridges, tapes and floppies and can be found throughout the internet. Cartridge files have the *.rom extension and can only be played on Emulators mimicking a true MSX machine. Tape files of MSX games are very rare but *.dsk disk based games can also be found all over the internet. It is possible to re-create those *.dsk images to real floppies with help of a couple of utilities and a little knowlegde about the disk system used by the MSX.


The MSX computer system uses 720Kb 3.5" floppies for storing information and programs on. The used disk format is very similar to MS-DOS formatted disks and can be read-written by both MSX and MS-DOS based machines. The only difference is the boot sector which is different for both types of machines. MSX disks can be bootable � they boot the machines into MSX-DOS which closely resembles MS-DOS in terms of command syntax but also closely resembles CP/M. There’s also bootable floppies that launch into MSX-Basic which is remarkably similar to GW-BASIC. With some disks pressing the CTRL key when turning on the machine and whilst booting up the MSX is needed to make the machine enter the proper mode. This will free a little more RAM by defaulting to one drive being used instead of two � on most MSX 2 machines. Using on a real machine is a lot more fun than using the files on an emulator.


Creating real disks that can be used on a real MSX is fairly simple.

Needed:

Windows XP or lower based computer

Special DOS based disk utilities for use with MSX files

3.5" floppies � preferably 720Kb ones but 1.44Mb ones can be modified


CREATING *.DSK IMAGES FROM REAL FLOPPIES AND VICE VERSA.

DCOPY.EXE is a MS-DOS based tool that can be used to copy the entire contents of a *.dsk image to a real disk and back.


To create a *.dsk image of a real 720Kb sized MSX disk (DS/DD; Double Sided, Double Density) you type the following:

DCOPY A: C:DISK720.DSK /T:80 /S:9 /H:2

where the A: drive contains the floppy disk and DISK720.DSK is the name of the disk image that you want to create.


To create a *.dsk image of a real 360Kb sized MSX disk (SS/DD, Single Sided, Double Density) you type the following:

DCOPY A: C:DISK360.DSK /T:80 /S:9 /H:1


Creating a real disk from a *.dsk image is a lot easier, just type:

DCOPY C:GAME720.DSK A:

where GAME720.DSK is the name of the *.dsk image you want to put to the disk. There is a catch though. The disk has to be properly formatted at 720Kb or 360Kb before you are able to successfully restore the disk image to it. Using real 720Kb floppies is the easiest way but it is also possible to use 1.44Mb floppies but you need to cover up the hole on the opposite side of the write protection notch � using a piece of duct tape usually works. This hole is used by the PC drive to detect the disk format and the drive will refuse to format a 1.44Mb floppy at a lower capacity when that hole is not covered. Use the regular format command for MS-DOS or better format the disks first in your MSX machine by booting up the MSX in basic, inserting the disk and then type:

CALL FORMAT

This will present you with an number of choices and formatting will commence.


It is possible to try to use the program without the elaborate parameters but with copy protected games or disks with strange formats the auto recognition will not always work.



MANIPULATING FILES WITHIN THE *.DSK IMAGE

DSKTOOL.EXE is a MS-DOS based utility that allows you to manipulate files in the *.dsk images. It is possible to do all sorts of file manupulation with help of the command line and various switches. The command line options of DSKTOOL.EXE are very similar to that of the ARJ compressor tool, the latter for a while being a little more popular than the ZIP utility.





How to use the DSKTOOL utility:

type the following:

DSKTOOL command archive [files]


“command” is one of the four supported commands:

L list the contents of the archive

E extract files from the archive

A add files to the archive

D delete files from the archive


[files] is a list of files separated by spaces and the “*” wildcard is supported.

The DSKTOOL utility will automatically create a 720Kb disk image if you use an archive name (*.DSK image) that doesn’t exist yet. It will automatically boot into MSX-DOS 1.

The sad part is that only 720Kb *.DSK images are supported (80 tracks, 9 sectors per track, 2 sides).


Computer Hardware Tutorial


CONVERTING CARTRIDGE *.ROM FILES FOR USE ON A REAL MSX

The MSX2Bin utility enables you to convert 8, 16Kb and 32Kb cartridge *.rom files to MSX binary excecutable files that can be saved to disk and run on a real MSX machine. Computer Hardware Tutorial


Example, pacman.rom is a 16Kb MSX cartridge file. To convert it into a binary executable format copy the file into the MSXR2B directory and type:

MSXR2B pacman.rom


This wil create a pacman.bin file with a bit of loader code pasted in front of it allowing the code to be executed on a real MSX machine. How to do that? Well save to file onto a 720Kb MSX floppy or add it to an MSX *.DSK image with the tool above.

For 32Kb ROM:

Two files will be created instead of 1. A number will be appended to the the name filename1.bin and filename2.bin.

The created files can be loaded as a binary files and executed. I’ll tell you how to do that below.


RUNNING FILES ON AN MSX MACHINE

Some disks are autobooting and you are presented with either a menu or the game itself. It is possible to load programs from the basic prompt too.


Type FILES to get a list of files in the drive.

FILES A: will give you a list of files in the A: drive

FILES B: will give you a list of files in the B: drive (only for MSX machines with a B drive)

*.BAS and *.LDR files are files that can be run from basic.


BASIC PROGRAMS: *.BAS

To start those type:

LOAD"FILENAME.BAS" and then type RUN


To automatically start the BASIC program you can type:

LOAD"FILENAME.BAS",R


It is also possible to type:

RUN"FILENAME.BAS" to load and start a program.


If the disk has booted your MSX into MSX-DOS mode it is still possible to start *.BAS files by typing:

BASIC FILENAME.BAS


LOADER PROGRAMS: *.LDR

Loader is short for LOADER and it basically is just a BASIC program that is intended to load another part of the program into memory, often it is assambly code/machine code that has the *.BIN extension. Games usually use this method of loading.

To start those type:

LOAD"FILENAME.LDR" and then RUN

or

LOAD"FILENAME.LDR",R

or

RUN"FILENAME.LDR"


MACHINE CODE PROGRAMS:*.BIN

Binary files *.BIN contain machine language they can also be executed from the BASIC command line.

To execute a single file FILENAME.BIN type:

BLOAD"filename.bin",R


To execute a multipart ROM file type:

BLOAD”name1.bin”,R: BLOAD”name2.bin”,R


On disks try to find the *.BAS, *.LDR files of a game and run that. This will usually boot the rest of the game without any problems.


CREATING BOOTABLE MENUS YOURSELF

Type something similar to this in MSX basic and save as AUTOEXEC.BAS, this file will automatically boot and RUN when the MSX is booted from this disk.


10 POKE -1,170: REM This is necessary for most Philips MSX machines when running games

20 SCREEN 0:KEY OFF:COLOR 15,1:WIDTH 80:DEF FNA(X)=(65-len(A$))/2

30 A$=”MSX GAMES GALORE”:LOCATE FNA(X),0:PRINT A$: REM This will center the title of the menu

40 LOCATE 20,6:PRINT”[1] � GAME NUMBER ONE"

50 LOCATE 20,8:PRINT”[2] � GAME NUMBER TWO"

60 LOCATE 20,10:PRINT”[3] � GAME NUMBER THREE"

70 LOCATE 20,20:PRINT”MAKE YOUR DECISION NOW, RELY ON NO HELP FROM ABOVE :”;:A$=INPUT$(1)

80 IF A$=”1″ THEN RUN “GAME1.LDR”

90 IF A$=”2″THEN RUN “GAME2.BAS”

100 IF A$=”3″THEN BLOAD”GAME3.BIN”,R

110 GOTO 70


This will display a fancy multi selection menu on screen allowing you to load no less than three games all with their own ways of loading them.

It is possible to create your own *.ROM files from real MSX carts and save them to disk. Convert them to executable files and create multiple game disks with fancy selection screens in just a jiffy. Nothing to it really….


Enjoy!


By Mark Vergeer August 2010

p

No comments:

Post a Comment