ArduiTape

Страница 1/9
| 2 | 3 | 4 | 5 | 6

By Buleste

Master (158)

Аватар пользователя Buleste

26-09-2014, 10:49

With the help of a friend (who has done most of the work) I have now finished a basic prototype that will play wav files from an SD card to the MSX but unlike using an MP3 player or Tapdancer it has full motor control so tricky games like Head Over Heels will load properly. It does require converting the cas files to wavs on the PC with a special version of CAS2WAV due to the limitations of the Arduino.

The code and designs for a basic version can be found here.

My version which has some slight differences such as an I2C LCD screen and a LM386 amplifier can be seen below.

I will upload the updated code for my version along with the new CAS2WAV soon.

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By pitpan

Prophet (3131)

Аватар пользователя pitpan

26-09-2014, 11:32

Arduino should be able to convert CAS to WAV without further problems. It is neither memory nor CPU intensive task. Of course, interfacing that could be a real problem Tongue

By Buleste

Master (158)

Аватар пользователя Buleste

26-09-2014, 11:56

It's far beyond my skill levels to do that at the moment. The main problem so far has been reducing the sample rate as the Arduino Uno (and Nano which I will be using for a more permanent board) can only play back samples up to 20kHz and simply converting wav files does not work which is why cas2wav has been altered for this project. It does need to be optimised more but at the moment I'm testing to see what games work or not and if 2400 baud mode works or not.

By giangiacomo.zaffini

Champion (267)

Аватар пользователя giangiacomo.zaffini

26-09-2014, 17:03

@ Buleste : did You calculate number of samples per encoded binary symbol (i.e. baud) according to sampling rate?
For instance in CasLink project it was fixed, and I think it is a software problem. I'm reworking CasLink projects in order to improve it, but I'm so slow at it.

By Buleste

Master (158)

Аватар пользователя Buleste

26-09-2014, 17:51

The programming is done being done by a friend and he is calculating the baud rate with the sampling rate but he doesn't have an MSX so at the moment it's being passed between us to see what works and what doesn't.

By Buleste

Master (158)

Аватар пользователя Buleste

26-09-2014, 18:31

Can Caslink handle cas files and convert them to less than 20kHz?

By Manuel

Ascended (15940)

Аватар пользователя Manuel

26-09-2014, 22:29

Note that openMSX also has modified CAS2WAV code in it (originally based on Vincent's code), and as far as I know, it can convert it to any frequency too. So, perhaps this is useful for you. (The code is GPL licensed, so use it wisely.)

By giangiacomo.zaffini

Champion (267)

Аватар пользователя giangiacomo.zaffini

27-09-2014, 18:38

@ Buleste: CasLink2 notes say it can work at 44100 Hz /4 = 11025 Hz ( < 20kHz).

Thanks Manuel for his precious informations, since I should have resolved sampling frequencies problems I will look into openMSX souces if I'm lost in trouble again.

By hit9918

Prophet (2881)

Аватар пользователя hit9918

28-09-2014, 06:26

I want to remind, in low Hz region, one needs "exactly 4 wav samples per MSX bit".
2400baud * 4 -> 9600hz wav. 11khz gets aliased trash while 9600Hz is a tidy curve.

Actualy making the low hz wav is easy, I suggest using separate code without going thru any interpolation function.
Here I got a tool, you can look at the curves it makes:
https://sites.google.com/site/tueftlerlabs/home/downloads/lw...

A MSX bit gets 4 samples in the wav. An MSX 0-bit is DOWN DOWN UP UP and the 1-bit DOWN UP DOWN UP.
Done that, tell "9600hz" in the wav hz header word.
But this ease and clarity is required in the low hz region, one MSX bit must be exactly 4 wav samples long, anything else makes an aliasing mess.

Another thing, "file hangs at the end".
The wav generator ends in the UP position, machine hangs on the final stop bit (I think on the MSX the "tape off" bios function makes that final DOWN position).
Easy fix is just to generate one more MSX bit, that has a DOWN position that closes the slope.

After having those things sorted out, 9600hz wav loads very good :)

By hit9918

Prophet (2881)

Аватар пользователя hit9918

28-09-2014, 06:55

p.s.
11025hz dont work. except it is 11025 / 4 = 2756.25 baud, i.e. a fast loading app.

key is the "exactly 4 samples" rule.
To break the rule, the wav hz must be two times bigger, maybe 22khz. In this region the "bigger is better" rule does apply, but not in low hz wav.

By Buleste

Master (158)

Аватар пользователя Buleste

28-09-2014, 10:52

At the moment the best success we've had is at 14400.

Here's a list of games tested and whether they are working or not.

Avenger - No
Bubbler - Yes
Cyberun - Yes
Aliens - No
Alien8 - Yes
Knight Lore - Yes
Gunfright - Yes
Hustler - Yes
Mayhem - Yes
Head Over Heels - Yes
Pentagram - Yes
Jack The Nipper II - No
Jack The Nipper - No
Nightshade - Yes
Finders Keepers - Yes
Storm: Una's Lair - Yes
Vampire - Yes
Knight Tyme - Yes
Stormbringer - Yes
Afterburner - Yes
Auf Wiedersehn Monty - No
Chiller - Yes
Arkanoid - Yes
Batman - Yes
BMX Simulator - Yes
Journey To The Centre Of The Earth - Yes
Martianoids - Yes
Out Run - No
Return To Eden - Yes
Ghostbusters - Yes
Feud - Yes
Batman The Movie - Yes
Molecule Man - Yes
Snowball - Yes
Worm In Paradise - Yes

Страница 1/9
| 2 | 3 | 4 | 5 | 6