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 - Making a SEGA card and mapper (this time fully open)

Reply to topic
Author Message
  • Joined: 24 Sep 2013
  • Posts: 123
Reply with quote
Making a SEGA card and mapper (this time fully open)
Post Posted: Thu Jun 27, 2019 9:34 am
Two years ago I made a SEGA card clone with a mapper clone made out of discrete components, the bad part is that I made it with a not-really-legally-licensed and proprietary CAD solution (Proteus) and would put in trouble other people if I released it as is, so this time I'm fixing some issues it had, moving the mapper connector to a single 40pin header as to allow development of Hardware, and using KiCAD instead of any proprietary solution.

I would like some feedback on this part of the circuit, which should work as a plain 32K cartridge, especially the ROM #CE line, which I'm not really sure if that's the correct way to use it, even though "it works" on the current revision of the board, and the chosen board dimensions, which are slightly smaller (a few dozen Thou narrower) since current board revision "scratches" the SMS port sides, board thickness increased from 1.6mm (which barely works) to 2mm (closer to real card thickness)

The mapper will attach to the pin header, and will be released in a similar fashion later on this same thread. Separating it makes the boards cheaper to manufacture and allows the card port to be used as a general purpose peripheral port.

Note that, with no mapper attached, you can put 5 jumpers between pins 32 to 40 and 31 to 39 to set ROM upper address to Zero and ROM A14 to Z80 A14, giving 32K of address space.

Attached to this message are design files and PDF prints of them. Feedback welcome! :)
sega_flash_card_v2.zip (170.94 KB)

  View user's profile Send private message Visit poster's website
  • Joined: 24 Sep 2013
  • Posts: 123
Reply with quote
Post Posted: Fri Jun 28, 2019 4:53 pm
Mapper module ready for use. No more need for "Donnor Cartridges" or FPGAs. At least for SLOT1/2 games. Also, while intended to be used with the SEGA mycard board above, it is a complete functional unit by itself, so it can be used as a module on any other board.

Maximum ROM size 512KByte (32x16K).
Attached to this post, board design files and PDF prints.
pinout.png (63.85 KB)
Module Pinout
pinout.png
mapper-module-v2.zip (186.59 KB)
SEGA Mapper clone
firmware.zip (1.14 KB)
GAL16V8 Firmware

  View user's profile Send private message Visit poster's website
  • Joined: 08 Sep 2018
  • Posts: 147
Reply with quote
Post Posted: Fri Jun 28, 2019 6:18 pm
Interesting, How spot on is the mapper? have you tested any official games with this design?
  View user's profile Send private message
  • Joined: 24 Sep 2013
  • Posts: 123
Reply with quote
Post Posted: Fri Jun 28, 2019 7:44 pm
Last edited by NeonMan on Fri Jun 28, 2019 8:05 pm; edited 1 time in total
IllusionOfMana wrote
Interesting, How spot on is the mapper? have you tested any official games with this design?


It is a redesign of a previous project which had a working mapper. I made very minor changes, switched to CMOS (from TTL), used some SMD components and made it into a module on itself as not to depend on the SEGA card board. And of course, this time is legal for me to release it xD

So far I've successfuly tested:

- Sonic the hedgehog 2 (to completion)
- Bubble Bobble*
- Chuck Rock 2 (to completion)
- Ecco the Dolphin (Uses both SLOT1/2)

(*) Patched to work from Card Slot
So I'd say the design is solid enough.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2465
Reply with quote
Post Posted: Fri Jun 28, 2019 7:59 pm
How hard would it be to make it support up to 256 16KB banks (4 MB)?
  View user's profile Send private message Visit poster's website
  • Joined: 08 Sep 2018
  • Posts: 147
Reply with quote
Post Posted: Fri Jun 28, 2019 8:05 pm
I assume no SRAM support?
  View user's profile Send private message
  • Joined: 24 Sep 2013
  • Posts: 123
Reply with quote
Post Posted: Fri Jun 28, 2019 8:07 pm
sverx wrote
How hard would it be to make it support up to 256 16KB banks (4 MB)?


* Finding a 4MB flash/EEPROM that can tolerate 5V
* Exposing the remaining 3 address/data pins (new PCB required, but same electronics)
  View user's profile Send private message Visit poster's website
  • Joined: 24 Sep 2013
  • Posts: 123
Reply with quote
Post Posted: Fri Jun 28, 2019 8:09 pm
IllusionOfMana wrote
I assume no SRAM support?


Not yet, but could be done.
Adding SRAM is bulky, will need extra work, and I don't currently have studied how SRAM works. Wasn't a priority.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2465
Reply with quote
Post Posted: Sat Jun 29, 2019 10:29 am
NeonMan wrote
sverx wrote
How hard would it be to make it support up to 256 16KB banks (4 MB)?

* Finding a 4MB flash/EEPROM that can tolerate 5V


I wonder... is 512 KB the biggest? Anyway, what about having two chips on the PCB eventually?
  View user's profile Send private message Visit poster's website
  • Joined: 24 Sep 2013
  • Posts: 123
Reply with quote
Post Posted: Sat Jun 29, 2019 2:09 pm
There are a couple ways to get around the limits. Bigger ROMs, there are some TSSOP packages ones that tolerate 5V IIRC. you can also have multiple 512K ROMs and select each one with a muxer circuit (rather easy hack) or use bigger and wider ROMs (a 512KWord ROM at 16bit would yield 1MByte)

Neither would require significant mapper changes but would make the cartridge board significantly more complex/bigger.

Edit: The prototype cart on the 22nd anniversary post has 4 ROM chips and a suspiciously placed demuxer circuit (74HC157) so I'm guessing SEGA used this very same hack to "merge" multiple EPROMs. With up to a 1-to-8 demultiplexer you could manage a huge 8-ROM cartridge of 256x16K size.
  View user's profile Send private message Visit poster's website
  • Joined: 08 Sep 2018
  • Posts: 147
Reply with quote
Post Posted: Sun Jun 30, 2019 5:35 pm
coming back to this since the design for the mapper expansion board features multiple chips. Would it not be cheaper to just use a single micro controller or CPLD? That way if you ever wanted bigger rom or sram support, you shouldnt need a ton of extra components.
  View user's profile Send private message
  • Joined: 24 Sep 2013
  • Posts: 123
Reply with quote
Post Posted: Sun Jun 30, 2019 7:02 pm
IllusionOfMana wrote
coming back to this since the design for the mapper expansion board features multiple chips. Would it not be cheaper to just use a single micro controller or CPLD? That way if you ever wanted bigger rom or sram support, you shouldnt need a ton of extra components.


I tried, just search PIC 18F44K22 on this forum, but a microcontroller is way too slow for this purpose, and 32bit micros (like the Teensy Boards) are even worse since interrupts and branches are slower per cycle, as far as I tried.

The instruction budget (talking from memory here) I had for a mapper, using the 18F series PIC micro was ~10/8 instructions total running the micro at a clock speed of 64Mhz and writing all the code in assembler. And I almost managed to make a SLOT2-Only mapper within that budget. SLOT1/2 was not doable and SLOT0 and SRAM were out of question.

I'm not saying is not doable using other micros, Cypress arm cores have a programmable logic cell like a CPLD and looked very promising, but regular CPLDs were a faster solution at a reasonable price point. More or less the price of a "beefy" 8-bit microcontroller, around $4 buying small quantities and PDIP for the PLDs, using all-SMD and buying bulk would be cheaper.

Using a single CPLD would probably be cheaper, even when 16v8 GALs are pretty cheap. Main reason I'm using that one is my programmer accepts them and the package (PDIP/SOIC) I easy to solder unlike the Altera MAX devices (everdrive uses these one IIRC) which I considered using at some point, are also cheap but not easy to solder by the average hobbist. After all, tradeoffs were made and, since the PLD firmware source code will be released soon, anyone can adapt the design eventually :)
  View user's profile Send private message Visit poster's website
  • Joined: 24 Sep 2013
  • Posts: 123
Reply with quote
Post Posted: Yesterday at 4:39 pm
Boards arrived and im missing just one component. However, here's the current aspect. ROM on black board, mapper on green board.



the card half has been tested and it works. Mapper testing will proceed when I get the 40pin connector I'm missing on the pic. And once is all tested, release the firmware source with it.
card-comparison.jpg (131.16 KB)
card
card-comparison.jpg

  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!