GamePad SPI vs The World

Start a work log and update it occasionally with your projects progress
Post Reply
User avatar
CyrusDevX
Active PSXDEV User
Active PSXDEV User
Posts: 47
Joined: Aug 07, 2015

GamePad SPI vs The World

Post by CyrusDevX » August 15th, 2015, 1:40 am

GP-SPI vs The World

This project's goal is to develop a hardware spi interface off the GamePad port.


Some features would include:
  • A Storage Media
  • Peek n' Poke
  • GPIO "bridge"
  • Feature suggestions and idea from forum members ^^. (what would you use / like to see)
The PSX Does have the ability to use "standard" SPI protocol, although the way it works might be altered.
The 250khz is pretty much the norm on Arduino boards, but they can go higher to 1mhz etc.

The reason for my interest with this project basically is to further my understanding of Hardware Development.
While learning far more about the Software side of the mix.

Update's
Looking for some help from members with the PSX Side programming.
~8/18/2015~
*SPI protocol and implementation via psyq and possibly kernel.
*Write a lib for GamePad SPI

Work Log:
~8/14/2015~
10:40 AM EST:
*Began Initial projects source's
*Pinout PSX PAD Port
*Started building the interfacing board on breadboard.

~8/15/2015~
11:25 AM EST:
*Planning Interface board with Buffer; Forgot to draw in the state control lines between both MCP23S08's
Image

5:55PM EST:
*Borked my serial cable. I'm building a new one atm...
*Working on the arduino side of the trio. Thanks shendo for the arduino mc source, its very helpful.
*Setup VS2013 pc side for arduino link to psx.
*PSX code is bare atm.

~8/18/2015~
3:25PM EST:
*New Serial Cable ^^
*Testing new hardware design - Direct to Parallax P8X32A
*Fixing prop-gcc to work after ide upgrade...
*Pics soon ^^
Serial Cable Pics:
Image
Image
I found some MCP2221 ic's in my parts box ^^, simple and quick 5v serial cable lol. The MCP2221 also has an i2c master bus.

~8/19/2015~
*Sticking with Arduino for now, testing purposes.
*Arduino Source setup for direct to GP port testing.
*PSX PAD to SPI Pinout

Code: Select all


                  PAD

        ----------------------- 

       | o o o | o o o | o o o |           (front view)

        \______|_______|______/ 

 pin No. 9 8 7   6 5 4   3 2 1

PinPAD	PinSPI

1		MISO
2		MOSI
6		SS
7		CLK
9		MCU GPIO ACK Simulate
~8/21/2015~
*Presents ^o^!! My 256 and 512KB bios replacements got here today.
Image
Image
Last edited by CyrusDevX on August 22nd, 2015, 12:15 am, edited 6 times in total.

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » August 19th, 2015, 10:16 pm

Jeesus, you really do work fast...
Gimme a nudge if I can be of any help =)

User avatar
CyrusDevX
Active PSXDEV User
Active PSXDEV User
Posts: 47
Joined: Aug 07, 2015

Post by CyrusDevX » October 3rd, 2015, 6:00 am

I started over with a cpld cuz i figured doing all the hardware "static" allows me to use almost all control directly from the ps1; xc2c64a is the xilinx chip im using. its got enough to handle the ps1's gameport and breakout into a std spi master bus to handle multiple spi devices at once.

Code: Select all

------------------------------------------------------------------------------------------
-- Developer: 			CyrusDevX
-- 
-- Create Date:    	13:02:37 10/02/2015 
-- Design Name: 		PSX gpSPI
-- Module Name:    	gpSPI - GamePort 
-- Project Name: 		gpSPI
-- Target Devices: 	Local HW is XC2C64A-7VQ44
--
-- Description: gpSPI is a hardware interface device based around the xilinx XC2C64(A).
-- gpSPI was developed specifically to be used with the Sony Playstation / PSone. The
-- hardware is connected to either PS's GamePad ports.
--
-- Dependencies: Any XC2C64 boards should work fine. ISE 14.7 WebPack.
--
-- Revision: 			0.01
------------------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

entity gpSPI is
	 generic (
		slaves  : integer := 4;  --number of spi slaves
		d_width : integer := 8); --bus width
    Port ( 
			 DAT : in   STD_LOGIC;
			 CMD : out  STD_LOGIC;
			 SEL : out  STD_LOGIC;
			 CLK : out  STD_LOGIC;
			 ACK : in   STD_LOGIC
			 );
end gpSPI;

architecture GamePort of gpSPI is
type gpPort is(ready, execute);
signal state 			: gpPort;
signal sioOutBuffer	: STD_LOGIC_VECTOR(d_width-1 downto 0);
signal sioInBuffer	: STD_LOGIC_VECTOR(d_width-1 downto 0);
signal clk_ratio   	: integer;
signal clk_toggles 	: integer range 0 to d_width*2 + 1;
signal lastbitIn		: integer range 0 to d_width*2;

begin


end GamePort;


		
thats all i got for the moment, busy with some hw.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests