NRTDRV MAN EN HOWTOPLAYX1

From MSX MUSIC WIKI
Jump to: navigation, search

How to play on real X1 or X1 emulators

Driver of NRTDRV embeds easy play monitor for real X1 or X1 emulator, and it can be called from IPL boot patch or original programs.

Included IPL boot patches are 2 versions. One has easy playing monitor (IPLPATCH.BIN) and other has OPM tone editor(IPLOPMED.BIN). It is selectable from menu of NRTDRV.EXE.

Easy play monitor

When press trigger 1 of joypad while playing music, switches play and stop as toggle. Trigger 2 or NMI switch to play test sounds.

OPM tone editor

This is tone editor which can change parameter simultaneously.

Tone parameter changing effects only editing channel simultaneously..

Enter return key twice while value inputting when you want set same parameters to multiple channels like chord. (Sends parameter to editing channel when enter return once).

The values of WF/LFRQ/PMD/AMD are common among A-H and I-P channels.

Key binds are like below.

Cursor keys (left and right of joypad)
Selects parameters
[0]-[9] key 
[+][-]key (up and down of joypad)
Changes parameter. When input values with number keys, type return to enter (send tone to editing channel) and others to cancel.


[A]-[P] keys
Selects channel to edit.
[SHIFT]+[A]-[P] keys
Select target (of sending tone) channels to enter with return key.
[CTRL]+[A]-[P] keys / [CTRL]+[1]-[3] keys

Select channel to play or mute.

[CTRL]+[R] key
Revert to play and mute channels.
Return key (trigger 1)
Sends all parameters to multiple channels as usual. When input values, sends parameters to channels editing.
[S]key (trigger2)
Escapes editing tones.
[R]key
Rewrite escaped tone to editing channel.
Space key
Stops / plays music data.
[SHIFT]+space key
Fades out music data.
[CTRL]+[T]key
Plays test sound.

Editing tone is overwritten as soon as tone data is switched. It can be escaped with I, I@, IP or IV command, but it is more convenient that periodically escape it with S key or trigger 2 to avoid unwilling writing.


Remote booting with serial connection

This is special way to do on real X1 PC only. If you use X1 emulator, refer below to make disk image.

Prerequisites

Real X1turbo/Z series PC with FDD (turbo model 10 and normal X1 series cannot be used).

Windows PC with serial port (USB serial cables cannot be used).

Serial cross cable (Interlink) or DSUB 9 pins - DSUB 25 pins

Turbo Basic executable (CZ-8FB02) environment.

Key board for X1turbo

Monitor (not necessary ? )

5 inch 2D floppy disk with standard format

Communication between X1 and PC requires cable which connects RTS from 25 pins and CTS of 9 pins (cross cable of Interlink).

If not described "for Interlink" on specifications, such a cross cable is sometimes not connected these pins and cannot communicate. Refer pinouts written in latest document of HSSIO(see below) for details.

Preparation

Connect PC and X1turbo/X1turboZ via serial port with cross cable.

Download archive of "HSSIO"(hssio_ver02a.zip) at site of "X1 Center". It provides full-duplex high speed serial communication module and remote booting environment.

Refer "readme.txt" in the archive above and make IPL boot disk for remote booting.

How to execute

Execute IPL boot disk prepared on real X1 PC and boot loader.

Select "Start serial communication after compile" and COM port number at compiler settings and then compile MML.

System and music data are transferred to real machine and starts playing.

Automatically reboots loader when recompiles MML while it is playing.

If playing screen is showed only for a moment and loader reboots soon after that, RTS and CTS are correctly connected via serial cross cable.

Use cross cable or disable check for "Start serial communication after compile" on compiler settings.

Making disk image

Explanations below is for NRTDRV embedded easy play monitor. Currently we recommend to use NRDSEL and refer NRDSEL.TXT.

IPL boot file "NRTDRV.sys" is written to the folder where NRTDRV.EXE exists when MML is compiled. Use tools from these sites and write as D88 formatted disk image.

"X1EMU and PadKey98" site  http://www.geocities.co.jp/SiliconValley-SanJose/3949/

Use X1FORMAT.EXE and X1SAVE.EXE imaging file tools for X1EMU (img1023.lzh)

> X1FORMAT [D88 image name to aformat]
> X1SAVE [D88 formatted image name ] NRTDRV.Sys /I /R0000 /G0100

The easiest way might be that put X1FORMAT.EXE, X1SAVE.EXE and NRTDRV.Sys into same folder and them execute "D88MAKE.BAT".

Change final line of BAT file for your environment, it can automate to boot "NRTDRV.D88".

If you use this image on real X1, make D88 image as above, write it into 2D disk and boot from IPL.

Manual preparation

Extract archive which saved when MML is compiled and use it individually (as a file).

Load NRTDRV(driver itself) to 01800H.

Load NRD file (music data) to 04000H.

Execute entries below.

List of driver entry

01800H (DRVINI) Initialization of driver. This must be executed first.

01803H (MPLAY) Play. Turns EI and plays from appropriate address.(See note 1)

01806H (MSTOP) Stop. Stops playing music. Turns EI.

01809H (MFOUT) Fades out.(See note 2)

0180FH (MTEST) Play test sound.(See note 3)

01812H (MPLAYD) Play. Turns EI and plays from 04000H.

01815H (VINIT) Display initialization. Sets PCG definition etc.(See mote 4)

01818H (VMAIN) Draws 1 frame of playing monitor. (See note 5)

0181BH (INVREG) Disables virtual OPM register for NRDSEL/OPM tone editor.

Note 1 Music data is relocatable and can be allocate memory freely. Put music data address to driver's BGMADR work area and then call MPLAY. Default address is 04000H.

Note 2 A little noise occurs when OPM tone is selected while fading outs.

Note3 Test sounds below are played when this entry is called. Use it for balancing volumes etc.

1. OPM#1->PSG->OPM#2 Plays "CDEFGABC" in this order. 2. OPM#1"CD"->PSG"EF"->OPM#2"GA->OPM#1"BC" 3. Chord with OPM#1"C"->PSG"E"->OPM#2"G" 4. OPM#1->PSG->OPM#2 Repeat playing "C" in this order.

After playing this, address of BGMADR work area points test sounds' one. If you want to play ordinary music data again, call MPLAYD or call MPLAY after BGMADR is set.

Note4 When it is called with 0 in A resister, only defines logo as PCG. When it is called with other than 0 in A resister, defines all of PCG and then text attributes changes 80 characters and 19 lines of PCG.

Note5 o0c is treated as rest only in keyboard displaying and it is not displayed (but played sound). Playing sounds has priority towards displaying so when loading is high displaying is not renewed.

External reference work area

 01831H (VER) Internal version number.

0=Versions until 2016/10/28
1=Versions from 2016/11/01
2=Versions from 2017/03/03

This is version number to avoid mismatching between driver and music data.

Specification is as mentioned above but actually version number is newly implemented from version of 2016/11/03. If this work area is read by previous versions, returns are 0.

Previous versions of 2016/12/03 changes value when starts playing. Get former value before playing if you need.