News:

Retrode - Honey, fire up the emulator! My Retrode just arrived

Main Menu

SNES Enhanced Cart Support (FW v0.22)

Started by skaman, 11/May/2017 08:57:05 PM

Previous topic - Next topic

skaman

Matthias kindly provided me with access to the Retrode source code and I've implemented support for a majority of the SNES Enhanced Carts: CX4, SDD1, ExHiROM, SPC7110, SA-1, and Nintendo Power (SF Memory Cassette).  I've also include various fixes for other SNES issues.

My code changes have been committed but not officially reviewed and merged into the main firmware yet.  Wannado is working on other changes so hopefully there will be an official release with everything included.

The firmware supports the SPC7110, SA-1 (Read Only), and Nintendo Power carts ONLY with my Enhanced cart adapter.  The Enhanced cart adapter serves as a pass-thru that provides the signals needed for these carts to work properly with the Retrode.  My prototype adapters are working perfectly with these carts.  The final adapter design is under review.  I won't be able to test the final design until sometime next month.  More details on the adapter are forthcoming.

I want to gauge interest in the SNES Enhanced firmware and ask for BETA testers.  My code has only been compiled and tested on a Retrode 2 so the initial testers should have this hardware version.  If you're willing to test AND provide feedback, then please contact me by PM.

Keep in mind that the full functionality of this firmware is only possible with the Enhanced cart adapter.

***UPDATE***:  The BETA testing of the SNES Enhanced firmware is complete.  The firmware has evolved and expanded during the development and testing process.  Please read the summary below (or the Readme included with the firmware) to understand all of the changes.

Here's the summary of the firmware changes:

v0.22  (2017-08-18)
- Changes by skaman:
-- SNES Enhancements!
-- Added support for SNES Enhanced Chip carts: 
   CX4, SDD1, ExHiROM, SPC7110, SA-1, BS Satellaview,
   Sufami Turbo, and Nintendo Power carts.
-- Added register writing code to enable remapping for
   CX4, SDD1, SPC7110, SA-1, and Nintendo Power carts.
-- SPC7110, SA-1 and Nintendo Power carts need a separate
   SNES Enhanced cart adapter.
-- WARNING:  SA-1 SRAM writes are not possible with the
   current hardware.  Any changes made to the SA-1 SRAM
   file on the Retrode will not be written to the cart.
-- Added Nintendo Power (SF Memory Cassette) cart support
   using the SNES Enhanced cart adapter.  The base ROM
   is initially read whether a single game or the
   multi-game Menu.  In single game mode, the SRAM is
   visible if used.
-- Added Nintendo Power multi-game switching using the
   HWB button.  Press the HWB button to switch games on
   a multi-game cart.  Refresh the Retrode folder to
   access the new game.
-- Added display of Nintendo Power flash mapping.  Press
   the HWB button to cycle thru games.  The flash map
   files will be shown when the base ROM is displayed
   for the 2nd time.  Flash map files are read only.
-- Added support for BS Satellaview carts and memory paks.
   Memory Pak support is limited to read only on the BS-X,
   Special LoROM, and HiROM carts.
-- WARNING:  Memory Paks will not work on the SA-1 carts.
-- WARNING:  Completely blank (all 0xFFs) Memory Paks
   will not be shown when inserted in the BS-X cart.
-- Added support for the Sufami Turbo adapter and carts.
   Carts will have the adapter slot position (A or B)
   added to the filename. This allows two carts with the
   same name to be accessed.
-- Added reading of Flash saves for the JRA PAT/SPAT4 carts.
   These carts use a 1024Kb Flash chip with unique mapping.
-- Fixed HiROM to read ROM starting from Bank 0xC0.
   Previous code used the mirror in lower banks which
   returned incomplete data.
-- Fixed LoROM to read ROM starting from Bank 0x80 for
   large (> 24 Mbit) games.
-- Fixed HiROM SRAM to read Bank 0x30.  Previous code was
   reading Bank 0x20.  Fixes problems with Brain Lord,
   The 7th Saga, etc.
-- Fixed SRAM bank switching for both LoROM and HiROM.
   LoROM SRAM switches banks every 0x8000 bytes and HiROM
   SRAM switches banks every 0x2000 bytes.
-- Fixed SRAM size for ST010/011/018 carts.  Only ST018
   (Hayazashi Nidan Morita Shougi 2) contains SRAM.
-- Fixed SRAM bug where previous code reported size 0
   for 64K due to sramSize256 overflowing the SRAM
   setDirEntry.
-- Fixed SuperFX SRAM bug where the upper half of the 64K
   SRAM size was mapped to the wrong bank.  SuperFX SRAM
   starts in Bank 0x70 and bankswitches at 0x10000 bytes.
-- Changed the checksum to use the proper bytes at 0xFFDE
   and 0xFFDF.  Previous code used the complement at 0xFFDC
   and 0xFFDD.
-- Added checksum + complement checksum code to check for
   the presence of ExHiROM.
-- Added code to address the incorrect mapping due to the
   too long internal ROM name (22 characters) that runs
   into 0xFFD5.  Fixes problems with Contra 3 (U),
   Krusty's Super Funhouse (U)(1.0), etc.
-- Added overdump correction code to eliminate the need to
   flag individual carts.  Removed the short internal list
   of overdumped carts since it is no longer needed.
-- Removed the HWB button overdump code since it is no
   longer necessary.  The HWB button function is now used
   for switching games on the Nintendo Power carts.
-- Added Config file option to control SNES automatic
   overdump correction. Default setting is 1 = ON.
-- Added Config file option to display the ROM Version in
   place of the checksum.  Default setting is 0 = OFF.


The v0.22 firmware is available here:  http://www.mediafire.com/file/yfatyncpq628ciu/Retrode-v0.22.zip

guy

Fantastic news! It would be great to be able to play Super Mario RPG and Kirby again.

Thank you for working on this :)

Knight of Time

Hey, this is looking quite promising, anyway, I have a few questions:

First of all, will this eventually have support for games that utilize the Super FX chip (e.g. Yoshi's Island)?  Second, will it be theoretically possible in the future for this add-on to write new saves to games with a special chip?  Third, will this add-on be available to buy on dragonbox?  Lastly, how much will it cost in USD/CAD (the latter is what I'm following since I'm a Canadian)?

Nice work so far.

skaman

Thanks for all of the interest!  I'm traveling at the moment but I will get the Beta out to the testers next week.  Wannado gave me the ok to release the initial firmware to the beta testers.  If all goes well in the testing, then I'll post the Retrode 2 firmware.  After the Retrode 2 release, I'll compile a version for the original Retrode version and ask for testers for it.

To answer Knight of Time:
SuperFX games are already supported by the Retrode firmware.  The SuperFX (and DSP) games don't do anything special in regards to accessing the ROM and SRAM.  I fixed some of the SRAM code so if it wasn't working before then test this beta to see if it fixes it.  I tested a couple of SuperFX carts including Yoshi's Island.

Writing save games for special chip carts should work with the exception of the SA-1 carts.  I added the register code for SPC7110 saves and that works (with the Enhanced cart adapter).  Reading SA-1 saves works with the Enhanced cart adapter but the Retrode is missing a couple of the pins needed to control writes to the SRAM (at least in the method that I use).  The SA-1 uses BW-RAM and I was only able to write to it with register writes that expose a section of SRAM at a time.  If you really need to write SA-1 save games, then you'll need to look into the Arduino cart reader (on which most of my code was developed).  I'm going to continue to test workarounds for the SA-1 SRAM problem but I can't say that it will ever happen due to the missing hardware.

Dragonbox is aware of the Enhanced cart adapter.  I can't speak for them but I would think it might be something that they'd want to offer.  They're currently working on a new production run of the Retrode so maybe it will become available after that.  My prototypes are small PCBs with a full length cart connector.  I'm not sure how the process to make a shell for it would go.  I'm using a hand cut universal SNES case to house one of my adapters and I ran into some clearance issues (fixing it in the next run of proto PCBs).  Hopefully, Matthias will find some time in his busy schedule to review my hardware files and work his magic on it to get ready for production.

Hope this helps!

MasterOfPuppets

This is a great update, thank you for all your hard work!

Would it be possible to add Satellaview dumping (no writing!) with this info?

https://wiki.superfamicom.org/snes/show/Satellaview+%28Meta%29

skaman

I didn't test the BS carts extensively other than to confirm the SRAM code changes fixed the large SRAM on RPG Tsukuru 2 and Sound Novel Tsukuru.  BS Satellaview carts themselves are possible to dump (SA-1 versions with the Enhanced cart adapter) but the Memory Paks are a different story as they use pins that are unavailable on the Retrode (at least the method that I use).  I'll look into workarounds for reading the BS Memory Paks.

I implemented full BS cart support with the Arduino cart reader.  LuigiBlood posted a video on YouTube not too long ago of BS dumping using the Arduino reader.  If you need to read and write Memory Paks, then you might want to look into that.

MasterOfPuppets

Quote from: skaman on 20/May/2017 04:17:13 AM
I'll look into workarounds for reading the BS Memory Paks.

Awesome, thanks!

Quote from: skaman on 20/May/2017 04:17:13 AM
I implemented full BS cart support with the Arduino cart reader.  LuigiBlood posted a video on YouTube not too long ago of BS dumping using the Arduino reader.  If you need to read and write Memory Paks, then you might want to look into that.

I will have to look into this, thanks for the info!

skaman

Quick update.  The BETA firmware for both Retrode versions is in the hands of the testers.  Some SRAM bugs were found and fixed.  A couple testers went through a large number of carts testing the firmware.  Testing is ongoing.

I'm working on adding BS Satellaview support to the firmware.  It is possible to read the BS carts and memory paks with the Retrode.  The firmware isn't quite ready for release as not every combination of cart + memory pak is working.   It should be possible to read the memory paks from all of the BS carts except the BS-X cart (due to limitations of the Retrode hardware).  As of right now, the BS Special LoROM carts work perfectly reading out the cart, SRAM, and memory pak.  I'm still working on the BS HiROM carts and BS SA-1 carts.

MasterOfPuppets

Quote from: skaman on 03/Jun/2017 02:55:16 AM
Quick update.  The BETA firmware for both Retrode versions is in the hands of the testers.  Some SRAM bugs were found and fixed.  A couple testers went through a large number of carts testing the firmware.  Testing is ongoing.

I'm working on adding BS Satellaview support to the firmware.  It is possible to read the BS carts and memory paks with the Retrode.  The firmware isn't quite ready for release as not every combination of cart + memory pak is working.   It should be possible to read the memory paks from all of the BS carts except the BS-X cart (due to limitations of the Retrode hardware).  As of right now, the BS Special LoROM carts work perfectly reading out the cart, SRAM, and memory pak.  I'm still working on the BS HiROM carts and BS SA-1 carts.

Awesome news! Many thanks to you and all the testers!

skaman

Quick update.  BS Satellaview ROM and SRAM reading works for all carts (SA-1 carts using the Enhanced cart adapter).  Memory Pak reading works only on the Special LoROM and HiROM carts.  I wasn't able to get the communication with the registers needed to enable Memory Pak reading on the BS-X or SA-1 carts.

I'm working on an updated BETA that will include the BS Satellaview support.  If anyone is interested in testing it, then please let me know.  You'll need one of the BS carts (NO BS-X or SA-1) and a Memory Pak or Same Game Data Pak.

In case anyone cares, the SD Gundam GNext Map & Data Collection Pak was only readable on the matching SD Gundam cart (this was using my Arduino based cart reader).  Unfortunately, there's no way to read the SD Gundam (BS SA-1) Memory Pak slot using the Retrode at least based on my testing.

ssokolow

#10
This evokes mixed feelings in me.

On the one hand, I'm very happy.

On the other hand, "Dammit! It took me far too long to stop dwelling on my desire to play Super Mario RPG again the first time around! Who knows how long it'll be until this is ready, ready-made adapters are available, I've ordered and received one, and I've re-bought an SMRPG cartridge!"

(I have a very strict policy about neither pirating nor paying for games unless they're available on my terms in order to ensure I can't contribute to companies' delusions that all they need is more DRM or that Steam-like eStores are acceptable... a policy that led me to buy a Retrode and to continue to eBay cartridges because I refuse to financially endorse the Nintendo Virtual Console... and I only play ROMs I personally dumped from my own cartridges in order to flip the bird at Nintendo's policy on emulation.)

skaman

Quick update.  BETA firmware with the BS Satellaview support is in the hands of the testers. 

I've decided to finish off the SNES cart list by adding support for the Sufami Turbo adapter and carts.  Sufami Turbo carts are mapped based on the slot used in the adapter.

One potential firmware problem is that a Sufami Turbo adapter with both slots filled could require 5 files (3 ROM files and 2 SRAM files).  Hopefully I won't hit any hardware limitations when creating the 5 files.  If I manage to get it all working, then there will be an updated BETA.

skaman

#12
Quick update.  I fixed the problem with the BS-X cart reading memory paks.  It is now possible to read memory paks using the BS-X cart,  Special LoROM, and HiROM carts.  I also finished adding support for the Sufami Turbo carts.

A new BETA release will be going out to testers soon.

skaman

Quick update.  BETA firmware with Sufami Turbo support and the BS-X Memory Pak fix is in the hands of the testers.

I'm working on one last addition which is the Nintendo Power (SF Memory Cassette) flash mapping.  My plan is to make the flash map files read only as there's too much potential to brick your NP cart when you play around with the mapping.  I'll probably make the displaying of the mapping files an option in the config file.  Once the mapping code is done then a final BETA will go out for testing followed by a full release for everyone.

androda

Do you intend to release the board files for the enhanced adapter?  Just curious, because I made my own N64/GBx adapter from the design files that are publicly released.