Skip to main content

Arduitape on the ZX Spectrum

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 
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.

Comments

  1. 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.

    ReplyDelete
    Replies
    1. From 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.

      From 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.

      Delete
  2. Hello,

    Thanks 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.

    ReplyDelete
    Replies
    1. You should get something on your screen if your sda and scl are connected up correctly to the sda and scl on the Uno.

      As 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.

      Delete
  3. Hello,

    I 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

    ReplyDelete
    Replies
    1. 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)


      Correct link to 1.8 final https://mega.nz/#!jUtDEIAR!hmGpKuykyNwW6G7E321ngnp1qgL9eEE18LDMNCqEB_k

      Delete
  4. Hi,

    Yes 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.

    ReplyDelete
    Replies
    1. 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.

      Here 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.

      Delete
    2. 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.

      Delete
  5. Sorry 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.

    How do I wire in the REMOTE? Is it:

    Pin 6 (REM+) and a GND

    or:

    Pin 6 (REM+) & Pin 7 (REM-) ?

    Cheers.

    ReplyDelete
    Replies
    1. 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.

      My best guess would be as follows.

      http://tinypic.com/m/jj07c8/2

      Delete
    2. I got it working! ;-)
      I 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.

      Delete
    3. Yes. I've nearly blown eardrums before now when you're trying to get the damn thing working properly. Lol.

      Again 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.

      Delete
  6. It is very impressive how quickly it converts the .cas file. On a Smartphone is takes upto 10 sec, this is instant. :)

    ReplyDelete
    Replies
    1. Thanks 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.

      Delete
  7. Progress is going well. I have most of the bits to tidy up and put my Casduino in a small case.

    I 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

    ReplyDelete
  8. Excellent. I was wondering if you'd made any progress. Thank you for keeping me updated.

    I'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.

    ReplyDelete
    Replies
    1. 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.

      Here is a link to the .CAS and .WAV file I created.


      https://mega.nz/#!6IkxQQhL!9smjuJljovUZ8T60BHLwfPp762Ep5Tg0_y0yE7Quw84

      Delete
  9. Thanks for that.
    Flappy Bird on my HX-10 gives graphical errors. Is it another case of MSX computers not conforming to 'the standard' ? :(

    ReplyDelete
  10. I think its more a case that programmes are being developed on emulators rather than real machines so the compatibility isn't always there.

    ReplyDelete
  11. Hi,

    I 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

    ReplyDelete
    Replies
    1. Wow. That looks great. Did you have to make any changes to the programming or pin out?

      Delete
  12. BTW 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

    https://mega.nz/#!rZUWzYqC!d-K-aN6HckGCdci_GOdEpRUpcme_KU7UvyFw455heHg

    ReplyDelete
  13. Thanks for games, I will go and try them!

    I 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.

    ReplyDelete
  14. Thanks I've been looking and seen that the pins are the same. May have to makeaversion with one. Lol.

    I have to ask, what buttons did you use and where did yo get them from?

    ReplyDelete
  15. 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 :)

    Buttons - I bought 20 for 99pence off ebay:

    http://tinyurl.com/gwh3u

    I painted them with +25yr old Humbrol model paint!! Long lasting stuff lol!

    ReplyDelete
  16. So glad Flappy Bird is working properly for you.

    Damn. 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.

    ReplyDelete
  17. 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.
    If 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

    ReplyDelete
  18. Tell me about it. Its taken me 3 months and I've still done very little on my PP9 Arduitape. Lol

    There'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.

    ReplyDelete
  19. Hello me again :)

    I 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

    ReplyDelete
    Replies
    1. 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.

      It would be great to add another format.

      Delete
    2. 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?

      https://mega.nz/#!XU10zTjJ!_gXpcfb1JRiacZKTAYG8BpNfTIZSnjANNu5ImzTRiog

      Delete
  20. Many thanks.
    It 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.

    ReplyDelete
    Replies
    1. 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.

      He's actually looking at a TZXDuino that will play TZX files thanks to looking at how the Dragon works.

      Delete
    2. I am glad that has helped expand things more!

      For 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

      Delete
    3. Sorry, MEGA just seems really slow. I have the file now.
      Thanks.

      Delete
  21. Hello,
    I 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

    ReplyDelete
  22. I had a reply regarding volume, and yes the Dragon is very picky.

    It 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?

    ReplyDelete
    Replies
    1. It shouldn't need the filter circuit but adjusting the blue pot will change the volume.

      For 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.

      Delete
    2. It shouldn't need the filter circuit but adjusting the blue pot will change the volume.

      For 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.

      Delete

Post a Comment

Popular posts from this blog

TZXDuino Firmware 1.16, 1.17, and an updated TZXDuino Instruction Manual

  TZXDuino 1.16 In TZXDuino 1.15.3 I added a bug that lowered the volume of some Spectrum TZX files and all ZX80/81 TZX, O, and P files so they didn't work for many people. I fixed this for 1.16. You can download TZXDuino 1.16 from here.   TZXDuino 1.17 The MAXDuino team added ORIC TAP playback functionality to their firmware which I have adapted to TZXDuino. I don't have an Oric Atmos to test it on so I have been recording the playback and loading on Oricutron and everything I have tried has worked. Obviously things may be different on a real machine. Team MAXDuino have also added a speed up function for Oric TAP files which I will add to TZXDuino 1.18 but so far I have been unable to get it to work correctly. You can download TZXDuino 1.17 from here.   And finally there is the updated instruction manual which now tells you how to access Turbo mode for the Electron, ZX80, and ZX81. It also says for Oric but that has not been implemented yet. You can download the pdf of v1.2 fo

And Now For Something Completely Amazing.

 When Andrew Beer and I came up with this idea the intention was for people to build their own and many people have but once in a while someone comes up with something so amazing it really needs to be shared. JamHamster came up with the idea of fitting a TZXDuino in a cassette. Originally it was powered by USB and had a 3.5mm Ear socket but it looked amazing. Then he added a battery so that it was self powered. Then he added a head from a CD to cassette adapter. Then he added a switch under that head so that when you press play on the Cassette Recorder it plays the file you've selected. And the TZXCassette was born Because he is a great guy he's also uploaded the instructions on how to build one to Github and you can download the instructions and build your own. Now at the moment there is no REM control it may not work as well with a CPC 464 as it does with with a Spectrum +2 but it is a stunning piece of electrical engineering and a work of art in my opinion.

New CAS/TZXDuino firmware

New firmware . TZXDuino 1.15.3 Adapted the MAXDuino ID19 code and TurboMode for ZX80/81. To access Turbo Mode for ZX80/81 and Electron please switch Turbo Mode On in the menu Also added UEF Chunk 117 which allows for differing baudrates in BBC UEFs. Added a Spectrum Font for OLED 1306 users converted by Brendan Alford. Option added to userconfig.h Added File scrolling by holding up or down buttons. By Brendan Alford. Download from here. CASDuino 1.24 Added a Spectrum Font for OLED 1306 users converted by Brendan Alford. Option added to userconfig.h Added File scrolling by holding up or down buttons. By Brendan Alford. Download from here.