Author Topic: Virtual Boy SRAM Support (FW v0.25)  (Read 1620 times)

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 170
  • Karma: +39/-0
    • View Profile
Virtual Boy SRAM Support (FW v0.25)
« on: 19/Feb/2018 10:14:29 PM »
Announcing the public release of the Virtual Boy (VB) Firmware v0.25.  This firmware adds the ability to read and write VB SRAM saves.  SRAM support requires a modified VB plugin detailed below.  I've added other changes to improve VB cart recognition.  I also added the "vboy" setting for [forceSystem] in the Config file in case a VB cart is not detected properly.

UPDATE (v0.25a):  I fixed the support for Sega Genesis/Mega Drive Sonic 3 & Knuckles that was broken in v0.24a.  The code changes that added support for Super Street Fighter 2 broke the reads for Sonic 3 & Knuckles.

Here's a summary:
Code: [Select]
v0.25a (2018-08-17)
- Changes by skaman:
-- SEGA Genesis/Megadrive Fix for Sonic 3 & Knuckles.
   The v0.24a code changes to support Super Street Fighter 2
   broke the support for Sonic 3 & Knuckles.

v0.25 (2018-05-12)
- Changes by skaman:
-- Virtual Boy Saves!
-- Added VB SRAM save support.
-- VB SRAM carts should be identified by Product Code
   and display the .SAV file.  The .SAV file can be read
   and written.
-- SRAM support requires a modified VB Plugin with the SRAM
   control pins connected.
-- Fixed identification of Red Alarm.
-- Fixed Galactic Pinball and Mario's Tennis detection.
-- Moved VB cart detection ahead of NGP cart detection.
   Some VB carts were incorrectly detected as NGP.
-- Added "vboy" setting for [forceSystem] in the Config file.
-- Fixed VB size detection code to work with [forceSystem].

The v0.25 firmware is available here:  http://www.mediafire.com/file/9lna3fbcc9zctm3/Retrode-v0.25.zip

The updated v0.25a firmware is available here: http://www.mediafire.com/file/i2a1q7dft3f4135/Retrode-v0.25a.zip

I've been working on a modified Virtual Boy Plugin with SRAM save support.

Here's the modified pinout with the SRAM pins connected:
Code: [Select]
---------------------------------------
Sega Edge       Signal          VB Edge
---------------------------------------
A1              gnd             1, 2
A2              +5v             54
A3              a8              15
A4              a11             22
A5              a7              17
A6              a12             24
A7              a6              19
A8              a13             26
A9              a5              21
A10             a14             28
A11             a4              23
A12             a15             30
A13             a3              25
A14             a16             32
A15             a2              27
A16             a17             34
A17             a1              29
A18             gnd             33
A19             d7              38
A20             d0              39
A21             d8              37
A22             d6              42
A23             d1              43
A24             d9              41
A25             d5              46
A26             d2              47
A27             d10             45
A28             d4              50
A29             d3              51
A30             d11             49
A31             +5v             36, 53
A32             gnd             59, 60
B1              N/A             -
B2              N/A             -
B3              N/A             -
B4              a9              18
B5              a10             20
B6              a18             13
B7              a19             11
B8              a20             16
B9     CS2 (SRAM), /CE (ROM)    7, 31
B10      /CS1 (SRAM Enable)     6
B11   /WE0 (SRAM Write Enable)  3
B12             N/A             -
B13             N/A             -
B14             N/A             -
B15             N/A             -
B16\     /OE (Output Enable)    35
B17/     /OE (Output Enable)    35
B18             N/A             -
B19             N/A             -
B20             N/A             -
B21             N/A             -
B22             d15             40
B23             d14             44
B24             d13             48
B25             d12             52
B26             N/A             -
B27             N/A             -
B28     /LDSW (not used)        -
B29     /UDSW (not used)        -
B30             N/A             -
B31             N/A             -
B32     /CART_IN (not used)     -
---------------------------------------

Here are pics of the Plugin PCB:





The section with the holes at the top of the PCB breaks off and is used to help align the pins for assembly.  I use pins from 1.27mm male right angle pin headers (2 row) and hand assemble them.
« Last Edit: 18/Aug/2018 07:14:01 AM by skaman »

Offline mistermorcus

  • Baby Retrode
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Virtual Boy SRAM Support
« Reply #1 on: 26/Feb/2018 05:34:00 PM »
Great work!! Awesome to see plugins and support for the virtual boy.

I have been toying with the idea of creating a plugin for a while now that my personal virtual boy has a dead pixel which results in a solid black line across the screen. Now with a google cardboard headset or a 3d TV you can actually make virtual boy look really nice.

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 170
  • Karma: +39/-0
    • View Profile
Re: Virtual Boy SRAM Support
« Reply #2 on: 18/Mar/2018 07:44:40 AM »
I might change the SRAM pinout that was posted as I was asked to support Hyper Fighting.  In order to read out Hyper Fighting, I need to free up pins on the Retrode to connect the uppermost address pins on the VB.  Right now, the uppermost address pins on the Sega slot are used to control the VB SRAM.  I didn't want to use them for addressing as the Retrode uses those pins for configuring other cart types.

I'll have to do more testing to find the best pin configuration.

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 170
  • Karma: +39/-0
    • View Profile
Re: Virtual Boy SRAM Support
« Reply #3 on: 27/Mar/2018 04:13:22 AM »
I looked for a pinout that would support both SRAM and Hyper Fighting.

Unfortunately, support for both is not possible due to a lack of available control pins on the Retrode.

I'm going to stick with my current plugin design with support for the SRAM.

If anyone wants to read out Hyper Fighting, then the original pinout needs to be modified with the following pins:
Code: [Select]
Sega          Signal            VB
B9              a21             14
B10             a22             12
B11             a23             10

If the cart is not detected, then use FW v0.25 with forceSystem set to "vboy" and forceSize set to "32".  The ROM should be identified as FightingDemo.vb.

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 170
  • Karma: +39/-0
    • View Profile
Re: Virtual Boy SRAM Support (FW v0.25)
« Reply #4 on: 18/Aug/2018 07:18:32 AM »
Pat1986 found a bug in FW v0.24a that broke support for Sega Genesis/Megadrive Sonic 3 & Knuckles.  The bug was related to the code changes that enabled reading Super Street Fighter 2.  I've fixed the bug and now both Sonic 3 & Knuckles and Super Street Fighter 2 work.

I've released a new firmware FW v0.25a with the fix:  http://www.mediafire.com/file/i2a1q7dft3f4135/Retrode-v0.25a.zip