Author Topic: SEGA SMS/GG Firmware (FW v0.24)  (Read 1002 times)

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 138
  • Karma: +37/-0
    • View Profile
SEGA SMS/GG Firmware (FW v0.24)
« on: 10/Dec/2017 03:41:40 AM »
Announcing the public release of the Sega SMS/GG Firmware v0.24.  This firmware adds the ability to read and write SMS and GG saves (SRAM and EEPROM).  I added improved SMS/GG cart recognition including proper Codemasters cart support.  The SMS/GG Plugin needs to be modified for the Codemasters carts to work.

I've included a couple changes for Genesis/Megadrive carts:  I added SRAM identification for carts that are missing the SRAM header data; and I fixed the large SRAM problem that affected Phantasy Star IV and other carts.

As part of the development, I made a working prototype Mark III Plugin.  The plugin allows you to read Japanese Mark III carts and Sega Card/My Cards with a Card Catcher (see http://forum.retrode.org/index.php/topic,368.msg2711.html#msg2711).

Here's a summary:
Code: [Select]
v0.24 (2018-03-14)
- Changes by skaman:
-- SEGA SMS and GG Saves!
-- Fixed SMS SRAM read support.
-- Added SMS SRAM write support.
-- SMS SRAM carts should be identified by Product Code
   and display the .SAV file.  The .SAV file can be read
   and written.
-- Corrected the ROM size identification for Mega,
   Two-Mega, and Four-Mega carts.
-- Fixed Product Code identification.
-- Fixed identification of SMS Monopoly (U) to output
   the proper ROM and SRAM save file.
-- Fixed identification of SMS Wonder Boy in Monster
   World (EK) and SMS New Zealand Story (E) to output the
   proper ROM file.
-- Added code to improve handing carts with bad headers.
   A small number of games will still require using the
   [forceSystem] setting in the Config file due to
   missing ASCII text at the start of the header.
-- Added identification of SMS Ys (J) save file.
-- Added identification of SMS Haja no Fuuin (J) save file.
-- Added GG SRAM save support.
-- GG SRAM carts should be identified by Product Code
   and display the .SAV file.  The .SAV file can be read
   and written.
-- Added GG EEPROM save support.
-- GG EEPROM carts should be identified by Product Code
   and display the .SAV file.  The .SAV file can be read
   and written.
-- Corrected GG Nomo's World Series Baseball from EEPROM
   to SRAM.  The cart uses the BR6265 SRAM chip with
   battery.
-- Removed GG Pro Yakyuu GG League '94 from EEPROM list.
-- Added identification of GG Pro Yakyuu '91 (J).
-- Fixed GG ROM size "0" identification.  ROM size "0"
   is 256KB, however, carts may be 256KB, 512KB, or 1MB.
-- Fixed SMS Codemasters cart detection.
-- Added GG Codemasters cart support.
-- WARNING:  Codemasters carts require modification of the
   SMS/GG Plugin.  The CLOCK connection must be made from
   both slots to the plugin edge (pin B9).  In addition,
   SMS Codemasters carts require the /MREQ pin to be
   connected to the /CE pin.
-- Moved SMS/GG cart detection ahead of NGP cart detection.
   Some SMS carts were incorrectly detected as NGP.
-- Changed the SMS/GG SRAM save extension to ".SAV".
   This appears to be the extension expected by most
   SEGA emulators.
-- Added identification of Genesis/Megadrive carts with
   missing SRAM save data in the header.
-- Fixed Genesis/Megadrive SRAM code.  Fixes Phantasy
   Star IV and other large SRAM (16KB or larger) saves.

The v0.24 firmware is available here:  http://www.mediafire.com/file/oqhx2ad7l3l3wlt/Retrode-v0.24.zip
« Last Edit: 14/Mar/2018 09:29:55 AM by skaman »

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 138
  • Karma: +37/-0
    • View Profile
Re: SEGA SMS/GG Firmware (BETA)
« Reply #1 on: 10/Dec/2017 04:06:48 AM »
For Codemasters cart support, you need to:

1) Connect the CLOCK pin on each slot to the plugin edge pin B9.  For Game Gear, CLOCK is pin 40 and for Master System, CLOCK is pin 47.

2) Master System requires an additional connection for the /MREQ pin 3 to /CE pin 13.

3) Run BETA firmware v0.24b or higher.

Here are a couple pictures of the modified plugin:


Offline ICEknight

  • Junior Retrode
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: SEGA SMS/GG Firmware (BETA)
« Reply #2 on: 27/Dec/2017 05:15:48 PM »
Cool, does this work with an official Master System Converter?

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 138
  • Karma: +37/-0
    • View Profile
Re: SEGA SMS/GG Firmware (BETA)
« Reply #3 on: 27/Dec/2017 08:38:30 PM »
Cool, does this work with an official Master System Converter?

No, it only works with the Retrode SMS/GG Plugin.

Offline Nori

  • Junior Retrode
  • **
  • Posts: 49
  • Karma: +0/-0
    • View Profile
Re: SEGA SMS/GG Firmware (BETA)
« Reply #4 on: 29/Dec/2017 05:12:07 PM »
Wow that looks so great. I wish someone would mass produce the Gamegear plugin. I'd love to have one and wouldn't be able to make one myself.

Offline RazorX2014

  • Junior Retrode
  • **
  • Posts: 90
  • Karma: +1/-0
    • View Profile
Re: SEGA SMS/GG Firmware (BETA)
« Reply #5 on: 29/Dec/2017 10:45:39 PM »
Wow that looks so great. I wish someone would mass produce the Gamegear plugin. I'd love to have one and wouldn't be able to make one myself.
unfortunately you would have to sacrifice a game gear every time to do that, short of paying thousands to have the connectors made from scratch.

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 138
  • Karma: +37/-0
    • View Profile
Re: SEGA SMS/GG Firmware (BETA)
« Reply #6 on: 14/Feb/2018 01:41:26 AM »
Update:  The SMS/GG firmware is still in BETA while I finalize the GG EEPROM support.

I've got the GG EEPROM read code working and the write code partially works.  The write code only works when the cart is connected through my logic analyzer adapter board.  The long traces on the logic analyzer adapter must be affecting the timing of the signals to the EEPROM.  At least I know that the structure of my code is correct.

I'll continue to run tests in search of the proper timing needed for the write code.  Once the EEPROM code is fully working then I'll release the firmware for BETA testing followed by public release.

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 138
  • Karma: +37/-0
    • View Profile
Re: SEGA SMS/GG Firmware (BETA)
« Reply #7 on: 15/Feb/2018 10:10:18 PM »
I found the bug in my GG EEPROM write code.  GG EEPROM is now fully working.  The problem wasn't a timing issue.  My logic analyzer adapter board was somehow masking that I was missing some code.

I'll run additional tests on the firmware then release it to the BETA testers.
« Last Edit: 15/Feb/2018 10:12:01 PM by skaman »

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 138
  • Karma: +37/-0
    • View Profile
Re: SEGA SMS/GG Firmware (FW v0.24)
« Reply #8 on: 14/Mar/2018 09:31:04 AM »
Happy Pi Day!

The v0.24 Final firmware is now released.

See the first post for the details.

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 138
  • Karma: +37/-0
    • View Profile
Re: SEGA SMS/GG Firmware (FW v0.24)
« Reply #9 on: 24/Mar/2018 12:27:22 AM »
There appears to be a bug introduced in this firmware.  The bug is with reading SFC/SNES Nintendo Power carts using my Enhanced Cart Adapter.  Using the HWB button to cycle through a multi-game NP cart no longer returns you back to the Menu ROM with the flash map files.  It is an odd bug because I didn't touch any of the SFC/SNES code with this firmware.

I'll look for a solution.  In the meantime, anyone reading NP carts should use firmwares v0.22, v0.23, or v0.23a.

EDIT:  Looks like I'll need to disable the display of the NP Flash Map files going forward.  The Flash Map files are causing I/O issues that result in the Retrode hanging.  By disabling the Flash Map files, the multi-game cycling using the HWB button works as expected.  I'll keep the underlying Flash Map code in the firmware in the event that a solution is eventually found.
« Last Edit: 24/Mar/2018 06:32:06 AM by skaman »