logo elektroda
logo elektroda
X
logo elektroda
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

Jak przerobić pad SCPH-1080 na Bluetooth z zasilaniem AAA?

Trzyzet 16 Sie 2010 16:45 2398 1
  • #1 8404306
    Trzyzet
    Poziom 23  
    Posty: 613
    Pomógł: 35
    Ocena: 61
    Witam, chciałem napisać temat ze względu na dużą liczbę osób znających się na elektronice, zaglądających na forum. Znalazłem temat autorstwa MasterMatan'a, który opisuje projekt opensource'owego pada na interfejs bluetooth. Nie ma tam żadnych konkretów. Ja chciałem żeby wyżej wymieniony pad:

    1. Działał na interfejs BT (może być nawet najwolniejszy, oby moduł BT był jak najtańszy)
    2. Zmieścił się w obudowie pada od psx (tego bez gałek analogowych) - model SCPH-1080
    3. Zasilany był jednym, bądź dwoma akumulatorkami wielkości AAA (może też być akumulator od telefonu)
    4. Był uniwersalny (obsługa w systemie windows (mobile też) jak i symbian, Android, Maemo etc.)
    5. Miał wszystkie działające klawisze (czyli D-Pad + 10 konfigurowalnych dowolnie przycisków)
    6. nie trzeba było rozpruwać obudowy, topić ją itp.
    7. Ładował się przez jakikolwiek port (Mini USB, ładowarka od N3310 itp.)
    8. Miał jak najmniejszą ingerencja w płytkę pada (próba dorobienia tylko kontrolera oraz modułu BT)
    9. Miał możliwość zamocowania do telefonu (coś jak mini klawiatura do PS3, tylko metalowe)

    Nie chodzi mi o to, żeby podawać gotowe rozwiązania, lecz o komentarze dotyczące projektu ;) Ponadto, znalazłem w jaki sposób podawane są sygnały do i z konsoli.

    Oto i one:

    Pin Name Description
    1 DATA Data
    2 CMD Command
    3 +7.6V Dualshock and Dualshock 2 uses this for powering vibro-motors. Voltage on PS2 is 7.6V, however many sites says it's 9V. But it will work on 9V too. (ten jest nie potrzebny, ten pad nie ma wibracji)
    4 GND Ground
    5 VCC Vcc
    6 ATT ATT select
    7 CLK Clock
    8 N/C Not connected
    9 ACK Acknowledge

    PSX Signals descriptions:

    1. DATA:
    Signal from Controller to PSX.
    This signal is an 8 bit serial transmission synchronous to the falling edge of clock (That is both the incoming and outgoing signals change on a high to low transition of clock. All the reading of signals is done on the leading edge to allow settling time.)
    2. COMMAND:
    Signal from PSX to Controller.
    This signal is the counter part of DATA. It is again an 8 bit serial transmission on the falling edge of clock.
    3. VCC:
    VCC can vary from 5V down to 3V and the official SONY Controllers will still operate. The controllers outlined here really want 5V.
    The main board in the PSX also has a surface mount 750mA fuse that will blow if you try to draw to much current through the plug (750mA is for both left, right and memory cards).
    4. ATT:
    ATT is used to get the attention of the controller.
    This signal will go low for the duration of a transmission. I have also seen this pin called Select, DTR and Command.
    CLOCK:
    Signal from PSX to Controller.
    Used to keep units in sync.
    5. ACK:
    Acknowledge signal from Controller to PSX.
    This signal should go low for at least one clock period after each 8 bits are sent and ATT is still held low. If the ACK signal does not go low within about 60 us the PSX will then start interogating other devices.

    The PSX Controller Signals:

    All transmissions are eight bit serial LSB first. All timing in the PSX controller bus is syncronous to the falling edge of the clock. One byte of the transmissions will look kinda like this.

    transmisja


    The logic level on the data lines is changed by the transmitting device on the falling edge of clock. This is then read by the receiving device on the leading edge (at the points marked *) allowing time for the signal to settle. After each COMMAND is recieved by a selected controller, that controller needs to pull ACK low for at least one clock tick. If a selected controller does not ACK the PSX will assume that there is no controller present.

    When the PSX wants to read information from a controller it pulls that devices ATT line low and issues a start command (0x01). The Controller Will then reply with its ID (0x41=Digital, 0x23=NegCon, 0x73=Analogue Red LED, 0x53=Analogue Green LED). At the same time as the controller is sending this ID byte the PSX is transmitting 0x42 to request the data. Following this the COMMAND line goes idle and the controller transmits 0x5A to say "here comes the data".
    This would look like this for a digital controller

    PSX Controller Data 1,2,3

    The data transmision for a digital controller would look like this (where A0,A1,A2...B6,B7 are the data bits in the two bytes).

    PSX Controller Data 4,5

    Below are five tables that show the actual bytes sent by the controllers
    PSX Controller Data

    Below are five tables that show the actual bytes sent by the controllers

    Standard Digital Pad (czyli mój SCPH-1080...)

    Tekst ze strony http://www.gamesx.com/controldata/psxcont/psxcont.htm

    Czyli jak widać, przerabiając sterownik do PC i pisząc program na odpowiednią platformę można osiągnąć zamierzony cel: Zrobić miłego dla ręki pada za dosyć niewielkie pieniądze, w porównaniu do np. MSI BGP100 (160zł wzwyż).

    Liczę na pozytywne komentarze. Moderator usunął już ten temat bo wyszło lekkie nieporozumienie. Znalazłem już bardzo dużo na ten temat. Jak myślicie: według was warto się za to zabierać? Na stronce, gdzie są pokazane dane przesyłane przez pada jest jeszcze układ emulujący pada. Temat niech zostanie, przyda się - lubię gubić dane :P
  • #2 8432095
    mkpl
    Poziom 37  
    Posty: 5674
    Pomógł: 306
    Ocena: 858
    Teoretycznie się da. Co za problem podpiąć ATmege8 która będzie zamieniać info z pada na RS232 czy z jakim tam działa Bluetooth (moduł) oraz napisać program pod daną platformę czy to Android czy Windows Mobile tak aby interpretowała sygnały z pada na sygnały klawiatury.
    Może i będą niewielkie pieniądze ale musisz się wykazać wiedzą i umiejętnościami
REKLAMA