› Foros › Retro y descatalogado › Consolas clásicas
apietoteae escribió:acabo de hablar con mi profesor de electronica y me ha comentado que lo idoneo seria incorporarle un decodificador de 2 entradas y 4 salidas a nivel bajo (ya que tengo entendido que las entradas de movimiento van a 0), y que cada salida del decodificador las envie a la pista del mando para que al usarla envie una señal de 0.
¿que opinais de este metodo? pienso que podria ser el idoneo
apietoteae escribió:mmm tengo entonces varias opciones que elegir, me insistis en que lo idoneo es transformarlo de analogico a digital.
¿que deberia hacer para pasarlo a digital?
apietoteae escribió:acabo de hablar con mi profesor de electronica y me ha comentado que lo idoneo seria incorporarle un decodificador de 2 entradas y 4 salidas y que cada salida del decodificador las envie a la pista del mando para que al usarla envie la señal equivalente
bertobp escribió:Cambia de instituto... madre mia...
apietoteae escribió:¿que arias tu para insertarselo? (preferiblemente el metodo barato jejeje)
apietoteae escribió:gracias bertobp
para ser totalmente preciso, ¿como debo de medirlo los valores con el polimetro?
entonces, si lo ves correcto, podria comprarme 2 transistores npn como me comentas mañana mismo y aver si podemos insertarle el stick
apietoteae escribió:estupendo, hoy mismo te digo los datos
pd: en que posicion he de poner el polimetro para medir dichos valores? (no sabeis la verguenza que me da haceros tantas preguntas, y se supone que deveria yo ya de dominar todos estos temas.... asi de bien me estan enseñando en mi grado)
apietoteae escribió:es una lastima que esto se haya quedado tan parado jejeje
el Dr Katz escribió:Buenas,
Gracias @salvor70
Al final cómo quedó el asunto? Esta semana me he animado y ya tengo el emisor 100% funcional y el receptor de aquella manera . Tengo problemas con los botones que comparten pin como A/B y C/Start. Por más que compruebo el estado del pin SELECT siempre está en alto .
Alguna idea?
Saludos
el Dr Katz escribió:Buenas,
Gracias @salvor70
Al final cómo quedó el asunto? Esta semana me he animado y ya tengo el emisor 100% funcional y el receptor de aquella manera . Tengo problemas con los botones que comparten pin como A/B y C/Start. Por más que compruebo el estado del pin SELECT siempre está en alto .
Alguna idea?
Saludos
apietoteae escribió:el Dr Katz escribió:Buenas,
Gracias @salvor70
Al final cómo quedó el asunto? Esta semana me he animado y ya tengo el emisor 100% funcional y el receptor de aquella manera . Tengo problemas con los botones que comparten pin como A/B y C/Start. Por más que compruebo el estado del pin SELECT siempre está en alto .
Alguna idea?
Saludos
¿estas creando un mando inalambrico de megadrive? eso yo no me lo pierdo
me gustaria "aportar" algo en lo que estoy trabajando, no es tan grande como un mando inalambrico pero no deja de ser curioso, vereis recuerdo que en este hilo mencione la idea de crear un joystick para un mando de megadrive, pues quiero enseñaros algo
el joystick funciona correctamente con un manejo suave y fluido, solo me falta "fabricarle" una carcasa como dios manda, aunque habia pensado en dejarle el diseño original del mando de megadrive y acoplarle un simple porta joystick (como los que tienen los mandos de psx, game cube, etc)
compañero, si dejas un tutorial especificando como has conseguido realizar un mando inhalambrico de megadrive a este de aqui lo arias muuuuuy feliz
es mas, tenia pensado realizar un paso mas, tenia pensado usar un mando de 6 botones de megadrive, crearle 2 joystick y crear un juego para megadrive que aproveche dicha jugabilidad estilo binding os isaac (si, soy como el cuento de la lechera ), pero si dejas un tutorial de como has hecho el mando inalambrico tambien le añadiria dicha funcion, creando un mando de megadrive bastante interesante
mucha suerte en tu proyecto y espero que consigas terminarlo satisfactoriamente
el Dr Katz escribió:Buenas,
La señal SELECT (en la parte consola) no la genero yo, de ahí el problema. Cada vez que mando la pulsación del botón (por ejemplo) Start/C la consola actúa como si los hubiera presionado a la vez, lo mismo con A/B.
Saludos
christian14 escribió:Hostia, ya no me acordaba de esto jajajaja
Yo también estuve en el meollo dando ideas. No sé que te pasa, voy a leerme a ver cuál es tu problema concreto, pero sin leer creo que sé cual es: la señal de select va "demasiao rápido". He acertado, a que si?
AkrosRockBell escribió:christian14 escribió:Hostia, ya no me acordaba de esto jajajaja
Yo también estuve en el meollo dando ideas. No sé que te pasa, voy a leerme a ver cuál es tu problema concreto, pero sin leer creo que sé cual es: la señal de select va "demasiao rápido". He acertado, a que si?
En eso estamos concretamente, en la señal de SELECT, a ver como puede hacer para leerla bien xP
el Dr Katz escribió:Buenas,
Voy a probar con un arduino due que tengo... este es más apañado al incorporar un ARM en las tripas.
Saludos
christian14 escribió:, a pesar de usar una interfaz serie DB-9,
christian14 escribió:el Dr Katz escribió:Buenas,
Voy a probar con un arduino due que tengo... este es más apañado al incorporar un ARM en las tripas.
Saludos
No te preocupes por lo que te dije de la velocidad de permutación de 1 a 0, he leido que es como mucho de 60 Hz (la establece el juego que le pongas a la mega). Con el Uno vas que te matas.
Me he estado empapando del tema de nuevo, que ya se me había olvidao casi to jajaja. Para empezar, pensaba que el mando, a pesar de usar una interfaz serie DB-9, tenía un protocolo propio, pero que va, es el estándar de la época. Otra cosa que también he leído es que la MD puede hacer hasta tres peticiones de recogida de datos para mapear el mando completo en el caso de los mandos de 6 botones (en la tercera iteración de la señal SELECT, se recogen los botones X, Y y Z).
Pero bueno, todo esto son más curiosidades que otra cosa. Lo que realmente me ayudaría a echarte un cable sería que postearas el código que cargas en el Arduino, así puedo/podemos ver qué puede estar fallando.
const int PIN_UP_UP = 2;
const int PIN_DOWN_DOWN = 3;
const int PIN_GND_LEFT = 4;
const int PIN_GND_RIGHT = 5;
const int PIN_A_B = 6;
const int PIN_START_C = 7;
const int PIN_SELECT = 8;
void setup() {
// put your setup code here, to run once:
pinMode(PIN_UP_UP, OUTPUT);
pinMode(PIN_DOWN_DOWN, OUTPUT);
pinMode(PIN_GND_LEFT, OUTPUT);
pinMode(PIN_GND_RIGHT, OUTPUT);
pinMode(PIN_A_B, OUTPUT);
pinMode(PIN_START_C, OUTPUT);
pinMode(PIN_SELECT, INPUT);
digitalWrite(PIN_UP_UP, HIGH);
digitalWrite(PIN_DOWN_DOWN, HIGH);
digitalWrite(PIN_GND_LEFT, HIGH);
digitalWrite(PIN_GND_RIGHT, HIGH);
digitalWrite(PIN_A_B, HIGH);
digitalWrite(PIN_START_C, HIGH);
}
void loop() {
if (digitalRead(PIN_SELECT) == LOW) {
digitalWrite(PIN_START_C, LOW);
delay(3);
digitalWrite(PIN_START_C, HIGH);
delay(100);
}
}
sd-snatcher escribió:christian14 escribió:, a pesar de usar una interfaz serie DB-9,
Para evitar confusiones a gente que pudiera leerlo. No es "interfaz serie DB9" es "conector DB9" a secas. El que se use ese conector en los conectores serie es solo por que eran la opcion mas barata pero hay cientos de uso para ese tipo de conector que no tienen nada que ver con ser "serie". De hecho en este caso y en el de casi todos los mandos de 8 bit (msx , atari, commodore) es una conexion en paralelo. De hecho era bastante absurdo que se usase este conector para serie ya que se desperdician la mayoria de patillas, pero como se fabricaban a muy gran escala salian muy baratos.
el Dr Katz escribió:
Sí, lo de los 6 botones ya lo había léido . Te pongo lo que estoy probando para simular la pulsación del botón START.const int PIN_UP_UP = 2;
const int PIN_DOWN_DOWN = 3;
const int PIN_GND_LEFT = 4;
const int PIN_GND_RIGHT = 5;
const int PIN_A_B = 6;
const int PIN_START_C = 7;
const int PIN_SELECT = 8;
void setup() {
// put your setup code here, to run once:
pinMode(PIN_UP_UP, OUTPUT);
pinMode(PIN_DOWN_DOWN, OUTPUT);
pinMode(PIN_GND_LEFT, OUTPUT);
pinMode(PIN_GND_RIGHT, OUTPUT);
pinMode(PIN_A_B, OUTPUT);
pinMode(PIN_START_C, OUTPUT);
pinMode(PIN_SELECT, INPUT);
digitalWrite(PIN_UP_UP, HIGH);
digitalWrite(PIN_DOWN_DOWN, HIGH);
digitalWrite(PIN_GND_LEFT, HIGH);
digitalWrite(PIN_GND_RIGHT, HIGH);
digitalWrite(PIN_A_B, HIGH);
digitalWrite(PIN_START_C, HIGH);
}
void loop() {
if (digitalRead(PIN_SELECT) == LOW) {
digitalWrite(PIN_START_C, LOW);
delay(3);
digitalWrite(PIN_START_C, HIGH);
delay(100);
}
}
Con este código consigo simular la pulsación del botón C (que no debería al estar en LOW). No se cuantos saltos y volteretas lleva ya el pobre de Sonic
Saludos
el Dr Katz escribió:Buenas,
El mando lo controlo correctamente, envío los botones pulsados al receptor y éste los recibe perfectamente. Como dije ayer, de la manera que lo tengo ahora, puedo jugar al Sonic correctamente con el mando inalámbrico, ya que A y B realizan la misma función.
Saludos
void loop(){
/*Lecturas de todos los botones con digitalRead*/
vectorMando = [0,0,0,0,0,0,0,0,0];
vectorMando[0] = Up;
vectorMando[1] = Down;
vectorMando[2] = (Left && SELECT);
vectorMando[3] = (Right && SELECT);
// vectorMando[4] = No tienes por qué setearlo a ningún valor, es la entrada de 5V
vectorMando[5] = (A && !SELECT) || (B && SELECT);
vectorMando[6] = SELECT
// vectorMando[7] = Nada, GND
vectorMando[8] = (Start && !SELECT) || (C && SELECT);
delay(1); //Delay mínimo para no saturar el puerto.
}
============================================
= Sega Six Button Controller Hardware Info =
============================================
Source: http://www.cs.cmu.edu/~chuck/infopg/segasix.txt
Author: Charles Rosenberg, chuck@cs.cmu.edu
Version: 1.0
Last Update: 9/9/96
==========
Background
==========
A couple of months ago I was looking for a cheap, robust, hand held
controller for a project I was working on. The controller for the
Sega Genesis was the perfect choice because it was ready available and
had a standard DB-9 connector for interfacing instead of the
proprietary connectors used on the controllers for a lot of the newer
game systems. I was able to find interface info for the 3 button
controller, but I could not find any information about accessing the
X, Y, and Z buttons on the newer 6 button controllers. A little
reverse engineering uncovered the necessary info. This document
describes how to interface to a 6 button Sega Genesis Controller.
============
Introduction
============
The controller for the Sega Genesis is a hand held controller useful
for many applications. It has a joypad, a start button, and action
buttons. Another big advantage is that it has a standard DB-9
connector for interfacing instead of a proprietary connector. The
original version of the controller has three action buttons, labeled:
A, B, and C. The original version was easy to interface to. Newer
versions of controller have six buttons, the original three and three
new ones, labeled: X, Y, and Z. The newer version is a little more
tricky.
======================
Three Button Interface
======================
The interface for the original three button controller is relatively
simple. (I know that it has been described elsewhere, but I think
that this description is more straightforward.) You can open up the
controller and see that a standard quad 2:1 multiplexer chip is
inside, a 74HC157. A 2:1 multiplexer directs data from one of two
sources to a single input line based on the state of a select signal.
So, theoretically, this chip would allow 8 signals to be sent over 4
data lines. The way the Genesis uses this chip, the data from the 8
switches in the controller is sent over 6 data lines, not quite the
most economical solution, but one which makes the controller backwards
compatible with Atari 2600 joysticks.
Inside the controller is a small PC board which contains the 74HC157,
some 10K pull-up resistors and some bypass capacitors. The switches
are connected so when a switch is pressed (closed) it shorts its
output to ground, otherwise it's output is 5 volts (via the pull-up
resistors). One additional connection is a pull-up resistor on the
select line. If it is left unconnected it will be "pulled" high.
The following tables summarize how the signals are mapped to DB-9.
The output signal to a particular pin depends on the state of the
select line from the Genesis. During a standard game, the processor
will set the select line high or low, depending on the which game
controller buttons it wants to read.
This table lists connections which are outputs from the Genesis to the
controller, the first column is the pin number of the DB-9:
Pin Connection
--- ---------------
5 Power: +5 Volts
7 Select signal
8 Power: Ground
This table lists connections which are outputs from the controller to
the Genesis and are dependent on the logic level to the select signal,
again the first column is the pin of number the DB-9:
Pin Connection with select low Connection with select high
--- -------------------------- ---------------------------
1 joypad up signal joypad up signal
2 joypad down signal joypad down signal
3 logic low (ground) joypad left signal
4 logic low (ground) joypad right signal
6 Button A signal Button B signal
9 Start button signal Button C signal
Notice that the signals on pins 1 and 2 are not affected by the select
signal, there is a direct connection from those switches to the
corresponding pins. Also notice that signals on pins 3 and 4 are not
used to send switch info when select is low.
If you monitor the select signal to the controller on an oscilloscope
while playing a game on the Genesis, it will look something like this:
5V ---+ +-------------+ +-------------+ +---
| | | | | |
0V |_| |_| |_|
The low time of the signals is not drawn to scale with the period of
the signals. However, notice that the signal is mostly in one state
(high), and then is low (inverted) for a short period. A typical game
may sample the controller at 60 Hz, resulting in a period of 16.7
milliseconds. The low time for a select signal pulse might be around
20 microseconds. The timing can vary significantly from game to game.
The basic reason for this pulse pattern, is that every so often, the
game will call a routine which reads the state of the controller.
This routine will bring the select signal low and then record those
values and the bring it back to its default state.
That sums up the three button controller, now on to the new stuff.
====================
Six Button Interface
====================
The three button controller description was just a preamble for the
six button controller. When you open up the six button controller,
you notice a bunch of differences in the circuit besides the three
new buttons. The simple one is the addition of a fourth button which
acts as a mode select and tells the controller to be compatible with
three button controller games. The ugly one is that the nice standard
HC157 has been replaced with a custom chip (a microcontroller, a GAL?)
and most of the pull-up resistors are gone. So instead of being able
to trace out the circuit, you have to resort to the oscilloscope (or
logic analyzer) and see what the signals are doing while playing a
game that uses the additional three buttons. My test subject was MK3.
So why did Sega go to all of this trouble of replacing a nice simple
logic chip with a custom IC? Did they have too much time and money on
their hands? (Of course that is a possibility.) No, the reason seems
to be backwards compatibility. As the descriptions following I hope
will show, the new controller is designed to be compatible with almost
all three button games, without the use of the mode select switch.
Some quick probing on the circuit board reveals that the pull-up
resistors for the switches have moved inside the chip and all of the
switches still output a logic low when pressed. The pull-up for the
select signal still exists as a discrete resistor. There are also
some additional capacitors for power supply filtering and generating
the clock signal for the custom chip.
If you monitor the select signal generated during a game, you will see
something like the following:
5V ---+-+-+-+-------------+-+-+-+-------------+-+-+-+---
| | | | | | | | | | | |
0V | | | | | | | | | | | |
The amount of time between the start one of these pulse groups and the
next is about 16.6 milliseconds or 60 Hz. In my interfacing
experiments I have successfully used 33.3 milliseconds or 30 Hz.
A closer examination of the pulse groups on the select line:
5V ---+ +-+ +-+ +-+ +-----------------------------------
| | | | | | | |
0V |_| |_| |_| |_|
The period of these signals for MK3 was about 27.6 microseconds. That
is the high or low time for the pulses was 13.8 microseconds. In my
interfacing experiments I successfully used a signal with a 200
microsecond period, 100 microsecond high or low time. I suspect that
there is some maximum period length associated with a time-out in the
custom chip, but I have not investigated what that is.
Interesting things reveal themselves if you monitor pin 3 of the DB-9
with the X button pressed:
5V ---+ +-+ +-+ +-------------------------------------
| | | | | |
0V |_| |_| |___|
And if you monitor pin 3 of the DB-9 with the X button NOT pressed:
5V ---+ +-+ +-+ +---------------------------------------
| | | | | |
0V |_| |_| |_|
Now what Sega has done can be deciphered. To obtain the new button
data, a series of pulses needs to be sent to the controller on the
select line. For the first two pulses, the controller responds in the
same way as a three button controller. However, immediately after the
third pulse goes from low to high, the controller will output new data
on existing data lines. You can think of this as a new value for the
select line: Low, High, and what I will call Pulse-3. The fourth
pulse resets the controller to compatible mode.
The updated table with the third select state is as follows, the first
two columns are the same as the three button case:
Pin Select: low Select: high Select: pulse-3
--- ------------ ------------ ---------------
1 joypad up joypad up button Z
2 joypad down joypad down button Y
3 logic low joypad left button X
4 logic low joypad right
6 button A button B
9 start button button C
This table does not change from the three button controller case:
Pin Connection
--- ---------------
5 Power: +5 Volts
7 Select signal
8 Power: Ground
So what about compatibility? Under normal circumstances this system
maintains compatibility. So what's the use of the "compatibility"
mode switch? Obviously the controller could be fooled if some games
do strange things with the select line. Some game code might not poll
and store the state of the controller, if game code accesses the
controller throughout its code, then unpredictable pulse trains could
be sent to the controller which put it in "pulse-3" mode. And how
about games that aren't compatible no matter what? My guess is that
that has to do with the speed of the custom chip. Because the three
button version uses a discrete logic chip, the outputs of the
multiplexer can react to the state of select line in a matter of
nanoseconds. However a little microprocessor or a slowly clocked
state machine made from custom logic would not be able to respond as
quickly, causing incompatibility problems if code was written to
assume instantaneous response on the select line.
==========
Conclusion
==========
So interfacing is not that difficult after all if you are interfacing
the controller to a microprocessor of some sort. In my case it was a
68332 running Lisp. I highly recommend the controller it packs a lot
of punch in a small price and the DB-9 interface makes it easily
replaceable if it goes bad. Have fun interfacing.
el Dr Katz escribió:Buenas,
Hasta el viernes no voy a poder volver a probar, aunque estaré por aquí. Dejo este documento que explica cosas bastante interesantes, como que la señal SELECT en LOW está nada más y nada menos que unos 20 microsegundos (ahí es ná ).============================================
= Sega Six Button Controller Hardware Info =
============================================
Source: http://www.cs.cmu.edu/~chuck/infopg/segasix.txt
Author: Charles Rosenberg, chuck@cs.cmu.edu
Version: 1.0
Last Update: 9/9/96
==========
Background
==========
A couple of months ago I was looking for a cheap, robust, hand held
controller for a project I was working on. The controller for the
Sega Genesis was the perfect choice because it was ready available and
had a standard DB-9 connector for interfacing instead of the
proprietary connectors used on the controllers for a lot of the newer
game systems. I was able to find interface info for the 3 button
controller, but I could not find any information about accessing the
X, Y, and Z buttons on the newer 6 button controllers. A little
reverse engineering uncovered the necessary info. This document
describes how to interface to a 6 button Sega Genesis Controller.
============
Introduction
============
The controller for the Sega Genesis is a hand held controller useful
for many applications. It has a joypad, a start button, and action
buttons. Another big advantage is that it has a standard DB-9
connector for interfacing instead of a proprietary connector. The
original version of the controller has three action buttons, labeled:
A, B, and C. The original version was easy to interface to. Newer
versions of controller have six buttons, the original three and three
new ones, labeled: X, Y, and Z. The newer version is a little more
tricky.
======================
Three Button Interface
======================
The interface for the original three button controller is relatively
simple. (I know that it has been described elsewhere, but I think
that this description is more straightforward.) You can open up the
controller and see that a standard quad 2:1 multiplexer chip is
inside, a 74HC157. A 2:1 multiplexer directs data from one of two
sources to a single input line based on the state of a select signal.
So, theoretically, this chip would allow 8 signals to be sent over 4
data lines. The way the Genesis uses this chip, the data from the 8
switches in the controller is sent over 6 data lines, not quite the
most economical solution, but one which makes the controller backwards
compatible with Atari 2600 joysticks.
Inside the controller is a small PC board which contains the 74HC157,
some 10K pull-up resistors and some bypass capacitors. The switches
are connected so when a switch is pressed (closed) it shorts its
output to ground, otherwise it's output is 5 volts (via the pull-up
resistors). One additional connection is a pull-up resistor on the
select line. If it is left unconnected it will be "pulled" high.
The following tables summarize how the signals are mapped to DB-9.
The output signal to a particular pin depends on the state of the
select line from the Genesis. During a standard game, the processor
will set the select line high or low, depending on the which game
controller buttons it wants to read.
This table lists connections which are outputs from the Genesis to the
controller, the first column is the pin number of the DB-9:
Pin Connection
--- ---------------
5 Power: +5 Volts
7 Select signal
8 Power: Ground
This table lists connections which are outputs from the controller to
the Genesis and are dependent on the logic level to the select signal,
again the first column is the pin of number the DB-9:
Pin Connection with select low Connection with select high
--- -------------------------- ---------------------------
1 joypad up signal joypad up signal
2 joypad down signal joypad down signal
3 logic low (ground) joypad left signal
4 logic low (ground) joypad right signal
6 Button A signal Button B signal
9 Start button signal Button C signal
Notice that the signals on pins 1 and 2 are not affected by the select
signal, there is a direct connection from those switches to the
corresponding pins. Also notice that signals on pins 3 and 4 are not
used to send switch info when select is low.
If you monitor the select signal to the controller on an oscilloscope
while playing a game on the Genesis, it will look something like this:
5V ---+ +-------------+ +-------------+ +---
| | | | | |
0V |_| |_| |_|
The low time of the signals is not drawn to scale with the period of
the signals. However, notice that the signal is mostly in one state
(high), and then is low (inverted) for a short period. A typical game
may sample the controller at 60 Hz, resulting in a period of 16.7
milliseconds. The low time for a select signal pulse might be around
20 microseconds. The timing can vary significantly from game to game.
The basic reason for this pulse pattern, is that every so often, the
game will call a routine which reads the state of the controller.
This routine will bring the select signal low and then record those
values and the bring it back to its default state.
That sums up the three button controller, now on to the new stuff.
====================
Six Button Interface
====================
The three button controller description was just a preamble for the
six button controller. When you open up the six button controller,
you notice a bunch of differences in the circuit besides the three
new buttons. The simple one is the addition of a fourth button which
acts as a mode select and tells the controller to be compatible with
three button controller games. The ugly one is that the nice standard
HC157 has been replaced with a custom chip (a microcontroller, a GAL?)
and most of the pull-up resistors are gone. So instead of being able
to trace out the circuit, you have to resort to the oscilloscope (or
logic analyzer) and see what the signals are doing while playing a
game that uses the additional three buttons. My test subject was MK3.
So why did Sega go to all of this trouble of replacing a nice simple
logic chip with a custom IC? Did they have too much time and money on
their hands? (Of course that is a possibility.) No, the reason seems
to be backwards compatibility. As the descriptions following I hope
will show, the new controller is designed to be compatible with almost
all three button games, without the use of the mode select switch.
Some quick probing on the circuit board reveals that the pull-up
resistors for the switches have moved inside the chip and all of the
switches still output a logic low when pressed. The pull-up for the
select signal still exists as a discrete resistor. There are also
some additional capacitors for power supply filtering and generating
the clock signal for the custom chip.
If you monitor the select signal generated during a game, you will see
something like the following:
5V ---+-+-+-+-------------+-+-+-+-------------+-+-+-+---
| | | | | | | | | | | |
0V | | | | | | | | | | | |
The amount of time between the start one of these pulse groups and the
next is about 16.6 milliseconds or 60 Hz. In my interfacing
experiments I have successfully used 33.3 milliseconds or 30 Hz.
A closer examination of the pulse groups on the select line:
5V ---+ +-+ +-+ +-+ +-----------------------------------
| | | | | | | |
0V |_| |_| |_| |_|
The period of these signals for MK3 was about 27.6 microseconds. That
is the high or low time for the pulses was 13.8 microseconds. In my
interfacing experiments I successfully used a signal with a 200
microsecond period, 100 microsecond high or low time. I suspect that
there is some maximum period length associated with a time-out in the
custom chip, but I have not investigated what that is.
Interesting things reveal themselves if you monitor pin 3 of the DB-9
with the X button pressed:
5V ---+ +-+ +-+ +-------------------------------------
| | | | | |
0V |_| |_| |___|
And if you monitor pin 3 of the DB-9 with the X button NOT pressed:
5V ---+ +-+ +-+ +---------------------------------------
| | | | | |
0V |_| |_| |_|
Now what Sega has done can be deciphered. To obtain the new button
data, a series of pulses needs to be sent to the controller on the
select line. For the first two pulses, the controller responds in the
same way as a three button controller. However, immediately after the
third pulse goes from low to high, the controller will output new data
on existing data lines. You can think of this as a new value for the
select line: Low, High, and what I will call Pulse-3. The fourth
pulse resets the controller to compatible mode.
The updated table with the third select state is as follows, the first
two columns are the same as the three button case:
Pin Select: low Select: high Select: pulse-3
--- ------------ ------------ ---------------
1 joypad up joypad up button Z
2 joypad down joypad down button Y
3 logic low joypad left button X
4 logic low joypad right
6 button A button B
9 start button button C
This table does not change from the three button controller case:
Pin Connection
--- ---------------
5 Power: +5 Volts
7 Select signal
8 Power: Ground
So what about compatibility? Under normal circumstances this system
maintains compatibility. So what's the use of the "compatibility"
mode switch? Obviously the controller could be fooled if some games
do strange things with the select line. Some game code might not poll
and store the state of the controller, if game code accesses the
controller throughout its code, then unpredictable pulse trains could
be sent to the controller which put it in "pulse-3" mode. And how
about games that aren't compatible no matter what? My guess is that
that has to do with the speed of the custom chip. Because the three
button version uses a discrete logic chip, the outputs of the
multiplexer can react to the state of select line in a matter of
nanoseconds. However a little microprocessor or a slowly clocked
state machine made from custom logic would not be able to respond as
quickly, causing incompatibility problems if code was written to
assume instantaneous response on the select line.
==========
Conclusion
==========
So interfacing is not that difficult after all if you are interfacing
the controller to a microprocessor of some sort. In my case it was a
68332 running Lisp. I highly recommend the controller it packs a lot
of punch in a small price and the DB-9 interface makes it easily
replaceable if it goes bad. Have fun interfacing.
Fuente: http://www.cs.cmu.edu/~chuck/infopg/segasix.txt
Saludos
DiGiCharatFan escribió:En codigos que he visto se cambia el select cada 20ms.
Si se usa un 6 botones este no trabaja en 2 tiempos sino en 3, para el 3r tiempo recoge los 3 botones de mas (X, Y, Z) ademas que al enchufarlo da Up, Down para indicar que se ha conectado un 6 botones...
Me he basado en el siguiente link, aunque hace tiempo que lo leí creo que os puede ayudar, seguramente ya habreis llegado a él en alguna búsqueda: http://jonthysell.com/2014/07/26/readin ... h-arduino/
También hay otra, buscad en google "build a jamma test rig" y es un PDF, en este caso es todo por hardware pero sólo para convertir la señal a db9:db15 para un supergun, pero para el caso puede servir y te ahorras la arduino, no es mas que el uso de 2 (o sólo 3 para dobles) multiplexores deshaciendo lo que hace el 74C157. Para el SELECT usa un timer 555 y un cristal de 100hz (creo... lo estoy escribiendo de memoria...) y añado un algo que no recuerdo para estabilizar la señal, pero creo que sólo usa para 3 botones en este documento.
A ver si os puede servir... yo estaba pensando en hacer un adaptador db15 para mi supergun y de ahí la documentación.. Para arduino podeis encontrar sender/reciers RF bastante economicos y que encontrareis codigo facilmente sino lo lleva ya el IDE integrado...
Saludos!
piterpan222 escribió:Cuando termines,curarte un tuto, porfavor