|
Post by shadyman on Feb 4, 2007 21:28:03 GMT -5
Hey guys. I just got news from Lars Pontoppidan about his great new SD/MMC to IEC Converter: pontoppidan.info/lars/index.php?proj=mmc2iecThe idea of transfering data to the C64 from a flash media was conceived long ago as I did an university project. In cooperation with other students we created a data logger interfacing a SD-card using an AVR. The SD-card data access and FAT driver modules were created back then and they were thoroughly tested. The FAT driver is not completely my own invention, it is a partial rewrite of work done by Angelo Bannack and Giordano Bruno Wolaniuk who used work done by Pascal Stang. See fat.c for details.
At some point I discovered Jan Derogee's 1541-III device which was a major inspiration. Before that I considered creating a C64 datasette simulator, but the 1541-III made me realise that it was possible to simulate a 1541.
The MMC2IEC project thus started as an attempt to port Derogee's 1541-III from PIC to the Atmel AVR architecture such that I could combine it with my FAT and SD-card modules. Soon enough I gave up the porting and implemented the IEC and 1541 simulation from scratch, but it would have been impossible without referring to Derogee's project all the time.
At a later point I realised that the MMC2IEC was perfectly suited for embedding in a C64-DTV mod. And so far I have only tested the MMC2IEC on a DTV in conjunction with my Wooden DTV mod.
This project is open source under the GPL license.
|
|
|
Post by gmoon on Feb 4, 2007 21:41:02 GMT -5
GPL. AVR-GCC code for IEC, FAT16/32, MMC/SD. Pretty sweet.
|
|
|
Post by spiff on Feb 5, 2007 13:35:15 GMT -5
Yes, I have seen it work. LIVE! Lars gave me a demonstration last friday. Pretty cool device. Actually we used an early prototype of this device to make a complete dump of the DTV flash before I was able to get dtvtrans working. So it has been tested with files of 1MB as well
|
|
|
Post by rrolison on Feb 13, 2007 18:58:08 GMT -5
|
|
|
Post by spiff on Feb 14, 2007 4:47:01 GMT -5
Cool. Looking at the picture, it appears to me that the PCB is not like the one I have. Is it an NTSC (e.g. v1) DTV??
|
|
|
Post by rrolison on Feb 14, 2007 5:27:07 GMT -5
It's a DTV1 NTSC.
Oh, and another feature, since there's an Atmel inside, I use an ADC and a potentiometer for calibration (buried under the card slot) to show the battery pack voltage when the system turns on or is reset. It stuffs a keyboard string in through the PS2 port as such: BATTERY VOLTAGE = 5.12
|
|
|
Post by larsp on Feb 14, 2007 7:34:05 GMT -5
Hi there! Very nice rrolison! Fresh thinking to avoid the PCB alltogether and wirewrap it all I will just mention the few gotcha's people have had experimenting with my MMC2IEC: 1. About the SD-card reset command I have denoted LOAD"<<",8 The < symbol is the petscii left-arrow which is bound to the key left to the 1 key. 2. The way you enable debug printing is perhaps a little funny. You need to uncomment two lines in the makefile, and remember to make clean... I might change this principle in the next code revision.
|
|
|
Post by spiff on Feb 14, 2007 12:57:46 GMT -5
My prototype hardware using the STK500 seems to work: This should make it a lot easier to test the DTV-fixed games ;D
|
|
|
Post by jsaily on Feb 14, 2007 13:13:42 GMT -5
Spiff, wow! That looks like my office desk! How many DTV's did I see, maybe three?! Any plans on selling those MMC2IEC's with Lars? There seems to be an unsatisfiable need for flash drives... me and Pyrofer got tired after three batches :/
I also have now an AVR-programmer which I bought from Olimex. It fits inside the D25-connector though ;-) I got also a prototype board which I used to program the C-key chips for Pyrofer... Of course I f**ked up the oscillator settings at first and had to install a clock module to the board to be able to program the chips finally. Doh. This was my first AVR... PICs are harder to render unusable by programming, although some parts need 5V to be able to erase configurations.
|
|
|
Post by gmoon on Feb 14, 2007 15:14:22 GMT -5
Of course I f**ked up the oscillator settings at first and had to install a clock module to the board to be able to program the chips finally. Doh. This was my first AVR...PICs are harder to render unusable by programming, although some parts need 5V to be able to erase configurations. I don't have a STK500 like Spiff, but I think it has a 'Hi-voltage programming' mode that will let you reset those pesky fuses (clock source you referred to...)
|
|
|
Post by larsp on Feb 14, 2007 15:22:04 GMT -5
What a mess, spiff ;D
About selling MMC2IEC devices - it is not completely out of the question, but I just don't have the time at the moment as I'm quite busy with my master thesis. But in a couple of months its over and we'll see.
|
|
|
Post by shadyman on Feb 14, 2007 15:51:40 GMT -5
Lars! Sorry, man, all this attention's my fault
|
|
|
Post by spiff on Feb 14, 2007 16:35:12 GMT -5
Spiff, wow! That looks like my office desk! How many DTV's did I see, maybe three?! Well, there is my primary DTV (in the gray box). On the right are the two joysticks I use for testing (a Competition Pro and one "The Arcade"). Behind it (just in front of the phone) you can see the top cover of a DTV, and looking very closely you can just see a corner of the PCB for it to the right of the Competition Pro, under a piece of paper. So actually there are only two DTV's in this picture, although I have another three that I have not started modding yet Any plans on selling those MMC2IEC's with Lars? There seems to be an unsatisfiable need for flash drives... me and Pyrofer got tired after three batches :/ Well, I know for sure that I won't be the one soldering them. If people want to buy kits we could probably order some PCBs and I'd be happy to set up a web-shop for it. I don't know about Lars, but I assume that the soldering gets boring for him at some point too. The other possibility is that we can actually get the PCBs made and soldered all in one go. Even for small productions I don't think it will be too expensive. There are only two components: the ATmega32 and the SD-socket. I will discuss this with Lars, and perhaps we will try to get a quote on PCB and soldering for something like 25 or 50 pcs. However, my own setup still behaves a little buggy. I think I need to ask Lars if he'll help me debug it. Perhaps the problems are related to using the internal RC-oscillator. I also have now an AVR-programmer which I bought from Olimex. It fits inside the D25-connector though ;-) I got also a prototype board which I used to program the C-key chips for Pyrofer... Of course I f**ked up the oscillator settings at first and had to install a clock module to the board to be able to program the chips finally. Doh. This was my first AVR... PICs are harder to render unusable by programming, although some parts need 5V to be able to erase configurations. Well, I did almost the same thing with the first AVR I used. But that is 5 years ago and I have not done it again, so maybe it only happens once I really don't have a lot of knowledge about PIC, and also I don't think I want to start that war again, but I'm really satisfied with AVR and have used for all kinds of stuff.
|
|
|
Post by jsaily on Feb 15, 2007 2:08:07 GMT -5
Spiff, I think the timing is pretty important in the IEC-bus routines. Some lines have to be pulled low in an exact timeframe. That's why Jan Derogee used a 20 MHz crystal in his 1541-III, although the used PIC has an internal 8 MHz RC-oscillator like in the ATmega's in MMC2IEC. No intention of warfare here :-)
Actually we have tried to 'push it' a little with the bus timing, and it seems that the delays can be made somewhat smaller to increase transfer speeds. This all requires an accurate timing source, of course. Otherwise you'll need to allow too much margin and this results in slow transfers.
It's a good idea to out-source the manufacturing of the device, since it is pretty boring to make up 50 units actually. Pyrofer has kept his Jedi<tm> soldering station busy in the last months !
|
|
|
Post by rrolison on Feb 16, 2007 9:44:13 GMT -5
However, my own setup still behaves a little buggy. I think I need to ask Lars if he'll help me debug it. Perhaps the problems are related to using the internal RC-oscillator. Define buggy. Mine in running flawless. I tuned OSCCAL before I actually started playing with it.
|
|