2019.05.19
I started working with this as a lead-up to my next project. They are still available, but cost twice as much as they did a couple of years ago. From what I can tell, playback quality is pretty good. Getting up to speed did not come without aggravation/s.
#1) Do not power the player from Arduino 5V, it's inadequate. It doesn't hurt anything but it causes problems with player volume and with the IDE.
I worked with two configurations: one is for programming and the other for use. For the "In Use" configuration, get a USB breakout and branch +5 from that to the player and to Arduino 5V (and Gnd). For the programming configuration, disconnect the breakout from its source and disconnect the Arduino 5V from it too.
When you start testing and all, it can get irksome going back and forth with it, but that's how it is. The current demand of the Catalex overtaxes Arduino 5V where that may dip low enough such that, basically, the IDE may not find an Arduino connected.
#2) At first I was trying to play tracks using the index scheme (CMD = 0x0f). And, supposedly, there's a way to set the volume (CMD = 0x06). The index works, having files in folders would be my preference, but my experience was that it was full volume regardless.
There's a command for playing a track at a specified volume (CMD = 0x22), which does work, but all of your tracks have to be on top (no folders / directories) to use it. But here, instead of playing by "index", basically the track's file name, it plays with reference to the file's position in the list.
Evidently, files should be named beginning with a number. I don't know whether there's a byte limitation. This also preserves track positions, the stack, if/as files are added.
Admittedly, I was getting more than a little fed-up and as I write this, having unwound some, I am wondering if a 0x06 (set vol) might work if issued immediately after a 0x0f (play track).
I've read about there being an "unsolicited message", FILE_END, but I haven't found anything spelling out exactly how to use it. A practical example was not included with the PDF. It's not needed for the project I have in my mind right now, but another would benefit from it.
2019.06.02
Here is a link to the Catalex PDF.
2019.07.07
Sunday, May 19, 2019
Wednesday, April 3, 2019
Commodore64 Meets Arduino
I was a devoted C64 user from the time I bought one in '85 till the time I put it away in '96, on account of having moved house and gotten busier at work (time and circumstances) and so on. But, it was the greatest fun.
At one time I was experimenting, trying to develop a "wireless remote" joystick based on DTMF encoding/decoding and FM radio. Tone capture wasn't very snappy though.
Fast Forward 25 years to the present day. I got the idea of bringing back the C64 fun with some Arduino fun by utilizing the Esplora. With its integral accelerometer and handy buttons it seemed a natural as a controller platform. Combined with HC-05 and HC-06 Bluetooth modules and a Pro-Mini, a wireless game controller system was born.
The first step was to assess the Esplora playability by rigging the Esplora outputs to some open-collector transistors and those to the C64 joystick port. As that worked out acceptably, I worked out a couple of sketches that relied on SoftwareSerial with the Bluetooth modules.
The Esplora (transmitter) sets bits in a control byte based on the results of the accelerometer reads and a pushbutton, and transmits that, in a loop. The Pro-Mini (receiver) deconstructs the bits from the received control byte, applying those to output pins that control their respective transistors that interface with the C64 (via the Control Port, the CIA's pulled up inputs).
Most of all, I wanted to play Zaxxon (!) and Defender again. I have those on cartridges. I used Defender during development.
Trying out Zaxxon uncovered a dilemma. In Defender, joystick forward/back positioned the craft Up/Down, so I programmed the Esplora so that tilting up resulted a joystick forward. But that was incompatible with Zaxxon where a dive with the controller tilted up. To accommodate the difference I made an input to switch between the two modess. So, for Zaxxon tilting the Esplora down results a dive and up results a climb. The system works well, but could stand some tweaking vis-à-vis the accelerometer thresholds for forward/backward (up/down, dive/climb).
I found a composite to HDMI converter for around $20. The C64 looks great on the Big Screen.
Special Thanks to Martyn Currey, he made the BIND and PAIR configuring simple.
http://www.martyncurrey.com/connecting-2-arduinos-by-bluetooth-using-a-hc-05-and-a-hc-06-pair-bind-and-link/
All I've done so far has been with cartridges. I should pull out a disk drive and see how that goes. This should work with the Amiga, too (I could dig up Action Fighter).
Look on my "Where's the Code?" page for the transmitter (Controller64_TX03) and receiver (Controller64_RX02) sketches.
At one time I was experimenting, trying to develop a "wireless remote" joystick based on DTMF encoding/decoding and FM radio. Tone capture wasn't very snappy though.
Fast Forward 25 years to the present day. I got the idea of bringing back the C64 fun with some Arduino fun by utilizing the Esplora. With its integral accelerometer and handy buttons it seemed a natural as a controller platform. Combined with HC-05 and HC-06 Bluetooth modules and a Pro-Mini, a wireless game controller system was born.
The first step was to assess the Esplora playability by rigging the Esplora outputs to some open-collector transistors and those to the C64 joystick port. As that worked out acceptably, I worked out a couple of sketches that relied on SoftwareSerial with the Bluetooth modules.
The Esplora (transmitter) sets bits in a control byte based on the results of the accelerometer reads and a pushbutton, and transmits that, in a loop. The Pro-Mini (receiver) deconstructs the bits from the received control byte, applying those to output pins that control their respective transistors that interface with the C64 (via the Control Port, the CIA's pulled up inputs).
Most of all, I wanted to play Zaxxon (!) and Defender again. I have those on cartridges. I used Defender during development.
Trying out Zaxxon uncovered a dilemma. In Defender, joystick forward/back positioned the craft Up/Down, so I programmed the Esplora so that tilting up resulted a joystick forward. But that was incompatible with Zaxxon where a dive with the controller tilted up. To accommodate the difference I made an input to switch between the two modess. So, for Zaxxon tilting the Esplora down results a dive and up results a climb. The system works well, but could stand some tweaking vis-à-vis the accelerometer thresholds for forward/backward (up/down, dive/climb).
I found a composite to HDMI converter for around $20. The C64 looks great on the Big Screen.
Transmitter schematic and pic
Receiver schematic
Receiver pics
Special Thanks to Martyn Currey, he made the BIND and PAIR configuring simple.
http://www.martyncurrey.com/connecting-2-arduinos-by-bluetooth-using-a-hc-05-and-a-hc-06-pair-bind-and-link/
All I've done so far has been with cartridges. I should pull out a disk drive and see how that goes. This should work with the Amiga, too (I could dig up Action Fighter).
Look on my "Where's the Code?" page for the transmitter (Controller64_TX03) and receiver (Controller64_RX02) sketches.
Subscribe to:
Posts (Atom)