TZXDuino with UEF support

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
Post Reply
kernelcrash
Posts: 28
Joined: Wed Mar 14, 2018 6:00 am
Contact:

TZXDuino with UEF support

Post by kernelcrash » Wed Mar 14, 2018 8:58 am

I've made some mods to TZXDuino so it can play back UEF tape dumps. TZXDuino is basically an Arduino Uno plus a cheap SD adapter plus an I2C LCD display plus 5 buttons. You fill a micro SD with tape dumps, select a tape dump using the buttons and LCD and press PLAY. TZXDuino is great for playing TZX dumps (ie. Spectrum) and CDT dumps (ie. Amstrad), and I've just extended that to include UEF files. I've been using it with my Electron successfully (I do not have a Plus 1). I haven't been able to use it with my BBC B, as its cassette input seems to be broken.

The UEF support has some limitations

- It can't read gzipped UEF files. Pretty much all UEF files you download are gzipped, so you just need to gunzip them before you put them on an SD card. For linux/Mac, this is something like

gunzip -c game.uef >game.uef.tmp && mv game.uef.tmp game.uef

- TZXDuino outputs a square wave, not a nice sine wave like you are supposed to send to an Electron or Beeb. I haven't found this to be a problem.
- There are lots of chunk IDs defined for UEF files. The code just understands the main ones.

I've also added in some of the speed enhancements mentioned elsewhere in these forums re faster baud rate and reduced carrier tone sections. If you hold down the ROOT button when you turn it on, it will playback at 1550 baud (not 1200) and much shorter carrier tones. I find this works with a lot of games, but some just don't work at all. Just reboot it into 1200 baud mode if you can't get something to load.

Enjoy ...
Attachments
TZXDuino-with-uef-1.8u1.zip
(172.41 KiB) Downloaded 43 times

arananet
Posts: 16
Joined: Wed Mar 14, 2018 8:32 am
Contact:

Re: TZXDuino with UEF support

Post by arananet » Wed Mar 14, 2018 10:08 am

I made a tzxduino device compatible with some systems. The gerbers can be obtained on my github.

https://github.com/arananet/TzxDuino-Reloaded

:D

kernelcrash
Posts: 28
Joined: Wed Mar 14, 2018 6:00 am
Contact:

Re: TZXDuino with UEF support

Post by kernelcrash » Thu Mar 15, 2018 4:55 am

That looks pretty good. Much better than my protoboard effort.

User avatar
Dethmunk
Posts: 210
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: TZXDuino with UEF support

Post by Dethmunk » Mon Aug 20, 2018 5:55 pm

Hey there I'm using a Duino. Or trying to. It doesn't seem to recognise my SD Card. Is there a particular brand they usually prefer or particular Format (FAT, FAT32, NTFS)? Up to now I can't find anything compatible with Windows 8.1 that will format in FAT32 or FAT? So it keeps formating to ExFAT which doesn't seem to be the same as FAT32 for instance.
Last edited by Dethmunk on Mon Aug 20, 2018 5:56 pm, edited 1 time in total.
Image

scruss
Posts: 115
Joined: Sun Jul 01, 2018 3:12 pm
Location: Toronto
Contact:

Re: TZXDuino with UEF support

Post by scruss » Mon Aug 20, 2018 7:08 pm

For Arduino use, you want the smallest SD you can find, preferably ≤ 4 GB. Format the with the SD Association's Memory Card Formatter as FAT or FAT32.

User avatar
Dethmunk
Posts: 210
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: TZXDuino with UEF support

Post by Dethmunk » Wed Aug 22, 2018 7:21 am

Awesome thanks. That is actually very useful info. :D Right I'm on it.
Image

User avatar
Dethmunk
Posts: 210
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: TZXDuino with UEF support

Post by Dethmunk » Sun Aug 26, 2018 7:47 am

I got a FAT formatted 128mb SD Card! Success. It loads up the card. I can see the different uef files. Now how do I load them. I hit Chain"" and return pick a file on the screen, I guess I just hit play, but it says playing for a split second and then nothing. What am I doing wrong?
Baud Rate is set at 1200
Motor Ctrl is set to ON
TSXCzxpUEFT is set to ON

On boot up the small screen says... v1.42 MaxDuino
Last edited by Dethmunk on Sun Aug 26, 2018 7:51 am, edited 2 times in total.
Image

cmorley
Posts: 865
Joined: Sat Jul 30, 2016 7:11 pm
Location: Oxford
Contact:

Re: TZXDuino with UEF support

Post by cmorley » Sun Aug 26, 2018 8:03 am

Total guess. Do you have a motor control wire? If not then you might need motor control to OFF

User avatar
Dethmunk
Posts: 210
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: TZXDuino with UEF support

Post by Dethmunk » Sun Aug 26, 2018 8:12 am

Nope that makes no difference. Hmmm... All I have plugged in at the moment is the EAR.
I press Play and it says Playing for half a second and then goes back to displaying the uef file. I can keep my finger on the play button and it keeps saying Playing. Whether its actually playing the file I have no idea. The Electron isn't picking it up.
I dunno. I have my MGC to play with, but there are a couple of games its doesn't have.
Last edited by Dethmunk on Sun Aug 26, 2018 8:13 am, edited 1 time in total.
Image

User avatar
Dethmunk
Posts: 210
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: TZXDuino with UEF support

Post by Dethmunk » Sun Aug 26, 2018 12:11 pm

I suspect it might the uef files themselves. I got them from Stairway to Hell. I just unzipped them to a folder and then copied them across to the SD Card. Other than that I dunno what might be wrong. :-k
Image

User avatar
davidb
Posts: 2398
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: TZXDuino with UEF support

Post by davidb » Sun Aug 26, 2018 2:47 pm

Dethmunk wrote:
Sun Aug 26, 2018 12:11 pm
I suspect it might the uef files themselves. I got them from Stairway to Hell. I just unzipped them to a folder and then copied them across to the SD Card. Other than that I dunno what might be wrong. :-k
You need to process them as outlined at the start of this thread. The files are held in zip archives, but they are also individually compressed and require processing with gunzip after being extracted from the zip archives.

User avatar
Dethmunk
Posts: 210
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: TZXDuino with UEF support

Post by Dethmunk » Mon Aug 27, 2018 11:54 am

Why is it such a pain in the a*se to get these files to work? :wink:
Right done a quick search for Gunzip and it keeps mentioning Linux... is it just a Linux thing? I assume there's a Windows version somewhere and hopefully it works with Win 8.1 and above? [-o<
Image

cmorley
Posts: 865
Joined: Sat Jul 30, 2016 7:11 pm
Location: Oxford
Contact:

Re: TZXDuino with UEF support

Post by cmorley » Mon Aug 27, 2018 12:41 pm

Cygwin has gzip. I'd have thought 7z would do it too which is Windows. So should WinRAR.

User avatar
davidb
Posts: 2398
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: TZXDuino with UEF support

Post by davidb » Mon Aug 27, 2018 12:44 pm

Well, there's an "official" but ancient MS-DOS version and I also found an non ancient but old version (files here). It looks like 7-zip might be simpler to use.

Note that I haven't tried any of the above. I last used Windows on a computer I own in 2002/3.

User avatar
MartinB
Posts: 5201
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: TZXDuino with UEF support

Post by MartinB » Mon Aug 27, 2018 12:45 pm

It’s not gunzip, it’s gzip. I had a similar faff with UPCFS because that loads and plays UEF files directly but they have to be un-gzipped first.


.
Last edited by MartinB on Mon Aug 27, 2018 1:10 pm, edited 1 time in total.

User avatar
Elminster
Posts: 3420
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: TZXDuino with UEF support

Post by Elminster » Mon Aug 27, 2018 1:18 pm

MartinB wrote:
Mon Aug 27, 2018 12:45 pm
It’s not gunzip, it’s gzip. I had a similar faff with UPCFS because that loads and plays UEF files directly but they have to be un-gzipped first.
I had similar fun the other day, when someone wanted a gzipped file gunzip ( :-) ) on Windows (which I rarely use) I couldn’t believe windows 10 didn’t have it built in. Used 7z in the end.

From what I remember Windows pretends to do it but goes in an endless loop. But that might have been because of the Tarball inside the gzip file.
Last edited by Elminster on Mon Aug 27, 2018 1:21 pm, edited 2 times in total.

User avatar
Dethmunk
Posts: 210
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: TZXDuino with UEF support

Post by Dethmunk » Wed Aug 29, 2018 6:19 am

Right now that sounds like a plan. Thanks fellas. May be next weekend I can get this working. :wink:
Image

User avatar
vanekp
Posts: 617
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

Re: TZXDuino with UEF support

Post by vanekp » Sun Nov 04, 2018 10:14 am

the documentation (https://mega.nz/#!fAEUQa4J!Nm8LISazoTK6 ... PTytsU1MUc) tells you for the BBC that you have to unzip the .uef files :-
2 UEF files need to be unzipped before they can be played on the TZXDuino. On Linux machines this can be done by using GUNZIP. On Windows machines this involves using WinZIP or WinRAR to decompress the UEF file. Once decompressed you will have a file with either no extension or a .hq extension. Rename the file to add .UEF on the end.
winrar will unzip them and so will 7z, I renamed the .uef's to .zip then unzipped them and renamed the unzipped file to .uef
This is how they look (with a hex editor) before and after you have uncompressed the uef file.
Before:-
compressedUEF.png
After:-
UnCompressedUEF.png
Last edited by vanekp on Sun Nov 04, 2018 10:15 am, edited 1 time in total.
Peter.

Post Reply