git.y1.nz

gbdk-2020

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

commit 6107416166b4e11a7666421f3962549184aca4c3
parent f1615120f86383f356ef3f5617096daa967570ad
Author: bbbbbr <bbbbbr@users.noreply.github.com>
Date:   Tue, 14 Jun 2022 11:46:47 -0700

Merge pull request #380 from bbbbbr/docs_4_1_0

Docs: Add a nicer table for MBCs, not sure if it's entirely better so keeping old one too
Diffstat:
Mdocs/config/github-markdown-theme/doxygen_extra.css48++++++++++++++++++++++++++++++++++++++++++++++++
Mdocs/pages/05_banking_mbcs.md78++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
2 files changed, 104 insertions(+), 22 deletions(-)

diff --git a/docs/config/github-markdown-theme/doxygen_extra.css b/docs/config/github-markdown-theme/doxygen_extra.css @@ -470,3 +470,51 @@ code { padding-left: 3px; padding-right: 3px; } + +/* Markdown tables */ +/* +table, .markdownTable { + background-color: rgb(255, 255, 255); + border-color: #d0d7de; + color: rgb(36, 41, 47); +} + +th, .markdownTableHead. +.markdownTableRowOdd { + background-color: rgb(255, 255, 255); +} + +.markdownTableRowEven { + background-color: rgb(246, 248, 250); +} + +*/ +table.markdownTable td, table.markdownTable th { + border: 1px solid #d0d7de; + padding: 3px 7px 2px; + color: rgb(36, 41, 47); + font-size: 90%; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: rgb(255, 255, 255); + color: rgb(36, 41, 47); + font-size: unset; + padding-bottom: unset; + padding-top: unset; +} + +th, +.markdownTableHead, +.markdownTableRowOdd { + background-color: rgb(255, 255, 255); +} + +.markdownTableRowEven { + background-color: rgb(246, 248, 250); +} + +table.markdownTable tr:hover { + background-color: rgb(231, 236, 242); +} diff --git a/docs/pages/05_banking_mbcs.md b/docs/pages/05_banking_mbcs.md @@ -63,36 +63,70 @@ At the link stage this is done with @ref lcc using pass-through switches for @re - `-Wl-yo<N>` where `<N>` is the number of ROM banks. 2, 4, 8, 16, 32, 64, 128, 256, 512 - `-Wl-yoA` may be used for automatic bank size. - `-Wl-ya<N>` where `<N>` is the number of RAM banks. 2, 4, 8, 16, 32 - - `-Wl-yt<N>` where `<N>` is the type of MBC cartridge (see below). + - `-Wl-yt<N>` where `<N>` is the type of MBC cartridge (see chart below). - Example: `Wl-yt0x1A` -The MBC settings below are available when using the makebin MBC switch. +The MBC settings below are available when using the makebin `-Wl-yt<N>` switch. + +Source: Pandocs. Additional details available at [Pandocs](https://gbdev.io/pandocs/The_Cartridge_Header.html#0147---cartridge-type "Pandocs") -Additional details available at [Pandocs](https://gbdev.io/pandocs/The_Cartridge_Header.html#0147---cartridge-type "Pandocs") ``` -# From Makebin source: -# -#-Wl-yt<NN> where <NN> is one of the numbers below -# -# 0147: Cartridge type: -# 0-ROM ONLY 12-ROM+MBC3+RAM -# 1-ROM+MBC1 13-ROM+MBC3+RAM+BATT -# 2-ROM+MBC1+RAM 19-ROM+MBC5 -# 3-ROM+MBC1+RAM+BATT 1A-ROM+MBC5+RAM -# 5-ROM+MBC2 1B-ROM+MBC5+RAM+BATT -# 6-ROM+MBC2+BATTERY 1C-ROM+MBC5+RUMBLE -# 8-ROM+RAM 1D-ROM+MBC5+RUMBLE+SRAM -# 9-ROM+RAM+BATTERY 1E-ROM+MBC5+RUMBLE+SRAM+BATT -# B-ROM+MMM01 1F-Pocket Camera -# C-ROM+MMM01+SRAM FD-Bandai TAMA5 -# D-ROM+MMM01+SRAM+BATT FE - Hudson HuC-3 -# F-ROM+MBC3+TIMER+BATT FF - Hudson HuC-1 -# 10-ROM+MBC3+TIMER+RAM+BATT -# 11-ROM+MBC3 +0147: Cartridge type: +0x00: ROM ONLY 0x12: ROM+MBC3+RAM +0x01: ROM+MBC1 0x13: ROM+MBC3+RAM+BATT +0x02: ROM+MBC1+RAM 0x19: ROM+MBC5 +0x03: ROM+MBC1+RAM+BATT 0x1A: ROM+MBC5+RAM +0x05: ROM+MBC2 0x1B: ROM+MBC5+RAM+BATT +0x06: ROM+MBC2+BATTERY 0x1C: ROM+MBC5+RUMBLE +0x08: ROM+RAM 0x1D: ROM+MBC5+RUMBLE+SRAM +0x09: ROM+RAM+BATTERY 0x1E: ROM+MBC5+RUMBLE+SRAM+BATT +0x0B: ROM+MMM01 0x1F: Pocket Camera +0x0C: ROM+MMM01+SRAM 0xFD: Bandai TAMA5 +0x0D: ROM+MMM01+SRAM+BATT 0xFE: Hudson HuC-3 +0x0F: ROM+MBC3+TIMER+BATT 0xFF: Hudson HuC-1 +0x10: ROM+MBC3+TIMER+RAM+BATT +0x11: ROM+MBC3 ``` +| Hex Code | MBC Type | SRAM | BATTERY | RTC | RUMBLE | EXTRA | +| -------- | ------------- | ---- | ------- | --- | ------ | ------ | +| 0x00 | ROM ONLY | | | | | | +| 0x01 | MBC-1 | | | | | | +| 0x02 | MBC-1 | SRAM | | | | | +| 0x03 | MBC-1 | SRAM | BATTERY | | | | +| 0x05 | MBC-2 | | | | | | +| 0x06 | MBC-2 | | BATTERY | | | | +| 0x08 | ROM (1) | SRAM | | | | | +| 0x09 | ROM (1) | SRAM | BATTERY | | | | +| 0x0B | MMM01 | | | | | | +| 0x0C | MMM01 | SRAM | | | | | +| 0x0D | MMM01 | SRAM | BATTERY | | | | +| 0x0F | MBC-3 | | BATTERY | RTC | | | +| 0x10 | MBC-3 (2) | SRAM | BATTERY | RTC | | | +| 0x11 | MBC-3 | | | | | | +| 0x12 | MBC-3 (2) | SRAM | | | | | +| 0x13 | MBC-3 (2) | SRAM | BATTERY | | | | +| 0x19 | MBC-5 | | | | | | +| 0x1A | MBC-5 | SRAM | | | | | +| 0x1B | MBC-5 | SRAM | BATTERY | | | | +| 0x1C | MBC-5 | | | | RUMBLE | | +| 0x1D | MBC-5 | SRAM | | | RUMBLE | | +| 0x1E | MBC-5 | SRAM | BATTERY | | RUMBLE | | +| 0x20 | MBC-6 | | | | | | +| 0x22 | MBC-7 | SRAM | BATTERY | | RUMBLE | SENSOR | +| 0xFC | POCKET CAMERA | | | | | | +| 0xFD | BANDAI TAMA5 | | | | | | +| 0xFE | HuC3 | | | | | | +| 0xFF | HuC1 | SRAM | BATTERY | | | | + + +1: No licensed cartridge makes use of this option. Exact behaviour is unknown. + +2: MBC3 with RAM size 64 KByte refers to MBC30, used only in Pocket Monsters Crystal Version for Japan. + + ## Getting Bank Numbers The bank number for a banked function, variable or source file can be stored and retrieved using the following macros: - @ref BANKREF(): create a reference for retrieving the bank number of a variable or function

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