News:

Welcome to the Retrode Community Forums

Main Menu

SEGA SMS/GG Firmware (FW v0.24)

Started by skaman, 10/Dec/2017 03:41:40 AM

Previous topic - Next topic

skaman

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).

UPDATE (v0.24a):  I found a bug in FW v0.24 relating to the Nintendo Power carts.  The multi-game NP carts no longer cycle properly using the HWB button.  I've disabled the display of the Flash Map files since the bug causes the Retrode to hang.  If you want to see the NP Flash Map files, then use FW v0.22, v0.23 or v0.23a.

I decided to include a couple new features in the firmware update.  I added the SSF2 mapper code to read Super Street Fighter 2 for the Sega Genesis/Mega Drive.  I've also included XBAND modem support for both Genesis and SNES/SFC units.

To read the XBAND ROM and SRAM, the switch on the unit must be in the bottom position.  A cart does NOT need to be attached to read out the XBAND unit.  If anyone dumps an XBAND unit that still contains valid SRAM data, then I'd love to get a copy of the dump.

UPDATE (v0.24b):  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:

v0.24b (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.24a (2018-05-12)
- Changes by skaman:
-- SEGA SMS and GG Fixes!
-- DISABLED SNES NINTENDO POWER FLASH MAP FILE DISPLAY
   DUE TO v0.24 BUG PREVENTING MULTI-GAME SWITCHING.
   THIS BUG EXISTS ONLY IN THE FW v0.24 RELEASE.
   USE FW v0.22, v0.23, OR v0.23a TO SEE THE FLASH MAP FILES.
-- Added Sega Genesis/Megadrive Super Street Fighter 2
   detection and mapping.
-- Added Sega XBAND Modem detection and SRAM save support.
-- Added SNES XBAND Modem detection and SRAM save support.
   NOTE:  To read the XBAND ROM and SRAM, the switch on the
   unit must be in the bottom position.  A cart does NOT
   need to be attached to read the XBAND ROM and SRAM.

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

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

The updated v0.24b firmware is available here:  http://www.mediafire.com/file/9u4jb0bnfb7o843/Retrode-v0.24b.zip

skaman

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:


ICEknight

Cool, does this work with an official Master System Converter?

skaman

Quote from: ICEknight on 27/Dec/2017 05:15:48 PM
Cool, does this work with an official Master System Converter?

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

Nori

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.

RazorX2014

Quote from: Nori 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.
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.

skaman

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.

skaman

#7
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.

skaman

Happy Pi Day!

The v0.24 Final firmware is now released.

See the first post for the details.

skaman

#9
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.

bsittler

#10
This is great! I updated to this firmware and built a "Mark Master Converter". With those I'm able to dump+emulate many SG-1000 and Mark III games — both cartridges and My Cards — by stacking the Mark Master Converter atop the PlugIn Master. However, my adapter may have some sort of bug - there are a few SG-1000 cartridges I have not been able to use with the Retrode2, and they load as entirely 0xFF bytes:


  • Congo Bongo
  • Flicky
  • Girl's Garden
  • Star Jacker

Strangely, those very same games work fine (other than missing SG-1000 color palette set-up and needing a quick cartridge-swap to defeat the BIOS checks) in a Game Gear by stacking the same Mark Master Converter on top of the Beeshu Gear Master. Also, more than a dozen other games — including SG-1000 and Mark III cartridges and also My Cards — work fine with the Mark Master Converter atop the PlugIn Master in the Retrode2.

Before I go too much further into debugging these, has anyone else been able to successfully use any of these SG-1000 titles via the Retrode2?

edit: got one of skaman's Mark III Plug-Ins (thank you!) and see the same behavior with that as with the two-adapter stack - however, it's a beautiful Plug-In, works fine with actual Mark III cartridges, and I highly recommend it :)

skaman

Ran across an eBay listing for Game Gear slots:  https://www.ebay.com/itm/Game-Gear-45-pin-Slot/283019404463

In case anyone was looking for one and didn't want to pull one from a console.

bsittler

#12
FYI, Peter byemu (famulator)'s "Lithium"/"Tengu" MD dumper seems to be electrically compatible with skaman's Retrode2 Mark III plugin. Using that combination, I was able to dump five problematic SG-1000 cartridges (Orguss, Star Jacker, Girl's Garden, Flicky, and Congo Bongo.) I'm not yet sure why the Retrode2 only sees 0xFF for these, but at least there does exist a Mass Storage-compatible dumper that can read them. Note that the dumps will need to be deinterleaved (discard all even byte locations, they all read as 0xFF) and truncated (these old games are headerless, they all seem to work with final length 32768 bytes.)

skaman

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.24b with the fix:  http://www.mediafire.com/file/9u4jb0bnfb7o843/Retrode-v0.24b.zip

skaman

Quote from: bsittler on 14/Aug/2018 02:33:45 PM
FYI, Peter byemu (famulator)'s "Lithium"/"Tengu" MD dumper seems to be electrically compatible with skaman's Retrode2 Mark III plugin. Using that combination, I was able to dump five problematic SG-1000 cartridges (Orguss, Star Jacker, Girl's Garden, Flicky, and Congo Bongo.) I'm not yet sure why the Retrode2 only sees 0xFF for these, but at least there does exist a Mass Storage-compatible dumper that can read them. Note that the dumps will need to be deinterleaved (discard all even byte locations, they all read as 0xFF) and truncated (these old games are headerless, they all seem to work with final length 32768 bytes.)

I picked up copies of Girl's Garden, Flicky (Rev 1), and Congo Bongo (Rev 1).  Like bsittler stated, the Retrode with Mark III plugin will not read out these SG-1000 carts.  I used sanni's MD cart reader with the Mark III plugin to read the carts out.  The dumped files need to be split between even and odd bytes.  The odd bytes will contain the ROM data.

I'll try to figure out what is going on with these SG-1000 carts on the Retrode but no promises...