Jump to content
IGNORED

7800/2600 dual-boot cart possible?


supercat

Recommended Posts

Would it be possible to construct a bank-switched cart which could boot into either 7800 or 2600 mode? I recognize that there would be severe limits on what it could do in 7800 mode due to the lack of normal address pins, but it would be interesting to be able to have a game that could, e.g., display instructions using the 7800's high-resolution mode and yet still run as a 2600 game.

 

Given that the 7800 seems to allow for an encrypted area of only 4K (put an $F7 at $FFF9) it would seem like doing a 4K cart wouldn't be a problem except that there's not a whole lot one can do in 4K. A larger cart would seem to risk problems with the 7800 hitting bank-switch registers, though if the 7800 hits such registers in predictable fashion it might be possible to deal with that.

 

Has anyone done such a thing, or am I just crazy for thinking of it?

Link to comment
Share on other sites

Would it be possible to construct a bank-switched cart which could boot into either 7800 or 2600 mode?  I recognize that there would be severe limits on what it could do in 7800 mode due to the lack of normal address pins, but it would be interesting to be able to have a game that could, e.g., display instructions using the 7800's high-resolution mode and yet still run as a 2600 game.

 

Given that the 7800 seems to allow for an encrypted area of only 4K (put an $F7 at $FFF9) it would seem like doing a 4K cart wouldn't be a problem except that there's not a whole lot one can do in 4K.  A larger cart would seem to risk problems with the 7800 hitting bank-switch registers, though if the 7800 hits such registers in predictable fashion it might be possible to deal with that.

 

Has anyone done such a thing, or am I just crazy for thinking of it?

1014204[/snapback]

 

Sort of yes and no. I think you can force a 7800 game into 2600 but not vice versa. I believe the 7800 diag cart does something like this but I'm not a programmer so maybe I am misinterpreting it. See John Harvey's 7800 Diag cart page for more info.

 

Mitch

Link to comment
Share on other sites

Sort of yes and no. I think you can force a 7800 game into 2600 but not vice versa. I believe the 7800 diag cart does something like this but I'm not a programmer so maybe I am misinterpreting it. See John Harvey's 7800 Diag cart page for more info.

1014254[/snapback]

 

IIRC, the 7800 includes a "mode lock" latch which, once set, disallows future mode switching. Until that latch is set, the machine can freely switch between Maria and Stella modes. The biggest difficulty I can see is that a cart bigger than 4K might get switched from bank to bank during the 7800's power-up validation, thereby causing some confusion. I would think it would be possible to mitigate this, possibly even using the same circuit as the existing AtariAge cart boards but a different 22V10 fusemap (anyone have a schematic?) which would look for address sequences that the 7800 would not generate (e.g. a 32K cart could be programmed to start on the first page and remain there until address $1555 was accessed, switching to the second page; once in the second page, address $1AAA would go to the third while any address over $1000 other than $1AAA would revert to the first. Once on the third page, banking would act "normally".

Link to comment
Share on other sites

Would it be possible to construct a bank-switched cart which could boot into either 7800 or 2600 mode?  I recognize that there would be severe limits on what it could do in 7800 mode due to the lack of normal address pins, but it would be interesting to be able to have a game that could, e.g., display instructions using the 7800's high-resolution mode and yet still run as a 2600 game.

 

Given that the 7800 seems to allow for an encrypted area of only 4K (put an $F7 at $FFF9) it would seem like doing a 4K cart wouldn't be a problem except that there's not a whole lot one can do in 4K.  A larger cart would seem to risk problems with the 7800 hitting bank-switch registers, though if the 7800 hits such registers in predictable fashion it might be possible to deal with that.

 

Has anyone done such a thing, or am I just crazy for thinking of it?

1014204[/snapback]

 

Not a lot you can do in 4K? Guess you've never played the majority of 2600 games.

 

You can switch modes as much as you want, but you are going to have to work to sync up Maria video and TIA video so the switch won't freak out a current monitor. You do have to avoid writing to low addresses (I forget which range) as it will latch it into one mode. And since those addresses are frequently used, you probably can't do much in 2600 mode before you have to access one of them.

 

You don't need to worry about banks switching writing a 2600 game for use only on a 7800 as you can use all odd 4K addresses ($5xxx, $7xxx,...,$dxxx, $fxxx) for 2600 code and all even addresses for 7800 code.

Link to comment
Share on other sites

I remember thinking about it once, and the problem is what the bus does when you have a 7800 cart without the side pins. Remember, with those side pins, the cartridge won't fit into a 2600! So basically, you can ONLY have a 4K game. And there isn't much you can do with 4K on a 7800 because of how Maria memory mapping works. Even worse, in 7800 mode, the RAM will conflict with a cartridge that doesn't use A13-A15 for address decoding! So it's impossible.

 

There are two remaining interesting combinations. A 7800 game that uses the TIA, and a 2600 game that uses A13-A15.

 

A 7800 game that uses the TIA is easy enough, as long as you never lock the mode port, just encrypt the last 4K properly. It's like a 2600 with up to a full 48K of RAM/ROM plus the internal 4K RAM. Supercharger was never this good. But it's still a freaking TIA, and you'll never run it on anything but a 7800, so why bother other than "because it's there"?

 

A 2600 game with extra address lines (using A12 as the chip select) works out like how many larger 2600 games were developed, with an ICE and lots of RAM. You get up to 32K of space, some of which may be cartridge RAM, at every other 4K page. This could be moderately useful for developing 8K or 16K 2600 games. But the Cuttle Cart 2 doesn't have support for this memory mapping (not that it couldn't), so you're on your own.

 

A "flippy" cart with a connector on each end might be possible, but at that point you might as well do what Xonox did and make them two separate boards.

Link to comment
Share on other sites

You do have to avoid writing to low addresses (I forget which range) as it will latch it into one mode.  And since those addresses are frequently used, you probably can't do much in 2600 mode before you have to access one of them.

The mode-select byte is mapped in at $0000-$001F. Therefore you can't do TIA sound in 7800 mode when the mode isn't locked. In 2600 mode you could use the TIA mirror at $0040-$007F though.

 

Even worse, in 7800 mode, the RAM will conflict with a cartridge that doesn't use A13-A15 for address decoding!  So it's impossible.

The RAM is mapped in at $1800-$27FF. Therefore only half of it would conflict with a cartridge that doesn't use A13-A15. Parts of the not-conflicting RAM are used for zeropage RAM and stack RAM though, so you really wouldn't have too much RAM left to create your display lists in.

 

A 7800 game that uses the TIA is easy enough, as long as you never lock the mode port, just encrypt the last 4K properly.  It's like a 2600 with up to a full 48K of RAM/ROM plus the internal 4K RAM.

Unfortunately the RAM is tied with the MARIA. If you disable MARIA support, you also don't get the 4K of internal RAM. Also in TIA mode you get the same TIA mapping as on a 2600. This means that the TIA and the RIOT are mirrord at every even 4K page. Therefore you can only use the odd 4K pages for your code.

 

A 2600 game with extra address lines (using A12 as the chip select) works out like how many larger 2600 games were developed, with an ICE and lots of RAM.  You get up to 32K of space, some of which may be cartridge RAM, at every other 4K page.  This could be moderately useful for developing 8K or 16K 2600 games.  But the Cuttle Cart 2 doesn't have support for this memory mapping (not that it couldn't), so you're on your own.

Atari did develop some bankswitched 2600 games on their 7800 development cartridge this way. In the Cuttle Cart 2 you could use the 48K 7800 game type and put your code only in the odd 4K pages of the ROM image.

 

 

Ciao, Eckhard Stolberg

Link to comment
Share on other sites

The mode-select byte is mapped in at $0000-$001F. Therefore you can't do TIA sound in 7800 mode when the mode isn't locked. In 2600 mode you could use the TIA mirror at $0040-$007F though.

 

Useful to know.

 

The RAM is mapped in at $1800-$27FF. Therefore only half of it would conflict with a cartridge that doesn't use A13-A15. Parts of the not-conflicting RAM are used for zeropage RAM and stack RAM though, so you really wouldn't have too much RAM left to create your display lists in.

 

How does the 7800 work to disable the cartridges from appearing at $F000 during bootup? It gates the upper address lines somehow, right? Could code running out of RAM access other RAM by temporarily disabling the cartridge?

 

Unfortunately the RAM is tied with the MARIA. If you disable MARIA support, you also don't get the 4K of internal RAM. Also in TIA mode you get the same TIA mapping as on a 2600. This means that the TIA and the RIOT are mirrord at every even 4K page. Therefore you can only use the odd 4K pages for your code.

 

Is there any way to get the Maria and TIA 'in sync' with each other to allow glitch-free switching between them?

 

My basic thought is that it might be nice to have a 2600 cart that could take advantage of 7800 features when they're available but would run just fine on either machine. One feature that should be doable without anything too fancy would be NTSC/PAL autodetect (do the various versions of the 7800 BIOS leave different stuff in RAM based upon machine type?) But otherwise, things like being able to do the Strat-O-Gems instant replay without needing a memcard would be cool as well.

Link to comment
Share on other sites

How does the 7800 work to disable the cartridges from appearing at $F000 during bootup?  It gates the upper address lines somehow, right?  Could code running out of RAM access other RAM by temporarily disabling the cartridge?

There is a bit in the mode-control byte which switches between BIOS-ROM and cartridge. I think when the BIOS is selected, the console will pull A12-A15 low on the cartridge port. So you could disable the cartridge at any time until the mode is locked.

 

The RIOT RAM is mapped in at $0480-$04FF in both modes (7800 and 2600). So you could run code from there to switch between modes. I'm not sure if the internal RAM keeps it's data in 2600 mode though. You would have to test that yourself.

 

Is there any way to get the Maria and TIA 'in sync' with each other to allow glitch-free switching between them?

Since games weren't supposed to freely switch between modes, there is no hardware support for that. But there is a flag in 7800 mode that lets you test if the console is in the vertical blank. You might be able to use that to find out when it might be the best time to switch modes.

 

My basic thought is that it might be nice to have a 2600 cart that could take advantage of 7800 features when they're available but would run just fine on either machine.  One feature that should be doable without anything too fancy would be NTSC/PAL autodetect (do the various versions of the 7800 BIOS leave different stuff in RAM based upon machine type?)  But otherwise, things like being able to do the Strat-O-Gems instant replay without needing a memcard would be cool as well.

On the 7800 it's the console that decides how many scanlines a frame should have. PAL consoles do more lines than NTSC consoles. Since you can find out when the 7800 is in vertical sync and there is a WSYNC command in 7800 mode too, you can easily count how many lines the console does between two vertical sync periods. The Asteroids game that is build into the PAL 7800 uses this method to find out what type of console it's running on and to set up it's output accordingly.

 

 

Ciao, Eckhard Stolberg

Link to comment
Share on other sites

It's impossible to make a 24 pin / 4K (2600 style) cartridge which will execute 7800 code with a standard NTSC BIOS. From the Keith Henrickson/Daniel Boris disassembly: at $F8E7 the BIOS runs a full RAM test which fails because the 2600 cart is shadowed at $1800-$1F00. Once the cart is detected as 2600 the BIOS locks the 7800 into 2600 mode which disables all of the 7800 extensions with no way to put it back to 7800 mode.

 

My original plan for SpaceWar! 7800 was to leverage AA's existing 4K 2600 PCBs.

Link to comment
Share on other sites

The mode-select byte is mapped in at $0000-$001F. Therefore you can't do TIA sound in 7800 mode when the mode isn't locked. In 2600 mode you could use the TIA mirror at $0040-$007F though.
I didn't realize that before, but looking at the schematic I see that the latch is selected using only TIACS and RW. So any TIA write with the lock bit set would lock the latch, and even without the lock bit it could change the memory map. Nasty.

 

The RAM is mapped in at $1800-$27FF. Therefore only half of it would conflict with a cartridge that doesn't use A13-A15. Parts of the not-conflicting RAM are used for zeropage RAM and stack RAM though, so you really wouldn't have too much RAM left to create your display lists in.
According to the 7800 docs, there is a mirror of the RAM at $2800-$2FFF. So the whole address space whould conflict.
Link to comment
Share on other sites

According to the 7800 docs, there is a mirror of the RAM at $2800-$2FFF.  So the whole address space whould conflict.

1018825[/snapback]

 

Hmm... that might make things difficult. Of course, using the same address range for reading and writing on the 2600 isn't possible, but my 4A50 cart doesn't seem to realize that...

Link to comment
Share on other sites

According to the 7800 docs, there is a mirror of the RAM at $2800-$2FFF.  So the whole address space whould conflict.

1018825[/snapback]

 

The docs are incorrect. Eckhard Stolberg did some testing and determined there are no RAM shadows.

 

Again, a 24 pin (4K) cartidge in an unmodified NTSC 7800 will result in the BIOS locking the system into 2600 mode because the RAM test will fail due to cart ROM shadowing. Dual-boot 2600/7800 carts are therefore impossible.

Link to comment
Share on other sites

According to the 7800 docs, there is a mirror of the RAM at $2800-$2FFF.  So the whole address space whould conflict.

1018825[/snapback]

 

The docs are incorrect. Eckhard Stolberg did some testing and determined there are no RAM shadows.

That's right. With my 7800 console that was modified to be a cartridge reader I read out the entire 6502 addressing space. And there wasn't anything at $2800-$2FFF. Also I think the manual actually says that the RAM mirror is at $2800-$3FFF, which can't be true, because the HighScore Cart uses $3000-$3FFF for it's ROM.

 

Again, a 24 pin (4K) cartidge in an unmodified NTSC 7800 will result in the BIOS locking the system into 2600 mode because the RAM test will fail due to cart ROM shadowing.  Dual-boot 2600/7800 carts are therefore impossible.

Are you sure about that? The RAM test at $F8E7 is running from within the 7800 BIOS. While the BIOS is enabled, the cartridge is disabled by setting A12-A15 low. So no cartridge should interfere with the RAM test. Also when the RAM test fails, it locks the 7800 into 2600 mode. But it does so in the middle of the BIOS ROM without transfering control to the cartridge. This results in a crash. So if 24 pin cartridges could make this RAM test fail, then no 2600 cartridge should work on the 7800.

 

But if Bruce is right and the mode-select byte reacts to all mirrors of the TIA, then a dual-boot cartridge would be kind of pointless, because you couldn't do much in 2600 mode.

 

 

Ciao, Eckhard Stolberg

Link to comment
Share on other sites

According to the 7800 docs, there is a mirror of the RAM at $2800-$2FFF.  So the whole address space whould conflict.

1018825[/snapback]

 

The docs are incorrect. Eckhard Stolberg did some testing and determined there are no RAM shadows.

 

Again, a 24 pin (4K) cartidge in an unmodified NTSC 7800 will result in the BIOS locking the system into 2600 mode because the RAM test will fail due to cart ROM shadowing. Dual-boot 2600/7800 carts are therefore impossible.

1022529[/snapback]

 

How about using a 7800 cartridge with a proper 7800 signature that stays in 2600 mode? Is that possible?

Link to comment
Share on other sites

How about using a 7800 cartridge with a proper 7800 signature that stays in 2600 mode?  Is that possible?

1022553[/snapback]

 

Sure it'd be possible, but it wouldn't run on the 2600.

 

It would be nice to have a cart (with one connector) that could use the 7800's extra RAM if it exists, but still run in a 2600. What problems would arise if TIA and Maria were both enabled but the Maria was set to output blankness? Would it be possible to either disable the Maria's sync output or else senchronize the TIA to it?

Link to comment
Share on other sites

But if Bruce is right and the mode-select byte reacts to all mirrors of the TIA, then a dual-boot cartridge would be kind of pointless, because you couldn't do much in 2600 mode.
It would only mean that you couldn't leave the mode latch unlocked, whether it's for a 2600 game or a 7800 game. Once the latch is locked, it can't be changed.

 

And in any case, your game will only be started with the latch unlocked if it passes the 7800 signature test.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...