Wednesday, 7 June 2017

TZXDuino 1.7

TZXDuino 1.7
This fixes issues with pause lengths that we never noticed before. It should fix games like Top Gun and Street Hawk for the Spectrum and make CDT files behave as they should for the Amstrad CPC.

Changes.
*Maximum pause length of 8.3 seconds due to the TimerOne library has been worked around.
*ID20 Pause Block fixed.
*Temporary fix for pause after motor control removed.

https://mega.nz/#!aEt1VJKZ!ZFw-fP3bkNTtiPlbG_IllmR94Xni3KvIGUn6Jggfof8

Thursday, 1 June 2017

Adding a 5 pin DIN to an Amstrad CPC 464

After mentioning that I had gotten a CPC and attached a DIN to it so that I could connect it to the TZXDuino I have had a few requests on how to do it so I thought I'd try a guide.

You will need to purchase 180 degree 5 pin female din that is chassis mountable.





This is the type that I purchased except mine also had a mounting plate too.
The standard 6128 cassette connector is wired like this.



Each pin is numbered on the back so that you know which one you are connecting it too so don't worry if the pins are in different positions as it depends on whether you are looking from the connection side or the soldering side.


I would use different coloured wiring for each type of connection. I used the following
Ground - Black
Data Input - White
Data Output - Red
Remote Control - Brown

At this point I added 4 male pins to the end of my wiring so that I could build a connector so that I could easily disconnect the DIN should I need to work on the cassette drive.

Next is connecting the wiring to the cassette drive Make sure that when you solder you do not create any shorts and connect the wiring as follows.



Close Up your computer and then test to make sure that it all works.

If you want to use the built in cassette recorder you just unplug the cassette leads from the DIN and use it as normal.

Monday, 29 May 2017

TZXDuino 1.6

Now that I have my CPC464 all set I've been testing .CDT files and have noticed a few issues. The first is that when I altered the code that sped up things for the Spectrum I messed things up for the CPC so that has been rolled back. The second is that with the CPC the motor control and pause after blocks is very important and TZXDuino isn't calculating a long enough pause for some games which causes them to fail. This seems to be a limit to the TimerOne library of 8,191 milliseconds (1F FF). This obviously is a big issue that needs more investigation.

Changes:
*Fixed the garbled text bug (thanks to Rafael Malins Chesserot for that one)
*Rolled back an update that made files load faster on the Spectrum but broke files on the CPC.
*Added a 2.25 second delay on playback after a motor control pause to fix issues with compacted multiload games from http://cngsoft.no-ip.org/cpc_lzx.htm

ToDo
* There is a discrepancy between length of time of pause after block and what the actual pause time is. This affects some Ocean games (Rainbow Islands, Batman The Movie, Salamander). Sometimes they load as they should but other times they don't.
* A more efficient way of moving back one folder that uses up less memory.

The latest version can be downloaded from here

Sunday, 21 May 2017

Gotten hold of a CPC464

I've finally managed to get hold of a CPC464 so I can see what compatibility is like with TZXDuino.

One of the first things I did was add a DIN so that I could connect the TZXDuino to it. Rather than the normal 5-pin DIN that the CPC664/6128 use I decided that as I already have the cable for the MSX I would add an 8 pin DIN.
After some testing I found the best places to solder the connections and now it is up and running with full motor control.

As there are no TOSEC like downloads for CDT files I have been using both CPCRulez and CPCPower for the downloads.
TZXDuino compatibility is quite good with CDT files although there are a few that use the ID15 block which currently is not compatible but I did notice some issues.
Some games seemed to have insufficient pause blocks and whilst they worked on emulators they did not with either TZXDuino or WinTZX playback. These were quite easily fixed by adding a pause block to the CDT file (Aliens, Ghouls and Ghosts, Turbo Outrun).
Others however posed greater difficulty with the latest version of the firmware (Rainbow Islands, and Salamander). These contained a Speedlock 1 followed by a Speedlock 2 block and adding a pause block between them sometimes worked and sometimes didn't. I've now gone back on some of the improvements that were made to the speed of the TZXDuino to something more akin to version 1.0 and added "newTime += 12" back to the Wave function in TZXProcessing and this has had some success but it is erratic. Unfortunately I'm no longer sure as to whether it's my fault due to how I've wired in the DIN or if it's due to the TZXDuino code itself. I will however keep on persevering.

Tuesday, 2 May 2017

TZXDuino Firmware Update

TZXDuino user and Luca Forattini has added the ability to load AY files with Spec AY on any Spectrum with an AY chip to TZX.

First you load LOADER.TAP from SpecAY. Once that is loaded just select the .AY file you want to load and away you go.

You can download version 1.5 of the firmware from Here.

You can download Luca's original version of the firmware which is for an Arduino Mega with LCD and buttons shield from Here. Interestingly Luca has added a filesize counter with his firmware so that you can see how large the file currently selected is.


You can watch a video of Luca's TZXDuino at work here.


Wednesday, 22 March 2017

TZXMaple Progress.

It's been a while since I've published anything on my progress on converting things to the Maple Mini so I thought I'd keep you up to date.

I have converted TZXDuino to the Maple Mini and it is working but not properly. For some reason, even though it is using the same values as the Nano the frequency of the output is higher. So much so that fastloaders cannot be recognised and TAP and simple TZX cannot all register with the Spectrum. Oddly this would indicate that a microsecond for the Maple Mini is different to the microsecond for the Arduino Nano, yet the files play for a similar length of time.
It's all highly confusing and I've put the project on the back burner for a while so I can concentrate on working any errors out of the CAS/TZXDuino Shield PCB.
The good news being that when I was trying to figure out what was going wrong I noticed that TZX2WAV which we had been using as a benchmark to test our coding actually has a typo in it a decodes slower than the TZX standard which is why there has been a slight speed up to the TZXDuino code.


Anyhoo, that's all there is to report for now.

New Homebrew For MSX Converted to CAS for CASDuino.

Tales of Popolon is a new MSX homebrew game that is still under development but a ROM has been released so people can play. I've used CASLink3 to convert it to a CAS file and tested it on my Toshiba HX-10 with CASDuino and it works beautifully.

Here is a link to the games Github page.

Here is the CAS file to download.

Enjoy!!

Saturday, 18 March 2017

Dragon CAS files.

I've updated the CASDuino firmware so that it will load some games with Xroar but there has been no luck on an real Dragon.
Can you please give it a test and let me know the results? Thank you.

Download

Friday, 17 March 2017

ZX81 P and O filetype added to TZXDuino with a slight speed update.

ZX81 P and O filetypes have been added to TZXDuino. There is also a minor speed update that shaves a few seconds off previous load times.



We were hoping to have an update to CASDuino with working Dragon CAS files but unfortunately whilst we can get Chucky Egg to work we still can't get others to work. We are still working on it though.

Sunday, 5 March 2017

CASDuino ported to the Maple Mini.

I've managed to get the CASDuino firmware up and running on the Maple Leaf Mini. It's not perfect, there are issues with 3600 baudrate and it cannot store your baudrate selection as of yet as the Maple Mini does not have an EEPROM to store your selection but it is now working. Sadly whilst .CAS files on the MSX work, the ones for the Dragon have been broken

TZXDuino is proving particularly stubborn at the moment, it is at least playing sound but is very stuttery and that also causes ID errors after the main loader.

Friday, 3 March 2017

MapleTape - Moving towards combining firmwares.

One of my desires when I first thought about this project was to have something for everyone and for users to just be able to put their files onto an SD card and go but to remain cheap. The Arduino Nano was the perfect starting place for that but it quickly showed it's limitations, so now we're trying to port the firmwares over to the Maple Leaf Mini using the STM32Duino add on to the Arduino IDE.

It's still very much a work in progress and there has been a slight hardware change, the original SD card readers we used are not compatible with the Maple Mini, but we have managed to get the Maple Mini version of ArduiTape working and playing .WAV files. Unlike ArduiTape you are not restricted to the frequency of .WAVs you can play and you also do not require a low pass filter to play the .WAVs

What you need.
Maple Leaf Mini
1602 I2C LCD 

TF Micro SD Card Module Mini SD Card Module Memory Module
LM386 Amplifier Module
5 button button board (See earlier blogs for instructions).
3.5mm Audio Jack
2.5mm Audio Jack

Optional: Veroboard and 40 pin IC DIP socket.

I connected my Maple Mini to a piece of Veroboard as I could then add more pins to connect to for 5v and GND which gave me more flexibility.
Normally the Maple Mini is a 3.3v board so you can't power the 1602 from the VCC pins as normal but I have found that if you use a mini USB cable to power the Maple that 5v comes out of the VIN pin and so you're actually able to power the 1602 and the LM386 from that.

Connections
SD card
MOSI        -> Pin 4
MISO        -> Pin 5
SCK/CLK -> Pin 6
CS            -> Pin 8
3.3v          -> VCC
GND         -> GND

1602 I2C LCD
GND         -> GND
VCC         -> VIN

SDA         -> Pin 15
SCL          -> Pin 16

Button Board
Down       -> Pin 17
Up            -> Pin 18
Stop         -> Pin 19

Play          -> Pin 20
Menu        -> Pin 22
GND         -> GND


LM386
VCC         -> VIN
IN             -> Pin 27
GND         -> GND

GND         -> GND

2.5mm Audio
Active pins-> Pin 21
GND          -> GND



Using the Arduino IDE with STM32duino installed you can upload this sketch with it's improved TMRpcm library and play 8-bit wavs.

Next step

Now that I have MapleTape working (Doesn't stop when it gets to the end of the file yet but it basically works) I can try to port CASDuino and TZXDuino over using the same hardware.
Once that is done I can try combining CAS and TZXDuino first and then add MapleTape to it so that all three firmwares will be on one board which will bring me closer to my original idea.

Saturday, 11 February 2017

Designing a PCB

Inspired by Piotr Bugaj and his TZXDuino Shield I thought I'd take his PCB design and add the 2.5mm socket and some right angle buttons and get it so it will fit into a PP9 case.
This is a whole new thing for me as I have never designed a PCB in my life or used Diptrace before. Luckily it's quite an intuitive piece of software that's easy to use. After adding a design for a PCB mounted 2.5mm and also the buttons I managed to design a PCB that should work.



Now however it's finding a reasonably priced manufacturer for a couple of prototypes before maybe a production run.

If you're interested in looking at the Diptrace and gerber file you can download them from here.