Skip to content

Fredobedo/JVS2X

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

I was not really in favor of integrating Gaming consoles in arcade CABs but I gave a try with a Sony Playstation 3 and could confirm that:
   - It can natively output 640x480@60Hz with 4:3 aspect ratio (not all games)
   - It natively supports Logitech G25 racing Wheel with full FFB and has some excellent arcade ports (i.e. OutRun 2 SP, Sega Rally, GTI Club)
   - It can run arcade Shoot'em ups (i.e. RayStorm HD) and Beat'em ups (i.e. Street Fighter IV Arcade Edition)
   - It could be an excellent solution for rail shooting games with also very interesting arcade ports

For the racing games, it was not a problem as I could directly connect my racing wheel but I needed an interface for being able to play other games with my CAB's controller.
-> I decided to use a Teensy 2.0 for this purpose as already done by other users but with small changes to fit my needs.

JVS2X (Teensy) acts as an interface between the Game console/PC and the Arcade JVS IO Board, converting JVS protocol to USB (software HID Device).
When compiled in JVS2PS3 mode, the Teensy will represents a USB composite Device exposes 2 HID interfaces of type gamepad controllers.
When compiled in JVS2KEYBOARD mode, the Teensy will represents a USB composite Device exposes 2 HID interfaces of type Keyboard.

Here is a non exhaustive list of systems that should be compatible today when compiled in JVS2PS3 mode (TBC):
   - Sony Playstation 3 (Home button supported: 'Start + Button 1')
   - Microsoft Windows (i.e. Mame)
   - Linux based systems (i.e. RetroPie)
   - Nintendo Switch
   - Etc.

This project is not something new; it is highly inspired from other projects referenced at the bottom of this page.
Do not hesitate to look at these projects to have more information.

What could be considered as new here, is the way it is implemented (technical aspects):
   - Bulk JVS Commands dynamically built based on supported JVS client features
   - Analog and LightGun support
   - Daisy chain support
   - Configurable multi CABs
   - Optimized USB report updates
   - Basic Analog Fuzz filters
   - Controller remapping facilities
   - 2 keyboards interfaces to circumvent limitation of 8 keystrokes (6 non-modifier keycodes + 2 modifiers) per Keyboard report (=> 2x 6KRO).
   - Support multi Keyboard layout
   - Support for programmable shiftKeys
   - Etc.

Here is a video of a PS3 in an arcade CAB with Logitech G25 Racing Wheel (FFB full support natively) :
IMAGE ALT TEXT HERE


Here is another video of a PS3 in an arcade CAB but this time with a JVS2X adapter connected to JVS IO Board (for 'sticks' games) :
IMAGE ALT TEXT HERE



TODO: Implement HID for PS4, XBOX One, etc. when I have time or with your help :)

Supported arcade layout

JVS2X is developed to support device chaining, thus it supports multiple JVS IO boards in the same CAB or in different CABs (Clone mode, VS mode, etc.)
All is implemented but I can't test as I do only have 1 CAB :(
If someone is willing to give it a try, I will be more than happy to help in case of trouble

You can configure your CAB's layout by updating file jvs_host_config.h:

Building the hardware

Here are the components you need to construct your adapter (total max. 15€):


Then, you have the possibility to buy a pcb helper for a very reasonable from Aganyte (easy way):

more information at https://www.gamoover.net/Forums/index.php?topic=43288.0


And for the courageous one, here is diagram for soldering all yourself without the Aganyte's PCB (hardcore way):

This is the way I soldered mine (c/o compatible enclosure below if needed):

There are also additional pictures from other realizations for other persons, in the doc folder if needed.

Printing an enclosure

I also designed a box for the JVS2X:
In case you are interested, You can find the 3 STL files in the 'Enclosure' folder.

Compiling the software

For now on, I use VS Code with PlatformIO IDE extension:
   - Board: Teensy 2.0
   - Framework: Arduino
Here are the supported build flags (c/o platformio.ini):
   - JVS2PS3 -> create 2 gamepad controllers compatible with ps3, pc, etc.
   - JVS2KEYBOARD -> create 2 keyboards
   - JVSDEBUG=1 -> activate info traces
   - JVSDEBUG=2 -> activate debug traces
   - LAYOUT_FRENCH_BELGIAN -> set keyboard layout to French for Unicode keyboard mapping
   - SENSE_DISABLED -> disable sense line
   - SHIFTKEY_DISABLED -> disable keyboard shift keys support

If you don't want to compile it, there is already a compiled version in 'build' folder

Upload software

Please upload 'jvs2x.hex' in your Teensy with help of Teensy Loader (c/o pjrc.com).

Debugging

You can compile JVS2X with JVSDEBUG flag; this will create a additional HID interface that you will connect with help of hid_listen.exe (c/o https://www.pjrc.com/teensy/hid_listen.html for more information)

You should see these traces:


If you do not want to compile it, I also have placed debug versions in 'build' folder too.

LED States

JVS2X uses the Teensy internal LED to indicate several states:
   - Continuously blinking: waiting for a JVS cable to be connected
   - No blink: init phase started
   - Steady ON: JVS init is finished successfully and the device is ready

Compatibilty list

Here are some games confirmed to work on Sony PlayStation 3:
  Working:
   - Under defeat HD
   - RayStorm HD
   - Super Street Fighter IV Arcade Edition
   - Virtua Fighter 5
   - Söldner-X 2
   - Super Street Fighter ii Turbo HD Remix
   - R-Type Dimensions
   - Metal Slug 2
   - Capcom Arcade Cabinet (Ghodtd'n goblins, Commando, Gun Smoke, section7, etc.)
   - Sky force Anniversary
   - After burner
   - Sonic generations
   - WipeOut HD Fury

Controller mapping

Some PS3 buttons do not exist on a arcade control panel. These are mapped as follow:
   - START + Button 1 -> PS Button
   - START + Button 2 -> Select

You can reconfigure the default control mapping to your likings by updating the file jvs_controller_ps3_config.h:

Keyboard mapping

Keyboard mapping is done by updating the file jvs_keyboard_config.h
Keyboard mapping can be done by giving keycodes or unicodes.
It is strongly advised that you use keycode mapping for your emulators (i.e. Mame).



If for any reason you would still like to use unicode caracters, it is possible but you will have to select also the according keyboard layout (default is 'US'):

The desired keyboard layout (i.e. "LAYOUT_FRENCH") must be given at compile time as parameter (c/o platformio.ini)
For now it supports those layouts (extract from keylayouts.h):
  - LAYOUT_US_ENGLISH   - LAYOUT_US_INTERNATIONAL
  - LAYOUT_GERMAN   - LAYOUT_GERMAN_MAC
  - LAYOUT_CANADIAN_FRENCH   - LAYOUT_CANADIAN_MULTILINGUAL
  - LAYOUT_UNITED_KINGDOM   - LAYOUT_FINNISH
  - LAYOUT_FRENCH   - LAYOUT_DANISH
  - LAYOUT_NORWEGIAN   - LAYOUT_SWEDISH
  - LAYOUT_SPANISH   - LAYOUT_PORTUGUESE
  - LAYOUT_ITALIAN   - LAYOUT_PORTUGUESE_BRAZILIAN
  - LAYOUT_FRENCH_BELGIAN   - LAYOUT_GERMAN_SWISS
  - LAYOUT_FRENCH_SWISS   - LAYOUT_SPANISH_LATIN_AMERICA
  - LAYOUT_IRISH   - LAYOUT_ICELANDIC
  - LAYOUT_TURKISH   - LAYOUT_CZECH
  - LAYOUT_SERBIAN_LATIN_ONLY

Here is an example of Keyboard mapping with unicode caracters:


Please note that you can also define 'Shift Keys' in this same Keyboard configuration file:

Fault tolerance

There is no special order to follow when starting your JVS2X, all orders are supported.

JVS2X will detect these follow errors and act upon:
   - JVS cable removed-> JVS2X will wait for JVS cable and reinitialize when detected.
   - JVS IO Board powered off-> JVS2X will wait for JVS IO Board powered on again and reinitialize when detected.
   - PS3 Powered off and on again-> JVS2X is also powered off and on as it is powered by the PS3 USB.

If for any reason, you have the impression that JVS2X is blocked or not responding accordingly, you can always try to restart it by pressing these 3 buttons at the same time: START + Button 1 + Button 2 -> Restart JVS2X

Sony PlayStation 3 video output

In my journey to integrate the Sony PS3 in my CAB, I spent several weeks finding the best way to connect the video output.
Let me share my experience and my final implementation.

640x480@60Hz

The PS3 can output this resolution ONLY if the region is set to NTSC:

(extract from https://manuals.playstation.net/document/en/ps3/3_15/settings/videooutput.html)

-> So you have 2 choices, either you have a NTSC PS3 or you you have a PAL PS3 that you can change region with help of CFW and some registry updates.

"VGA" cable

Next, I had to look at the video connectivity and first tried one of those PS3 to VGA cable:


This was a mistake, the image was very dark, washed and colorimetry was wrong. It turned out that this was not a standard VGA output (RGB HV) but D-Terminal (Sync on Green, D2). This video format can also be found on Sony PS2 and Nintendo GameCube. More info at https://en.m.wikipedia.org/wiki/D-Terminal.

Component out

Then I tried the component Video out cable that I connected to my GBS Control (custom CBS 8200) configured to direct output to same resolution in VGA and surprise, it worked well!

Looking at it a bit more after some days, it was kind of working but the image was a little too blury and it was a bit overkill, no? So I decided to look at something else.

HDMI + DAC

I decided to give a try to this little DAC converter, after all that is what we can also find on Video cards with VGA output:

The result is just perfect! Image is sharp, without any lags or screen tearing, simple to use and so cheap!?!
-> That is my solution.

Please note that this little adapter does not downscale, etc. It is just a DAC converter. So the HDMI out on PS3 is configured to output 480p.

External references

This project is based on:
   - JVSy from k4roshi (https://github.com/k4roshi/JVSy).,
   - Adapted version of JVSy (https://github.com/gtranche/JVSy).
   - OpenJVS (https://github.com/OpenJVS/OpenJVS).

Many thanks for sharing all these precious sources of information and also a special thanks to Bobby & Francesco for all thier help, ideas and support!

Have fun & best regards.
Fred

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published