Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Simplest SEGA Mapper with off the shelf parts.

Reply to topic
Author Message
  • Joined: 24 Sep 2013
  • Posts: 141
Reply with quote
Simplest SEGA Mapper with off the shelf parts.
Post Posted: Sat Oct 17, 2020 9:56 pm
I've reworked my current mapper replacing the ATF16V8 PLDs, which require a dedicated programmer and are pretty much obsoleted, with a 512K Flash ROM that anyone can even order pre-programmed from some vendors (like Microchipdirect).

In essence the mapper needs the Flash ROM programmed with the attached .bin file, 5 10K resistors and 1 or 2 74HC573 latches, the circuit is as follows:



Connect the game ROM to the mapper as follows:

Game ROM       Mapper
A14            ROM-A14
A15            ROM-A15
A16            ROM-A16
A17            ROM-A17
A18            ROM-A18
!CE            !ROM_CE

Connect the rest of the game ROM pins to the SMS slot like a regular ROM.


I've ordered a few boards with this design. Further testing of this mapper required but it seems to work.
mapper-flash.png (37.18 KB)
mapper-flash.png
mapper.zip (1.93 KB)

  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 435
  • Location: Auckland - NZ
Reply with quote
Post Posted: Sun Oct 18, 2020 6:01 pm
Thats a cleaver approach. I like that!
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3758
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Mon Oct 19, 2020 11:46 am
Would you mind explaining how are you using a ROM as a mapper?
Thanks! :)
  View user's profile Send private message Visit poster's website
  • Joined: 24 Sep 2013
  • Posts: 141
Reply with quote
Post Posted: Mon Oct 19, 2020 2:36 pm
sverx wrote
Would you mind explaining how are you using a ROM as a mapper?
Thanks! :)


From the SST39SF040 datasheet there is an option to drive the Data bus via changes on the Address bus without resetting !CE or !OE, making the ROM (chronogram on page 14) into an asynchronous programmable combinatorial circuit.

Also, is not the rom by itself doing all the work. You need the latch circuits and some pull-downs as well. The ROM just controls when to update and activate the address latches.
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2021
  • Posts: 1
Reply with quote
Post Posted: Thu Apr 22, 2021 8:52 pm
Brilliant! I was analising your code, and thinking about implement on-cartridge RAM.
  View user's profile Send private message
  • Joined: 27 Jun 2020
  • Posts: 212
Reply with quote
Post Posted: Sun May 30, 2021 8:06 am
Perfect!! You're the man! I started a post on this without looking through the forum first!

Have you done any further testing since the post? I want to bootleg some exotic games like SORII and other large 512kb ROMS.. would this support?
  View user's profile Send private message
  • Joined: 10 May 2015
  • Posts: 23
Reply with quote
Post Posted: Tue Jun 01, 2021 11:32 am
That's pretty interesting.
It raised a doubt I have for years and think that's the perfect occasion to ask:
Do we really need to decode the full address bus?
I mean, does any game assert the cartridge's /CE and /WE on other addresses that are not mapper related?
  View user's profile Send private message
  • Joined: 24 Mar 2021
  • Posts: 120
Reply with quote
Post Posted: Tue Jun 01, 2021 5:22 pm
Games that use the 3D glasses write to the region at $FFF8-$FFFB, so you need to include A2 at least.

I helped design a mapper replacement that ignores A9-A3 and it seems to work ok. (i.e. writes to $FC00-$FFF7 would be problematic but apparently don't happen)
  View user's profile Send private message
  • Joined: 27 Jun 2020
  • Posts: 212
Reply with quote
Post Posted: Sat Jun 05, 2021 5:11 am
I've ordered ST M27C4001-10F1 4mbit EPROMS (for master system ROM) + the SST39FS040 for your Mapper here.

Planning on throwing a PCB together later, should squeeze into a shell.

Just confused on when you would need 1 or 2 latches, it doesn't make sense to me having everything doubled up on a bus for the input and output?

If anyone can point me in the right direction, I will make the board as per schematic, with only 1 requiring the external components?
  View user's profile Send private message
  • Joined: 27 Jun 2020
  • Posts: 212
Reply with quote
Post Posted: Sat Jun 05, 2021 5:14 am
Also the 10k resistor on A14 latch 1, where's that going? is that a pull up?
** sorry didn't look properly, just another pull down

You can use a resistor array bus but the ones with common on pin 6 containing 5 resistors seem to be out of stock everywhere. If i find one i will paste it here

** 4306R-101-103LF.
  View user's profile Send private message
  • Joined: 24 Mar 2021
  • Posts: 120
Reply with quote
Post Posted: Sat Jun 05, 2021 11:51 pm
L10N37 wrote
Just confused on when you would need 1 or 2 latches, it doesn't make sense to me having everything doubled up on a bus for the input and output?
The standard SMS mapper effectively has two¹ movable windows, for access to memory when the Z80 is accessing $4000-$7FFF, or $8000-$BFFF. The bottom 16KB effectively always accesses the first 16KB of the external ROM, and the last 16KB effectively always accesses the SMS's built-in 8KB of RAM. So there are two latches to hold each of these.

The trick here is that the two latches' have "output enable" pins. These can be selectively enabled so that only one, the other, or the pull-down resistors, selects which region of the ROM is accessed by the Z80.

This is very similar to the NES mapper used for the unlicensed game Impossible Mission 2, where two latches are used in the same way to increase graphics diversity.

¹Pedantically there's a third window, accessible at $0400-$3FFF. Almost no games use it.
  View user's profile Send private message
  • Joined: 27 Jun 2020
  • Posts: 212
Reply with quote
Post Posted: Sun Jun 06, 2021 3:14 am
lidnariq wrote
L10N37 wrote
Just confused on when you would need 1 or 2 latches, it doesn't make sense to me having everything doubled up on a bus for the input and output?
The standard SMS mapper effectively has two¹ movable windows, for access to memory when the Z80 is accessing $4000-$7FFF, or $8000-$BFFF. The bottom 16KB effectively always accesses the first 16KB of the external ROM, and the last 16KB effectively always accesses the SMS's built-in 8KB of RAM. So there are two latches to hold each of these.

The trick here is that the two latches' have "output enable" pins. These can be selectively enabled so that only one, the other, or the pull-down resistors, selects which region of the ROM is accessed by the Z80.

This is very similar to the NES mapper used for the unlicensed game Impossible Mission 2, where two latches are used in the same way to increase graphics diversity.

¹Pedantically there's a third window, accessible at $0400-$3FFF. Almost no games use it.


Thanks for that.

Is there a simplified way to determine which games require one or both latches?
  View user's profile Send private message
  • Joined: 24 Mar 2021
  • Posts: 120
Reply with quote
Post Posted: Sun Jun 06, 2021 4:19 am
L10N37 wrote
Is there a simplified way to determine which games require one or both latches?
To the best of my knowledge, most games seem to use both. You could use MEKA's debugger to find which ones write multiple different values.

However, trying to optimize this is really the wrong place: the ROM is much more expensive than the latches are.
  View user's profile Send private message
  • Joined: 10 May 2015
  • Posts: 23
Reply with quote
Post Posted: Mon Jun 07, 2021 10:41 am
That's interesting.
Maybe the decoding can be done with a 74'139 if you won't be using the 3D glasses.

About the Codemasters mapper, is it me or it's very similar to NES' UNROM?
  View user's profile Send private message
  • Joined: 24 Mar 2021
  • Posts: 120
Reply with quote
Post Posted: Mon Jun 07, 2021 6:02 pm
Last edited by lidnariq on Tue Jul 06, 2021 12:33 am; edited 1 time in total
Fisher wrote
Maybe the decoding can be done with a 74'139 if you won't be using the 3D glasses.
You'd need to make sure that the register doesn't overlap with SMS-internal RAM, so you have to make sure A13 is high. But you're right that you might be able to get away with much less complete decoding.

A 74'138 might be good enough, checking /MREQ, A13, A2, A1, A0, /WR.
And a separate 74'139 to decode the latch /OEs.

(edit: remove nonsense)

Quote
About the Codemasters mapper, is it me or it's very similar to NES' UNROM?
The "one fixed bank" and "one movable bank" seems to be ubiquitous. I've seen it in a lot of more-modern embedded systems too.
  View user's profile Send private message
  • Joined: 27 Jun 2020
  • Posts: 212
Reply with quote
Post Posted: Tue Jun 22, 2021 7:51 am
Ok guys, made a start
This wasn't done carefully and the readability isn't the greatest but should be good so far.

will use a ~1k resistor to tie the unused address lines on the mapper high, all other unused lines directly to ground. 4 x 0805 caps should suffice for AC shunting/ cleaning up the power.

Should just be a matter of the 50 pin edge connector being added then all the labeling done.

If you see any mistakes give me a heads up, and of course I will credit the author. no rush on the PCB :)

I can see the mistakes on the BUS for slot 1 and 2 OE etc, just squeezed this in between errands and cloning across drives for my main, stuck on a lappy
MAPPERCART.png (130.97 KB)
MAPPERCART.png
screenshot1.png (138.26 KB)
screenshot1.png

  View user's profile Send private message
  • Joined: 10 May 2015
  • Posts: 23
Reply with quote
Post Posted: Tue Jun 22, 2021 11:41 am
Looks like a very nice design!
Thanks for sharing. :-)

I've seen a bootleg cart that used a "sanded" IC and 2x 74LS670.
Not sure if the full mapping with SRAM control was implemented, but would be nice if the sanded IC could be identified.

Probably it's some kind of PAL or GAL...
I'll try to get pictures of it if it ever comes to my hands again.
  View user's profile Send private message
  • Joined: 27 Jun 2020
  • Posts: 212
Reply with quote
Post Posted: Fri Jul 02, 2021 12:59 pm
Does anyone know how to add BATTERY save to this schematic?
haven't gone back to the PCB design yet, being using after burners/ golden axe etc... and now very interested in a copy of Monopoly we have. Found someone that turned that into a retranslation of Phantasy star with no issues. Just wondering how to add save functionality to this.
  View user's profile Send private message
  • Joined: 24 Mar 2021
  • Posts: 120
Reply with quote
Post Posted: Fri Jul 02, 2021 4:03 pm
L10N37 wrote
Does anyone know how to add BATTERY save to this schematic?
You'll need to add another latch, and also have to give up on fully decoding the address bus - the 512KB ROM-as-PLA doesn't have any more inputs, and you need to change the logic depending on what the output of the latch is.

See:
https://www.smspower.org/Development/Mappers#TheSegaMapper

Currently, the two latches on this board are instructed to latch the data bus on a write to $FFFE or $FFFF. The new latch will need to latch a write to $FFFC, but will only care about D3. The output of that latch will need to go back to the ROM, and one of the three unused outputs from the ROM will need to go to /RAM-CE.

The contents of the ROM-as-PLA will also need to change.
  View user's profile Send private message
  • Joined: 27 Jun 2020
  • Posts: 212
Reply with quote
Post Posted: Sat Jul 03, 2021 4:08 am
Thanks Lidnariq. Won't be any room though.. I suspect you'd only jusssst manage to squeeze this into a shell as is... Maybe tracking down well priced monopoly copies to turn into games with save functionality is the best route. There's a gamegear conversion of a really well made RPG from 1995 that I have my eye on...

Mind you an everdrive IS available but lacks that authentic feel lol
  View user's profile Send private message
  • Joined: 16 Mar 2022
  • Posts: 1
Reply with quote
Post Posted: Wed Mar 16, 2022 8:19 pm
Hello, been lurking on the forum for a long time, decided to finally register an account.

Has anybody tested this mapper in real hardware? I'm considering making a cart for personal use using it, I can share the schematics and PCB design after its done if it is of interest of you guys and NeonMan permits me.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!