Commodore‎ > ‎C128‎ > ‎

Media Player 128 (beta)

This is the second release of an experimental real-time multi-media player for the Commodre 128.  Real-time means it can play files directly without waiting to load the entire file into memory (which is quite impossible without some RAM expansion).  Multi-media means it will play various formats, some standard, and some I just made up.

  Beta Features  
  • Plays original (alpha) style videos (now centered)
  • Plays CIFF 2-bit, 4-bit, and 8-bit audio files (something I made up)
  • Plays .AIF 8-bit audio files
  • Plays DFF 8-bit audio files
  • Plays .WAV 8-bit audio files
  • Plays .M3U play lists
  • Semi-graphical user interface runs in both 40 and 80 columns
  • User input via keyboard, joystick, or mouse
  • Supports casette (not recommended for anybody)
  • Supports C1541 with or without JiffyDOS (of course JD is recommended)
  • Supports C1571,C1581,CMD-HD,uIEC and other fast serial devices
  • Supports C1581-style, CMD-style, and VICE-style subdirectories.
  • Supports REU up to 16MB
  Limitations  
  • requires fast-serial device (1571, 1581, CMD-HD, or µIEC) or RAM Expansion Unit (REU)
  • 99 items per directory
  • 99 files per play list
  • 9 unique directory paths
  • All files in play list must be on the same unit/drive (but they can be in different directories)
  • Only monophonic audio (no stereo)
  • Maximum 13kHz for 2-bit audio
  • Maximum 12kHz for 4-bit audio
  • Maximum 14kHz for 8-bit usigned audio (.WAV, DFF, CIFF)
  • Maximum 13kHz for 8-bit signed audio (.AIF)
  • Minimum 7.1kHz for 8-bit audio
  Choose your version  
I've worked hard to make Media Player 128 work with as many devices as possible. However, to make things simple for you, I've made 3 different downloads that are taylored to specific hardware. The only real requirements are a C128 (duh) and a fast-serial device (like C1571/81) or else a large REU to buffer the files from slower devices.

Download the D64 package if you have only a C1571 disk drive (or God forbid, only a C1541 or datasette!). This includes the player on one D64 disk image, and another two disk images of 2-bit, and 4-bit audio files. There are no videos because the 1571 just isn't fast enough (and also it won't hold enough data).

Download the D81 package if you have a C1581 or similar device (like FD-2000). This is also recommended for the casual VICE user who wants to give Media Player 128 a test drive. It includes the player and some small audio files on one D81 disk image, and a few more D81 disks of 8-bit audio, and three more disks with video clips (a full video will not fit on a single D81).  VICE users should configure the emulator for PAL video, enable True Drive Emulation, and obviously set the drive type to 1581. 

Download the HD package if you have a mass storage device that supports fast-serial, like a CMD-HD or uIEC. If your mass-storage device does not support fast-serial, then you will also need a large REU (minimum 2MB recommended). This can also be used in VICE but the setup is a bit more complicated than the D81 package:  VICE users should disable True Trive Emulation, enable Device Traps, and Enable REU.  Also device 8 should be set to a local directory (wherever you unzipped the download).
 
  More Downloads  
Not enough for you?  Additional downloads include a set of Windows command-line utilities to make 2-bit or 4-bit audio files, or compile a .CIF video (the utilities should also run on Linux using Wine).  If all you want to do is make audio files, you may not need this, as MP128 will automatically play 8-bit audio (.AIF and .WAV files in PCM format).  If you want to make a video, be warned it is not a simple process, but the utilites download includes a ReadMe text file to help explain the process.  For you hackers, the complete source code is also available.  Enjoy!
 
  Using MP128  
If you are using a disk image (from the D64 or D81 download) the program will auto-boot if the disk is in drive 8.  Or you can manually start the player with BOOT Un (where n is the correct drive#).  If you are using the HD download, you have to manually start the program with RUN"MP128INI.BAS",Un (again, n is the drive#).  Of course if the file "MP128INI.BAS" is the first in your directory you can shorten this command to RUN"*",Un.
 
This will start a BASIC initialization program which prints a sign-on message, sets up several variables, and loads several files.  The screen shot is from the 80-column (VDC) screen.  MP128 will run in either 40 or 80 column mode, however the videos will appear only on the 40-column (VIC-II) screen.  An important thing you might want to look for is a message that appears below the first loading message (below JLOAD128.BIN).  This should tell you the type of hardware in use.  It should read one of:
  • Using Fast Serial -- this happens with 1571, 1581, CMD-HD, etc.
  • Using JiffyDOS; REU Required -- this happens with JiffyDOS devices like MMC or upgraded 1541.
  • Using KERNAL; REU Required -- this happens with standard 1541, parallel cable, cassette, etc.
 

 

After the software loads, the user interface is presented.  The current directory is read and displayed.  Note the player does not force the use of upper/lower character set.  You can switch between upper/graphic and lower/upper character sets by pressing SHIFT + Commodore at the same time (I bet you knew that).  A typical directory listing may look like the following.
 
Image of MP128 Directory

 

You can use a mouse or joystick to move the arrow and press FIRE or left-click to select items on-screen.  You can also use the keyboard to select commands by name (the letter highlighted in white) and move the 'file selector' using the cursor keys.  You can scroll the selection pointer by almost a full screen by clicking the up and down triangles of the scroll bar (or pressing + and - on the keyboard).  Because the interface is written in BASIC, it is not fast enogh to support dragging the scroll bar (that's on the TODO list for the next release).
 
Clicking a filename or pressing the spacebar will (un)select files in the directory to be added to your play list.  Selecting a real directory (DIR items) or a 1581 partition (CBM items) the program will read in the files of the (psudo)directory.  You can select the command Directory to re-read the files from disk (for example, after a disk swap).
 
You can click the Up Arrow (or press it on the keyboard) to go 'up' in the directory tree.  Note when you first start MP128, this will normally not be available because the software can not determine what is the current directory (but some configurations of VICE will allow this).  Once you go 'down' into a (sub)directory, the 'up' option will become available.  Unfortunately, VICE will list only files but not directories from your hard drive!  In order to change directories in VICE, you need to access the Media Files option from the Config menu.  The following screen-shot is from the 40-column display.
 
Image of Media Files configuration screen (40 column)

 

From here you can enter the path you want displayed in the Directory listing.  You can also change the device# or drive# (partition#) you want MP128 to use.  Note the Type option shows what the last detected device was.  You should normally not change it -- MP128 should automatically detect the correct device if change from, say unit 8 which is 1571 to unit 10 which is a CMD-HD.  You should only click a different Type option if you have problems and think MP128 is detecting your device wrong (because once you click a Type option, MP128 will be forced to use only commands of that type and will not auto-detect any longer).  Note also that Type only applies to devices that support paths, such as 1581, CMD-HD, or VICE (that is why you do not see types like 1541 or 1571).  SD2IEC devices such as the MMC and uIEC are compatible with CMD-HD.  FD-2000 and FD-4000 devices should be compatible with 1581 and possibly CMD (still awaiting feedback on that issue).
 
The Test option lets you check the Unit/Drive/Path is correct before you press OK.  When entering the Path (or any other entry described later that requires keyboard input), you can use any of the standard editing features of the C128:
  • Cursor keys move left/right (or up/down for multi-line items)
  • CLR (Shift+Home) will erase all the input
  • Home will move the cursor to the start of input
  • ESC key combinations can be used (ESC,Q being may favorite which clears everything after the cursor)
  • RETURN to finish editing
The Command option lets you issue a command on channel 15 to your device.  You might want to scratch or rename a file, etc.  After pressing return the command will execute and the response from the drive will display at the top of the screen.
 
Important Note: clicking OK on this screen will re-set the device drivers used by Media Player 128.  If you change your hardware configuration, it is important that you access this Config menu and select OK before you try to read a directory or play any files.  If you fail to do this, the wrong drivers may be used and the machine may lock up.  For example, if you start MP128 from a 1541 unit 8, but then turn off your 1541 and turn on your 1581 (also unit 8) then the software may crash when trying to read the directory.  The same goes for using the 'swap device' button on a CMD-HD or when turning True Drive Emulation on/off in VICE.  Remember, if you change your hardware configuration then access this menu and select OK.
 
 
Playing Files  
Now to the purpose of the program, to play your files for entertainment!  After selecting one or more files from the Directory screen, the option Play Files will become available.  Simple click that option or press P on the keyboard to play all the files in your playlist.  You can review or edit your playlist by clicking List from the main menu at the top of the screen.  It should look something like this:
 
Image of MP128 play list (80 column)

 

The editing options are rather crude in this version.  You can Delete an item from the play list or Clear the entire play list.  Unfortunately you can not re-order items in the playlist (also on the TODO list for the next version).  More importantly, you can save your playlist as an .M3U file -- so the next time you use MP128 all you need to do is select the playlist instead of picking out files manually.  Before saving your playlist, be sure you are in the correct directory first, because the save option only lets you specify a filename.  It will however warn you if the file already exists, and if you choose OK it will replace the existing playlist.
 
For either audio or video playback, MP128 will show you some information about the current file in your playlist before it actually starts playback.  If you are using an REU to buffer the file, the screen will flash colors as it loads the file into the REU.  Every change in color represents 4kiByte.  After cycling through all 16 colors, your REU has loaded one bank (64kiByte).  This means if your file is 1MiByte in size, you should see the colors go through 16 complete cycles (or if you care to count 256 screen flashes).
 
After the REU is loaded you may see the message READY TO PLAY.  If this appears, you need to press CLICK/FIRE/SPACEBAR before the file actually starts playing.  This is because large files can take a minute or more to load into an REU and gives you a chance to confirm the start of playback.  If the file loads quickly (or you do not use an REU), you will not see the message.  The default timeout is 5 seconds.  If buffering takes less than 5 seconds, no message will display.  You can change the timeout value on the Config/Loader page.
 
When playing a video, the 40-column VIC screen will show the video.  If you also use the 80-column screen, it will only show the file statistics.
 
When playing an audio file, the player will show a buffer graph (either 40 or 80 column screen).  It indicates how full the audio buffer is -- if your storage device is fast enough, the bar should be pegged to the right side of the screen.  It is normal for the last bits of the graph to fluctuate a little during playback.  If your storage device is too slow, you will the see the bar slowly "drain" until it is "empty" at which point you will hear the audio loop and the graph will magicly "refill."  This should never happen when playing from an REU.  If this happen when playing from a fast-serial device, it means your hardware is too slow.  If you have an REU, then you should reduce the DateRate on the Config/Loader screen -- this will tell MP128 that your device is slower than it thought and it will instead use your REU to buffer the audio file.
 
Many audio files will blank the 40-column VIC screen during playback.  More specifically, only audio files with a sample rate very near double the VIC's raster rate can play without blanking the screen.  For PAL machines, the two-raster rate is about 7778 Hz and for NTSC about 7846 Hz.  In other words, if the audio is about 7816 Hz then the VIC screen should not be blanked.  However, this only applies to 2-bit and 4-bit audio files -- the 8-bit audio files always blank the VIC screen.

While a file is playing, you can use CLICK/FIRE/SPACEBAR to pause or resume playback.  You can skip to the next file in your playlist with a right-click of the mouse, pressing UP on your joystick, or pressing 1 on the keyboard.  You can abort playback of all files and return to the menu by pressing both buttons on the mouse, by pressing UP+FIRE on your joystick, or pressing STOP on the keyboard.

Well that describes all the neccessary things.  An additional Configuration option let's you tune the playback of audio files (or the audio of videos).  Select SID from the Config menu and you should see a screen like this (40 column):
 
Image of SID Configuration (40 column)

 

There are quite a few options here.  The Stereo Address is meant for future versions to support stereo audio.  The ML part of the software will initialize your second SID at the address you specify, but otherwise it will be unused.  The Use Filter option allows you force the SID filter On, force it Off, or use the default for the type of audio file (2, 4 or 8 bit).  If the SID filter is on (because you forced it on, or it is the default for the audio type), then the following items are used.  Filter Cutoff can have a big effect, and the best setting can vary between different Commodore 128s because of the type of SID chip and the size of capacitors installed.  Resonance will tend to amplify frequencies near the cutoff value.  The type of filtering is usually Low Pass.  High Pass should be avoided (but it is fun to experiment).  Band pass could be usefull, but it must be fine-tuned to your particular machine (so it is not the default of any audio type).  You can select combinations of Low/Band/High pass too.  Volume should be self-explanatory.
 
What is not obvious is that these settings do not always apply to every audio type.  For example, 4-bit audio only slams values into the SID volume register; no SID voice (oscillator) is used.  Which means your Volume setting will immediatly be overwritten when starting playback, and the filter will have no effect (the filter only applies to the SID oscillators, not the volume register).  8-bit audio uses all the settings, so you can have fun playing with different settings.  2-bit audio uses a combination of 4-bit and 8-bit methods.  So 2-bit audio will also bypass your volume settings, and the filter will have an effect on high frequencies, but low frequencies are mainly carried through the volume register (immune to filtering).
 
Unfortunately I have spent so much time on different audio types (2/4/8 bit and AIF/DFF/WAV files) and different storage technoligies (1581/CMD/JiffyDOS/REU/VICE) that I haven't had the time to improve the video quality.  Unfortunate because it really needs improvement.  That being said, I still think it is pretty cool to watch a video in real-time over the fast-serial bus.  In other words, except for a few minor tweaks (centering the video and properly clocking the frame rate), the video of this beta version is essentially unchanged from the alpha version.  I hope to find time this year to improve it.
 
Anyway, here are a couple of images from the video clips included in this beta release.  Enjoy and be sure to contact me with any comments or criticisms.
 Frame from "I Love Rock 'n' Roll" by Britney Spears (4:3 aspect ratio)
 Frame from "Rockstar" by Nickleback (16:9 aspect ratio)
 
 
  Known Issues  
Wether using a real C128 or VICE, it is important to note that when playing videos, an NTSC machine will read data slightly slower.  If your storage device is fast enough (a uIEC for example), then you can still watch the 'normal' videos on an NTSC machine.  Otherwise (C1581 or CMD-HD) an NTSC user will only be able to watch the 'slow' version of the video (slow meaning a lower data rate and thus a slower frame rate) unless they have an REU to buffer the file.  For audio files, PAL machines read data slightly slower.  This does not cause a problem for any of the audio samples included, but you could make an audio file that plays on NTSC but not PAL if you wanted.

© H2Obsession, 2011, 2012, 2017
Comments