>>>> WARNING: very poor translation!!! <<<<
This project is extended MOD-player 1. I've added IDE interface for IDE P-ATA HDDs or CF cards instead of external EEPROM. HDD (or CF) works in LBA mode and maximum usable capacity for songs is some 128MB (it's around 255 0.5MB songs). It can store up to 255 songs received via COM port or virtual USB-COM with FT232. With FT232 the transfer speed is about 1.25Mbit/sec.
Sampling-rate: 22321.42 Hz Channels: 4 (mixed into stereo) Instruments: 15 or 31 Reasampling mode: linear interpolation Max. songs in file system: 255 and less than 128MB
At first I want to use ATmega64 instead of ATmega32, but there is enough pins for IDE interface on ATmega32. Only 16 pins for data, 3 pins for addressing and 2 pins for clocking (RD/WR). I'm using 16-bit communication mode, because old 8-bit IDE transfer mode is almost not supproted. Data pins D0-D7 are connected directly to portc, higher 8 data pins are connected to porta. 3 addressing pins for IDE device register selection are connected to extension buffer IC3. SRAM is connected just like in old version - the lower 8 addressing bits are connected directly to porta, higher 8 bits are connected via extension buffer IC2 and the highest bits are connected together with HDD address pins via buffer IC3.
FT232 is connected in standard mode (don't forget to install drivers from FTDI). You can use standard COM, but you have to change baudrate in MCU FW. You can choose 2 kinds of D/A converters. First is standard I2S bus (TDA1543). It has bigger power consumtion and noise. The second one is something called "Japanese standard bus" (TDA1545). Actualy it's I2S with WS signal delayed by one clock and it's simpler to emulate this via SPI.
After the power is connected, LCD shows IDE identifier, CHS and
expected capacity. If there is no IDE drive, the player works only in USB/COM mode.
It means that you can upload file into RAM and play it.
If the IDE device is connected at first time, the player will ask you for formatting.
You can choose "Format" (create allocation table (not FAT12/16/32 - it's only my experimental format))
or "Znovu" (try to load FAT again) or "Bez HDD/CF" (no IDE device).
Every time the FAT is initialized, the FAT is send via COM to the PC.
If formatting/nothing is done, the LCD displays songs count and their size.
After that, player waiting for data or starts playing the first song.
Firmware for MCU
The FW is written in assembler and it is about 4600 lines long and
only 9,5kB in size. File system is only experimental.
Every file start address and end of file is defined by the
two 16-bit values in the FAT coll. FAT begins by the "Tab0" identifier.
there is nothing like fragmentation, so if you erase file, there is gap in the data
and if new song is bigger, the gap will be there forever.
Effects and formats
This player can play old MOD files with 15 or 31 instruments and 4 channels. 31 instruments file has identifier "M.K.", "M!K!" or "FLT4" at offset 1080. Other formats are incorrectly identified as 15 instruments and the player can not play it (it will play ... who knows what).
Here are a few sample records from MOD-player
(c) 2006-2007, Stanislav Mašláň - All rights reserved.
Last update: 7.11.2007