shmups.system11.org

Shmups Forum
 
* FAQ    * Search
 * Register  * Login 
It is currently Mon Aug 02, 2021 10:04 am View unanswered posts
View active topics



Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Conversions
PostPosted: Sun May 17, 2020 6:29 pm 


User avatar

Joined: 14 Aug 2019
Posts: 498
Location: BW, Germany
Introduction

Preface

Gradius III for SNES is more than just a port of the arcade original. Due to the szenic rearrangement on the one hand, and a dash of special features and small tweaks, the SNES version is a worthwhile title on its own right. For a long time, however, this otherwise great ensemble was – according to many – tarnished by one drop of bitterness: considerable slowdown. Some conjecture this would be ascribed to half-baked programming, because the developers weren't really familiar with the hardware yet due to the early release date. Others assume the slowdowns to be intentional, or at least approved, with the purpose to more closely resemble the arcade original, or to cushion difficulty spikes during crowded sections of gameplay.

The SA-1 patch

In any case, since May 2019, there's an ingenious patch penned by Vitor Vilela that provides a remedy in that regard. The patch offloads part of the calculations to the so-called SA-1 chip – a coprocessor that's installed ex factory in some game cartridges, including for example Super Mario RPG, Kirby's Dream Land 3 and Kirby Super Star. In this manner, the burden on the CPU is reduced and Gradius III runs buttery smooth!

Here is a video comparison.
And here's a more extensive one, done on genuine hardware.
I can also recommend this article which provides further information.

A ROM patched in this way can be played via emulation or by using a flashcart (provided these support the SA-1), and, if you build a respective physical cartridge yourself, even on genuine hardware. This is the path we want to take here.

At the time of writing, there are also patches in this vein for Contra III and Super Mario World. The hardware-oriented section of this tutorial is applicable analogously. Only Mario requires slightly different steps to generate the ROM file. Using Lunar Magic, you can furthermore create your own gameplay scenarios and patch them into the ROM. The technical constraints imposed on you are significantly lifted by the SA-1 patch. We won't go into that here, but if there's any questions, don't hesitate to ask.

This tutorial can be seen as a companion to Voultar's excellent, but slightly summarized video. I tried to address beginners first and foremost and explained a few steps more extensively, and/or compiled information from futher sources. I'm not liable to any harm you cause to your hardware or yourself; you're acting on your own responsibility :)


Section 0: Required parts and tools

We should have the following hardware in stock before beginning the build. The portion concerned with software can be done in advance, I'll go into that step by step:

• Gamebit 3.8mm screwdriver
• M27C322-compatible EPROM programmer
• Soldering equipment
• Heat gun
• Tweezers made of metal
• Pincer pliers

1x M27C322 EPROM
1x 27C322 SA-1 Adapter REV.3, courtesy of The Real Phoenix (⮞ obtainable via oshpark)
1x donor SNES cart with SA-1 Chip and 128KB SRAM: for this tutorial, the following games are qualified: Kakinoki Shogi (Label) or Daisenryaku Expert WWII - War in Europe (Label). More games can serve as a donor, see section "Variants" below.

Note: Kakinoki Shogi uses a larger game PCB than Daisenryaku Expert, there is less space between it and the inner surface of the cartridge shell's top side. So using Kakinoki Shogi might necessitate further measures to make the finished game PCB/adapter board combination fit back into the cartridge shell. Or, it might not fit with The Real Phoenix's SA-1 Adapter REV.3 at all (if this is the case you might be limited to using FlashROM - see the 'Variants' section). Currently, I cannot give a final assessment, as I don't have a SHVC-1L8B-01 game PCB at hand, the PCB that Kakinoki Shogi uses. Maybe somebody can chime in on this and give more information on what is possible with that donor game and what isn't. In the meantime, you can use these PCB photos: [1] [2] and my photo below that shows how much space remains with Daisenryaku Expert, to gauge how this will pan out with Kakinoki Shogi.

Optional:

1x CR2032 battery holder (watch out: many don't fit! These apparently work.)
1x CR2032 battery
OR
no holder and 1x tabbed CR2032 battery instead (ones labelled 'Panasonic CR2032-HU3N' should work - 'HU3N' is the correct tab configuration.)



Section 1: Generation of patched ROM file and burning it onto the EPROM

First we need an original Gradius III ROM file, in regards to where you get it from, you're on your own. I dumped my NTSC-U cartridge using a Retrode for this purpose:

Spoiler: show
Image


There are SA-1 patches for both the NTSC-U and the NTSC-J versions of Gradius III, so alternatively you can also use the latter one. The only important thing is that, depending on what you use here, you need to apply the correct patch file later. To my knowledge there are no gameplay differences between both – should I err on that, I'm happy for any competent clarification!

To make sure you have a sound ROM dump, you should check its hash sum:
Spoiler: show
On Windows, bring up the command line tool (cmd.exe) and execute the following command:
Code:
certutil -hashfile pathToYourRomFile SHA1


On Linux, use the following command:
Code:
sha1sum pathToYourRomFile


On OSX, use this:
Code:
shasum pathToYourRomFile


If you have the NTSC-U version, the output should read
Code:
7e62203a4198e9404eb7b076802c09786e5a63f4
, and
Code:
e5119c731c9de5f942565ab0d752cb50abf4f32c
for the NTSC-J version.



We then obtain the SA-1 patch by visiting Vitor Viela's GitHub repository, and downloading the latest Gradius III patch on the 'Releases' page.
Gradius-III-JPN.bps or Gradius-III-USA.bps – here you have to make sure to choose the file that matches your original ROM!

Using the BPS patcher of our choice, we apply the patch file to our original ROM file. I use FLIPS for this, beat is an alternative. We save the resulting file as 'G3-US_SA1.sfc'.

Our M27C322, which we want to burn using this file, has 4 MByte of memory, but G3-US_SA1.sfc only has a size of 512 kByte. We therefore inflate the patched game using the helper application Lunar Expand to match the size of our EPROM. We choose the option 32Mbit (4MB), and after clicking on "Apply to ROM..." we select our G3-US_SA1.sfc. Let the resulting file be called G3-US_SA1_padded.sfc in the further course, which should have a size of 4 MByte.

Contained in the header of every SNES ROM is a checksum, which is now incorrect due to our "inflation". Using uCON64, which is kind of a swiss army knife for video game ROM files, we can correct this. We download the executable appropriate for our operating system (for Linux I recommend to either build uCON64 from source, or to consult your distribution's package manager), open the command line, navigate to the directory where we put uCON64 and execute the following command:
Code:
ucon64 pathToYour_G3-US_SA1_padded.sfc


It should now show various information about our ROM file; scrolling down a little we see that the checksum does not match: "Checksum: Bad; Inverted checksum: Bad".
To correct this, we now execute the following command:
Code:
ucon64 --chk pathToYour_G3-US_SA1_padded.sfc


By executing the following another time
Code:
ucon64 pathToYour_G3-US_SA1_padded.sfc

we assure ourselves that the checksum is now correct.

If we now generate the hashsum again as described above, and if it reads as follows (assuming patch version 1.5), we can be sure to have done everything right up to this point:
Code:
9aabdbdc8c5024c38899c2647cd871d83c572eff (NTSC-U version)
032e422fa66a16b4f27da9d12ed2bb7a7d24af10 (NTSC-J version)


Please note: the three previous steps are not absolutely necessary (unless your programmer's software doesn't allow for burning files smaller than the capacity of the respective EPROM). The finished cartridge should, in theory, also work without the expansion and the header correction, but I didn't verify. For diligence I therefore recommend you to not skip these steps, because you're on the safe side then.

Preparation of our ROM file is complete now, and we can move on to burn it onto the 27C322. As for programming device, by way of example I'm using the FlashcatUSB XPORT in combination with a DIP-42 Adapter here:

Image


Section 2: Preparation of the donor PCB

Upfront we should test our donor cartridge for correct function: in case something doesn't work later down the line, we will know whom to blame and isolation of the error will be easier ;)

Green light? Then we free the donor PCB from its case using the Gamebit and carefully put the halves aside. The markings on the PCB tell us about the functions of all relevant components. On this occasion it's a good idea to give the contacts of the edge connector a good clean using isopropyl alcohol and cotton swabs, since they're well accessible now.

At first we desolder the old battery:

Spoiler: show
Image


The original Gradius doesn't use a battery – however, the patch brings a small extra perk with itself: as long as the SRAM is put under sufficient voltage, highscores stay saved. Therefore, the opportunity now arises to install a battery holder along with a fresh coin cell (see above under "Required parts"). I decided against it here, however.

In the next step we remove the MaskROM. Due to its type we cannot easily get at it with the soldering iron. A workable method consists in using a hot air gun. It doesn't have to be a particularly high-end device; for this tutorial I use a run-of-the-mill model that was on offer for cheap in a supermarket. Along with it a narrower reduction nozzle which is subsequently used:

Spoiler: show
Image


While it wouldn't hurt for sure, it's not absolutely necessary to shield the surrounding components from the heat, for example by using aluminium foil. Given correct handling and the absence of unfortunate signs of wear, the components will withstand the temperature for the moment. We let the heat gun reach target heat (I use "Level 1", meaning 350C° / 662°F and 300 l/min / 79 US.liq.gal./min) and slowly draw closer to the MaskROM until there's just a copule of centimetres/inches distance while moving the nozzle in circles. It's crucial to maintain the circular movement, after about 20 seconds we laterally push the MaskROM using a long pair of tweezers. What's important is that we distribute the heat across the area of the MaskROM's pins as evenly as possible to ease pushing the chip away from its solder pads in one go, and to minimize chances for damage on the PCB or other parts. To get a feeling for the procedure I refer to Voultar's video.

Image
Image

The MaskROM detached, we let it and the PCB cool down for a bit. Afterwards we remove any solder spilled onto the PCB in the process. We don't have to clean the old solder off of the pads; instead we can reuse it later by refreshing it with new solder, easing the soldering of the adapter board a little.


Section 3: Soldering the adapter board and EPROM

After breaking the adapter board out of the panel, small protrusions remain due to the perforation, which should be clipped or sanded off (this is especially important for those residing in-between the edge pins, otherwise it will be hard to get good solder flow later):

Spoiler: show
Image


We align the adapter board to the exposed pads as evenly as possible, like the following photo shows (marking "The Real Phoenix" has to point to the game's edge connector):

Image
(Sorry, the edges turned out a little dark...)

We want to avoid attaching the board too far up, the spacing between it and the plastic shell is quite tight unfortunately, else we might later need to file down one corner of the PCB a little, before it will be possible to screw down the cart again. We dab the resulting junctions in flux and slowly move the soldering iron along the edge. Because of the flux, the solder should find the way by itself, if necessary we apply a little bit of additional solder, but not too much, otherwise bridges can form. To initially lock the board in place, it can help to - like Voultar does it - only solder a few contacts at one corner at first, followed by the diagonally opposite corner.

Once all contacts are soldered, we carefully inspect the contacts for bridges, ideally both visually and by using a multimeter, the counterpart being the respective via or pad for the EPROM on the adapter board. It's by design that the adapter board doesn't connect pin 32 of the M27C322.

Image

Now, only the EPROM remains: one pin row goes through the vias, the other one rests on the pads. For the latter, we have to trim the pigtails, meaning the narrower parts, which we do using a pair of pliers. If we observe the correct orientation (the notch on the EPROM is correspondingly marked on the adapter board), we know which side has to be trimmed. The trimmed pin row should rest on the pads as evenly as possible, so we trim protruding pins again until all pins have approximately the same length. Finally we solder both pin rows onto the adapter board:

Spoiler: show
Image
Image
Image
Image
Image


Depending on how far up we attached the adapter board onto the donor PCB's ROM pads, we might have to file down one corner of the adapter PCB a little until it correctly fits into the cartridge shell. Alternatively it's possible to file or clip off the cartridge shell's plastic tab that's in the way – I did the former here. There mustn't be any creaking sound or pressure acting upon the game and/or adapter PCB when fitting it into the shell and screwing it together:
Spoiler: show
Image



Done! Time to give the cartridge a try. :) I don't really recommend testing the bare game PCB. Should for example a bridge have snuck in, we may not have to unscrew the cart, but because there's no guidance without the plastic shell, just as a precaution I advise you to screw everything together before testing.

As for the label... I'll have to come up with something ^^'

Image


Variants

Further possible donor cartridges

In principle, all SNES/SFC games that have an SA-1 chip at their disposal can serve as a donor. (Wikipedia provides further information, sort by column "Chip" there).
With games other than those two mentioned at the beginning, you have to upgrade the SRAM. You need the following part for this: IS62C1024AL-35QLI-TR. It appears that in most cases, the new SRAM chip cannot be soldered in directly; the exact procedure depends on the game PCB revision at hand. 1L5B or 1L3B-10/11 e.g. (PGA European Tour Golf, PAL) do have the necessary additional solder pads, but they're located below the solder resist mask and have to be revealed beforehand:

Spoiler: show
Image


Other revisions on the other hand, e.g. 1L3B-01, completely lack these pads. In this case 3 pins of the SRAM chip have to be rerouted, it's a good idea to first exchange the SRAM chip and then test the cart again, before taking further steps:
Spoiler: show
Image



M27C160 instead of M27C322

In compliance with one additional facet, it's possible to use a M27C160 in place of a M27C322. As opposed to the former, the latter not only has a 16bit-, but an additional 8bit mode. We need 16bit – which we tell the M27C160 by soldering it normally, except for pin 32, which we let float at first. We then connect it with a 5V source (pin 22 on the M27C160 is suitable). In Lunar Expand we divergently choose "16Mbit (2MB)", all checksums change accordingly.


FlashROM instead of EPROM

Instead of an EPROM in combination with an adapter board, a FlashROM can also be used, for example the 29F1610 (pin 1 has to be set to 5V) or the 29L3211 (Careful: operating voltage is 3.3V for the latter, so you need a voltage regulator). One implementation of this can be seen e.g. here. Note: the 29F1610 is erroneously listed as "28F1610" there. Factor in the correct ROM size in Lunar Expand, all checksums change accordingly.


Changelog:
Spoiler: show
Oct 07, 2020:
- Added a better comparison video.
- Mentioned using a tabbed coin cell battery as an alternative to using a battery holder.
- Added a note and accompanying photo about filing down one corner of the adapter PCB a little in case the game and adapter PCB combination doesn't otherwise properly fit into the cartridge shell.
- Added a note about potential limitations/necessary extra steps due to the larger PCB of donor candidate 'Kakinoki Shougi'.


Last edited by 6t8k on Wed Oct 07, 2020 11:16 pm, edited 2 times in total.

Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun May 17, 2020 9:09 pm 



Joined: 14 Feb 2005
Posts: 954
Location: Los Angeles, CA
Fantastic detailed post.

I wonder, with all of the earlier opinions and conjecture about the original game's slowdown, do most people prefer it with the patch? Find it more, or less playable?


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun May 17, 2020 9:56 pm 


User avatar

Joined: 16 Jan 2014
Posts: 1439
Awesome writeup. There are Gradius 3 SFC SA-1 carts available and I find them super intriguing but havent snagged one yet. Let me ask first, how well do the SA-1 chips eliminate ALL slowdown in that game? Ive seen the Youtube videos, but didnt watch a whole playthrough. I would think the bubble world would be the most taxing, but there are other levels that suffer pretty bad as well.
Im sure there must still be some areas that slowdown eh?

Its strange that folks spent time doing this for games like SMW and Contra 3 though. Contra 3 had vastly reduced slowdown in comparison to Konamis first gen games and it was a touted feature back in the day.

Any chance some games that REALLY could use it like Super Ghouls N Ghosts and Super R-Type will ever get a go? Like Gradius 3, Super R-Type may be the prime candidate for the SA-1 makeover.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun May 17, 2020 10:03 pm 


User avatar

Joined: 26 Mar 2008
Posts: 1367
Location: philly suburbs
Great tutorial! Not something that I'm looking to do myself, but I'm sure this post will help people out immensely.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun May 17, 2020 10:47 pm 


User avatar

Joined: 20 Aug 2016
Posts: 2257
I'd really like to see Krikzz manufacture some single game flashable carts based on his SD2SNES board. That would make getting a physical cart easier and help prevent "donor cart" sacrifice of original hardware.
_________________
We apologise for the inconvenience


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun May 17, 2020 11:13 pm 


User avatar

Joined: 14 Aug 2019
Posts: 498
Location: BW, Germany
@bigbadboaz: good question, and it's ultimately of course something you can only answer for yourself. I'm seeing many people saying they like the SA-1 version better, all the same I can fully understand why one would prefer the original game, which is a lot more forgiving and easier to get into. If in doubt, perhaps give the SA-1 version a try using emulation? As for emulators, I can recommend Snes9x or bsnes, both are quite accurate while not too taxing resource-wise. Personally I prefer the SA-1 version due to its more smooth and brisk pacing (some early thoughts here).

@Josh128: I'm currently trying to clear the first loop on Normal on this cart, and so far, I've noticed no slowdown at all, during no part of the gameplay whatsoever. Furthest I got so far was the boss rush during stage 8. Here's a playthrough by Jaimers on Arcade difficulty, which should be more demanding for the hardware due to higher bullet counts. I think there's still no slowdown (that I would notice). He played this on Snes9x I believe, which should represent the real hardware well enough.

People often talk about the bubble stage, but I believe the part where the difference is most obvious is stage 5. It's baffling how fast it's over :o You also have to adapt your boss strategies somewhat, stage 5 is a good example of this as well – the dragon's furious! So you have to let yourself be encircled as quickly as possible, otherwise you don't survive for long (at least that's what I have found).

Vitor is planning to create patches for Super Ghouls 'n Ghosts and Super R-Type! See here. Might also be a good reason to support him on Patreon.

@orange808: neat idea although not sure if economical. There might still be some difference with regards to the accuracy of the FPGA-based replica of the SA-1 that's used in the sd2snes/FXPAK. Does somebody know more about this? Aside from glitches (which occured in the beginning, but are now down pat as far as I know) slight speed deviations would be thinkable. Might be rather insignificant for something like Gradius – on the other hand, as more games join the party, something like this might be interesting to know for speedrunners.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun May 17, 2020 11:42 pm 


User avatar

Joined: 16 Jan 2014
Posts: 1439
Fantastic. I will look into supporting him. I would love a trio of G3, SRType, and SGNG SA-1 carts. I love this type of shit, its incredible.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Mon May 18, 2020 4:11 am 


User avatar

Joined: 20 Aug 2016
Posts: 2257
6t8k wrote:
@orange808: neat idea although not sure if economical. There might still be some difference with regards to the accuracy of the FPGA-based replica of the SA-1 that's used in the sd2snes/FXPAK. Does somebody know more about this? Aside from glitches (which occured in the beginning, but are now down pat as far as I know) slight speed deviations would be thinkable. Might be rather insignificant for something like Gradius – on the other hand, as more games join the party, something like this might be interesting to know for speedrunners.


Yes. Speedrunners will definitely want to use the donor solution and real hardware. There's really no substitute.

I want the stand alone carts for more than just enhancing existing games.

If the boards Krikzz is using have hardware DRM (many boards do) from the manufacturer, the SNES needs a platform to publish new software on carts. Many devs aren't going to bother if they are making free "romz" for pirates. A custom expanded rom file format that fully utilizes the ARM and allows programming game logic using C++ (while simultanuously feeding signals to the console) would be ideal, but simple easy access to the SA-1 using assembler would be sufficient to spark more development. In fact, an expanded and overclocked SA-1 could be added to SD2SNES Pro specifically for homebrew devs.

The economics of the whole thing are a question mark. Is SD2NES fully open source? If so, then it's doable right now with or without Krikzz.

Sooner or later, it will get done.
_________________
We apologise for the inconvenience


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Mon May 18, 2020 5:38 am 


User avatar

Joined: 06 Oct 2015
Posts: 2741
Location: Montréal, Canada
Once you go through the expense of putting on a powerful enough FPGA to include the CIC and SA-1 hardware, plus the onboard nonvolatile storage to hold a game, it would cost almost as much as a full-blown SD2SNES... At that point you might as well just use the SD2SNES.

RetroCircuits' SA-1 multicarts don't currently have any of the SA-1 patch games, but they do custom requests, so you could probably request a multicast from them with the three patched games (Gradius III, Contra III, and Super Mario World).


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Mon May 18, 2020 7:04 am 


User avatar

Joined: 19 Jan 2016
Posts: 351
Location: Sweden
Josh128 wrote:

Any chance some games that REALLY could use it like Super Ghouls N Ghosts and Super R-Type will ever get a go?


Super Ghouls N Ghosts can be patched to fix (almost all?) slowdown. It seems the slowdown in that game was almost entirely due to a programming error.

https://www.romhacking.net/hacks/3473/
_________________
OSSC TV Compatibility report thread


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Mon May 18, 2020 2:29 pm 


User avatar

Joined: 16 Jan 2014
Posts: 1439
Cool!


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Mon May 18, 2020 5:21 pm 


User avatar

Joined: 07 May 2018
Posts: 765
Location: Escondido, CA, USA
Really cool, OP! What would you say is the total cost to build a gradius 3 cart? I have a krikzz super everdrive dsp, but it doesnt support sa-1. Wouldnt mind building myself a dedicated cart.

And thanks for that @Harrumph. Improved gng is definitely going on my everdrive.

Sent from my SM-G955U using Tapatalk


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Mon May 18, 2020 9:36 pm 


User avatar

Joined: 14 Aug 2019
Posts: 498
Location: BW, Germany
With regards to the crude programming vs. intentional/approved feature subject mentioned at the beginning, the Gradius III arcade team itself spoke of hardware limitations in an interview and explained that the SFC team wasn't as skilled, giving weight to the former view. Nevertheless, I'm having a hunch that some spots, some bosses in particular, were designed with the slowdown in mind. So it certainly seems plausible that both aspects had a bearing on the end result.

On an unrelated note, there are vague reports that, apparently, the SA-1 patches don't work with some (more uncommon?) revisions of the SA-1 chip. The info seems pretty inconclusive currently, so just in case you absolutely cannot get your SA-1 patched cart to work despite having checked everything else, perhaps consider stating your game, PCB revision, and the exact markings on the SA-1 so somebody else can confirm/falsify the problem.

@orange808: ikari_01 created the sd2snes and with the help of others has made it what it is today – krikzz builds and sells it. It's licensed under the GPL v2.0, which probably prevents derived work from incorporating a DRM scheme, but I'm not a lawyer.

@NoAffinity: Depends on whether you need to incorporate shipping cost for missing parts. I only needed a donor cart and the adapter board, which cost me about $25 and $10 respectively. 3 pcs is the minimum amount you can order from oshpark, both prices include shipping (USPS was $0 for the adapter boards). Adding to that a ROM chip, maybe a coin cell + holder and a little bit of consumables, you land at around $45-$50, assuming you have all needed tools.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Mon May 18, 2020 10:02 pm 


User avatar

Joined: 20 Aug 2016
Posts: 2257
6t8k wrote:
@orange808: ikari_01 created the sd2snes and with the help of others has made it what it is today – krikzz builds and sells it. It's licensed unter the GPL v2.0, which probably prevents derived work from incorporating a DRM scheme, but I'm not a lawyer.


Could be an issue.

I'm not familiar with the hardware. Some boards have protected memory execution features included from the manufacturer. So, it's just a matter of enabling it and possibly needing to directly specify where data is stored in RAM.

Anyhow, that's the only hope for getting any real high quality fresh IP on the console. Quality SNES software (even with a simplified work flow) would require a team of devs and hundreds of man hours.

Few (if any) will take on the job without DRM. There's no profit in adding a rom to Smokemonster's set. Nobody expects to make a mint, but that's too much work to give away for free.
_________________
We apologise for the inconvenience


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sat Oct 03, 2020 2:47 pm 



Joined: 03 Oct 2020
Posts: 8
Help needed.

I was wondering if anyone would be able to help me troubleshoot my version of this project. I picked it up with the hopes of improving my somewhat lacking soldering skills and getting to enjoy some good old fashioned side shooter fun.

I followed the guide with a few tweaks...I used a 1L3B-10 board for the donor, removed the solder mask and fitted the ram suggested in the guide. Checked the existing game still booted OK and then moved on to replacing the ROM. For that I used an MX29F1610AMC-90 with pin 1 held high by soldering it to the positive side of the cap next to the rom chip (similar to that seen in the linked guide for flash rom use).

The donor cart was a PAL game so I tried it in my PAL SNES and it starts to boot, the black and white grid appears for a second, resizes itself to bigger than the screen and then it black screens. I tried it on a SFC but that doesn't boot at all. Does anyone know what might be causing this issue? I dumped the ROM back off the chip and tried it in BSNES and it boots and runs fine. I'm at a bit 0f a loss with this one now.

Thanks for any help you can offer to this newbie.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun Oct 04, 2020 11:30 am 


User avatar

Joined: 14 Aug 2019
Posts: 498
Location: BW, Germany
Hi!

Can you post a close-up photo of the whole game PCB after the conversion? It may not be necessary, but just to make sure: did you expand the patched ROM to 16Mbit / 2MB (the capacity of the 29F1610) with Lunar Expand?

As for why your converted game PCB does not run on your SFC: the SA-1 has a built-in CIC (in other cases the CIC is a separate, dedicated chip on the game PCB). This "key" CIC talks with a "lock" CIC on the SNES PCB, thereby implementing the SNES' regional lockout mechanism. Since you used a PAL game as a donor, its SA-1 is in PAL mode. If pin 127 of the SA-1 is tied to GND, it's in NTSC mode, and if it's tied to VCC (5V), it's in PAL mode. [1] You should be able make the SA-1 run in NTSC mode by lifting that pin, or tying it to GND. Your conversion should then run on your SFC, but it will be locked out from your PAL SNES. I would recommend doing so, as you will not get the correct gameplay speed on your PAL SNES (unless your console is modified accordingly), but it shouldn't be the reason why your converted game PCB crashes like you described.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun Oct 04, 2020 2:32 pm 



Joined: 03 Oct 2020
Posts: 8
Hi there,

Thanks for the reply. I just took some pics of the board, hopefully the links below work ok. There is a bit of residual no clean flux on the board still from me swapping the ROM chips back and fourth while troubleshooting. I think for now I will leave the SA-1 set to PAL and then swap it to NTSC once I can get it to boot, assuming that isn't what is causing the issue. Also I did pad out the ROM to match the chip size, it's now 2MB in size.

[img][https://photos.app.goo.gl/ZL7uLgWVFZJaYw6r6]
[img][https://photos.app.goo.gl/86eUrtXEr982JpSC6]
[img][https://photos.app.goo.gl/khVonidig1xeue3H6]
[img][https://photos.app.goo.gl/yShVxDj297XcZ4VM8]
[img][https://photos.app.goo.gl/3FyaXaFAtXe8cFcy9]

Cheers for helping with this.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun Oct 04, 2020 8:08 pm 


User avatar

Joined: 14 Aug 2019
Posts: 498
Location: BW, Germany
Yes, I can access your photos - the soldering looks good. The parts have the right orientation and it looks like pin 1 of the 29F1610 is lifted and connected properly. Sometimes it can happen that one of the small SMD caps or resistors gets blown off due to the hot air, but it looks like all are in place.

According to the datasheets, the MX29F1610A is just a newer revision of the MX29F1610 with the same pinout and functionality. The -XX at the end is an access time performance indicator, -10 meaning 100ns and -90 meaning 90ns. So using the MX29F1610AMC-90 in place of the commonly mentioned MX29F1610MC-10 should be just fine.

I'm wondering a bit about your SA-1. Its package has a slightly different design compared to all SA-1 chips I've seen so far on sucessful conversions: for marking pin 1, it has a distinct dot instead of a chamfered corner (some examples: [1] [2] [3] [4], and mine in this thread). There's some vague info by Voultar and Arthrimus I linked to here that the conversion does not work with some or a specific variant(s) of the SA-1. I don't want to meet trouble halfway, but maybe there could be something to it. Which game did you use as a donor?

But it could also be the case that your SRAM chip is a bad exemplar. Do you have another one that you could try?

Makes sense not modifying pin 127 of the SA-1 for now - one step at a time.

This forum doesn't have an image upload functionality, but you can embed images by uploading them elsewhere and putting the link between bbcode tags like so: [img*]https://example.com/my_image.jpg[/img*] (remove the *s).


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun Oct 04, 2020 9:37 pm 



Joined: 03 Oct 2020
Posts: 8
Hi there. Thanks for the tips on the photos, I am glad you could see the work. I used PGA European Tour as a donor for this one. I also have a copy of PGA 96 which has the chamfered corner instead of the dot. I didn't end up using that board as it is the 01 revision with the traces missing and wasn't sure how successful I would be lifting pin 86. Maybe I will try and swap the SA-1 chips and see if I can get it to work that way. Thank you very much for the advice on this. I vaguely recall reading about some compatability issues while I was researching this. Now I just hope my soldering is up the the task of swapping the SA-1 chips over.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Sun Oct 04, 2020 10:31 pm 


User avatar

Joined: 14 Aug 2019
Posts: 498
Location: BW, Germany
ShootTheCore also had an SA-1 with a dot instead of a chamfered corner and could not get it to work (see here). He has an account here - I reached out to him, would be interesting to know if he had just a black screen or if the crash looked like yours. Assuming that this is the right direction, it would be nice if it turned out that the dot instead of a chamfered corner can serve as a hint as to which SA-1 chips are compatible and which ones aren't.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Tue Oct 06, 2020 5:38 am 



Joined: 01 Feb 2016
Posts: 129
Location: Tokyo
A Japanese blog mentioned that he tried using "Kaki Shogi" as a donor cart, but wasn't able to get the EEPROM to fit right.
https://bcc.hatenablog.com/entry/2020/05/29/224629

The "Shining Scorpion" game is still regularly available over here for around 100 yen, so was thinking about trying this. Should I assume that I'd need to replace the SRAM for all the SA1 hacks? Do any of them need anything other than 128KB?


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Wed Oct 07, 2020 5:08 pm 


User avatar

Joined: 12 Jul 2007
Posts: 5829
Location: Where the fish lives, WV
I've played the Gradius III, Mega Man X, and Contra III SA-I modified games.

I would really like to see this branch out, as there are definitely more games that could use it. Sparkster is coming to mind. Super R-Type, obviously. Heck, it would probably even benefit R-Type III.
_________________
My Collection: http://www.rfgeneration.com/cgi-bin/col ... Collection


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Wed Oct 07, 2020 8:27 pm 


User avatar

Joined: 05 Aug 2020
Posts: 618
What would be ideal is a pass-through cart that provides the chip. That would save the need to do each cart individually.

There's also the Polymega, which will let you use software patches with original carts.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Wed Oct 07, 2020 10:11 pm 


User avatar

Joined: 14 Aug 2019
Posts: 498
Location: BW, Germany
jd213 wrote:
A Japanese blog mentioned that he tried using "Kaki Shogi" as a donor cart, but wasn't able to get the EPROM to fit right.
https://bcc.hatenablog.com/entry/2020/05/29/224629

Thank you for the heads-up! Without photos the part about 'Kakinoki Shougi' in the blog entry is a bit difficult to assess. I compared PCB photos of 'Daisenryaku Expert WWII - War in Europe' (SHVC-1L8B-10) and 'Kakinoki Shougi' (SHVC-1L8B-01) (see here and here respectively; specifically here and here). SHVC-1L8B-01 is indeed larger, such that there is less space between it and the inner surface of the cartridge shell's top side. Originally, I mentioned 'Kakinoki Shougi' because as far as I know, it's one of the two only SA-1 games that have enough SRAM ex-factory.

I supplemented the guide with a photo that approximately shows how much space there will remain between the cartridge shell and the adapter board with 'Daisenryaku Expert WWII - War in Europe'/SHVC-1L8B-10. Without having a SHVC-1L8B-01 PCB available myself, it's difficult to say whether the EPROM+The Real Phoenix SA-1 adapter REV.3 combination will still fit if soldered onto the ROM pads of the game PCB in a slightly lower position (which is a bit harder to do), or whether you need to file/clip off the inner plastic tabs adjacent to the top side of the cartridge shell, or whether it doesn't fit at all (the blog entry doesn't say whether anything in this vein was tried). If it doesn't fit at all, one would have to either a) design a different adapter board, b) connect the EPROM with wires (e.g. like so, note: I wouldn't recommend it*), or c) use a FlashROM. I added a respective note to the guide.

* Which won't stop me from linking to this instance :P

jd213 wrote:
Should I assume that I'd need to replace the SRAM for all the SA1 hacks? Do any of them need anything other than 128KB?

All SA-1 patches released by Vitor Vilela so far (Super Mario World, Gradius III, Contra III) require a 128KByte / 1024Kbit SRAM chip (which then acts as BW-RAM). References: [Gradius III] [Contra III] [SMW]

Sengoku Strider wrote:
What would be ideal is a pass-through cart that provides the chip. That would save the need to do each cart individually.

With sockets, both the adapter PCB+DIP socket scenario for EPROMs and the SOP socket scenario for FlashROMs, it will not be possible to close the cartridge shell. It's possible though to write multiple SA-1 patched games onto one ROM chip, and switch between them by putting e.g. a group of DIP switches in-between some address lines. The DIP switches could be installed into the cartridge shell to make them accessible from the outside (presuming appropriate wiring), or onto a revised version of the ROM adapter PCB. Onto a M27C322, all of the following would fit for example: Gradius III, Contra III, Super Mario World (not expanded using Lunar Magic), Super R-Type and Super Castlevania IV (assuming the latter two will be made).


@Thor87:
ShootTheCore wrote me: "I found out later on that something about the SA-1 patch prevents it from booting past the grid pattern on a SNES Jr, which is the type of console I have".

No PAL versions were released of the New-Style SNES / SFC Jr., but all New-Style SNES / SFC Jr. consoles were manufactured with a 1-chip motherboard.
To have another data point: can you tell whether your PAL SNES contains a 1-chip or a 3-chip motherboard?

With the older 3-chip motherboards, the CPU, PPU1 and PPU2 are separate chips, while for the newer, 1-chip motherboards, all three were combined into a single physical chip labelled 'S-CPUN'. Instead of opening the console to look at the mainboard, you can also look up the serial number. It's on a sticker on the underside of the console and begins with 'UP'. But there's some uncertainty with this method, as there's no clear boundary in the serial numbers that delimits 3-chip consoles from 1-chip consoles (between UP1715... and UP172... is approximately the window where PAL SNES consoles start having 1-chip motherboards). Moreover, motherboards/cases could also have been swapped at some point after production.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Thu Oct 08, 2020 7:27 am 



Joined: 03 Oct 2020
Posts: 8
@6t8k thanks for the reply. I do indeed have a 1 chip PAL console. That is unfortunate. I have a 3 chip SFC though and an adapter cartridge so I will try and see if a Japanese game will get it to boot OK on the 3 chip or if it is the SA-1 revision that is the problem. If it app boots OK I will then lift pin 127 so it is and tie it accordingly so it runs natively on the SFC. There still seems to be quite a few variables in the no boot problem, but thank you so much for all your help, I would have been completely lost without you.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Thu Oct 08, 2020 9:03 pm 


User avatar

Joined: 14 Aug 2019
Posts: 498
Location: BW, Germany
You're welcome ^-^

It's certainly strange. Here Arthrimus tested different ROM data in combination with different SA-1 chips, on the same game PCB. With one SA-1 chip, all ROMs worked, while with two others, only officially released, i.e. non-SA-1 patched ROMs seemed to work (PGA European Tour was tried as a control ROM on all of them, and unpached Gradius III was tried with just one SA-1 chip that did not cooperate with patched ROMs, and it worked). He further wrote: "[...] the ROM chip was socketed. I'm having to desolder and resolder the SA1 chips every time I need to switch between them."

A few thoughts:
- To me that doesn't read like it was tried on different consoles, I think he'd have mentioned that
- We don't know whether those SA-1 chips that did not cooperate with SA-1 patched games were ones that mark pin 1 with a dot
- So far I've only seen three instances of SA-1 chips that mark pin 1 with a dot: yours, ShootTheCore's (both having the same code on them: 6JH 8X), and this one (6GH 02).

In any case, I wonder if it would be possible to remedy these hardware incompatibilities via updates to the patches. To do that, some tangible clue as to what part of the system is the culprit here would probably help. So I'm all in favor of you trying it on a 3-chip console and/or attempting a SA-1 transplant.

6t8k wrote:
write multiple SA-1 patched games onto one ROM chip, and switch between them by putting e.g. a group of DIP switches in-between some address lines

I guess a more elegant solution would be to count the number of times the reset button was pressed per power cycle modulo the number of games on the ROM, and gate said address lines based on that. The cartridge connector's /RESET pin is pulled low by the console when that happens, and is also led further across the game PCB until it goes into pin 120 of the SA-1. It could be accomplished with a PIC16F630 for example, which are also used for switchless region / 50/60Hz mods. These contain 128 bytes of EEPROM, so that could be used to retain the selected game across power cycles. And for tidy innards, installing that onto a revised ROM adapter PCB.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Fri Oct 09, 2020 4:02 pm 



Joined: 03 Oct 2020
Posts: 8
Hi @6t8k, bit of an update for you. So far I have only been able to test the cart with the universal adapter on the SFC. For some reason it just black screens and I don't think it is an issue with the adapter as it works OK with super Mario RPG. I did manage to get hold of a Japanese donor board though, so I will hopefully get that prepped and the ROM put on it this evening. It has the chamfered corner so hopefully it will all work. If it does go well I will give the transplant of the SA-1 a go over the weekend and see if I can get that one working too.

I did see another PAL pga European tour cart with the same SA-1 chip as the one I have too. I wonder if that is a common thing on this game.

I will keep you updated of the progress with the new donor cart and the transplant.

Cheers


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Fri Oct 09, 2020 7:29 pm 



Joined: 03 Oct 2020
Posts: 8
I finally managed to get a build working. Hooray! Same RAM and ROM as on the previous attempt but the new Japanese donor board with the chamfered edge SA-1 worked. Next challenge is to get the pga version to work by transplanting the SA-1 chip from pga 96 to European tour and see if it is the SA-1 that is causing the issues with that build. I will keep you posted.


Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Fri Oct 09, 2020 8:34 pm 


User avatar

Joined: 14 Aug 2019
Posts: 498
Location: BW, Germany
Huzzah! Interesting. That reinforces the theory that the SA-1 is at fault (and seemingly, specifically the ones with a dot for pin 1). Curious what results the PAL PGA European Tour board + transplanted chamfered-edge SA-1 will yield on your PAL 1-chip SNES.

By the way, I asked ShootTheCore whether he ever tried his conversion on a 3-chip console. In the meantime he answered: "Unfortunately I haven't tried my modded carts on a 3 chip SNES yet - the whole project is on hold for me at the moment. I was never able to get past the grid pattern on any of my own SNES Jr. tests".

I still think it's worth testing against both 3-chip and 1-chip consoles to see if this hardware difference is a factor at all for SA-1 patch compatibility:

SA-1 with chamfered edge
- We know that it works on 3-chip consoles (for example your new build with the Japanese donor board, and my build for the guide; my SFC contains a 3-chip motherboard as well)
- S̶o̶ ̶f̶a̶r̶ ̶I̶ ̶h̶a̶v̶e̶n̶'̶t̶ ̶s̶e̶e̶n̶ ̶a̶n̶ ̶e̶x̶a̶m̶p̶l̶e̶ ̶s̶h̶o̶w̶i̶n̶g̶ ̶t̶h̶a̶t̶ ̶i̶t̶ ̶a̶l̶s̶o̶ ̶w̶o̶r̶k̶s̶ ̶w̶i̶t̶h̶ ̶1̶-̶c̶h̶i̶p̶ ̶c̶o̶n̶s̶o̶l̶e̶s̶ ̶–̶ ̶t̶h̶e̶r̶e̶ ̶m̶a̶y̶ ̶b̶e̶ ̶s̶o̶m̶e̶ ̶o̶u̶t̶ ̶t̶h̶e̶r̶e̶ ̶t̶h̶a̶t̶ ̶j̶u̶s̶t̶ ̶d̶o̶n̶'̶t̶ ̶m̶e̶n̶t̶i̶o̶n̶ ̶t̶h̶a̶t̶ ̶t̶h̶e̶ ̶c̶o̶n̶s̶o̶l̶e̶ ̶i̶s̶ ̶a̶ ̶1̶-̶c̶h̶i̶p̶ ̶m̶o̶d̶e̶l̶ Edit: works on 1-chip consoles as well, see below

SA-1 with dot:
- So far I haven't seen any example showing that it works on any console, be it 3-chip, or 1-chip

If you do decide to switch the SA-1 from your PAL PGA European Tour PCB to NTSC mode; in case it's not enough to lift pin 127, and you'll have to connect it to GND, I've annotated suitable 5V (for setting it to PAL mode) and GND (for setting it to NTSC mode) hookup points below. The photo is from a PAL PGA European Tour PCB:



Last edited by 6t8k on Fri Oct 09, 2020 10:00 pm, edited 1 time in total.

Top
 Offline Profile  
 
 Post subject: Re: TUT: Slowdown-free Gradius 3: Building SNES SA-1 Convers
PostPosted: Fri Oct 09, 2020 9:09 pm 



Joined: 03 Oct 2020
Posts: 8
OK so I just did a quick test, as you got me thinking about the 1 chip issue. I managed to get my working Japanese cart to boot fine on the PAL 1 chip using the adapter. So it looks like there isn't an issue with the game on 1 chips per se. It's looking more and more like the SA-1 chip is the culprit for the issues I was having. I'll do some more testing with the PAL European tour cart on Sunday.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Space Pilot 3K template by Jakob Persson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group