CPCSD: new mass storage solution
France Hicks - 06 May 2012 - 17:53:53 459 posts
Question to Pulko: would it possible to use this extension as a RAM extension? For example: saving the whole linear 64k on it before an execution with DAMS, and restore it after. Maybe a time problem (how many times to save 64k?)...
France PulkoMandy - 06 May 2012 - 21:51:52 633 posts
Well, it works just like a floppy drive. If you remove any kind of filesystem and just save 64K in the first sectors, let's do some math :

read speed = 50kbit / seconds
64Kbyte = 512Kbit

So, slightly more than 10 seconds for loading 64K. Writing will be a bit slower with the current code, because it writes one sector at a time and wait for the card, which isn't the good way. Using the "write multiple sector" command is simpler to code for big data access and will work about as fast (depends on the SD card write speed, then).

The speed can be improved if you're able to pack the data somehow (detecting/knowing big empty areas is a good start).

For example, I don't think you need to save video memory ? So down to 7.5 seconds :)
Germany HAL6128 - 07 May 2012 - 13:28:40 7 posts
Nice pictures and nice prototype! Did you solder the pins on that SD-Card and it doesn't harm?
France TotO - 07 May 2012 - 17:56:32 127 posts
It look to be a SD to Micro SD adapter used for the prototype.
Greece voxfreax - 07 May 2012 - 18:23:28 223 posts
@TotO: It is a microSD adapter. Pulkomandy wrote in a previous post:

You need a MicroSD card, because this way I use an SD to microSD adapter as a connector - it's cheaper than a real SD card socket.

France PulkoMandy - 07 May 2012 - 18:32:04 633 posts
Yes, soldering the Adapter directly to the board is cheaper than a real adapter. If you want to use a regular SD card, one trick is to use an HE901/HE902 connector (same as CPC non-centronics printer/floppy port) and plug the SD card in it. But, an SD to microSD adapter is even cheaper and more reliable :)

That being said, soldering an SD card directly would work as well, but then you couldn't use it to transfer data to/from other computers anymore.
France TotO - 07 May 2012 - 19:47:27 127 posts
This is a clever way for a prototype.
France PulkoMandy - 16 June 2012 - 11:13:51 633 posts
Ok, so I'm making some progress on soldering everything, checking compatibility with different cards and working on the filesystem...

I found a design problem that prevented some SD cards from working.
The schematic is updated with the new hardware (and some drawing fixes as well) :
http://pulkomandy.tk/drop/cpcsd.png
France PulkoMandy - 16 June 2012 - 14:22:11 633 posts
Updated the example sourcecode as well. We now support multi-sector read and write, which is a bit faster and actually uses simpler code (no need to increment the sector number by hand).
This get us down to 472 bytes for SD read/write support. It can be made a bit smaller by removing the error print (and returning an error code to the caller). So with less than 512 bytes you can now add SD support to any project !

Some things in the comments were fixed as well.

http://pulkomandy.tk/drop/cpcsd.z80

I'm also assembling the devices for you all...
http://pulkomandy.tk/drop/CPCSD_batch.JPG
Tortuga Grim - 17 June 2012 - 17:09:24 521 posts
@Pulko: If you haven't done it already, don't bother mounting and soldering one for me. (I will put the whole stuff inside the keyboard so it will be more convenient to have the elements apart).

edit: oh! No need for a printer connector too.
France PulkoMandy - 17 June 2012 - 19:35:04 633 posts
ok, I'm waiting for another order for Zener diodes, I hope they'll get in in time (the compatibility problem with the SD cards fixed yesterday was not really planned...).

I will likely not have time to solder them all before the party, so if some people want to do it themselves, it's ok for me. I bring the usual bag of random parts for party-hacking !
France krusty - 17 June 2012 - 20:59:44 327 posts
Do you think it is possible to:
- sold it inside the cpc
- add a switch to select
* cpcsd
* real output

In order to keep a soundplayer connected to the cpc
France PulkoMandy - 17 June 2012 - 21:44:56 633 posts
Everything is possible :)
The problem is the SD interface uses 3 data bits so it needs a 3-way switch. It also uses the BUSY bit, so a 4-way switch is needed if you also need VNet96.
I don't have such switches at hand, I can only offer you 2-way switches (so you need 2 of them, and it looks bad)

I suggest patching VNet96 and Soundplayer software to use the CPC Booster instead, and free the parallel port ;)

Germany TFM - 19 June 2012 - 22:07:17 146 posts
Hi PulkoMandy. I guess a lot of people want one (me too!). It could make sense to get real PCBs, then manufacturing could be more easy. And since the PCB is really tiny, also the price should be ok. What do you think?
France TotO - 20 June 2012 - 10:27:37 127 posts
I agree. Nice for prototyping but not for sell.
France CloudStrife - 20 June 2012 - 14:52:01 161 posts
PulkoMandy: maybe with a switch on ChipSelect on the SD Card ?!?

The "funny" think, it's that writing can be faster than reading... (f***ing PPI...)
France PulkoMandy - 20 June 2012 - 19:07:58 633 posts
Mh, yes, a switch on the chip select should work fine for regular logic. I'm not sure leaving the voltage adjust circuit connected (zener and resistor) will work well with the soundplayer, however...
first previous Page: 1 2
Online: nobody
Kill All Humans!