Author Topic: SD Cards on the PCW  (Read 737 times)

0 Members and 1 Guest are viewing this topic.

Online jamesots

  • CPC464
  • **
  • Posts: 21
  • Country: gb
  • Liked: 26
Re: SD Cards on the PCW
« Reply #10 on: 10:42, 06 November 17 »
Sounds really cool! I need that for the SymAmp player (AY sound), controlling my mouse pointer (Joystick), and FAT 16/32 access...
Is it possible to access the 512byte sectors of the SD card directly (low level sector read/write)?


Yes, it just uses two IO ports, one which controls the SD card's select signal and whether or not communication should run at 16Mhz or 125Khz (needed during initialization), and one which writes/reads bytes to/from the SD card in SPI mode. So you can send any instructions you like to the SD card. I've got a small library of Z80 code to do this, which is gradually gaining more features at the moment.


Offline JonB

  • 6128 Plus
  • ******
  • Posts: 550
  • Country: 00
  • Liked: 123
Re: SD Cards on the PCW
« Reply #11 on: 16:29, 06 November 17 »
Hi James


Hope you saw my PM. Would you be prepared to share details of your design with me? I would like to get my uIDE cards to boot without accessing the floppy drive, but I think I will need a bit of help..



Cheers
JonB

Online jamesots

  • CPC464
  • **
  • Posts: 21
  • Country: gb
  • Liked: 26
Re: SD Cards on the PCW
« Reply #12 on: 00:42, 07 November 17 »
Hope you saw my PM. Would you be prepared to share details of your design with me? I would like to get my uIDE cards to boot without accessing the floppy drive, but I think I will need a bit of help..


Yes, I'm happy to help. Did you see my post further up the thread? Would anything else be useful at the moment?


James Ots

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 550
  • Country: 00
  • Liked: 123
Re: SD Cards on the PCW
« Reply #13 on: 14:09, 07 November 17 »
I probably need:

  • Schematics of your interface (so I can recreate it with uIDE compatibility).
  • Details of the mechanism by which it detects the end of the first level boot - port addresses, ROM disassembly, etc.
  • Source code of the second level boot (the code you put in the SD card's boot track).
  • CPLD programming details (I assume you're using some programmable logic).
  • Your patched EMS file.
  • Probably some advice on build tool chains you are using (I use TASM for Z80 assembly) especially for the programmable logic.
Basically, everything required to boot the PCW from a mass storage device.. I would substitute your SD card boot code for IDE code (same thing functionally - read boot code off the first track).
« Last Edit: 14:18, 07 November 17 by JonB »

Online jamesots

  • CPC464
  • **
  • Posts: 21
  • Country: gb
  • Liked: 26
Re: SD Cards on the PCW
« Reply #14 on: 14:48, 07 November 17 »
I probably need:

  • Schematics of your interface (so I can recreate it with uIDE compatibility).
  • Details of the mechanism by which it detects the end of the first level boot - port addresses, ROM disassembly, etc.
  • Source code of the second level boot (the code you put in the SD card's boot track).
  • CPLD programming details (I assume you're using some programmable logic).
  • Your patched EMS file.
  • Probably some advice on build tool chains you are using (I use TASM for Z80 assembly) especially for the programmable logic.
Basically, everything required to boot the PCW from a mass storage device.. I would substitute your SD card boot code for IDE code (same thing functionally - read boot code off the first track).


Some of that is in the github repository, although not the interface schematics and CPLD code. I don't think a CPLD is really necessary for doing the boot from ROM stuff — it really comes into its own for the SD card interface — and it's also fairly expensive, although without the SD card code you could fit it into a smaller, cheaper chip, I guess. I don't have the schematic documented at the moment, I'll have to sketch that out in KiCAD, and I need to get a public repo up of the CPLD code.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 550
  • Country: 00
  • Liked: 123
Re: SD Cards on the PCW
« Reply #15 on: 22:55, 07 November 17 »
Maybe you could walk me through how we might do this without a CPLD in principle. I'm all for something cheap and simple!


Cheers
JonB
« Last Edit: 22:57, 07 November 17 by JonB »

Online jamesots

  • CPC464
  • **
  • Posts: 21
  • Country: gb
  • Liked: 26
Re: SD Cards on the PCW
« Reply #16 on: 10:40, 10 November 17 »
At the moment I'm trying to rebuild my circuit on stripboard, as something is slightly dodgy with my breadboard since I knocked it and at least one of the wires somewhere is slightly loose. Hopefully once it's on stripboard and working reliably I'll be able to tell whether my improved VHDL boot code works properly or not. If it does work, the circuit will be a lot simpler to build without a CPLD.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 550
  • Country: 00
  • Liked: 123
Re: SD Cards on the PCW
« Reply #17 on: 16:28, 10 November 17 »
OK, James I'm keeping my fingers crossed...


A CPLD isn't necessarily a no-go for me though, it just depends on how much discrete logic is needed to implement the boot.

Online jamesots

  • CPC464
  • **
  • Posts: 21
  • Country: gb
  • Liked: 26
Re: SD Cards on the PCW
« Reply #18 on: 22:24, 14 November 17 »
Just letting you know I haven't forgotten about this — I'm still working on the stripboard circuit. Nearly got it all soldered.


Re CPLDs — I reckon without the SD code it would fit into one of the small, cheap CPLDs, so it might still be the best way to go. You would need a 3.3v regulator though if you were using the XC9500XL CPLDs like I'm using, which I think is a good choice as they accept 5V inputs. One downside is the outputs are 3.3V, but that is still TTL compatible, and the PCW is happy with those levels. Also, the CPLDs are surface mount.


Offline JonB

  • 6128 Plus
  • ******
  • Posts: 550
  • Country: 00
  • Liked: 123
Re: SD Cards on the PCW
« Reply #19 on: 10:21, 15 November 17 »
Thanks James

It's a matter of documentation - I can understand it as long as it is explained. Being able to boot from something other than the floppy disk is a bit of a holy grail for PCW owners, so I think your success is a great achievement. Documenting it will hopefully lead to renewed interest in the machine and more bootable devices appearing.

I am happy to document your design if you would rather not go to the effort, but of course I will need to build one first (and get the understanding).

Would this CPLD suffice? https://www.ebay.co.uk/itm/271333636888


Cheers
JonB
« Last Edit: 10:46, 15 November 17 by JonB »