How to use the Arduitape with the ZX Spectrum.
Sorry I've been a little quiet recently but I've managed to get my grubby little mitts on a ZX Spectrum + 48k and have been testing it with the Arduitape. Unlike the MSX and other 8-bits the only limitations on frequency of the .WAV files is no higher than 22050 Hz due to the limitations of the software used. I was expecting to have all the difficulties of the MSX but I've tested lots of files at different frequencies and they all work fine.
I've been using TZX2WAV to do the conversions. Open a command window. Type
I've been using TZX2WAV to do the conversions. Open a command window. Type
tzx2wav -f [desired frequency] [filename].tzx [filename].wav
and that's it.
I have been trying to experiment with a programme called OTLA which can output various formats of Spectrum, ZX81, Amstrad, and MSX files that playback at a higher rate and essentially turn a 5 minute loading game in to a 30 second loading game however it outputs at either 44100Hz or 48000Hz which is too high for the Arduitape to play back and any attempts to lower the frequency have met with failure so far. I'm not sure whether it's been my settings on OTLA that have been the fault or the resampling. I am trying to reprogramme a version of OTLA to output at 22050Hz as well but the original programme was compiled with Borland C++ and it can only be recompiled with Borland.
Experimenting with the possibilities of a Spectrum version of Casduino which will play PZX files is ongoing.
I have been trying to experiment with a programme called OTLA which can output various formats of Spectrum, ZX81, Amstrad, and MSX files that playback at a higher rate and essentially turn a 5 minute loading game in to a 30 second loading game however it outputs at either 44100Hz or 48000Hz which is too high for the Arduitape to play back and any attempts to lower the frequency have met with failure so far. I'm not sure whether it's been my settings on OTLA that have been the fault or the resampling. I am trying to reprogramme a version of OTLA to output at 22050Hz as well but the original programme was compiled with Borland C++ and it can only be recompiled with Borland.
Experimenting with the possibilities of a Spectrum version of Casduino which will play PZX files is ongoing.
This is amazing! I have tapuino and I want to build aduitape! Is it possible to add support for TI99/4a. TI have ear, mic and remote plug. With remote computer can pause tape recorder.
ReplyDeleteFrom what I've seen you would just need to convert the cassette files to wav format and then find out the frequency that your TI99/4a will work at.
DeleteFrom my research there is a programme called cs1er that will convert the cassette files to 44100Hz wavs you would just need to convert them to something the arduitape can use 22050Hz or lower.
I will look for as much information I can find including if I can find source code. At the moment I'm just finishing off building an Arduitape in the same Evatron PP9 case that the Casduino uses and maybe adding the mic port.
Hello,
ReplyDeleteThanks for this cool project.
I just started to build one for my MSX.
I am using a Uno to start with. I connected everything and powered it up but my LCD is blank?
To troubleshoot, can I just have the LCD plugged into the Uno and should I see some menu txt?
Next step would be the button board to test I can select things.
Then the SD card board.
Then the amp with some headphones to see if I can hear anything before plugging it into the MSX.
One other thing. The lastest version is down as 1.8Final, but the actual file in is 1.7Final?
Thanks again.
You should get something on your screen if your sda and scl are connected up correctly to the sda and scl on the Uno.
DeleteAs for the file I think it's just an error on my behalf but once I have access to my PC I'll upload the correct version.
Hello,
ReplyDeleteI found an issue. This particular LCD that was delivered is a 'QAPASS' model. So I needed to change the LCD address from 0x27 to 0x3F. I now have a working display!!
It is late now so hopefully over the weekend I can get the rest of the bits plugged in and start testing!! :-)
Cheers
Yes. Of course. I keep forgetting that LCD addresses aren't always the same. I've been luck and even the exotic ones I've had has all been 0x27 (btw I think QAPass stands for Quality assurance pass and isn't a brand but I could be wrong. Lol)
DeleteCorrect link to 1.8 final https://mega.nz/#!jUtDEIAR!hmGpKuykyNwW6G7E321ngnp1qgL9eEE18LDMNCqEB_k
Hi,
ReplyDeleteYes QAPass is probably some Engrish. As it will be printed on every PCB but there is no box to tick to say it has actually passed! Every PCB has passed QA!
Anyway back to topic. After rebuilding the Button Board this morning after I had made some mistake last night I got it working. But... I can't get programmes to load. I can't get my HX-10 to load any header from the .cas files.
When comparing the volume of MSX2CAS on my Smartphone to get games to load, I don't think my Casuino gets to the same volume? When the volume is fully up on my amp (bought same one as per quide, although I have not removed that capacitor) it is not as loud as the Smartphone and there is also some 'popping or clicking' so distortion from the amp? - corrupting the signal?
I don't think changing the variable resistor will do anything. Is there anything in the Arduino software I can change? I might Upload a previous version of your software to see if there is any difference.
The buttons are very sensitive. When I press 'Load' it jumps to 'Pause' and I have to press 'Load' again. Can I add a slight delay to reading the button signal?
Thanks for the help.
As you are building the Casduino version you don't need to build the low pass filter that is in the guide you just need to build a daughter board with 5v pins for the SD card, lcd, and amp (+1 for in) and the gnd pins. Excessive clicking is usually a sign of soldering not quite being right (it took me many times to perfect my solders) but the good news is with the smaller daughter board you should have less errors.
DeleteHere is all you need for the daughter board.
http://i63.tinypic.com/jkxhev.jpg
The play going to pause is because of the REM signal otherwise the file would automatically start playing without waiting for a signal from the computer. It's just a case of pressing play twice.
Rather than building a new daughter board a quick way is just to plug the wire from pin 9 straight into the IN pin on the Amp.
DeleteSorry another question. My HX-10 did not come with a tape cable so I have made my own, but I only am currently only connecting to Pin 5 & GND for SOUND IN.
ReplyDeleteHow do I wire in the REMOTE? Is it:
Pin 6 (REM+) and a GND
or:
Pin 6 (REM+) & Pin 7 (REM-) ?
Cheers.
I'm going to be honest and say I haven't got a clue how to wire up the REM on a home built version.
DeleteMy best guess would be as follows.
http://tinypic.com/m/jj07c8/2
I got it working! ;-)
DeleteI had not used the 2nd GND on the amp! Doh!
Once I connected that and tested with some headphones I nearly blew my ear!! :) Much louder and no popping now :)
That REM pic is very helpful. You only take 2 signals onto your board for the MOTOR CONTROL. So all I need to know now is:
Does '6' on the tape lead goto D6 and does '7' goto GND? The terminal convention of a 2.5mm plug suggests '7' is a GND and you don't mention about wiring up the 2.5mm socket in a different convention.
If this is correct, I wonder what REM- is for? When recording?
I just loaded a '007' game and the 'tape' should stop at the title screen. You then select the level you want to load, but without MOTOR CONTROL the tape keeps playing at the title screen so you can't load a level.
Yes. I've nearly blown eardrums before now when you're trying to get the damn thing working properly. Lol.
DeleteAgain I haven't got a clue but I would guess that 6(REM+) on the DIN would go to D6 and 7(REM-)would go to ground. Looking at the 3.5mm and 2.5mm sockets there is no difference other than size so the same is probably true of the jacks. Having looked at the Amstrad CPC 5 din socket I would say it is just a ground rather than a REM-.
The way I think it works is there is a constant signal going through REM+ to stop the motor turning until a load command is entered in the MSX then the relay noisily switches the signal off causing the motor to run. REM- is just to complete the circuit.
I'm probably wrong though, I am usually. Lol.
It is very impressive how quickly it converts the .cas file. On a Smartphone is takes upto 10 sec, this is instant. :)
ReplyDeleteThanks to my genius of a friend Andrew Beer. Programmes like Tapdancer and MSX2CAS convert to a sound file and then play. Casduino works differently by converting every bit into a sound as it goes along. Andrew really did do a very impressive job all without an MSX either.
DeleteProgress is going well. I have most of the bits to tidy up and put my Casduino in a small case.
ReplyDeleteI have uploaded the software onto a Pro Mini 328P and I will see if it works as it is even smaller than the NANO.
I am trying to convert a ROM game. I generate the .WAV but when creating a .CAS the file is 0 kbs? I even tried on 32/64bit Windows.
The game is an update on Blagger:
https://sites.google.com/site/msxpage/msx-developed-software/blagger-enhanced-version
Any chance you could convert it? I looks a good play. Thanks
Excellent. I was wondering if you'd made any progress. Thank you for keeping me updated.
ReplyDeleteI'd not heard of enhanced Blagger but I will see if I can get a copy to work. WAV2CAS or CasTools Gui can be difficult to get some conversions working. I'm using CasLink3 to create the .WAV and CasTools Gui with Phase Shift Signal activated and it's given me a .CAS file of 17kb. However under OpenMSX using the .ROM .WAV and .CAS I get an issue with the display when emulating a HX-10 but it works fine wehn emulating and MSX2 machine. I'm going to have to try it on a real HX-10 to make sure it works as I know OpenMSX does not seem to emulate the HX-10 properly.
Okay. Tried the .CAS file on a real HX-10 and it has the graphical glitches. on an emulated CX5MII (another 64k MSX machine) it works fine.
DeleteHere is a link to the .CAS and .WAV file I created.
https://mega.nz/#!6IkxQQhL!9smjuJljovUZ8T60BHLwfPp762Ep5Tg0_y0yE7Quw84
Thanks for that.
ReplyDeleteFlappy Bird on my HX-10 gives graphical errors. Is it another case of MSX computers not conforming to 'the standard' ? :(
I think its more a case that programmes are being developed on emulators rather than real machines so the compatibility isn't always there.
ReplyDeleteHi,
ReplyDeleteI have it all sorted now. I made a tape lead with a 3.5mm and 2.5mm jack and the Motor Control works great.
I ended up using a Pro Micro in the end, I could not do a complete copy of your work ;)
I used a hot glue gun instead of stand-offs and screws.
I just need to fix on some labels for the controls:
http://tinypic.com/r/wjz50x/9
Thanks
Wow. That looks great. Did you have to make any changes to the programming or pin out?
DeleteBTW here are some other games for you. Bubbo World and Bubbo World 2 plus a version of Flappy Birds that I couldn't find and visual bugs in but then I'm crap at it. Lol
ReplyDeletehttps://mega.nz/#!rZUWzYqC!d-K-aN6HckGCdci_GOdEpRUpcme_KU7UvyFw455heHg
Thanks for games, I will go and try them!
ReplyDeleteI think my comment from the other day did not post.
I did not need to do any programming or pin changes. The Pro Micro has all the pins you used.
3600 baud is working well. I can't remember if I tested it with normal Ardiuno and Nano.
Thanks I've been looking and seen that the pins are the same. May have to makeaversion with one. Lol.
ReplyDeleteI have to ask, what buttons did you use and where did yo get them from?
Cheers for the games. That Flappy Bird is perfect, on the version I had tried, the graphics were corrupted straight away. I got a High Score of 156 points :)
ReplyDeleteButtons - I bought 20 for 99pence off ebay:
http://tinyurl.com/gwh3u
I painted them with +25yr old Humbrol model paint!! Long lasting stuff lol!
So glad Flappy Bird is working properly for you.
ReplyDeleteDamn. I was hoping for a mystical supply of 6x6mm coloured buttons or caps for the coloured buttons. Lol
Thank you for the picture and telling me what you've done because it's inspired me to see if I can make a universal board that will be able to play .CAS and .WAV files (bypassing the low level filter for .CAS files via a switch) using a 128x64 oled screen and Andrew to potentially writing a .WAV playing library that is compatible with the Casduino library rather than using tmrpcm.library.
No problem. Thanks for the hard effort in writing up what you have done so others can make the device. Write ups take lots of work.
ReplyDeleteIf Andrew is looking at software, is it possible to have a % indicator like the Tapuino has? Then you could roughly see how long you have left for the tape to load.
Cheers
Tell me about it. Its taken me 3 months and I've still done very little on my PP9 Arduitape. Lol
ReplyDeleteThere's lots of things from Tapuino we'd like to incude but haven't been able to due to my lack of programming skills and Andrews lack of time. We will still keep trying to update it though.
Hello me again :)
ReplyDeleteI just picked up a couple of Dragon computers (32K & 64K), I am not sure if they work yet.
But... I see tapes are stored in a .CAS format, not sure if it just a coincidence with file extension, or in fact that they might be similar to the MSX's .CAS file format.
This is the file info:
http://archive.worldofdragon.org/index.php?title=Tape%5CDisk_Preservation
It has the IN/OUT & MOTOR control like the MSX.
It would be cool to make a Draguino ;)
Cheers
We'll have a look into that. It isn't a compressed file format which is excellent and it seems more basic than the MSX format so it is certainly feasible. Just need to find some source code for the conversion programmes so that we have a basis for something to look at.
DeleteIt would be great to add another format.
Okay. This is an update that should play Dragon/Tandy .CAS files as well as MSX. Can you give it a try and let me know how you get on?
Deletehttps://mega.nz/#!XU10zTjJ!_gXpcfb1JRiacZKTAYG8BpNfTIZSnjANNu5ImzTRiog
Many thanks.
ReplyDeleteIt is going to be great if it does all three computers within the same program!
I just powered up the 32k Dragon and it boots!
I will try to update my Casuino tomorrow and test.
It was quite easy to add the Dragon/Tandy at the moment but whether it works is another thing. It certainly plays the files. I don't think you can change the baud rate on the playback but Andrew did a pretty good job.
DeleteHe's actually looking at a TZXDuino that will play TZX files thanks to looking at how the Dragon works.
I am glad that has helped expand things more!
DeleteFor some reason I can't seem to get Mega to work? I have tried 2 browsers. Could you please upload to TinyUpload.com please.
I have just uploaded a load of MSX games. I found them on a website and then went through and renamed them all to include the loading instructions. There might be some you don't have:
http://s000.tinyupload.com/?file_id=72985551729371623783
Sorry, MEGA just seems really slow. I have the file now.
DeleteThanks.
Hello,
ReplyDeleteI had a try with both the 32k and 54k Dragons.
I think they might be really picky with volume.
I initially managed just to get a '?IO ERROR' message which happened within about 1 second.
Loading is done by pressing ENTER after typing 'CLOADM', an S appears in the top left hand corner, I could see flashing so it was reading in data.
Using a tape player again the volume seemed critical. I managed to get it to read the header of the tape the S goes to an F and you get some text.
But then I think my tape was damaged as I got a '?IO ERROR' message soon after.
I did not manage to get the Casuino to read the header.
I am sorry but I ran out of time. I hope to be able to try again in a week or so.
I think some .CAS files have bits missing that work on an Emulator but not on real hardware. So first I need to make sure I have a suitable file.
I did wonder about trying to load in a .CAS via the Casuino via the MIC on my PC into an Emulator (XROAR) but again ran out of time.
Thanks
I had a reply regarding volume, and yes the Dragon is very picky.
ReplyDeleteIt seems the ?IO ERROR message is 'check tape player'.
I wonder if changing the resistor on the AMP would help? Or maybe it needs the FILTER circuit.
My Casuino in a tiny box does not lead itself to being pulled apart and fiddled with, so I might have to make another on a breadboard, I know I ordered 2 SD card readers, but not so sure about the AMP?
It shouldn't need the filter circuit but adjusting the blue pot will change the volume.
DeleteFor a first attempt the fact that it will recognise the files is amazing. It's difficult for Andrew and myself to know what it should sound like but I'm going to do some experimenting with cas to WAV files and also fixcas too to see what differences there are between what Casduino is playing back and what it's supposed to sound like.
It shouldn't need the filter circuit but adjusting the blue pot will change the volume.
DeleteFor a first attempt the fact that it will recognise the files is amazing. It's difficult for Andrew and myself to know what it should sound like but I'm going to do some experimenting with cas to WAV files and also fixcas too to see what differences there are between what Casduino is playing back and what it's supposed to sound like.