aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrecher <crecher@crecher.net>2026-10-12 15:49:15 +0200
committercrecher <crecher@crecher.net>2026-10-12 15:49:15 +0200
commitf5969959b81bce1841974cedcac0289d44f7c69e (patch)
tree92da67031841b7b902de079f84d294fe729e2ad0
parent780b1e886f6676efedc732b67328f5fbdbe87dc4 (diff)
downloadgones-f5969959b81bce1841974cedcac0289d44f7c69e.tar.gz
gones-f5969959b81bce1841974cedcac0289d44f7c69e.zip
make table pretty :3
-rw-r--r--nes/bus.go29
1 files changed, 15 insertions, 14 deletions
diff --git a/nes/bus.go b/nes/bus.go
index 07bbbf2..eeb96b0 100644
--- a/nes/bus.go
+++ b/nes/bus.go
@@ -1,20 +1,21 @@
package nes
// CPU memory map is:
-// Address range | Size | Device
-// --------------------------------------------------
-// $0000-$07FF | $0800 | 2 KB internal RAM
-// $0800-$0FFF | $0800 | Mirror of $0000-$07FF
-// $1000-$17FF | $0800 | Mirror of $0000-$07FF
-// $1800-1FFF | $0800 | Mirror of $0000-$07FF
-// $2000-2007 | $0008 | PPU registers
-// $2008-$3FFF | $1FF8 | Mirrors of $2000-$2007 (repeats every 8 bytes)
-// $4000-4017 | $0018 | APU and I/O registers
-// $4018-$401F | $0008 | APU and I/O functionality thats normally disabled (CPU test mode)
-// $4020-$FFFF | $BFE0 | Unmapped, available for cartridge
-// - $6000-$7FFF | $2000 | Usually cartridge RAM (if present)
-// - $8000-$FFFF | $8000 | Usually cartridge ROM (if present)
-
+// +--------------------------------------------------------------------------------------------------+
+// | Address range | Size | Device |
+// +--------------------------------------------------------------------------------------------------+
+// | $0000-$07FF | $0800 | 2 KB internal RAM |
+// | $0800-$0FFF | $0800 | Mirror of $0000-$07FF |
+// | $1000-$17FF | $0800 | Mirror of $0000-$07FF |
+// | $1800-1FFF | $0800 | Mirror of $0000-$07FF |
+// | $2000-2007 | $0008 | PPU registers |
+// | $2008-$3FFF | $1FF8 | Mirrors of $2000-$2007 (repeats every 8 bytes) |
+// | $4000-4017 | $0018 | APU and I/O registers |
+// | $4018-$401F | $0008 | APU and I/O functionality thats normally disabled (CPU test mode) |
+// | $4020-$FFFF | $BFE0 | Unmapped, available for cartridge |
+// | - $6000-$7FFF | $2000 | Usually cartridge RAM (if present) |
+// | - $8000-$FFFF | $8000 | Usually cartridge ROM (if present) |
+// +--------------------------------------------------------------------------------------------------+
// wow i put way too much effort into making that table
func (n *Console) Read(addr uint16) uint8 {