AmiMPC
Intro PSU
Hardware Install
Software Gallery

Software
 
  I wrote all the software for this project from scratch, other than the MHI driver which I had already developed. I estimate that over 8000 lines of code were written when taking into account all the unused test code. The software is now at V2.8, after a complete re-write from V1.

  Some features of the software are:

  • Browse by directory or album (playlist)
  • Supports bit rates up to 256Kbps
  • Resumes where it left off on power up
  • Track, Album, Artist, volume and progress display
  • Preferences system
  • IR remote control
  Currently, the software is hard coded to a few defaults. It scans MP3: for directories. Sub directories are ignored. It then scans MP3:.lists/ for albums, which are basically playlists created in AmigaAMP or just a plain list of files (e.g. from the list command). This allows me to select tracks by either directory or album. By default directories of MP3s are always played in random order (non-repeating), while albums remain in the order they were saved in.

  The LCD display has four basic 'modes': Play Mode, Album Select, Directory Select and Prefs. Shown on the right are the loading screen (only shown for a few seconds), play mode and album select mode. I can flip between each mode using the number keys on my remote.

  Play mode shows the track name, album and artist. On the bottom line of the LCD, the current volume (shown as a percentage or 'MAX' for 100%) and a progress bar are show. The progress bar shows how much of the MP3 has been decoded. From here I can also skip to the next/previous track, or pause/stop the music.

  The album and directory select modes allow me to choose an a group of MP3s using the fast forward and rewind buttons on my remote. Pressing play will load the current album/directory list and start playing the first MP3.

  The final mode is the prefs mode. Here I can set various options, such as bass and treble control, display contrast, backlight brightness, analogue volume control accuracy and volume update timing. This is the least often used mode.

 
LCD Display
lcd top
lcd left play mode lcd right
lcd bottom

  Of course, the music will keep playing regardless of the current mode, and the pause/stop buttons keep working.

  For decoding the MPEG stream and output, AmiMPC uses my own MHI drivers for the MAS Player Pro. MHI was developed by myself and Thomas Wenzel to provide a standard API for accessing MPEG audio decoders (both hardware and software) on the Amiga. Drivers and an SDK can be found on Aminet, search for 'MHI'.

  For volume control I used an analogue pot (see the hardware section). To read this I used an interrupt on the vertical blank (int5) which periodically checks the value of the pot. It then checks to see if it has changed enough to be more than just a random fluctuation, and if so signals the main task to perform a volume change.

  The software was developed on my A4000 060, and tested on the actual A1200 030 I used. The program code itself is only 34K, and along with the OS only uses around 100k of RAM. The program allocates 1MB of memory for buffering, which is split in to 128k chunks. This keeps HD access down, as 128K is approximately 8 seconds of audio at 128Kb/sec, or 6 at 192Kb/sec. The HD then only has to access every time a buffer becomes empty, and the 1MB total of buffering ensures that the music never skips. I also used PFS3 on the HD, which has 100K of buffers.

  If you want more info on the software, or have any questions, please contact me: paul@world3.net

Download
The software, including source, can be downloaded here:

AmiMPC V2.8

AmiMPC was developed entirely in Storm C V3.

Thanks
My thanks go to Przemyslaw 'SENSEI' Gruchala for help with finding the last, immensely irritating bug in AmiMPC V2.

Thanks also to the members of the Amiga C mailing list for help on a couple of other points.