English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware > Hardware mods

 
 
Thread Tools
Old 17 January 2018, 18:56   #2501
Mathesar
Registered User
 
Mathesar's Avatar
 
Join Date: Aug 2014
Location: Netherlands
Posts: 697
Quote:
Originally Posted by plasmab View Post
@Mathesar re the slow clock... i could use a bit in the control register to force the CLK line low when set and unsettling will let it come from the low bit of the shift register... the effect would be the ability of the CPU to sent 74 slow clock pulses and avoid having to do that in the CPLD..
That would indeed be useful for resetting the SD card into SPI mode.
I get it you are low on CPLD space .

I also think you are right about the low clock speed for the rest of the initialisation sequence. Every single modern SD card will probably work fine on a fast clock. What is the clock speed on the SPI port?

I also had a quick look at the SPI driver. It doesn't support RDB right? If somebody (Toni? ) could add that you could have an autoboot rom-able driver...
Mathesar is offline  
Old 17 January 2018, 19:54   #2502
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by Mathesar View Post
That would indeed be useful for resetting the SD card into SPI mode.
I get it you are low on CPLD space .

I also think you are right about the low clock speed for the rest of the initialisation sequence. Every single modern SD card will probably work fine on a fast clock. What is the clock speed on the SPI port?

I also had a quick look at the SPI driver. It doesn't support RDB right? If somebody (Toni? ) could add that you could have an autoboot rom-able driver...
I will freely admit I have no idea what im doing with the driver. I used the mtnsd.device driver and ripped its guts out and then started putting the EmuTOS driver in there. Its not pretty and its probably buggy as heck.

The CPLD is full. I've had to be sneaky to get what i have there to fit.

Its a starting point for someone who knows what they are doing to help me with. Plus since i'm away for 3 weeks i figured people might want to play with it.

EDIT: I'm decent with C++ but i do code for a living so i prefer to avoid it in my hobbies.
plasmab is offline  
Old 17 January 2018, 22:56   #2503
solidcore
Registered User
 
Join Date: Sep 2017
Location: birmingham, uk
Posts: 548
Quote:
Originally Posted by plasmab View Post
I will freely admit I have no idea what im doing with the driver. I used the mtnsd.device driver and ripped its guts out and then started putting the EmuTOS driver in there. Its not pretty and its probably buggy as heck.

The CPLD is full. I've had to be sneaky to get what i have there to fit.

Its a starting point for someone who knows what they are doing to help me with. Plus since i'm away for 3 weeks i figured people might want to play with it.

EDIT: I'm decent with C++ but i do code for a living so i prefer to avoid it in my hobbies.

I realized last night that Brian's k1208 with his now braindead out gayle could possibly be used for SPI on the ide header pins assuming that cpld has room for your spi code. That means I can get it running on the a1200 so I'm thinking that'll be my quickest path to getting in bed with the driver development unless you get something going with UAE sooner than this next week.

Also unsure what I'm doing but will play anyway. I think there's a lot of code for network drivers SANA-II (if applicable?). Some chatter about Zorro Autoconfig... and so on but we'll see.
solidcore is offline  
Old 17 January 2018, 23:04   #2504
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by solidcore View Post
I realized last night that Brian's k1208 with his now braindead out gayle could possibly be used for SPI on the ide header pins assuming that cpld has room for your spi code. That means I can get it running on the a1200 so I'm thinking that'll be my quickest path to getting in bed with the driver development unless you get something going with UAE sooner than this next week.

Also unsure what I'm doing but will play anyway. I think there's a lot of code for network drivers SANA-II (if applicable?). Some chatter about Zorro Autoconfig... and so on but we'll see.
My plan is to setup an arduino nano and plumb it into FS-UAE on linux.
plasmab is offline  
Old 17 January 2018, 23:26   #2505
solidcore
Registered User
 
Join Date: Sep 2017
Location: birmingham, uk
Posts: 548
Quote:
Originally Posted by plasmab View Post
My plan is to setup an arduino nano and plumb it into FS-UAE on linux.
Yeah that's great, just have to make sure regarding the spi modules that people are aware they need to buy the 3.3v modules not the 5v ones that are more specific for the arduino. Not sure what may happen if they put a 5v module on the tf530 lol a terrible fire ???

Edit: sorry missed your question regarding which USB spi in cd32 thread. Answer: guess I was looking for a cheap and easy one off eBay but ardunio nano will be suffice as long as it's discreet and easy to integrate into UAE im game .

Last edited by solidcore; 17 January 2018 at 23:38.
solidcore is offline  
Old 17 January 2018, 23:44   #2506
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by solidcore View Post
Yeah that's great, just have to make sure regarding the spi modules that people are aware they need to buy the 3.3v modules not the 5v ones that are more specific for the arduino. Not sure what may happen if they put a 5v module on the tf530 lol a terrible fire ???

Edit: sorry missed your question regarding which USB spi in cd32 thread. Answer: guess I was looking for a cheap and easy one off eBay but ardunio nano will be suffice as long as it's discreet and easy to integrate into UAE im game .
Make sure you get a TF530 Rev 3. The Rev 2s dont have the interrupt pin.
plasmab is offline  
Old 17 January 2018, 23:46   #2507
solidcore
Registered User
 
Join Date: Sep 2017
Location: birmingham, uk
Posts: 548
Quote:
Originally Posted by plasmab View Post
Make sure you get a TF530 Rev 3. The Rev 2s dont have the interrupt pin.
I got a rev 3 in black from you November ish

Edit : .

Bought an a500 rev6a mainboard today and USB keyboard adapter.
Bprepared is borrowing me a cpu and should have the tf530 built as soon as A week or so maybe.

I will get the a1200 going with spi cpld sooner( if it works out)

And arduino nano on order just now .

Looking at 3v3 modules ATM

Last edited by solidcore; 17 January 2018 at 23:54.
solidcore is offline  
Old 17 January 2018, 23:50   #2508
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by solidcore View Post
I got a rev 3 in black from you November ish .
Cool. Im gonna throw my MMC module and an arduino nano in my suitcase. If i can find my ENC28J60 module i'll take that too.
plasmab is offline  
Old 17 January 2018, 23:59   #2509
solidcore
Registered User
 
Join Date: Sep 2017
Location: birmingham, uk
Posts: 548
Quote:
Originally Posted by plasmab View Post
Cool. Im gonna throw my MMC module and an arduino nano in my suitcase. If i can find my ENC28J60 module i'll take that too.
I'll grab both ethernet and a sd spi module on eBay now then . What mmc chip specifically you got ? And good plan, thought you would have let's hope others chip in, would be cool to have an array of options such as Bluetooth, Wi-fi, LCD/OLED/COLOR-TFT display, dot-matrix (think arcades), flash memory, nixi tube.. Endless applications of use

Edit: Is it possible to run multiple SPI modules (dreaming here a bit) in regards to cpld firmware/ hardware limitations? I think I read somewhere about this, but not sure if you can chain them.

Edit #2: so far I can only find expensive 30GBP MMC. Grabbed the most common cheapest SD SPI that has a 3.3v reg & 'SN74LVC125A' bus buffer gate.

Last edited by solidcore; 18 January 2018 at 00:21.
solidcore is offline  
Old 18 January 2018, 00:16   #2510
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by solidcore View Post
I'll grab both ethernet and a sd spi module on eBay now then . What mmc chip specifically you got ? And good plan, thought you would have let's hope others chip in, would be cool to have an spi LCD/OLED/COLOR-TFT display module at some point also .

Edit: Is it possible to run multiple SPI modules (dreaming here a bit) in regards to cpld firmware/ hardware limitations? I think I read somewhere about this, but not sure if you can chain them.

Edit #2: so far I can only find expensive 30GBP MMC. Grabbed the most common cheapest SD SPI that has a 3.3v reg & 'SN74LVC125A' bus buffer gate.
The MMC chip? the SPI chip is wired straight to an sd card.

I'm gonna use this .. which by the way might let an arduino be usable for JTAG too..

https://github.com/BLavery/virtual-GPIO
plasmab is offline  
Old 18 January 2018, 00:24   #2511
solidcore
Registered User
 
Join Date: Sep 2017
Location: birmingham, uk
Posts: 548
Quote:
Originally Posted by plasmab View Post
The MMC chip? the SPI chip is wired straight to an sd card.

I'm gonna use this .. which by the way might let an arduino be usable for JTAG too..

https://github.com/BLavery/virtual-GPIO
Ah my bad so wont matter then. Good catch! it would certainly make an Arduino a very cheap jtag indeed.
solidcore is offline  
Old 18 January 2018, 18:22   #2512
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by solidcore View Post
Ah my bad so wont matter then. Good catch! it would certainly make an Arduino a very cheap jtag indeed.
Ok i have an arduino nano, a enc28j60, sd card breakout and some dupoint wires. I'll take them with me to play with in USA.

Is there an open source network driver in C? If not should we not consider writing a set of exemplar drivers.
plasmab is offline  
Old 18 January 2018, 19:19   #2513
solidcore
Registered User
 
Join Date: Sep 2017
Location: birmingham, uk
Posts: 548
Quote:
Originally Posted by plasmab View Post
Ok i have an arduino nano, a enc28j60, sd card breakout and some dupoint wires. I'll take them with me to play with in USA.

Is there an open source network driver in C? If not should we not consider writing a set of exemplar drivers.
Okay, nice to be in sync is that v3 nano?

For Amiga? Well I've been looking around and there's SANA II which may help but unsure if that's only OS 3.9. As for 3.0/3.1 I'd have to keep searching, otherwise yep will have to make some example drivers indeed and hope someone more attuned to Amiga drivers can chip in as well.

As it stands atm your example miggy driver is a simple read/write right?

Also can we have multiple SPI devices at the same time in a daisy chain? https://www.maximintegrated.com/en/a...ex.mvp/id/3947 chip-select lines.
solidcore is offline  
Old 18 January 2018, 19:58   #2514
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by solidcore View Post
Okay, nice to be in sync is that v3 nano?

For Amiga? Well I've been looking around and there's SANA II which may help but unsure if that's only OS 3.9. As for 3.0/3.1 I'd have to keep searching, otherwise yep will have to make some example drivers indeed and hope someone more attuned to Amiga drivers can chip in as well.

As it stands atm your example miggy driver is a simple read/write right?
Mine is a tinxi® MINI USB Nano V3.0 ATmega328P CH340G 5V 16M Compatible for Arduino Nano V3.0

My driver isnt simple. it detects all the versions and features of cards and does the correct thing based on that. Handles block vs direct addressing etc, voltage setup and all the other crazy things those cards expect.

Quote:
Also can we have multiple SPI devices at the same time in a daisy chain? https://www.maximintegrated.com/en/a...ex.mvp/id/3947 chip-select lines.
The TF530 does this. it has 2 CS lines just line that diagram. Read the docs and look at the schematic.
plasmab is offline  
Old 18 January 2018, 20:03   #2515
solidcore
Registered User
 
Join Date: Sep 2017
Location: birmingham, uk
Posts: 548
Quote:
Originally Posted by plasmab View Post
Mine is a tinxi® MINI USB Nano V3.0 ATmega328P CH340G 5V 16M Compatible for Arduino Nano V3.0

My driver isnt simple. it detects all the versions and features of cards and does the correct thing based on that. Handles block vs direct addressing etc, voltage setup and all the other crazy things those cards expect.



The TF530 does this. it has 2 CS lines just line that diagram. Read the docs and look at the schematic.
Same as my nano. Nice I'll have a look over everything and awesome will do.

Edit: Nice I hadn't got round to noticing dev branch spiport.v I see the pick active device on output reg [1:0] SPI_CS lovely stuff!!!! glad you've taken this approach.

Just going through your spi_alpha branch, /rtl and /drivers/sdcard/ files now.

Edit: sorry didn't mean to imply the sd driver was simple (it isn't) was referring to previous example I saw of the spi access in the workbench terminal.
Thought below was a simple quick test file where read/write access was proven didn't know if it was anything substantial at that time. I miss understood that it was more developed than that.
http://eab.abime.net/showpost.php?p=...postcount=2435

Last edited by solidcore; 18 January 2018 at 20:29.
solidcore is offline  
Old 18 January 2018, 20:40   #2516
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by solidcore View Post
Same as my nano. Nice I'll have a look over everything and awesome will do.
I'm planning to make this dev environment work off standard linux SPI port mode which apparently that Virtual GPIO support.

For the moment i'm switching into flying mode. ending all my ebay listings too.
plasmab is offline  
Old 18 January 2018, 21:06   #2517
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by solidcore View Post

Edit: sorry didn't mean to imply the sd driver was simple (it isn't) was referring to previous example I saw of the spi access in the workbench terminal.
Thought below was a simple quick test file where read/write access was proven didn't know if it was anything substantial at that time. I miss understood that it was more developed than that.
http://eab.abime.net/showpost.php?p=...postcount=2435
The driver is fully written but there is a testbench to match the one in the mntsd.device. Really really get to understand whats there. I expect the driver doesnt work properly but its a case of debugging now using the test bench. Seriously read and review whats there first before forming an opinon.

As i've said (4 times now) i have refactored a FULL mntsd.device driver and plumbed in the guts of the EmuTOS SD Card Driver. Its complete but buggy/broken. Just needs time to iron out which i dont have right now.
plasmab is offline  
Old 18 January 2018, 21:09   #2518
solidcore
Registered User
 
Join Date: Sep 2017
Location: birmingham, uk
Posts: 548
Quote:
Originally Posted by plasmab View Post
The driver is fully written but there is a testbench to match the one in the mntsd.device. Really really get to understand whats there. I expect the driver doesnt work properly but its a case of debugging now using the test bench. Seriously read and review whats there first before forming an opinon.

As i've said (4 times now) i have refactored a FULL mntsd.device driver and plumbed in the guts of the EmuTOS SD Card Driver. Its complete but buggy/broken. Just needs time to iron out which i dont have right now.
That's fine I gotcha, just picking it all up working backwards had me confused. (taking a look at http://www.github.com/mntmn/amiga200...drivers/sdcard comparing differences etc while I go through everything. Can't wait to get setup. )

Quote:
Originally Posted by plasmab View Post
I'm planning to make this dev environment work off standard linux SPI port mode which apparently that Virtual GPIO support.

For the moment i'm switching into flying mode. ending all my ebay listings too.
That's fine by me, I use the Arch Linux distribution over here so once you've got FS-UAE all setup let us know.

Roger that. Keep us posted.

Last edited by solidcore; 18 January 2018 at 21:44.
solidcore is offline  
Old 18 January 2018, 23:02   #2519
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Cant get that VirtGPIO to work.
plasmab is offline  
Old 19 January 2018, 16:54   #2520
PR77
Registered User
 
Join Date: Oct 2017
Location: Germany
Posts: 193
Is the SPI AUTOCONFIG and dasey chained (requesting the KS to map to I/O space) when the TF530 AUTOCONFIGs the FastRAM? I could check the verilog, but will ask first. I would like this for my DIY A500 accelerator I'm working on.
PR77 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Listening to Amiga music with too much treble makes it sound terrible! Foebane Amiga scene 4 08 October 2016 06:30
Terrible usb drive performance? lovinggames support.FS-UAE 5 11 March 2015 09:06
Broken MASPlayer - Terrible hissing. SS454 support.Hardware 8 17 November 2013 01:41
Accelerators pmc MarketPlace 9 04 November 2009 20:23
Problem with a terrible, simply effect! Camionsauro Coders. General 13 19 April 2009 08:53

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:35.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.18773 seconds with 14 queries