Difference between revisions of "Bankset Bankswitching"

From 8BitDev.org - Atari 7800 Development Wiki
Jump to: navigation, search
 
Line 61: Line 61:
 
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.
 
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.
  
==Sample Roms==
+
==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.
 
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.

Latest revision as of 00:10, 22 March 2022

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 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.

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.


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.