Help to interchange a Sonic 3 ROM to a SEGA 171-6279A board

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
Post Reply
crissaegrim87
Posts: 15
Joined: Tue Oct 06, 2020 5:51 pm

Help to interchange a Sonic 3 ROM to a SEGA 171-6279A board

Post by crissaegrim87 »

Well, as the title says, I have a sonic 3 ROM chip that transplanted to a sega 171-6279A board. As of now the game plays fine and save normally. But if i put into a S&K cart, it is completely ignored. I do have a bootleg sonic 3 wich is recognized perfectly by S&K. All the traces in the cart are good, no corrosion or anithing. Any ideas?
NHL95 with S3 MASKROM.jpeg
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: Help to interchange a Sonic 3 ROM to a SEGA 171-6279A board

Post by TmEE »

I'm pretty sure this is because of the simple mapper on the PCB you used. Sonic3 has switchable SRAM visibility in the 2nd MB of ROM space, while the board you use has SRAM always visible. I'm pretty sure S&K cart requires ability for SRAM switching to work right.
crissaegrim87
Posts: 15
Joined: Tue Oct 06, 2020 5:51 pm

Re: Help to interchange a Sonic 3 ROM to a SEGA 171-6279A board

Post by crissaegrim87 »

TmEE wrote: Fri Mar 17, 2023 2:44 pm I'm pretty sure this is because of the simple mapper on the PCB you used. Sonic3 has switchable SRAM visibility in the 2nd MB of ROM space, while the board you use has SRAM always visible. I'm pretty sure S&K cart requires ability for SRAM switching to work right.
So if I disable sram manually will it work? With something like a dpdt switch?
crissaegrim87
Posts: 15
Joined: Tue Oct 06, 2020 5:51 pm

Re: Help to interchange a Sonic 3 ROM to a SEGA 171-6279A board

Post by crissaegrim87 »

Ground/5v to CE will be enoug? does it erase the saves?
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: Help to interchange a Sonic 3 ROM to a SEGA 171-6279A board

Post by TmEE »

No, this is software controlled stuff. You need to recreate the circuit on the original Sonic3 cart, which uses a 74x74 to hold one bit that controls if SRAM is visible or not, triggered by writes to $A130xx range (signalled by !TIME on the cartslot)
crissaegrim87
Posts: 15
Joined: Tue Oct 06, 2020 5:51 pm

Re: Help to interchange a Sonic 3 ROM to a SEGA 171-6279A board

Post by crissaegrim87 »

Oh, too bad :( . So no chance doing that I think. Maybe checking what/what not is present besides the pair of 74*74 and the traces. I was planning to build a SMS phantasy star using an afterburner as a donor, soldering the sram chip and the backup circuit. I think this sonic 3 conversion is beyond my understanding. Thank you for your time.
stan423321
Posts: 53
Joined: Wed Sep 09, 2020 3:08 am

Re: Help to interchange a Sonic 3 ROM to a SEGA 171-6279A board

Post by stan423321 »

Allow me to resummarize notes from plutiedev and GameHut on how S&K lock-on works, in case anyone in the future cares.

The usual Sega cartridge setup is that, unsurprisingly, whatever ROM it got is mirrored through entire 4 MiB window where a cartridge is supposed to go. Things get more complicated if SRAM or FeRAM is present - the special address hides second half of the ROM area to reveal it, which also doubles as a write protection lock. If the game happens to fit in 2 MiB, it is "easy" to program it so that it also works with (Fe/S)RAM being persistently mapped in there, you just need to not use the mirror in the second half of the ROM window, and it would seem S3 does so. However, that's just not what the official S3 board did - I would hazard a guess the same PCB could work with a 4 MiB game this way.

Since S3&K saves are stored in S3 cartridge, S&K needs to be able to access both S3 ROM and (Fe/S)RAM. Unsurprisingly they both go into the latter half of the ROM window while S&K takes the first half. However, the interesting part is that in both cases, S&K lets the real address reach the S3 cartridge, which breaks the persistent mapping cartridge, which would rather have ROM accesses remapped back into the lower half of the window. Why did they make it this way and not the other way? Probably just since it was simpler and worked with real S3 cartridge just as well.

There is an additional bit of complexity caused by S2&K not fitting into the main S&K ROM. The extra ROM with relevant data is mapped in the same way (Fe/S)RAM is, regardless of the connected game, but doesn't interfere with S3&K since S3 (Fe/S)RAM isn't that big.
Post Reply