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 - Gamegear flashcart with cpld mapper

Reply to topic
Author Message
  • Joined: 31 May 2019
  • Posts: 4
Reply with quote
Gamegear flashcart with cpld mapper
Post Posted: Tue Jun 09, 2020 2:39 am
I need tout help guys.
I've came across rene's SMS mapper from db-electronics on github and was wondering if it could be easily ported to gamegear? I was hoping to develop a 8mb flashcart using a altera 5m40ze64 cpld. I'll need level shifters LVC16245A. I'll need to pull down /gg. Il was wondering if any other things needs to be taken into consideration.

Thanks for the hints
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13283
  • Location: London
Reply with quote
Post Posted: Tue Jun 09, 2020 7:57 am
No, the mapper is identical between SMS and GG.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 341
  • Location: Auckland - NZ
Reply with quote
Post Posted: Tue Jun 09, 2020 9:17 am
This may be of interest..

https://www.smspower.org/forums/12931-GameGear1MegaByteMemoryInterfaceUsing3155912MapperFinallyWorking

Several existing game gear games use an external mapper so you may be able to use one of those with a new rom.
  View user's profile Send private message
  • Joined: 31 May 2019
  • Posts: 4
Reply with quote
Post Posted: Tue Jun 09, 2020 3:42 pm
I've seen this flash cart, its a nice project :) But I'd like to avoid salvaging donnor cartridge.

I was thinking using Db-electronics sms vhdl mapper

And porting it to a altera 5m40ze64 cpld in Quartus II.

I removed the serial eeprom stuff since I dont think i need it.
Someone could check the vhdl code to see if its OK

For the Rom since Altera V cpld I/O's are 3.3v tolerant, I need a 3.3v.
I was thinking something like a MX29L3211 since its widely affortable. Any other suggestion? It could also be a tsop, I have adapters here.

From cartridge edge bus A0~A13 directly to ROM (level shifted off course ;) A15~A19 would come from the Altera CPLD.

Since I'm planning to use a 3.3v instead of 5v Rom, do I need to open-drain high addresses and WE and CE with 1k pull up?

Ram part seems pretty easy stuff.

I'll work on the schematic and share it with you guys, lets make it together :D

Thanks for your hints.
SMSMapper.vhd (5.14 KB)

  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 341
  • Location: Auckland - NZ
Reply with quote
Post Posted: Tue Jun 09, 2020 8:38 pm
Wouldnt a 5v rom be a little simpler to design with? Youd then only need to level shift between the cpld and rom instead of the entire rom.
  View user's profile Send private message
  • Joined: 31 May 2019
  • Posts: 4
Reply with quote
Post Posted: Tue Jun 09, 2020 10:07 pm
at first I was thinking using AM29F16D Rom wich is 5v, but then the issue is with the Altera cpld, its only 3.3v tolerant.

Looking at the mapper its needs inputs A0~A15 & D0~D7 from the Gamegear bus so I still need to level shift the whole bus.
  View user's profile Send private message
  • Joined: 22 Apr 2018
  • Posts: 208
Reply with quote
Post Posted: Sat Jun 27, 2020 4:58 pm
This looks like a really interesting project! And yeah, modern flash cartridges (for example) do indeed level shift the whole bus.

Any interest in also including "cartridge audio" hardware for FM sound in your Game Gear games? The Game Gear cartridge bus supports it, and the games themselves only need very minor patching to use it (basically to just assume FM is available, rather than probing for it which won't work.)

Also, any interest in including 32KB of cartridge RAM too, ideally with either socketed backup battery or backup to flash? I believe this can make it a bit less constricting to develop new homebrews for the platform and also aid in porting some of the MSX1 library to Game Gear. If it can additionally be mapped into the end of the first page this could make it able to run games originally built for the Jumbo/DahJee RAM adapter.

Another feature that could be very useful when trying to port MSX1 games and Korean SMS games would be support for an alternate 8KB paging granularity, where there are 6 pageable 8KB regions in the regular cartridge address space (8 if the Game Gear internal RAM is switched off) instead of just 3 16KB ones (or 4 with internal RAM off.)

If each of these pages can additionally be mapped to RAM instead of ROM (especially if the cartridge RAM supports a paging model too and there is a lot of it) under program control, porting from many other 8-bit systems (e.g. ZX Spectrum or even some CP/M machines, with disk emulated by RAM or ROM) becomes viable, and it also becomes a very valuable development tool. If the write access can additionally be toggled off and on for a page of RAM through mapper control, suddenly more capabilities become available (e.g. dynamic patching a la Game Genie where different patches can be toggled on and off without re-flashing or replacing the ROM.)

Finally, when you write 8mb is that 8 megabytes or 8 megabits? If it's 8 megabytes (or even 4, the limit I believe for Sega mapper ROM paging) I am very interested! If it's 8 megabytes, is there a separate control register for the "high bit" of the paging register?
  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 341
  • Location: Auckland - NZ
Reply with quote
Post Posted: Mon Jun 29, 2020 12:54 am
bsittler wrote
Any interest in also including "cartridge audio" hardware for FM sound in your Game Gear games? The Game Gear cartridge bus supports it, and the games themselves only need very minor patching to use it (basically to just assume FM is available, rather than probing for it which won't work.)


Are the audio inputs meant for the tv tuner actually active when a game is inserted? Or only in tv mode?

Why wouldn't probing work on the game gear? Due to lack of the /joydis pin to disable the io chip during probing?
  View user's profile Send private message
  • Joined: 31 May 2019
  • Posts: 4
Reply with quote
Post Posted: Tue Jun 30, 2020 10:08 pm
Here is the schematic I'm working on.
I already included the vhdl mapper.
Any thoughts about it so far?
gg.pdf (54.57 KB)

  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 341
  • Location: Auckland - NZ
Reply with quote
Post Posted: Tue Jun 30, 2020 11:30 pm
Do you need to pull ram /we high as well, like you have with ram /ce, just as a safety measure during power up or down? Those expensive sram battery controller chips do that.. but it may not be essential.
  View user's profile Send private message
  • Joined: 22 Apr 2018
  • Posts: 208
Reply with quote
Post Posted: Thu Jul 02, 2020 5:34 am
wasup wrote
bsittler wrote
Any interest in also including "cartridge audio" hardware for FM sound in your Game Gear games? The Game Gear cartridge bus supports it, and the games themselves only need very minor patching to use it (basically to just assume FM is available, rather than probing for it which won't work.)


Are the audio inputs meant for the tv tuner actually active when a game is inserted? Or only in tv mode?

Why wouldn't probing work on the game gear? Due to lack of the /joydis pin to disable the io chip during probing?


Audio inputs do indeed work outside TV mode. Verified by covering TV mode pins on the tuner with nonconductive tape.

Probing problem is only assumption on my part, indeed due to missing the pin.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!