Skip to content

Commit e9dedf0

Browse files
committed
Add description for out of bounds MBC ram access
This is based on: - Source code of the SameBoy emulator - Dissassembling Pokemon Pinball which depends on this behavior - Mbc1 schematics - https://www.devrs.com/gb/files/mbc1.gif
1 parent 215cae0 commit e9dedf0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/MBCs.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@ so, it might be nevertheless possible to use Double Speed during periods
2020
which use only code and data which is located in internal RAM. Despite the
2121
above, a self-made MBC1-EPROM card appears to work stable and fine even in
2222
Double Speed Mode.
23+
24+
## MBC Out Of Bounds RAM Access
25+
26+
On most of the MBC's in case an out of bounds address is accessed (selecting unmapped RAM bank),
27+
only the mapped bits from the address will be used.
28+
The actual address being accessed can be calculated using this formula: `address & (max_ram_size - 1)`.

0 commit comments

Comments
 (0)