-
Notifications
You must be signed in to change notification settings - Fork 31
Memory Map
Jason Turner edited this page Apr 24, 2018
·
1 revision
Actual locations are up for much discussion.
Memory Mapped Registers (all values are little-endian)
Graphics Registers
-
0xA0000
: 16bit screen width -
0xA0002
: 16bit screen height -
0xA0004
: 8bit screen bits per pixel. Bits are divided evenly across the color space with preference given for the odd bit to green, then to blue. Special cases for 1 bpp and 2 bpp.- 1 bpp: black or white
- 2 bpp: 2 levels of grey (0%, 33%, 66%, 100%)
- 3 bpp: 1 bit red, 1 bit green, 1 bit blue. Possible colors: black, white, red, green, blue, yellow, cyan, magenta).
- 4 bpp: 1 bit red, 2 bits green, 1 bit blue.
- 5 bpp: 1 bit red, 2 bits green, 2 bits blue.
- 6 bpp: 2 bits red, 2 bits green, 2 bits blue.
- 7 bpp: 2 bits red, 3 bits green, 2 bits blue.
- 8 bpp: 2 bits red, 3 bits green, 3 bits blue.
- etc
- 24 bpp: max value with meaning
-
0xA0005
: 8bit screen refresh rate -
0xA0006
: 8bit Horizontal aspect -
0xA0007
: 8bit Vertical aspect -
0xA0008
: 32bit pointer to current framebuffer. Expected to read width * height * bpp bits from this memory location to draw current frame
IO Registers
Joy 0
-
0xA0100
: 8bit joy 0 X axis -
0xA0101
: 8bit joy 0 Y axis -
0xA0102
: 8bit joy 0 Z axis -
0xA0103
: 8bit joy 0 R axis -
0xA0104
: 8bit joy 0 U axis -
0xA0105
: 8bit joy 0 V axis -
0xA0106
: 8bit joy 0 X POV axis -
0xA0107
: 8bit joy 0 Y POV axis -
0xA0108
: 32bit joy 0 Button States
Joy 1
-
0xA0112
: 8bit joy 1 X axis -
0xA0113
: 8bit joy 1 Y axis -
0xA0114
: 8bit joy 1 Z axis -
0xA0115
: 8bit joy 1 R axis -
0xA0116
: 8bit joy 1 U axis -
0xA0117
: 8bit joy 1 V axis -
0xA0118
: 8bit joy 1 X POV axis -
0xA0119
: 8bit joy 1 Y POV axis -
0xA0120
: 32bit joy 1 Button States
Joy 2
-
0xA0124
: 8bit joy 2 X axis -
0xA0125
: 8bit joy 2 Y axis -
0xA0126
: 8bit joy 2 Z axis -
0xA0127
: 8bit joy 2 R axis -
0xA0128
: 8bit joy 2 U axis -
0xA0129
: 8bit joy 2 V axis -
0xA0130
: 8bit joy 2 X POV axis -
0xA0131
: 8bit joy 2 Y POV axis -
0xA0132
: 32bit joy 2 Button States
Joy 3
-
0xA0136
: 8bit joy 3 X axis -
0xA0137
: 8bit joy 3 Y axis -
0xA0138
: 8bit joy 3 Z axis -
0xA0139
: 8bit joy 3 R axis -
0xA0140
: 8bit joy 3 U axis -
0xA0141
: 8bit joy 3 V axis -
0xA0142
: 8bit joy 3 X POV axis -
0xA0143
: 8bit joy 3 Y POV axis -
0xA0144
: 32bit joy 3 Button States
Keyboard
-
0xA0200
: Currently pressed key(s) of some sort. Possibly based on SFML keycodes.