Jun Soft MPX H/W R2.0 User manual

Media Player eXtended
MPXTM
User Manual
preliminary release
version 2.0b
relevant to
MPXÔ H/W R2.0
Presented by Jun Soft
Jul 12, 2017
1/11 2017 © Jun Soft

Revision History
R2.0a (2016-10-24)
•first release
R2.0 b (2017-7- )
•Totally revised.
•Figure 1: onne tion to audio devi es, modified.
•Table 1: memory map, modified.
•Table 2: status register, errata fixed.
•Setup utility and start-up sound file sub-se tions are added in MIOS se tion.
2/11 2017 © Jun Soft

Table of Contents
1 Introdu tion 5
2 System Requirement 5
2.1 Minimum requirement..............................................................................................................5
2.2 Re ommended requirement......................................................................................................5
2.3 Features.....................................................................................................................................5
3 Qui k Installation 6
3.1 Setup hardware.........................................................................................................................6
3.2 Conne tion diagram..................................................................................................................6
3.3 Che king hardware...................................................................................................................7
4 MPXTM Internal 7
4.1 Overview...................................................................................................................................7
4.2 Board layout..............................................................................................................................7
4.3 Memory map.............................................................................................................................8
4.3.1 Memory mapper................................................................................................................9
4.3.2 Audio ontrol registers......................................................................................................9
4.3.3 Spe ial registers................................................................................................................9
5 Tools 10
To playba k a mp3 file, MPXTM in slot 2.............................................................................10
With more detail information...............................................................................................10
To update MIOS...................................................................................................................10
6 MIOS 10
6.1 Setup Utility............................................................................................................................11
6.2 Startup Sound File...................................................................................................................11
7 A knowledgement 11
3/11 2017 © Jun Soft

Index of Tables
Table 1: memory map...........................................................................................................................8
Table 2: status register..........................................................................................................................9
Table 3: ontrol register......................................................................................................................10
Illustration Index
Figure 1: onne tion to audio devi es..................................................................................................6
Figure 2: board layout..........................................................................................................................8
4/11 2017 © Jun Soft

1 Introduction
Thank you for pur hasing and using Jun Soft's Produ ts. MPXTM is a media pro essing artridge
for MSX omputer systems. It supports lots of ommonly used media files, mainly fo used on
mp3 but not limited to. The purpose of MPXTM is to playba k media files with small omputation
power of MSX. It also provides an appli ation friendly software interfa e, named MPI (media
pro essing interfa e).
2 System Requirement
2.1 Minimum requirement
•MSX omputer with a disk drive (pra ti ally large and fast storage required)
•MSX-DOS.
•audio amplifier or/and headphone.
2.2 Recommended requirement
•MSX omputer running at 7MHz or more
•A fast mass storage (HDD/MMC/SD et .)
•MSX-DOS2.
•audio amplifier or/and headphone.
2.3 Features
•VS1053 audio CODEC.
•W8985 Stereo audio DAC.
•Flash memory minimum 128KB.
•FIFO memory 2KB.
•Two stereo audio outputs.
•Two stereo audio inputs.
5/11 2017 © Jun Soft

3 Quick Installation
3.1 Setup hardware
•Power off your MSX omputer, if it's powered up.
•Put a MPXTM artridge into your MSX omputer's empty slot.
•Conne t an audio able to MPXTM and audio equipments (audio amplifier or/and
headphone).
•Power on the MSX omputer and boot with MSX-DOS(2).
3.2 Connection diagram
There are two audio output onne tors and two audio input onne tors. You an onne t a
headphone or an external amplifier to any of output onne tors. Also you an mix external audio
signals via two audio input onne tors. A typi al onfiguration is shown in Figure 1.
6/11 2017 © Jun Soft
Figure 1: connection to audio devices

3.3 Checking hardware
You need a proper software to test MPXTM. Refer to se tion 5.
4 M XTM Internal
4.1 Overview
MPXTM is a multi-media de oding hardware, whi h supports mp3 in major. Currently, a separate
audio CODEC and DAC are in luded and MSX ontrols or sends data via a dedi ated serial
interfa e. All ommands from MSX are onverted to serial data and transferred to the audio
CODEC. Multi-media data are also transferred to the CODEC by the same method. Su h a parallel
to serial onversion is handled by a EPLD. Moreover, MPXTM R2 has a spe ial FIFO memory to
redu e pro essing time of MSX. Multi-media data an be transferred through the FIFO memory
without he king whether data buffer is ready or not on every byte write.
MPXTM also has a flash memory for internal usage and user program interfa e. The flash memory is
divided into two areas alled bank and physi al 16KB memory segments an be mapped to any
bank dynami ally.
Analog audio signals an be routed to DAC and you an mix mp3 musi s from MPXTM with
external sound from DalSoRi OPL4 artridge, for example. Ea h output and input levels an be
ontrollable. Mix all sounds from MSX together and enjoy it!
4.2 oard layout
Figure 2 shows the board layout of MPXTM. There are one LED and four onne tors. The left two
onne tors are used for audio input and the right two onne tors are for audio output. You an
onne t another audio equipments supporting line level inputs or outputs through those onne tors.
Note that ea h audio level is ontrolled by software.
The LED indi ates MPXTM is ready for re eiving data from MSX. If it be omes darker when
playing musi s, it means MPXTM is busy to de ode multi-media data.
One slide swit h is populated in MPXTM. If wrong software is installed into the flash memory and
thus MSX does not work orre tly, you an disable the internal flash memory of MPXTM and save
your MSX from the malfun tion. Also it’s safe that you disable the flash memory before MSX
boots, if you want to update software.
7/11 2017 © Jun Soft

4.3 Memory map
Table 1 shows all memory addresses used in MPXTM. Sin e MPXTM uses memory mapped I/O, that
means you an ontrol MPXTM through predefined memory addresses, some addresses are assigned
to spe ial purpose registers.
address name type des ription
4000H-77FFH BANK0 r Flash memory (bank 0)
6000H-67FFH REG_MAP0 w Memory mapper for bank 0
7000H-77FFH REG_MAP1 w Memory mapper for bank 1
7800H-7BFFH REG_FIFO w FIFO memory
7C00H REG_CODEC r/w Audio CODEC ontrol
7D00H REG_DAC w Audio DAC ontrol
7E00H REG_STAT r Status register
7F00H REG_CTRL r/w Control register
8000H-BFFFH BANK1 r Flash memory (bank 1)
Table 1: memory map
8/11 2017 © Jun Soft
Figure 2: board layout

4.3.1 Memory mapper
MPXTM has two memory mappers for mapping physi al memory segments to a bank, a logi al
spa e. Ea h segment's size is 16KB and maximum 32 segments are available. You an assign a
segment number to a bank via a 5-bit memory mapper register (REG_MAP0 and 1). Note that some
part of the bank 0 is o upied by spe ial registers, you an't read or write memory ontents of that
range. If needed, you an a ess all memory ontents without su h a limitation via bank 1.
4.3.2 Audio control registers
The audio CODEC and DAC are ontrolled dire tly by REG_CODEC and REG_DAC registers.
Detail des riptions are found on ea h hip vendor's site. Refer to VS1053B and WM8985 referen e
manuals.
4.3.3 Special registers
MPXTM has two spe ial registers to ontrol and monitor internal system. Refer to Table 2: status
register and Table 3: ontrol register for details. Note that all internal registers in luding mapper
registers are prohibited to appli ation programs basi ally, however MSX is an open ar hite ture and
it's free for personal use.
bit name des ription
7 VS_DREQ ‘1’: CODEC data request, ‘0’: CODEC is busy
6 FIFO_RDY ‘1’: FIFO available (minimum 512 bytes burst write a eptable)
5 FIFO_NEF ‘1’: FIFO not empty
4 ID1 '0'
3 ID0 '0'
2 IRQ ‘1’: Interrupt requested
1 SPI1_BUSY ‘1’: DAC SPI I/F busy
0 SPI0_BUSY ‘1’: CODEC SPI I/F busy
Table 2: status register
9/11 2017 © Jun Soft

bit name des ription
7 Do not use (write zero)
6 FIFO_RST ‘1’: FIFO reset
5 DMA_EN Dire t media a ess enable (reserved for future usage, DO NOT USE)
4 FMW_EN ‘1’: Flash memory write enable
3 HISPD ‘1’: High speed mode (6.144MHz) , ‘0’: 768KHz
2 IEN ‘1’: Interrupt enable
1 SPI1_EN ‘1’: DAC SPI I/F enable signal
0 SPI0_EN ‘1’: CODEC SPI I/F enable signal
Table 3: control register
5 Tools
There is several programs working with with MPXTM. At least, a mandatory program named as
“mpxtool. om”, exists to test MPXTM. It’s a ommand line tool to playba k meida files. Another
important tool is FlashPa kTM memory tool, “fpmt. om”. Download them from Jun Soft blog and
refer to output messages of the program with 'h' option. Some examples are following.
To playback a mp3 file, MPXTM in slot 2
A:> mpxtool <mp3_file_name> /s2
With more detail information
A:> mpxtool <mp3_file_name> /v2
To update MIOS
Move the swit h of MPXTM to 'ON' side if needed.
A:> fpmt w mios.rom /s1/t3
6 MIOS
In the flash memory of MPXTM, MIOS is pre-installed or you an install it by the FlashPa kTM
memory tool. MIOS is urrently under development but it's an important part of the MPXTM proje t.
MSX was indeed born from the ompatibility as you know, that must be kept as possible as we an.
All user appli ations are re ommended to a ess MPXTM through MIOS. In the near future, new
10/11 2017 © Jun Soft

MPXTM will be available with different hardware onfiguration, then guess what will happen.
Please ontinuously he k it out on Jun Soft's blog and update MIOS if possible. Refer to the
programming manual of MIOS for more details.
6.1 Setup Utility
From MIOS v0.3, a setup utility is in luded. If you press ‘<DEL>’ key when MSX boots, the setup
utility is invoked.
In this setup menu, you an onfigure several parameters su h as initial volumes, apabilities and
start-up sound ontrol.
6.2 Startup Sound File
At default, MIOS ontains a sample start-up sound file. This sound file is generated when MSX
boots if enabled ( onfigurable by the setup utility). If you want hange the start-up sound, just
hange a part of the flash memory ontent with a valid start-up sound file. Use the FlashPa kTM
memory tool to write the file into the flash memory.
A:> fpmt w <file.ssf> /o4
The option ‘/o’ should be given with a parameter 4. The start-up sound file stru ture is very simple
so you an make easily it with a proper tool. Firstly, you need a media file su h as mp3 or wav file.
The size must not ex eed 64KB – 8. At se ond, you need a header file beginning with “MPXSSF”
and followed by 2-byte (little endian) data length. Then atta h the header file prior to the media file.
Burn it up and reboot MSX!
7 Acknowledgement
Thank to all MSX users in the world,
MSX is still alive and ki king!
Enjoy your MSX forever!
11/11 2017 © Jun Soft
Table of contents