Difference between revisions of "Bankset Bankswitching"

From 8BitDev.org - Atari 7800 Development Wiki
Jump to: navigation, search
(A78 header usage)
 
(15 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
The Bankset bankswitching scheme is a 7800 homebrew-era invention. The Bankset scheme was created by Fred Quimby, in collaboration with Mike Saarna.
 
The Bankset bankswitching scheme is a 7800 homebrew-era invention. The Bankset scheme was created by Fred Quimby, in collaboration with Mike Saarna.
  
Banksets is an extension of the Atari 7800 SuperGame bankswitch format. Similar to SuperGame, there's an ephemeral bank located at $8000-$BFFF, a non-ephemeral bank located at $C000-$FFFF, and hitting the hotspot at $8000 will change the ephemeral bank. Unlike SuperGame, Maria is shown a different section of ROM than the Sally CPU is, with each of these views comprising a different set of banks. Hence the "Banksets" name.
+
Banksets is an extension of the Atari 7800 SuperGame bankswitch mapper. As with the plain SuperGame mapper, there's an ephemeral bank located at $8000-$BFFF, a non-ephemeral bank located at $C000-$FFFF, and hitting the hotspot at $8000 will change the ephemeral bank. Unlike SuperGame, Maria is shown a different section of ROM than the Sally CPU is, with each of these views comprising a different set of banks. Hence the "Banksets" name.
  
 
Compared to SuperGame scheme, the Banksets scheme allows for more overall ROM storage, enables 100% of the cart address space to be dedicated to the display of graphics, and does away with the need to interlace code and graphics within ROM.
 
Compared to SuperGame scheme, the Banksets scheme allows for more overall ROM storage, enables 100% of the cart address space to be dedicated to the display of graphics, and does away with the need to interlace code and graphics within ROM.
Line 23: Line 23:
 
* a bankswitch for Sally is also a bankswitch for Maria, so you still need to pay attention to where your code is running when Maria starts drawing the frame.
 
* a bankswitch for Sally is also a bankswitch for Maria, so you still need to pay attention to where your code is running when Maria starts drawing the frame.
 
* Maria is unable to see any of Sally's ROM. This means any ROM-based character strings either need to be in Maria's bankset, or copied into console RAM prior to display.
 
* Maria is unable to see any of Sally's ROM. This means any ROM-based character strings either need to be in Maria's bankset, or copied into console RAM prior to display.
 +
* Your DL must be stored in console ram, rather than bankset cart ram.
  
  
== A78 header usage and valid hardware combinations ==
+
== A78 header usage ==
  
The header bits should describe the format used in each bankset. (e.g. SuperGame + Pokey@450) in addition to the bankset bit. (bit 13 of the "cart type" word) Bankset memory, if used, is exclusively the "banked ram" type. (bit 5 of the "cart type" word)
+
The header bits should describe the format used in each bankset. (e.g. SuperGame + Pokey@800) in addition to the bankset bit. (bit 13 of the "cart type" word) Bankset memory, if used, is exclusively halt bank-switched RAM. (bit 14 of the "cart type" word)
  
A list of valid bankset mappers follows. The size indicated is the size of each individual bankset, not both banksets combined. Address locations are in hexadecimal.
 
  
* 32K ROM  
+
==Variations==
* 32K ROM + RAM@4000 + POKEY@450
+
 
* 32K ROM + POKEY@4000
+
A list of valid bankset hardware mappers follows. Address locations are in hexadecimal.
* 48K ROM
+
 
* 48K ROM + POKEY@4000(w/o)
+
* 2x32K ROM
* 52K ROM
+
* 2x32K ROM + RAM@4000 + POKEY@800
* 52K ROM + POKEY@4000(w/o)
+
* 2x32K ROM + POKEY@4000
* 128K ROM
+
* 2x48K ROM
* 128K ROM + RAM@4000
+
* 2x48K ROM + POKEY@4000(write-only)
* 128K ROM + RAM@4000 + POKEY@450
+
* 2x52K ROM
* 128K ROM + POKEY@4000
+
* 2x52K ROM + POKEY@4000(write-only)
 +
* 2x128K ROM + BANK6@4000
 +
* 2x128K ROM + RAM@4000
 +
* 2x128K ROM + RAM@4000 + POKEY@800
 +
* 2x128K ROM + POKEY@4000
  
Note that POKEY@4000 is used when no writable device is covering the $4xxx address space, to minimise hardware logic requirements. If ROM exists in the $4000 address space, the POKEY@4000 is write-only.
 
  
==Variations==
+
===ROM===
===ROM Sizes===
+
Presently 2x128K Banksets are the largest supported carts. If bankswitching isn't desired, bankset boards also support 2x32K, 2x48K, and extended 2x52K images. (the extended format covers $3000-$FFFF, so the added space comes at the expense of being incompatible with the High-Score Cart.)
Presently 2x128K Banksets are the largest supported carts. If bankswitching isn't desired, bankset boards also support 2x32K, 2x48K, and extended 2x54K images. (the extended format covers $2800-$FFFF, so the added space comes at the expense of being incompatible with the High-Score Cart.)
+
The 2x48K and 2x52K formats cannot be used with in-cart RAM.
The 2x48K and 2x54K formats cannot be used with in-cart RAM.
 
  
===In-Cart RAM===
+
===In-Cart Bank-RAM===
 
Bankset carts can optionally use 32K of in-cart RAM. Sally will see the first 16K of this RAM at $4000-$7FFF, and Maria will see the other 16K of RAM at the same location. Sally's writes to $C000-$FFFF will be redirected to Maria's chunk of RAM.
 
Bankset carts can optionally use 32K of in-cart RAM. Sally will see the first 16K of this RAM at $4000-$7FFF, and Maria will see the other 16K of RAM at the same location. Sally's writes to $C000-$FFFF will be redirected to Maria's chunk of RAM.
  
Line 56: Line 58:
  
 
Due to timing constraints, execution from Sally's cart-ram isn't supported.
 
Due to timing constraints, execution from Sally's cart-ram isn't supported.
 +
  
 
===Sound===
 
===Sound===
  
Bankset cart hardware optionally supports a Hokey chip (homebrew Pokey) at $450.
+
For mappers with POKEY, POKEY@4000 is used when no writable device is covering the $4xxx address space, to minimise hardware logic requirements. When ROM already exists in the $4000 address space, the POKEY@4000 is write-only.
 +
 
 +
 
 +
==The Bankset Test Suite==
 +
 
 +
The [[Media:Bankset_Test_Suite_v1.zip|Bankset_Test_Suite_v1.zip]] package contains sample bankset roms, which can be used by developers to test their emulators or flash carts.
 +
 
 +
 
 +
==Platforms Supporting Bankset Mappers==
 +
 
 +
The bankset mappers are fully supported by:
 +
* a7800 emulator (PC: Windows, MacOS, Linux)
 +
* a7800ds emulator (Nintendo DS)
 +
* 7800GD flash cart
 +
 
 +
The various 2x32k and 2x128k bankset mappers are supported by the MiSTer FPGA Atari 7800 core.

Latest revision as of 15:31, 24 February 2023

Overview

The Bankset bankswitching scheme is a 7800 homebrew-era invention. The Bankset scheme was created by Fred Quimby, in collaboration with Mike Saarna.

Banksets is an extension of the Atari 7800 SuperGame bankswitch mapper. As with the plain SuperGame mapper, there's an ephemeral bank located at $8000-$BFFF, a non-ephemeral bank located at $C000-$FFFF, and hitting the hotspot at $8000 will change the ephemeral bank. Unlike SuperGame, Maria is shown a different section of ROM than the Sally CPU is, with each of these views comprising a different set of banks. Hence the "Banksets" name.

Compared to SuperGame scheme, the Banksets scheme allows for more overall ROM storage, enables 100% of the cart address space to be dedicated to the display of graphics, and does away with the need to interlace code and graphics within ROM.

The first game to use the banksets scheme was the 7800 port of Petscii Robots.


Implementation Details

The bankset board uses the cartridge HALT line to switch between banksets. Anytime the HALT signal is high, Sally's bankset is active. Once the HALT signal goes low, Sally's bankset remains active until the second falling edge of PHI2, after which Maria's bankset is active until HALT goes high again.


Working with Banksets

To create a bankset compatible ROM, you simply concatenate together two Supergame ROMs - the first Supergame image will be Sally's set of banks, and the second will be Maria's set of banks. Only Sally's bankset needs the 7800 cart signature.

Things to be mindful of, when programming for banksets:

  • a bankswitch for Sally is also a bankswitch for Maria, so you still need to pay attention to where your code is running when Maria starts drawing the frame.
  • Maria is unable to see any of Sally's ROM. This means any ROM-based character strings either need to be in Maria's bankset, or copied into console RAM prior to display.
  • Your DL must be stored in console ram, rather than bankset cart ram.


A78 header usage

The header bits should describe the format used in each bankset. (e.g. SuperGame + Pokey@800) in addition to the bankset bit. (bit 13 of the "cart type" word) Bankset memory, if used, is exclusively halt bank-switched RAM. (bit 14 of the "cart type" word)


Variations

A list of valid bankset hardware mappers follows. Address locations are in hexadecimal.

  • 2x32K ROM
  • 2x32K ROM + RAM@4000 + POKEY@800
  • 2x32K ROM + POKEY@4000
  • 2x48K ROM
  • 2x48K ROM + POKEY@4000(write-only)
  • 2x52K ROM
  • 2x52K ROM + POKEY@4000(write-only)
  • 2x128K ROM + BANK6@4000
  • 2x128K ROM + RAM@4000
  • 2x128K ROM + RAM@4000 + POKEY@800
  • 2x128K ROM + POKEY@4000


ROM

Presently 2x128K Banksets are the largest supported carts. If bankswitching isn't desired, bankset boards also support 2x32K, 2x48K, and extended 2x52K images. (the extended format covers $3000-$FFFF, so the added space comes at the expense of being incompatible with the High-Score Cart.) The 2x48K and 2x52K formats cannot be used with in-cart RAM.

In-Cart Bank-RAM

Bankset carts can optionally use 32K of in-cart RAM. Sally will see the first 16K of this RAM at $4000-$7FFF, and Maria will see the other 16K of RAM at the same location. Sally's writes to $C000-$FFFF will be redirected to Maria's chunk of RAM.

Bear in mind that Maria's in-cart RAM is write-only as far as Sally is concerned.

Due to timing constraints, execution from Sally's cart-ram isn't supported.


Sound

For mappers with POKEY, POKEY@4000 is used when no writable device is covering the $4xxx address space, to minimise hardware logic requirements. When ROM already exists in the $4000 address space, the POKEY@4000 is write-only.


The Bankset Test Suite

The Bankset_Test_Suite_v1.zip package contains sample bankset roms, which can be used by developers to test their emulators or flash carts.


Platforms Supporting Bankset Mappers

The bankset mappers are fully supported by:

  • a7800 emulator (PC: Windows, MacOS, Linux)
  • a7800ds emulator (Nintendo DS)
  • 7800GD flash cart

The various 2x32k and 2x128k bankset mappers are supported by the MiSTer FPGA Atari 7800 core.