/GAME or /XROM used by any C128 Carts?

Started by Hydrophilic, November 25, 2009, 04:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hydrophilic

Currently there a couple of active threads regarding multiplexing ROMs or other devices, like SRAM.

I've always thought that for C128 (maybe even CP/M) mode that the /GAME and /XROM lines of the MMU would be an excellent interfacing option.  AFAIK, these are normally only used with C64 cartridges and if either line is active (0 volts = active, explains / character before name) when you power-up, C64 mode is automatically selected.

So I'm thinking for C128-mode, both of these lines would be freely available for programing / hardware-expansion purposes.  Some have questioned my assumption.  That is healthy skeptisism, because it would very bad for the C128 to try to pull one of these lines low while an attached cartridge is trying to pull the same line high... or vice versa... either way you risk burning up a chip or two if they are fighting each other.

So my question for all you cartridge owners (I have zero) is:

Are there any C128-mode cartridges that use the /GAME or /XROM lines that hardware hackers should know about?
I'm kupo for kupo nuts!

SmallCleverDinosaur

The GAME and EXROM lines are physically connected to the MMU, and bits 4-5 of the Mode Configuration Register of the MMU ($D505) controls the lines.

Mapping the 128 includes the following (page 413):

"Writing to one of the bits sets the corresponding line's output level. Writing a %0 to the bit pulls the line to a low (0 volts) state, while writing a %1 to the bit allows the line to go to a high ( + 5 volts) state. When used for input, an external device connected to the line can pull the line low if its output level is set high, but cannot bring the line high if its output level is set low, so writing a %0 to one of these bits effectively blocks the use of the line as an input."

When reading that it seems like the MMU protects both itself and any connected chip from burning up after fighting each other? Or maybe my conclusion is wrong? Many years since I experimented with digital circuits :)

I have a few C128 cartridges but none of them use the GAME/EXROM lines as input or output. The exception are those that are both C64/C128 cartridges at the same time. But then these lines are only used to switch to C64-mode when starting the computer.
Ignorance is a precious thing. Once lost, it can never be regained.

Hydrophilic

The MMU is setup to output 1's which is safe.  Which is why C64 mode would be safe if hardware projects were to use /GAME and /XROM because the MMU cannot be reprogrammed in C64 mode.  Thanks, SmallCleverDinosaur, for quoting the relevant documentation I was thinking of.

But in C128 mode (and CP/M mode) you can set /GAME and /XROM to output 0 which might not be safe if a cartridge uses the lines; according to the docs you provided

"...an external device [cartridge] connected to the line... cannot bring the line high if its [MMU's] output level is set low..."

This implies to me the MMU is using open-collector logic.  If cartridge also uses open-collector (or not use the lines at all) then there is no problem.  I just want to be sure there are no C128 mode carts that use the line(s) because they might not use open-collector but totem-pole circuitry instead!

An example of this type of problem that has been reported is with the CIA and Sega game controllers.  You can plug these into the joystick port and the direction pad and B button works, but it can cause problems because the controller actively pulls unused lines high (totem-pole circuit).  I've read that the CIA or game controller can get burnt out unless you put a diode on the line.

I own one of these Sega game controllers and can testify the keyboard (also connected to the CIA) will act funny when it is connected (I need to put in some diodes).

So I just want to be sure nobody knows of any C128 carts that use either /GAME or /XROM in C128 mode (in C64 the MMU lines are forced high which is safe)...
I'm kupo for kupo nuts!

richardc64

Mapping the C128, page 413, also goes on the say, "...the pins must be high during reset or the system will enter Commodore 64 mode."

I take this to mean that if something were to go awry while either (or both,) pins were low, so that the only recourse was to press Reset, you'd get dumped to C64 mode, with chunks of ROM missing, requiring a second hard reset to get back to 128 mode -- not that that would be so terrible, I suppose.
"I am endeavoring, ma'am, to create a mnemonic memory circuit... using stone knives and bearskins." -- Spock to Edith Keeler