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 - /CE signal on Game Gear pinout

Reply to topic
Author Message
  • Joined: 07 Aug 2007
  • Posts: 222
  • Location: Yach, Germany
Reply with quote
/CE signal on Game Gear pinout
Post Posted: Tue Aug 28, 2007 8:42 pm
Is /CE active only if the Z80 is accessing the cart's address space?
If I want to use only 48KB of a 512Kb EPROM, can I just connect data lines, address lines and connect both the EPROM's /OE and /CE to the Game Gear's /CE (ignoring the M0-7, M8-B)?

Philipp
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Wed Aug 29, 2007 2:55 pm
PkK wrote
Is /CE active only if the Z80 is accessing the cart's address space?
If I want to use only 48KB of a 512Kb EPROM, can I just connect data lines, address lines and connect both the EPROM's /OE and /CE to the Game Gear's /CE (ignoring the M0-7, M8-B)?
Philipp


It isn't. /CE is asserted whenever /MREQ is low and the cartridge slot enable bit in $3E is set regardless of the address. So you get a conflict with $C000-$FFFF.
Likewise /M0-7 and /M8-B are asserted when /MREQ is low and the appropriate address ranges are selected, but they always enabled regardless of the slot that's enabled.

So you'd have to OR both /M0-7 and /M8-B together for a strobe that was asserted within $0000-$BFFF, and use that for the EPROM /OE. Then use /CE for EPROM /CS.
  View user's profile Send private message Visit poster's website
  • Joined: 07 Aug 2007
  • Posts: 222
  • Location: Yach, Germany
Reply with quote
Post Posted: Wed Aug 29, 2007 4:34 pm
It seems the 74LS21 will follow me from the ColecoVision to the Game Gear then (unless I replace it by a 16V8).

Philipp
  View user's profile Send private message Visit poster's website
  • Joined: 07 Aug 2007
  • Posts: 222
  • Location: Yach, Germany
Reply with quote
Post Posted: Tue Sep 11, 2007 12:09 pm
What happens to these lines when the BIOS is active? I see /CE going low every few clocks even when the BIOS is in it's endless loop when no "TMR SEGA" has been found.
I suppose the GameGear just ignores the value on the external data bus and uses the value from the internal BIOS ROM only.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Wed Sep 12, 2007 3:39 pm
PkK wrote
What happens to these lines when the BIOS is active? I see /CE going low every few clocks even when the BIOS is in it's endless loop when no "TMR SEGA" has been found.
I suppose the GameGear just ignores the value on the external data bus and uses the value from the internal BIOS ROM only.


I think that's what happens. The GG works a little differently from the SMS in that respect:

When the BIOS is enabled, it occupies the first 1K of memory and the game cartridge takes up the remaining space. This way the BIOS can still check for the "TMR SEGA" header at $7FFx. AFAIK it doesn't have to copy code into RAM and switch slots like the SMS BIOS does.

So it's likely to be as you said, the /CE pin is forced high when the first 1K of memory is accessed, and internally the BIOS data is enabled instead. Outside of that range /CE is enabled like normal.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14761
  • Location: London
Reply with quote
Post Posted: Wed Sep 12, 2007 4:45 pm
Yes, the GG BIOS overlays the first 1KB. However, I can't imagine why /CE would be triggered during the BIOS's infinite loop, I'm fairly sure it goes into a loop rather than repeatedly checking the cartridge slot.
  View user's profile Send private message Visit poster's website
  • Joined: 07 Aug 2007
  • Posts: 222
  • Location: Yach, Germany
Reply with quote
Post Posted: Thu Sep 13, 2007 12:49 pm
The GameGear pulls both /CE and /E0000 low repeatetly in the BIOS loop.
The loop consists of a single jr z, -2 instruction. /CE and /E0000 are pulled low three times. Once for reading each of the bytes of the jr z, -2 and once to read another byte (not always the same, somtimes address lines are unstable while reading this). The whole process takes 12 clocks (as a jr z, -2 that jumps should according to Rodnay Zaks "Programmierung des Z80").

I've attached a screenshot: The yellow line is /CE, the blue lines are from top to bottom: CLK, /E0000, A5, A4, A3, A2, A1, A0.

Philipp
ggce.jpeg (36.41 KB)
GameGear signals during BIOS loop
ggce.jpeg

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14761
  • Location: London
Reply with quote
Post Posted: Thu Sep 13, 2007 1:24 pm
Well then... it's quite possible the BIOS overlay is handled at a lower level, so when executing the BIOS, reads still go to the cart, but the returned values are discarded. Certainly, on the SMS this doesn't happen because the buses on the various slots/chips are wired in parallel, /CE is used to select; it's possible the BIOS ROM is on a dedicated switched bus inside the ASIC with the Z80.
  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!