zander21510 Posted March 19, 2014 Share Posted March 19, 2014 So I did some messing around with my ECS...and successfully saved a program to my computer as a .wav file, then played it back to the ECS, and it read it. I used a regular 3.5mm stereo cable plugged into my PC's mic jack, then to play back it's headphone jack I'm hoping to make some programs and upload them here to share, so here is my proof of concept, the volume balancing program that is listed in the ECS manual as the first thing you type in. It's name is BAL All you need to do is CLOD BAL to load it into the ECS memory. Hope you guys like it! BAL.wav 4 1 Quote Link to comment Share on other sites More sharing options...
doctorclu Posted March 19, 2014 Share Posted March 19, 2014 Sweet! I tried something similar with the Mac recording port, but I couldn't get the volume at the right level for reloading later. Glad you got this working. Quote Link to comment Share on other sites More sharing options...
intvnut Posted March 19, 2014 Share Posted March 19, 2014 (edited) If someone wants to try to write a decoder, the format for ECS tapes (at least the ones I've worked with) is as follows: 300 baud Frequency Shift Keyed. 4800Hz for '1', 2400Hz for '0' 8-O-2 byte format. That is: 8 data bits, Odd parity, 2 stop bits. I've written a few ad hoc decoders of my own, but they were a little finnicky. I was helping someone decode their aging collection of ECS BASIC tapes. :-) Encoding is much easier than decoding. I've actually written code that will generate an appropriate FSK signal from a byte stream for the ECS. I've used it to successfully stream some data from a PC sound card to the Intellivision. One thing I've seen (and you can see it in zander's WAV above) is that it's easy to get hum on the signal between the PC and the ECS. That could be part of the problem. Also, IIRC, the electronics on the ECS were designed to interface to the Mic In and Speaker Out of a standard 80s cassette deck, not Line In and Line Out. Fewer cassette players have Line In/Line Out jacks. So, if you try this on your own system, use Mic In and Speaker Out jacks on your sound card. That said, you do still have to get the volume setting "just right". It's very, very picky! Edited March 19, 2014 by intvnut 1 Quote Link to comment Share on other sites More sharing options...
intvnut Posted March 19, 2014 Share Posted March 19, 2014 It's kinda fun looking at these WAVs in Audacity. With a clean WAV like this one, you can almost read the data like Morse code from the frequency-domain view. (See attached.) Note that the 0 bits look like they split into two tones—one at 2400 and one at 7200. That's because they're square waves, and square waves have strong odd harmonics. That is, if the fundamental tone is 2400Hz, you'll also see a lot of energy at 3*2400 = 7200Hz, 5*2400 = 12000Hz, etc. 3 Quote Link to comment Share on other sites More sharing options...
zander21510 Posted March 19, 2014 Author Share Posted March 19, 2014 (edited) Very cool! Do you happen to still have the encoder? I've always thought it would be great to be able to write and edit ECS code in a text file or something on the computer and then be able to save it to tape or stream it to the intellivision. It would definitely make programming a breeze. Edit: well this morning I tried to play back the file and now it won't work...I wonder if I got lucky the first time...I'll have to go back to it I guess. Edited March 19, 2014 by zander21510 Quote Link to comment Share on other sites More sharing options...
intvnut Posted March 20, 2014 Share Posted March 20, 2014 (edited) Well, the encoder I wrote just does the FSK encoding. You still need something to generate the binary data for the BASIC program. In principle, I could add this to jzIntv. For example, type your program in using jzIntv, and save it from ECS BASIC there either as a binary image or as a WAV file directly. Carl's emulator had a way to read a text file and type it in for you. I don't remember exactly how it worked, but the basic idea was that you edit your ECS BASIC program as a text file, fire up INTVPC, and (I think) hit a hot key, and it'd type the contents of the text file as if you had typed it yourself. If someone wants to play with my exceedingly simple FSK encoder and WAV output code, go for it. You'll need to build something around it, though, to feed it the bytes it needs for an ECS BASIC game. The adventurous might pop into jzIntv's debugger and watch writes to $E0 - $E2. I forget off the top of my head, but one of those is the UART TX register, and all the bytes sent to tape get written to it by CSAV. Attached is the C++ code for the FSK encoder and WAV output, extracted from the other project I had mentioned previously. These aren't a complete program by themselves. To write a WAV file with a particular payload: { wav_output wav("filename.wav"); // replace "filename.wav" with actual filename fsk_encode fsk(&wav); for (unsigned i = 0; i != 10; i++) { fsk.send_byte(0); // flush! } for (unsigned i = 0; i != enc.size(); i++) { fsk.send_byte(enc[i]); } } And that's about it. Edited March 20, 2014 by intvnut 1 Quote Link to comment Share on other sites More sharing options...
zander21510 Posted March 20, 2014 Author Share Posted March 20, 2014 I wouldn't mind doing it that way, type into an emulator on the PC and save that way....I'm no programmer but I might mess around with it a bit. Quote Link to comment Share on other sites More sharing options...
intvnut Posted March 21, 2014 Share Posted March 21, 2014 (edited) I actually had too much code above. You don't need the "flush" portion; that was specific to the other project I had worked on. Cutting that back: { wav_output wav("filename.wav"); // replace "filename.wav" with actual filename fsk_encode fsk(&wav); for (unsigned i = 0; i != enc.size(); i++) fsk.send_byte(enc[i]); } In playing with jzIntv just now, it appears the serial data gets written to location $E1 when saving a game to tape. I just tested, saving a simple program that prints "HELLO". The exact sequence of accesses were: WR a=$00E2 d=001D CP-1610 (PC = $7D3B) t=112556321 WR a=$00E2 d=0000 CP-1610 (PC = $7D45) t=114587792 WR a=$00E2 d=0039 CP-1610 (PC = $7E31) t=114880977 WR a=$00E0 d=001D CP-1610 (PC = $7E35) t=114880996 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116098871 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116098951 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116113805 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116128739 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116143673 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116158607 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116173541 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116188475 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116203409 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116218343 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116218423 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116233277 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116248211 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116263145 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116278079 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116293013 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116307947 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116322881 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116337815 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116337895 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116352749 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116367683 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116382617 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116397551 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116412485 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116427419 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116442353 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116457287 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116457367 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116472221 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116487155 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116502089 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116517023 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116531957 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116546891 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116561825 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116576759 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116576839 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116591693 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116606627 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116621561 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116636495 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116651429 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116666363 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116681297 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116696231 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116696311 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116711165 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116726099 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116741033 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116755967 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116770901 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116785835 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116800769 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116815703 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116815783 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116830637 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116845571 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116860505 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116875439 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116890373 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116905307 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116920241 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116935175 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116935255 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116950109 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116965043 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116979977 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=116994911 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117009845 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117024779 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117039713 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117054647 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=117054727 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117069581 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117084515 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117099449 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117114383 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117129317 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117144251 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117159185 RD a=$00E0 d=FFFF CP-1610 (PC = $7E91) t=117174119 WR a=$00E1 d=0000 CP-1610 (PC = $7EA5) t=117174176 RD a=$00E0 d=FFFF CP-1610 (PC = $7EAA) t=117189059 WR a=$00E1 d=00E3 CP-1610 (PC = $7EB5) t=117189112 RD a=$00E0 d=FFFF CP-1610 (PC = $7EAA) t=117203987 WR a=$00E1 d=00FF CP-1610 (PC = $7EB5) t=117204040 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117218921 WR a=$00E1 d=0048 CP-1610 (PC = $7EC4) t=117219068 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117233855 WR a=$00E1 d=0045 CP-1610 (PC = $7EC4) t=117234002 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117248789 WR a=$00E1 d=004C CP-1610 (PC = $7EC4) t=117248936 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117263723 WR a=$00E1 d=004F CP-1610 (PC = $7EC4) t=117263870 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117278657 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117278804 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117293591 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117293738 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117308525 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117308672 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117323459 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117323606 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117338393 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117338540 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117353327 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117353474 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117368261 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117368408 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117383195 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117383342 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117398129 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117398276 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117413063 WR a=$00E1 d=0015 CP-1610 (PC = $7EC4) t=117413210 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117427997 WR a=$00E1 d=0041 CP-1610 (PC = $7EC4) t=117428144 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117442931 WR a=$00E1 d=000A CP-1610 (PC = $7EC4) t=117443078 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117457865 WR a=$00E1 d=0047 CP-1610 (PC = $7EC4) t=117458012 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117472799 WR a=$00E1 d=000A CP-1610 (PC = $7EC4) t=117472946 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117487733 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117487880 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117502667 WR a=$00E1 d=000A CP-1610 (PC = $7EC4) t=117502814 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117517601 WR a=$00E1 d=00A6 CP-1610 (PC = $7EC4) t=117517748 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117532535 WR a=$00E1 d=0048 CP-1610 (PC = $7EC4) t=117532682 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117547469 WR a=$00E1 d=0045 CP-1610 (PC = $7EC4) t=117547616 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117562403 WR a=$00E1 d=004C CP-1610 (PC = $7EC4) t=117562550 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117577337 WR a=$00E1 d=004C CP-1610 (PC = $7EC4) t=117577484 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117592271 WR a=$00E1 d=004F CP-1610 (PC = $7EC4) t=117592418 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117607205 WR a=$00E1 d=0001 CP-1610 (PC = $7EC4) t=117607352 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117622139 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117622286 RD a=$00E0 d=FFFF CP-1610 (PC = $7EB9) t=117637073 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117637220 WR a=$00E2 d=0000 CP-1610 (PC = $7ED4) t=118234463 The first three writes to $E2 do the following, as best as I can tell: Write $1D to $E2: Enable cassette motor (relay "on"). This is the "SET" part of CSAV, where you're supposed to seek to where you want to save. Write $00 to $E2: Disable cassette motor (relay "off"). This is the "GO" part of CSAV, where you're supposed to press record Write $39 to $E2: Enable cassette motor and 300 baud modem. This turns on the actual recording. That's followed by a series of writes to location $E1 which have the byte code for the ECS BASIC program. The $AA bytes at the start are synchronization bytes. These should be about 1/6th of a second apart on a real ECS. In practice, I don't think they're required to be if you have a clear link. After that is the BASIC header followed by the BASIC program. At the end, there's one last write of $00 to $E2, which shuts off the cassette motor and ends the recording process. The part that needs to be FSK coded for the ECS are all the writes to location $E1. In this case, it's these bytes: WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116098951 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116218423 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116337895 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116457367 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116576839 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116696311 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116815783 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=116935255 WR a=$00E1 d=00AA CP-1610 (PC = $7EA2) t=117054727 WR a=$00E1 d=0000 CP-1610 (PC = $7EA5) t=117174176 WR a=$00E1 d=00E3 CP-1610 (PC = $7EB5) t=117189112 WR a=$00E1 d=00FF CP-1610 (PC = $7EB5) t=117204040 WR a=$00E1 d=0048 CP-1610 (PC = $7EC4) t=117219068 WR a=$00E1 d=0045 CP-1610 (PC = $7EC4) t=117234002 WR a=$00E1 d=004C CP-1610 (PC = $7EC4) t=117248936 WR a=$00E1 d=004F CP-1610 (PC = $7EC4) t=117263870 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117278804 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117293738 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117308672 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117323606 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117338540 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117353474 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117368408 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117383342 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117398276 WR a=$00E1 d=0015 CP-1610 (PC = $7EC4) t=117413210 WR a=$00E1 d=0041 CP-1610 (PC = $7EC4) t=117428144 WR a=$00E1 d=000A CP-1610 (PC = $7EC4) t=117443078 WR a=$00E1 d=0047 CP-1610 (PC = $7EC4) t=117458012 WR a=$00E1 d=000A CP-1610 (PC = $7EC4) t=117472946 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117487880 WR a=$00E1 d=000A CP-1610 (PC = $7EC4) t=117502814 WR a=$00E1 d=00A6 CP-1610 (PC = $7EC4) t=117517748 WR a=$00E1 d=0048 CP-1610 (PC = $7EC4) t=117532682 WR a=$00E1 d=0045 CP-1610 (PC = $7EC4) t=117547616 WR a=$00E1 d=004C CP-1610 (PC = $7EC4) t=117562550 WR a=$00E1 d=004C CP-1610 (PC = $7EC4) t=117577484 WR a=$00E1 d=004F CP-1610 (PC = $7EC4) t=117592418 WR a=$00E1 d=0001 CP-1610 (PC = $7EC4) t=117607352 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117622286 WR a=$00E1 d=0000 CP-1610 (PC = $7EC4) t=117637220 So, with all that in mind, I put those bytes into a file, and ran the following program (leveraging the FSK code I posted earlier) to generate a WAV file: // Read a file of binary data and convert it to a FSK WAV file #include <cstdio> #include <cstdlib> #include <iostream> #include <stdint.h> #include "audio_output.hpp" #include "fsk_encode.hpp" #include "wav_output.hpp" using namespace std; int main( int argc, char *argv[] ) { FILE *f; if (argc != 3) { cerr << "usage: bin2wav foo.bin foo.wav" << endl; exit(1); } if ( !(f = fopen( argv[1], "rb") ) ) { cerr << "could not open " << argv[1] << " for reading" << endl; exit(1); } int c; bool synced = false; wav_output wav(argv[2]); fsk_encode fsk(&wav); while ( (c = fgetc( f )) != EOF ) { if (c != 0xAA) synced = true; fsk.send_byte( c ); if (!synced) fsk.send_carrier( 50 ); } fclose(f); return 0; } That generated the attached WAV file. When I play it, it sounds right. I haven't tried it on my own ECS. (Currently my PC isn't set up to test that.) I've attached all the source files and even my Linux executable in the ZIP file "fsk_example.zip". The FSK encode C++ files are the same. Added are bin2wav.cpp, and the files I used to make hello.wav. See README.txt. hello.wav fsk_example.zip Edited March 21, 2014 by intvnut Quote Link to comment Share on other sites More sharing options...
zander21510 Posted March 21, 2014 Author Share Posted March 21, 2014 (edited) Success! I first tried to play back directly from my PC's headphone port to the ECS, but that didn't work. So I tried recording it to tape from my PC first, then playing back on the Intellivision, and it worked on the first try! I had the volume on maximum on my PC both times, the file itself is already loud and clear of course. What do you think? Also, I posted a short video of the program being loaded and run...not too terribly interesting but proof. Edited March 21, 2014 by zander21510 Quote Link to comment Share on other sites More sharing options...
intvnut Posted March 21, 2014 Share Posted March 21, 2014 Awesome! It's entirely possible it was too loud coming from your headphone port. The WAV file is, as you noted, very loud all by itself. Quote Link to comment Share on other sites More sharing options...
zander21510 Posted March 21, 2014 Author Share Posted March 21, 2014 There we go, I messed around with VLC's volume setting while keeping my PC volume at max, and it worked, a direct load from a PC to the Intellivision. Now if a program could be made that could take a text file, convert it to the proper binary form, then to the .wav file, that would be something else . Quote Link to comment Share on other sites More sharing options...
intvnut Posted March 22, 2014 Share Posted March 22, 2014 (edited) Well, ECS BASIC programs are tokenized. I vaguely recall someone (maybe Arnauld? Carl?) trying to work out the encoding. I don't think anyone got far enough with it to be useful. Edited March 22, 2014 by intvnut Quote Link to comment Share on other sites More sharing options...
JihemB Posted June 7, 2020 Share Posted June 7, 2020 Hello. Now in 2020 I just go an ECS for my computer/console collecter. I wonder if, since this thread was opened back in 2014, it exists a set of tool to convert ECS bin2wav (and wav2bin) or even a text2bin for ECS Basic ? Quote Link to comment Share on other sites More sharing options...
Zendocon Posted June 7, 2020 Share Posted June 7, 2020 Somebody was just recently asking if I had my ECS BASIC programs in .wav format for his Aquarius Data Recorder. I just finished getting a few of them to work with the latest stable version of jzintv. If somebody does write them out to actual tapes and record them, I'll pass them along. Quote Link to comment Share on other sites More sharing options...
intvnut Posted June 8, 2020 Share Posted June 8, 2020 I believe the FSK encoder (bin2wav) I posted above will work with the ECS cassette save files that jzIntv now produces. So, you should have an easy path from jzIntv to ECS. The other direction, ECS => jzIntv, is trickier. I spent some time awhile back trying to recover some tapes that were in rough shape for a collector, and I was able to get some, but not all of the games to decode. A clean recording of a tape that isn't 30+ years old might go better, though. ? Quote Link to comment Share on other sites More sharing options...
JihemB Posted June 8, 2020 Share Posted June 8, 2020 Thanks for your tips. So I'll be able to put the BASIC program I have in text format and use jzIntv to ouput them as bin files and the convert to wav using bin2wav. Great ! I just dowloaded the resources from this thread and will have a look soon. I have several old tape decks that I use for my computers collection and sometimes I use a Mixxtape to broadcast wav files from my smartphone into the tape deck via BlueTooth. I did this successfully with Philips C7420 and VTech Laser 310 so it could work with ECS. The question I forgot to ask is "Does it exist a collection of BASIC program originally provided by Mattel for the Intellivision ECS" (as they did for the Keyboard Component) ? In other words, do the only BASIC program that exist for ECS come from only end users ? If I understood well, there is a set of cartridge games that were designed to work with ECS but no tape. Quote Link to comment Share on other sites More sharing options...
intvnut Posted June 8, 2020 Share Posted June 8, 2020 12 minutes ago, JihemB said: Thanks for your tips. So I'll be able to put the BASIC program I have in text format and use jzIntv to ouput them as bin files and the convert to wav using bin2wav. Great ! I just dowloaded the resources from this thread and will have a look soon. The bin2wav program I posted is just source code and a Linux executable. If you need an executable for another platform, either you'll need to compile it, or I could compile it for you. You'll need to type in a program in ECS BASIC within jzIntv and save it to simulated "cassette." If I understood your sentence correctly, we're on the same page here. But just to be sure everyone's clear: The bin2wav converter doesn't parse ECS BASIC program text. Rather, it needs the binary image that ECS BASIC writes to cassette. And the way to get that is to type it in to ECS BASIC in jzIntv and "save" it to "cassette." 15 minutes ago, JihemB said: The question I forgot to ask is "Does it exist a collection of BASIC program originally provided by Mattel for the Intellivision ECS" (as they did for the Keyboard Component) ? In other words, do the only BASIC program that exist for ECS come from only end users ? Other than the sample programs that were in the manual that came with it, and the enhanced programs in Mr. BASIC Meets Bits'n'Bytes, I haven't seen any ECS BASIC programs from Mattel. If you scout through this thread, you'll find some ECS BASIC programs others have posted, including the ones @Zendocon referred to above. 16 minutes ago, JihemB said: If I understood well, there is a set of cartridge games that were designed to work with ECS but no tape. Yep, that's my understanding. Some of the cartridge games, such as World Series Major League Baseball and Game Factory can save/load data from cassette. Quote Link to comment Share on other sites More sharing options...
JihemB Posted June 8, 2020 Share Posted June 8, 2020 @intvnut Thanks for your message, I aknowledge we're on the page on everything and I understood it is not possible to convert a BASIC text file directly into wav. I haven't tried yet to paste a BASIC text file into jzIntv to save it as a "tape". I used to be a C/C++ skilled developper in Windows environment using Microsoft Visual Studio tools so I think I'll be able to recompile the C source code to run under Windows. I've got the LTO cartridge and I wonder if it will work fine with "Mr. BASIC Meets Bits'n'Bytes" and/or "World Series Major League Baseball" or if I have to find an actuall cartridge ? (Please note my console is currently in former French SECAM color system so I think US NTSC cartridge will not work on it). As suggested, I'll scout the thread you advised me as soon as I'm back to my flat where my collection is located (I had to drive to north of France to pickup the ECS yesterday :-)). Quote Link to comment Share on other sites More sharing options...
intvnut Posted June 8, 2020 Share Posted June 8, 2020 15 minutes ago, JihemB said: Please note my console is currently in former French SECAM color system so I think US NTSC cartridge will not work on it Nearly all of the Intellivision titles will work in the 50Hz systems (including SECAM). There were only a few titles that didn't work at all at 50Hz, such as Dreadnaught Factor, and I believe one version of Motocross. A couple other titles have minor glitches, but otherwise play fine. The rest work just fine. I've posted a patch for Dreadnaught Factor elsewhere. If you paste the patch into the CFG file for Dreadnaught Factor and load it onto LTO Flash!, it should apply the patch as part of the loading process. Just copy the code below to the end of Dreadnaught Factor's CFG file, and it'll patch it for PAL. If you have a .ROM rather than .BIN, use jzIntv's rom2bin utility to convert it to BIN+CFG. [memattr] $D000 - $D0FF = ROM 16 [macro] @p 5cb5 734a @p d000 02b8 @p d001 d009 @p d002 0240 @p d003 0100 @p d004 0040 @p d005 0240 @p d006 0101 @p d007 0220 @p d008 72c6 @p d009 02b8 @p d00a 5ca9 @p d00b 0240 @p d00c 0100 @p d00d 0040 @p d00e 0240 @p d00f 0101 @p d010 0220 @p d011 bffd 16 minutes ago, JihemB said: I've got the LTO cartridge and I wonder if it will work fine with "Mr. BASIC Meets Bits'n'Bytes" and/or "World Series Major League Baseball" or if I have to find an actuall cartridge ? Those should both work on LTO Flash!. Note that WSMLB needs a complete ROM image (24K words / 48K bytes) to function properly. The version that was on Intellivision Lives! is not complete. In the incomplete version, the voice playback will crash and play static/noise. Quote Link to comment Share on other sites More sharing options...
Zendocon Posted June 8, 2020 Share Posted June 8, 2020 7 hours ago, intvnut said: Some of the cartridge games, such as World Series Major League Baseball and Game Factory can save/load data from cassette. The Jetsons' Ways With Words automatically saves your word list if you create one of your own. It probably goes without mentioning that you can use CSAV/CLOD within Mr. BASIC Meets Bits & Bytes' integrated BASIC interpreter as well. Speaking of which, I should mention I peeked at the Mr. BASIC cartridge ROM to see if there were any extended BASIC keywords not listed in the manual. There weren't any others. All the keywords I found are covered in the manual's sample programs. Quote Link to comment Share on other sites More sharing options...
+Lathe26 Posted June 10, 2020 Share Posted June 10, 2020 Since you mentioned SECAM, which runs at 50Hz, make sure you use a brown ECS with your SECAM (or PAL) Intellivision. If you use an NTSC Intellivision, then switch to a white ECS. This makes sure that your tapes are recorded with the proper 2.4kHz and 4.8kHz frequencies. If you mix up using the wrong ECS with the wrong Intellivision, then the frequencies on the tape will too fast or slow (depends on which way they are mixed up). The same wrong system can re-read its own tapes but correct setups will not. Not sure if wav2bin can handle the frequencies being incorrect or not. Quote Link to comment Share on other sites More sharing options...
intvnut Posted June 10, 2020 Share Posted June 10, 2020 1 hour ago, Lathe26 said: Since you mentioned SECAM, which runs at 50Hz, make sure you use a brown ECS with your SECAM (or PAL) Intellivision. If you use an NTSC Intellivision, then switch to a white ECS. This makes sure that your tapes are recorded with the proper 2.4kHz and 4.8kHz frequencies. If you mix up using the wrong ECS with the wrong Intellivision, then the frequencies on the tape will too fast or slow (depends on which way they are mixed up). The same wrong system can re-read its own tapes but correct setups will not. Not sure if wav2bin can handle the frequencies being incorrect or not. Good point. As for wav2bin, I don't really have that yet. But, should be easy to modify bin2wav to output the right baud rate and FSK frequencies for a mismatched pair. (i.e. 50Hz Inty + 60Hz ECS and vice versa.) IIRC, the 2400Hz and 4800Hz tones were generated directly by ECS_COB_50 (aka. U41), weren't they? That would cause both baud rate and FSK to be wrong by the same ratio. If the tones come from something else, then the baud rate may shift independently of the FSK tones. Quote Link to comment Share on other sites More sharing options...
+Lathe26 Posted June 10, 2020 Share Posted June 10, 2020 12 hours ago, intvnut said: Good point. As for wav2bin, I don't really have that yet. But, should be easy to modify bin2wav to output the right baud rate and FSK frequencies for a mismatched pair. (i.e. 50Hz Inty + 60Hz ECS and vice versa.) IIRC, the 2400Hz and 4800Hz tones were generated directly by ECS_COB_50 (aka. U41), weren't they? That would cause both baud rate and FSK to be wrong by the same ratio. If the tones come from something else, then the baud rate may shift independently of the FSK tones. Your first guess is correct. The Chip-on-Board (glob-top) U41 directly generates both the baud rates and the frequencies used by the AUX and TAPE IN/OUT interfaces. Both are affected by the same ratio. The ratio is 4.0000 / 3.5795 which is the MHz differences between PAL and NTSC Intellivisions. Some details: the baud rate and frequencies are controlled by both MCLK and a pull-down pin on U41 called BAUD_DIV. The brown ECS grounds this pin while the white ECS leaves it unconnected. Thus, a brown ECS hooked up to an NTSC Intellivision will result in a tape rate of 335 baud instead of the normal 300 baud. 1 Quote Link to comment Share on other sites More sharing options...
intvnut Posted June 11, 2020 Share Posted June 11, 2020 14 hours ago, Lathe26 said: Your first guess is correct. It was a highly informed guess, thanks to all your reverse engineering efforts. 1 Quote Link to comment Share on other sites More sharing options...
JihemB Posted June 11, 2020 Share Posted June 11, 2020 I confirm I have the "brown" model (the only one that was sold in europe AFAIK) that comes with the Intellivision 1 (brown French SECAM model). Unfortunately I didn't have time to recompile the bin2wav tool to run under Windows environment since I restarted this thread, hope to do this soon since I will be out for vacation at the end of next week. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.