MBC GB

aus RHWiki, der freien Romhacking-Enzyklopädie

Dieser Artikel befasst sich mit den Memory Bank Controllern des Gameboys. Es handelt sich hierbei um einen Auszug aus der "gbspec.txt".

Inhaltsverzeichnis

Nur ROM

Hierbei handelt es sich um ein 32kB (256kb) ROM, das von 0000h bis 7FFFh gemappt ist.

MBC1 (Memory Bank Controller 1)

  MBC1 has two different maximum memory modes:
 16Mbit ROM/8KByte RAM  or  4Mbit ROM/32KByte RAM.
  The MBC1 defaults to 16Mbit ROM/8KByte RAM mode
 on power up. Writing a value (XXXXXXXS - X = Don't
 care, S = Memory model select) into 6000-7FFF area
 will select the memory model to use. S = 0 selects
 16/8 mode. S = 1 selects 4/32 mode.
  Writing a value (XXXBBBBB - X = Don't cares, B =
 bank select bits) into 2000-3FFF area will select an
 appropriate ROM bank at 4000-7FFF. Values of 0 and 1
 do the same thing and point to ROM bank 1. Rom bank 0
 is not accessible from 4000-7FFF and can only be read
 from 0000-3FFF.
 If memory model is set to 4/32:
   Writing a value (XXXXXXBB - X = Don't care, B =
  bank select bits) into 4000-5FFF area will select an
  appropriate RAM bank at A000-C000. Before you can
  read or write to a RAM bank you have to enable it by
  writing a XXXX1010 into 0000-1FFF area*. To disable
  RAM bank operations write any value but XXXX1010
  into 0000-1FFF area. Disabling a RAM bank probably
  protects that bank from false writes during power
  down of the GameBoy. (NOTE: Nintendo suggests values
  $0A to enable and $00 to disable RAM bank!!)
 If memory model is set to 16/8 mode:
   Writing a value (XXXXXXBB - X = Don't care, B =
  bank select bits) into 4000-5FFF area will set the
  two most significant ROM address lines.
 * NOTE: The Super Smart Card doesn't require this
  operation because it's RAM bank is ALWAYS enabled.
  Include this operation anyway to allow your code
  to work with both.

MBC2 (Memory Bank Controller 2)

  This memory controller works much like the MBC1
 controller with the following exceptions:
  MBC2 will work with ROM sizes up to 2Mbit.
  Writing a value (XXXXBBBB - X = Don't cares, B =
 bank select bits) into 2100-21FF area will select an
 appropriate ROM bank at 4000-7FFF.
  RAM switching is not provided. Unlike the MBC1 which
 uses external RAM, MBC2 has 512 x 4 bits of RAM which
 is in the controller itself. It still requires an
 external battery to save data during power-off though.
  The least significant bit of the upper address byte
 must be zero to enable/disable cart RAM. For example
 the following addresses can be used to enable/disable
 cart RAM:
 0000-00FF, 0200-02FF, 0400-04FF, ..., 1E00-1EFF.
 The suggested address range to use for MBC2 ram
 enable/disable is 0000-00FF.
  The least significant bit of the upper address byte
 must be one to select a ROM bank. For example the
 following addresses can be used to select a ROM bank:
 2100-21FF, 2300-23FF, 2500-25FF, ..., 3F00-3FFF.
 The suggested address range to use for MBC2 rom
 bank selection is 2100-21FF.

MBC3 (Memory Bank Controller 3)

Dieser Controller stimmt weitestgehend mit dem MBC1 überein. Der Unterschied besteht darin, dass man auf alle 16 Mbits zugreifen kann, ohne dass man in den 4000h-5FFFh Bereich schreiben muss. Um die Rombank in 4000h-7FFFh zu wählen, muss man ein Byte (XBBBBBBB - X = ohne Bedeutung, B = Bank-Wahl-Bits) nach 2000h-3FFFh schreiben.

Zudem hat dieser MBC ein eingebaute, batterie-betriebene Real Time Clock (RTC), die man in keinem anderen MBC findet. Manche MBC3 Cartridges unterstützen die RTC (wie z. B. Harvest Moon/jap. Version), es gibt jedoch auch einige, die sie nicht unterstützen (wie z. B. WarioLand II).

MBC5 (Memory Bank Controller 5)

  This controller is the first MBC that is guaranteed
 to run in GameBoy Color double-speed mode but it
 appears the other MBC's run fine in GBC double-speed
 mode as well.
  It is similar to the MBC3 (but no RTC) but can
 access up to 64mbits of ROM and up to 1mbit of RAM.
 The lower 8 bits of the 9-bit rom bank select is
 written to the 2000-2FFF area while the upper bit
 is written to the least significant bit of the
 3000-3FFF area.
   Writing a value (XXXXBBBB - X = Don't care, B =
 bank select bits) into 4000-5FFF area will select an
 appropriate RAM bank at A000-BFFF if the cart
 contains RAM. Ram sizes are 64kbit,256kbit, & 1mbit.
  Also, this is the first MBC that allows rom bank 0
 to appear in the 4000-7FFF range by writing $000
 to the rom bank select.

Rumble Carts

  Rumble carts use an MBC5 memory bank controller.
 Rumble carts can only have up to 256kbits of RAM.
 The highest RAM address line that allows 1mbit of
 RAM on MBC5 non-rumble carts is used as the motor
 on/off for the rumble cart.
   Writing a value (XXXXMBBB - X = Don't care, M =
 motor, B = bank select bits) into 4000-5FFF area
 will select an appropriate RAM bank at A000-BFFF
 if the cart contains RAM. RAM sizes are 64kbit or
 256kbits. To turn the rumble motor on set M = 1,
 M = 0 turns it off.

HuC1 (Memory Bank / Infrared Controller)

Dieser Controller, der von Hudson Soft hergestellt wurde, scheint dem MBC1 ziemlich ähnlich zu sein. Es gibt jedoch einen Hauptunterschied, der darin besteht, dass der HuC1 eine Infrarot Schnittstelle besitzt.

Die japanische Cartridge "Fighting Phoenix" (Interner Name: SUPER B DAMAN) ist z.B. mit einem HuC1 ausgestattet.

Bung Carts

  The flash carts sold by Bung (http://www.bung.com.hk)
 on power up appear like an MBC5 cart except that
 writing $00 to the bank select register selects rom
 bank 1 instead of rom bank 0. Writing values to
 3000-3FFF area does nothing.
  Writing values (XXXXXXXS - X = Don't care, S = Select)
 to 6000-7FFF area selects MBC1 16/8 mode if S=0
 except that writes to 3000-3FFF area still do nothing.
 If S=1 then MBC5 mode is selected. (S=1 by default
 on power up.)
  Cart locations A000 & A100 act as special
 write only hardware control registers if a
 value of $c0 is written to 0000-1FFF area.
 These hardware control registers are used
 for setting up cart hardware for different
 games when the Bung cart is used as a Multicart
 for holding several different games.

Siehe auch

'Persönliche Werkzeuge