git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

gbdk-lib/examples/gb/mbc5_rumble/Readme.md

      1 # GBDK example for using the rumble motor on the Game Boy MBC5 Cartridge
      2 This example demonstrates using the rumble motor that can be present
      3 on some MBC5 cartridges. For example the rumble motor was used in Pokemon Pinball.
      4 
      5 # Makefile MBC
      6 You need to use one of the following MBCs in the Makefile:
      7 - `0x1C`: MBC5 + RUMBLE
      8 - `0x1D`: MBC5 + RUMBLE + SRAM
      9 - `0x1E`: MBC5 + RUMBLE + SRAM + BATTERY
     10 
     11 In this example the last one is used. You can change it in the `Makefile`
     12 
     13 # Emulators
     14 Not every emulator supports Rumble, and most of the ones that do only work
     15 when you plug in a controller. The intensity of rumble using emulators may
     16 differ from what is experienced on an actual rumble cart in a Game Boy.
     17 
     18 # SRAM Banks
     19 If rumble is used in a program which does cart SRAM bank switching then the
     20 SRAM bank should be kept track of in a variable. The `MBC5_RUMBLE_ON` and
     21 `MBC5_RUMBLE_OFF` macros should be changed to include that SRAM bank variable
     22 (replacing `MBC_RAM_BANK_0`) so that rumble updates do not unexpectedly alter
     23 the cart SRAM bank.
     24 
     25 Likewise when switching cart SRAM banks to access data, the rumble state
     26 should be included when calling `SWITCH_RAM()` or `SWITCH_RAM_MBC5()` so
     27 that rumble status is not interrupted when active.

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.