Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Dónde poder conseguir la placa, cómo construirla tu mismo, reparaciones, modificaciones, proyectos derivados

Moderador: jepalza

lui sal
Veroboard
Mensajes: 3
Registrado: 17 Ago 2018, 18:22

Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Mensaje por lui sal » 28 Oct 2019, 15:44

Hola chicos:

Voy a explicaros que tenéis que hacer para modificar vuestro Unamiga para poder usar los futuros cores que se creen con opción de 6 botones + Start + Menú

Antes de nada decir que todo esto ha sido idea de @benitoss (Fernando Mosquera) y que todo el merito es únicamente suyo .
Él nos dijo que modificaciones teníamos que hacer y se curró un test para comprobar su funcionamiento basándose en el trabajo realizado en sus maquinas por Victor Trucco.

https://gitlab.com/victor.trucco


Con esta modificación tendremos posibilidad de pulsación en botones ABC XYZ Start y Menú.

La modificación es muy sencilla y solo hay que soldar unos cables a los puertos db9 de joystick de nuestro unamiga

1) llevar señal de 3.3 voltios a los pines 5 del puerto db9 de ambos mandos
Imagen

Imagen

2) Puentear los pines 7 de ambos puertos db9 de los joystick al pin T13 de nuestra FPGA

Imagen



Imagen


:!: Por lo que pueda pasar (posible daño en la fpga ) no se les ocurra conectar un joystick especial de 3 botones o Ratón de 3 botones de Amiga en los puertos del joystick :!:

Decir que ya se han probado algunos cores que utilizan más de 2 botones y funcionan perfectamente (ejemplo arcade capcom gunsmoke, 3 botones) , y explicar también que esto no afecta a los antiguos cores y que los mandos norma atari/amiga funcionan perfectamente con los antiguos cores.
Última edición por lui sal el 30 Oct 2019, 20:02, editado 3 veces en total.

benitoss
PLA
Mensajes: 43
Registrado: 07 Oct 2018, 04:53

Re: Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Mensaje por benitoss » 28 Oct 2019, 18:49

Aqui teneis los cores basados en el test del UnAmiga de McLeod para probar este nuevo sistema
Para que funcione correctamente has de tener el mod hecho y por supuesto probarlo con un Joystick de Megadrive de 3 o 6 botones como los que se muestran en las siguientes imagenes

Imagen Imagen

Si corres este core en un Unamiga sin el mod hecho, veras duplicidad de botones: C+START , A+B , Right+Mode , Left+X , Down+Y y Up+Z, eso es completamente normal

Hay 2 versiones, una para probar un joysctick de 3 o 6 botones de megadrive en el puerto 1 de Joystcick y otra para testearlo en el puerto 2
Olvidaros de la parte de la izquierda donde dice Joystick 1 o 2. Los botones pertencen solo a uno de los dos dependiendo de la version que useis

tld_test_placa_unamiga_6_botones.zip
(136.45 KiB) Descargado 345 veces


Adjunto un video donde se ve como funciona
video_2019-10-28_12-51-42.mp4
(2.74 MiB) Descargado 371 veces
Última edición por benitoss el 28 Oct 2019, 19:18, editado 1 vez en total.

Monstronio
PLA
Mensajes: 25
Registrado: 01 Sep 2019, 21:59

Re: Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Mensaje por Monstronio » 28 Oct 2019, 19:10

I think it's a bad idea to use a SEGA joystick without a buffer.
Cyclone IV is not tolerant to five-volt signal levels.

benitoss
PLA
Mensajes: 43
Registrado: 07 Oct 2018, 04:53

Re: Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Mensaje por benitoss » 28 Oct 2019, 19:24

Monstronio escribió:
28 Oct 2019, 19:10
I think it's a bad idea to use a SEGA joystick without a buffer.
Cyclone IV is not tolerant to five-volt signal levels.
We do not feed the power line of 5 vol to the pin 5 of the Joystick port from any pin of the FPGA board. It is coming from the power supply directly.
We only feed 3.3 volt from the unique pin that we use for this in the FPGA board. It is connected to the pin 7 (select) of the joystick port, and it works perfectly. The select line is a LOGIC line that is necessary to set the state in the 8 machine states of the internal multiplexor included inside of the Joystick.

You have more information of the system here: https://github.com/jonthysell/SegaContr ... ontrollers

Monstronio
PLA
Mensajes: 25
Registrado: 01 Sep 2019, 21:59

Re: Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Mensaje por Monstronio » 28 Oct 2019, 19:48

I meant that if we connect the joystick to five volts, then the level of the logical unit at the output of the joystick will be five volts. I do not think that at the output of the joystick, instead of a logical unit, there will be a state Z. Especially if it's a Chinese joystick.
Adjuntos
62432744.png
62432744.png (73.81 KiB) Visto 12576 veces
Última edición por Monstronio el 28 Oct 2019, 19:58, editado 1 vez en total.

benitoss
PLA
Mensajes: 43
Registrado: 07 Oct 2018, 04:53

Re: Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Mensaje por benitoss » 28 Oct 2019, 19:57

Monstronio escribió:
28 Oct 2019, 19:48
I meant that if we connect the joystick to five volts, then the level of the logical unit will be five volts. I do not think that at the output of the joystick, instead of a logical unit, there will be a state Z. Especially if it's a Chinese joystick.
Ok, but all inputs to the FPGA Boards are in negative logic. I mean , when you press the button is Low (0) and when you release is HIGH (3.3 volt) because all inputs of the Joystick are configured in the FPGA as a pull-up state.

set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy1down
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy1fire1
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy1fire2
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy1left
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy1right
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy1up
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy2down
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy2fire1
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy2fire2
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy2left
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy2right
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to joy2up

The next diagram shows the pull-up button. The R1 and Vcc are inside the FPGA. in this case Vcc is internally generated by the FPGA and is 3.3 volt

Imagen


It is doesn't matter if the joystick is powered with 5 volt. Every Joystick acts as 6 buttons (Up Down, Left , Right , Botton 1 and Botton 2)
The 5 volt are not used to feed the buttons, It is only used to feed the pic or micro-controller that act as a multiplexer. The lines of the joystick are isolated of that 5 volt.

That is the reason why the Megadrive Joysticks works in a passive way (without any power feed in pin 5). But only buttons B and C work.

Monstronio
PLA
Mensajes: 25
Registrado: 01 Sep 2019, 21:59

Re: Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Mensaje por Monstronio » 28 Oct 2019, 21:24

works in a passive way
The Chinese guys may have their own vision on this subject ;)
I would not connect the SEGA joystick without checking.

For the first start, I still recommend connecting a joystick up to three volts. I think this is not a problem for the joystick. My keyboard and mouse work from three volts, without additional strapping.
Adjuntos
ChinaGuy.png
ChinaGuy.png (176.34 KiB) Visto 12537 veces

benitoss
PLA
Mensajes: 43
Registrado: 07 Oct 2018, 04:53

Re: Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Mensaje por benitoss » 29 Oct 2019, 01:27

Monstronio escribió:
28 Oct 2019, 21:24
works in a passive way
The Chinese guys may have their own vision on this subject ;)
I would not connect the SEGA joystick without checking.

For the first start, I still recommend connecting a joystick up to three volts. I think this is not a problem for the joystick. My keyboard and mouse work from three volts, without additional strapping.
The theory of the Megadrive joysticks and the Atari Joystick in general is that in each position or if you press a button, the pin of each position is connected to the ground pin, and you close the circuit. There is not voltage crossing between the pins and GND, it is like a simple button. It is passive !!!

Imagen

So, I recommend you test with a multi-meter the pins of the joystick in each position pressing and releasing, and you will realize what i am talking about.
Connect one extreme in pin 8 (GND) en the other extreme in any position and move the joystick.

Here you have the pinout of the Sega Megadrive Joystick connector

Imagen

Monstronio
PLA
Mensajes: 25
Registrado: 01 Sep 2019, 21:59

Re: Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Mensaje por Monstronio » 29 Oct 2019, 20:03

It is passive !!!
NoOoOoOoOoOoOp!

After applying voltage, the joystick has a high level of outputs. More than 4.6 volts !!! I just checked it on three different joysticks (of course, Chinese ;) ).

And I remember exactly that the original four button joysticks have a multiplexer without a Z state.
Adjuntos
IMAG0230.jpg
IMAG0230.jpg (1.93 MiB) Visto 12492 veces
VIDEO0041.mp4
(2.75 MiB) Descargado 330 veces

Monstronio
PLA
Mensajes: 25
Registrado: 01 Sep 2019, 21:59

Re: Modificar Unamiga para tener 6 botones+ Start + Menú (norma megadrive 6 buttons)

Mensaje por Monstronio » 29 Oct 2019, 21:33

With AMIGA layout, the outputs are also in a high level state.
Adjuntos
IMAG0231.jpg
IMAG0231.jpg (1.69 MiB) Visto 12482 veces

Responder

Volver a “Hardware”