Skip to content

Commit 215cae0

Browse files
authored
MBC3: Tablify and fix inconsistencies (#587)
1 parent c1a9eb6 commit 215cae0

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

src/MBC3.md

+18-20
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Contains the first 16 KiB of the ROM.
1818
Same as for MBC1, except that accessing banks $20, $40, and $60 is
1919
supported now.
2020

21-
### A000-BFFF - RAM Bank 00-03, if any (Read/Write)
21+
### A000-BFFF - RAM Bank 00-07 or RTC register (Read/Write)
2222

2323
Depending on the current Bank Number/RTC Register selection (see below),
2424
this memory space is used to access an 8 KiB external RAM Bank, or a
@@ -30,7 +30,8 @@ single RTC Register.
3030

3131
Depending on the current Bank Number/RTC Register selection (see below),
3232
this memory space is used to access an 8KByte external RAM Bank, or a
33-
single RTC Register.
33+
single RTC Register. The mapped RTC register can be read/written by
34+
accessing any address in that area, typically using address A000.
3435

3536
### 0000-1FFF - RAM and Timer Enable (Write Only)
3637

@@ -47,12 +48,13 @@ corresponding ROM Banks.
4748

4849
### 4000-5FFF - RAM Bank Number - or - RTC Register Select (Write Only)
4950

50-
As for the MBC1s RAM Banking Mode, writing a value in range for $00-$03
51-
maps the corresponding external RAM Bank (if any) into memory at
52-
A000-BFFF. When writing a value of $08-$0C, this will map the
53-
corresponding RTC register into memory at A000-BFFF. That register could
54-
then be read/written by accessing any address in that area, typically
55-
that is done by using address A000.
51+
Controls what is mapped into memory at A000-BFFF.
52+
53+
| Value | Selection |
54+
|---------|-----------------------------------------------|
55+
| $00-$07 | The corresponding RAM Bank. |
56+
| $08-$0C | The corresponding RTC Register (see below). |
57+
5658

5759
### 6000-7FFF - Latch Clock Data (Write Only)
5860

@@ -62,18 +64,14 @@ until it becomes latched again, by repeating the write $00-\>$01
6264
procedure. This provides a way to read the RTC registers while the
6365
clock keeps ticking.
6466

65-
### The Clock Counter Registers
66-
67-
```
68-
$08 RTC S Seconds 0-59 ($00-$3B)
69-
$09 RTC M Minutes 0-59 ($00-$3B)
70-
$0A RTC H Hours 0-23 ($00-$17)
71-
$0B RTC DL Lower 8 bits of Day Counter ($00-$FF)
72-
$0C RTC DH Upper 1 bit of Day Counter, Carry Bit, Halt Flag
73-
Bit 0 Most significant bit of Day Counter (Bit 8)
74-
Bit 6 Halt (0=Active, 1=Stop Timer)
75-
Bit 7 Day Counter Carry Bit (1=Counter Overflow)
76-
```
67+
### Clock Counter Registers
68+
| Register | Name | Description | Range |
69+
|----------|------|-------------|-------|
70+
| $08 | RTC S | Seconds | 0-59 ($00-$3B) |
71+
| $09 | RTC M | Minutes | 0-59 ($00-$3B) |
72+
| $0A | RTC H | Hours | 0-23 ($00-$17) |
73+
| $0B | RTC DL | Lower 8 bits of Day Counter | ($00-$FF) |
74+
| $0C | RTC DH | Upper 1 bit of Day Counter, Carry Bit, Halt Flag. <br>Bit 0: Most significant bit (Bit 8) of Day Counter<br>Bit 6: Halt (0=Active, 1=Stop Timer)<br>Bit 7: Day Counter Carry Bit (1=Counter Overflow) | |
7775

7876
The Halt Flag is supposed to be set before **writing** to the RTC
7977
Registers.

0 commit comments

Comments
 (0)