English Amiga Board Amiga Lore


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 29 January 2017, 04:09   #61
thgill
Registered User

thgill's Avatar
 
Join Date: May 2008
Location: Mason, Ohio / USA
Age: 41
Posts: 359
I would be interested in a couple of these too!
thgill is offline  
AdSense AdSense  
Old 29 January 2017, 08:30   #62
kazmat
Registered User
 
Join Date: Jan 2005
Location: Japan
Age: 50
Posts: 8
Wow cool

I need 1 or 2 kits for me
kazmat is offline  
Old 29 January 2017, 11:41   #63
kgc210
Registered User

 
Join Date: Jun 2016
Location: Stoke-On-Trent, England
Posts: 138
Good work on the PCB's I would be interested in two replacement board kits.
Would like to get back into using my CD32.
kgc210 is offline  
Old 29 January 2017, 18:39   #64
arananet
Registered User

 
Join Date: Mar 2016
Location: Madrid
Posts: 30
Great kit, congrats!
arananet is offline  
Old 16 February 2017, 17:12   #65
tekopaa
Registered User
tekopaa's Avatar
 
Join Date: Feb 2008
Location: Finland
Posts: 116
Iam intrested about fully assembled black snescd32 controller and shipping to Finland
tekopaa is offline  
Old 19 February 2017, 12:09   #66
kubaslonka
Registered User

 
Join Date: Feb 2017
Location: Opole / Poland
Posts: 1
Yey! That's look fantastic! I would ask for 2 at least. What price?
kubaslonka is offline  
Old 02 March 2017, 11:19   #67
witchmaster
Registered User

witchmaster's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 133
I had a setback with the replacement PCB version, for some reason it doesn't work and I haven't found the reason why. Everything should be connected properly, might have something to do with the smd versions of the ICs. Anyway I got (what I think is a brilliant) idea and started working on doing a Atmega version with some unique features, more on this later, I just wanted to update you about the progress.
witchmaster is offline  
Old 02 March 2017, 11:28   #68
Amigajay
醉拳
Amigajay's Avatar
 
Join Date: Jan 2010
Location: UK
Posts: 1,427
Ah shame about the setback, its really annoying when you cant find a reason why!
Cheers for the update, hope all goes better!
Amigajay is offline  
Old 02 March 2017, 13:48   #69
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 509
Quote:
Originally Posted by witchmaster View Post
I had a setback with the replacement PCB version, for some reason it doesn't work and I haven't found the reason why. Everything should be connected properly, might have something to do with the smd versions of the ICs. Anyway I got (what I think is a brilliant) idea and started working on doing a Atmega version with some unique features, more on this later, I just wanted to update you about the progress.
That's a great idea - but there are a couple of pitfalls to watch out for.
Because the Amiga's POTX/Y lines do double-duty as analogue input and digital IO they have unusual characteristics, and it's not uncommon for a microcontroller to be unable to pull those lines low enough for the Amiga to see a logic 0. You may need to factor an external transistor into your design.
(Actually, thinking about it, this same issue could be why your existing boards aren't working, if the shift register IC doesn't have exactly the same characteristics as the original?)

You'll also need to make sure your shift register reacts very quickly. I did something similar using a PIC once, but struggled to get it working quickly enough, especially once the extra delays from the external transistor were taken into account. Another interesting option is the Cypress PSOC chips - there's a low-end PSOC4 chip with an Arm M0 CPU and a small amount of programmable logic on board - so with that, it's possible to do the shift register in hardware, which relaxes the timing requirements on the software quite considerably.

Test widely, with as many different models of Amiga and as many different games as possible - there are many variants of the CD32 pad reading code out there, all with slightly different timing requirements!
robinsonb5 is offline  
Old 02 March 2017, 14:16   #70
witchmaster
Registered User

witchmaster's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 133
Quote:
Originally Posted by robinsonb5 View Post
That's a great idea - but there are a couple of pitfalls to watch out for.
Because the Amiga's POTX/Y lines do double-duty as analogue input and digital IO they have unusual characteristics, and it's not uncommon for a microcontroller to be unable to pull those lines low enough for the Amiga to see a logic 0. You may need to factor an external transistor into your design.
(Actually, thinking about it, this same issue could be why your existing boards aren't working, if the shift register IC doesn't have exactly the same characteristics as the original?)
Thanks for the help! At the moment I'm thinking of only replacing the shift register with an Atmega microprosessor and leaving the tri-state buffer in place to have better compatibility. I have already have the CD32 gamepad working with the lines going directly to the microprocessor but it's not safe to do it this way because of the input/output on the same pin issue (this could do damage to the microprocessor or the Amiga). Also I'm only testing on my A500 at the moment, it's working on that but I guess the problem with logic zero can show up on other motherboards.

The current design is exactly the same as the small pcb I first made and is identical to the original CD32 gamepad circuitry, the only difference is that I use smd components, they are of the LS family though, as the original. For the first version I confirmed that 74HCT and 74LS worked, 74HC did not work (HC is CMOS, LS and HCT are TTL).

Quote:
Originally Posted by robinsonb5 View Post
You'll also need to make sure your shift register reacts very quickly. I did something similar using a PIC once, but struggled to get it working quickly enough, especially once the extra delays from the external transistor were taken into account. Another interesting option is the Cypress PSOC chips - there's a low-end PSOC4 chip with an Arm M0 CPU and a small amount of programmable logic on board - so with that, it's possible to do the shift register in hardware, which relaxes the timing requirements on the software quite considerably.
In my experiments with the Atmega328 I have set up external interrupts for the clock and latch pins so it should react quite quickly to the clock. I do everything with setting the registers directly (not using the slow attachInterrupt and using direct port manipulation). First I was updating the shift data output on RISING edge but this wasn't reliable, instead updating the data on the FALLING edge of the clock seems to be reliable on the A500 at least, but haven't tried other software then JoyPortTest for the moment. JoyPortTest can work without lowlevel.lib, don't know what the practical difference is. I will look into the Cypress PSOC chips, sounds interesting, I will experiment with the Atmega now and see how it goes (I'm used to that processor).

Quote:
Originally Posted by robinsonb5 View Post
Test widely, with as many different models of Amiga and as many different games as possible - there are many variants of the CD32 pad reading code out there, all with slightly different timing requirements!
Ok, good to know! I guess the timing for when sending the clock signals and reading the data can vary in the code. I have three CD32, two A1200 and three A500 machines I can test on here. Will test with different games also of course, I hope I will get this to work since I have some nice features I would like to implement!

Last edited by witchmaster; 02 March 2017 at 14:21.
witchmaster is offline  
Old 02 March 2017, 14:51   #71
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 509
Quote:
Originally Posted by witchmaster View Post
it's not safe to do it this way because of the input/output on the same pin issue (this could do damage to the microprocessor or the Amiga).
It's always safe to short the pin to ground - since the pin on the Amiga is designed to have a mouse button attached to it - the only danger is if the Amiga's driving the pin low while the uC is driving it high. You can avoid that by using "input with weak pull-up enabled" instead of "output logic high". But using the tristate IC is a much better idea.

Quote:
Also I'm only testing on my A500 at the moment, it's working on that but I guess the problem with logic zero can show up on other motherboards.
Yes, I never saw this issue on an A500 or my A4000/030 when I had that, but it apparently affected some A1200s and I think A600s too. I don't know about the CD32 (The same problem shows up with some PC mouse adapters whe then right mouse button doesn't work.)

Quote:
Ok, good to know! I guess the timing for when sending the clock signals and reading the data can vary in the code.
Yes, basically the code polls a CIA register multiple times to create a fixed delay, allowing the shift register to do its thing. Some games poll the register fewer times, cutting the timing to the absolute minimum.
robinsonb5 is offline  
Old 02 March 2017, 17:42   #72
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 17,956
robinsonb5, have you ever worked again on your adapter? I still have your beta
Akira is offline  
Old 02 March 2017, 18:27   #73
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 509
Quote:
Originally Posted by Akira View Post
robinsonb5, have you ever worked again on your adapter? I still have your beta
Unfortunately not - I've moved house since then and have a lot less time for such projects these days. Hopefully I'll pick it up again some day!
robinsonb5 is offline  
Old 02 March 2017, 20:12   #74
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 17,956
Well I'm here to test any time you need!
I haven't used it in a while, should bust it out.
Akira is offline  
Old 02 March 2017, 20:34   #75
witchmaster
Registered User

witchmaster's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 133
Quote:
Originally Posted by robinsonb5 View Post
Yes, basically the code polls a CIA register multiple times to create a fixed delay, allowing the shift register to do its thing. Some games poll the register fewer times, cutting the timing to the absolute minimum.
Ok, thanks! I was just looking at some CD32 gamepad reading routines but I'm more or less an assembly illiterate. What I know is a serial shift register sets the output to the first "input pin" value directly after loading, then for every clock pulse the output of the shift register will correspond to the next "input pin" value.

So is a "normal" CD32 gamepad read routine something along these lines:?

1. PotX (pin 5) is set low to enable shift mode of the LS165.
2. PotY (pin 9) is read?
3. Button1 (pin 6) is set HIGH and then LOW (clock pulse for the LS165)
4. Small wait then Amiga is reading PotY (the wait varies between games)
5. Repeat 3 and 4 until all data shifted.
6. PotX (pin 5) is set HIGH to enable load mode of the LS165.
witchmaster is offline  
Old 03 March 2017, 00:38   #76
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 509
Quote:
Originally Posted by witchmaster View Post
So is a "normal" CD32 gamepad read routine something along these lines:?

1. PotX (pin 5) is set low to enable shift mode of the LS165.
2. PotY (pin 9) is read?
3. Button1 (pin 6) is set HIGH and then LOW (clock pulse for the LS165)
4. Small wait then Amiga is reading PotY (the wait varies between games)
5. Repeat 3 and 4 until all data shifted.
6. PotX (pin 5) is set HIGH to enable load mode of the LS165.
Pretty much. Pin 6 is already high when the routine enters the main loop for the first time, and it's explicity set to output mode before the loop starts. And there's a final step, returning pin 6 to input mode and setting it high again.

Incidentally, remember that you're imitating an eight bit shift register, so when you've shifted out your seven buttons, shift out an extra '1' bit. Some routines use this extra bit to detect the presence of a CD32 pad.
robinsonb5 is offline  
Old 03 March 2017, 15:17   #77
witchmaster
Registered User

witchmaster's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 133
Quote:
Originally Posted by robinsonb5 View Post
Pretty much. Pin 6 is already high when the routine enters the main loop for the first time, and it's explicity set to output mode before the loop starts. And there's a final step, returning pin 6 to input mode and setting it high again.

Incidentally, remember that you're imitating an eight bit shift register, so when you've shifted out your seven buttons, shift out an extra '1' bit. Some routines use this extra bit to detect the presence of a CD32 pad.
Thank you, much appreciated! My work continues...
witchmaster is offline  
Old 06 March 2017, 00:29   #78
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 509
Quote:
Originally Posted by witchmaster View Post
Thank you, much appreciated! My work continues...
Another subtlety that I'd forgotten about until I saw Daedalus's post in the detect-CD32-controller-from-Blitz thread - as bits are shifted out, they're replaced with zeroes - so you should shift out the seven buttons, a single '1', then zeroes until the shifting has finished.
robinsonb5 is offline  
Old 08 March 2017, 10:06   #79
papa_november
Registered User
papa_november's Avatar
 
Join Date: Jul 2008
Location: California
Posts: 183
Have you checked out this thread?? You may want to change the shape of the D-pad contacts for better performance.

Also, how is the d-pad itself on that SNES clone controller? Lots of cheap d-pads lack the center nub on the bottom that stops all four directions from being pressed at once, or implement it so poorly it might as well not be there.
papa_november is offline  
Old 08 March 2017, 14:44   #80
witchmaster
Registered User

witchmaster's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 133
Quote:
Originally Posted by robinsonb5 View Post
Another subtlety that I'd forgotten about until I saw Daedalus's post in the detect-CD32-controller-from-Blitz thread - as bits are shifted out, they're replaced with zeroes - so you should shift out the seven buttons, a single '1', then zeroes until the shifting has finished.
Ok thanks! I have this accounted for in my code now. The shift register on the CD32 pad has the serial input connected to ground (multiple shift registers can be chained). When "shifting" more bits than eight before resetting with the latch will result in zeroes shifted out.

Quote:
Originally Posted by papa_november View Post
Have you checked out this thread?? You may want to change the shape of the D-pad contacts for better performance.

Also, how is the d-pad itself on that SNES clone controller? Lots of cheap d-pads lack the center nub on the bottom that stops all four directions from being pressed at once, or implement it so poorly it might as well not be there.
Thanks, good spotting! I will change the D-pad contacts accordingly, they are a bit sensitive now when you mention it. The DPAD on the SNES gamepad clones can be pressed down in the center so all directions are pressed, but this hasn't been a problemfor me (I use the usb gamepads on my PC also). It would of course be good to do something about this... Maybe there is a good way of modding the DPAD...
witchmaster is offline  
AdSense AdSense  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Amiga cd32 joystick Case arananet Hardware mods 11 26 September 2016 20:09
Cubo CD32 custom key maps elenamancuso support.WinUAE 2 24 July 2014 00:03
Buying a CD32 compatible gamepad is cool but... Mounty Retrogaming General Discussion 2 04 August 2013 16:02
CD32 Gamepad on Winuae? fribse New to Emulation or Amiga scene 1 12 May 2007 00:42
Custom CD32 Covers online TheBoss Amiga scene 343 31 December 2006 16:25

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 01:08.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.24345 seconds with 11 queries