About synchronization, it would be good if bit7 in #23 is set more than 1/50 second before the buffer is empty. That way it would not be any problem using vint. So @ 192kbps the flag must be set at least 491 bytes earlier. With other overhead I think 512 bytes earlier is enough, but I think it means that the mp3 buffer need to be serviced first in the ISR (which is no problem, just something to keep in mind). @128kbps its no problems at all.
About clearing the flag, I suggest clearing it on read. I guess it could be useful to have the bit set always when the buffer is close to empty ( < 512 bytes), but then its harder to use the interrupts.
I was expecting this for a looong time. I'm not interested in it.... Of course I am!!! I'll buy the first possible unit of it!!!
I think that this device would be very nice if you could read back the decoded data in order to make oscilloscope display for MP3 player or to make MP3 to WAV converter. Unfortunately I don't know how hard this is to implement.
From developer point of view it would be nice to have just 2 I/O ports (L&R) from where you could read realtime PCM data send by MP3 decoder to DA converter.
Sorry if I missed the previous discussion, but where are the MP3 files stored? In the MSX (hard)disk or in a separate memory? In any case, is the file fully loaded and/or buffered in the MP3 replayer device or has the MSX to handle the data transmission?
pitpan: see the top of page 4 of this thread.
Understood. Thanks for pointing it out, Manuel.
The decoding is done in the VS1011, all inside the chip. It is possible to upload a small program to the VS1011 and i think there are 4 16 bit registers which can be used as a feedback from the internal program to the outside world. All registers can be read through I/O &H22, i made a (quick and dirty) example program which reads and 'decodes' register 8 and 9. Here you can also see the actual bitrate of the current package, the layer, MP3 version, stereo/joint stereo etc.
There is an example program available from VLSI for the VS1011 to insert a loudness filter. I was thinking of a small spectrum analyser, but i have to study this strange language first and i don't know the data path inside... Now i am busy with hardware... I spent some time searching on the internet for this, this is needed to start with it:
http://www.vlsi.fi/software/vskit/vskit.shtml
http://www.vlsi.fi/vs1011/software/software.shtml
The data buffer is increased to 14*256 bytes now. It is no problem to send smaller parts ofcourse, if you only want to send 3*256 bytes you won't see the difference. In my test program this buffersize is better with 320kbps MP3's, after 12*OTIR the MSX has more time to access the VDP.
You're welcome. With rapidly growing threads it's sometimes hard to follow.
Cool, that the buffer size has been increased to 3,5KB!
Because of this I wonder if there is any chance to make the "buffer is nearly empty"-signal configurable. Now you are generating it, when the buffer contains <512 bytes, which is fine for 128kbps MP3s (I am speaking about the VDP-irq-poll-methode). For 192kbps this is already very short, and for 256kbps it's not enough (higher bitrates are probably not useful, if you want to do something else with a normal MSX2). So as you now have a bigger buffer, maybe it could make sense to set the bit more early (768 or 1024), if the bps-rate is higher.
Only an idea, and I hope these discussions won't delay the project, as I can't wait for holding this great card in my hands Personally I think I will hardly play MP3s with a bitrate >128kbps on the MSX.