MIPS Assembly programming for
the Playstation 1 (PS1/PSX)
The Playstation was Sony's first home
console, While inferior in some ways to the more powerful N64, the
Playstations huge storage capability, combined with an impressive
game library saw the Playstation become the most popular console of
the period, catapulting the playstation to the top of the console
market.
|
|
|
|
Cpu |
33.87 mhz R3000 (MIPS I) |
Ram |
2MB |
Video |
1MB VRAM |
Resolution |
256x224 / 320x240 / 640x480 |
|
|
Memory Map
KUSEG |
KSEG0
(Cached) |
KSEG1
(Uncached) |
KSEG2
(IO Ports) |
Size |
Purpose |
0x00000000 |
0x80000000 |
0xA0000000 |
-- |
2048K
|
Main RAM (first 64K reserved for
BIOS) |
0x1F000000 |
0x9F000000 |
0xBF000000 |
-- |
8192K |
Expansion Region 1 (ROM/RAM) |
0x1F800000 |
0x9F800000 |
-- |
-- |
1K |
Scratchpad (D-Cache used as Fast
RAM) |
0x1F801000 |
0x9F801000 |
0xBF801000 |
-- |
8K |
I/O Ports |
0x1F802000 |
0x9F802000 |
0xBF802000 |
-- |
8K |
Expansion Region 2 (I/O Ports) |
0x1FA00000 |
0x9FA00000 |
0xBFA00000 |
-- |
2048K |
Expansion Region 3 (whatever
purpose) |
0x1FC00000
|
0x9FC00000
|
0xBFC00000
|
-- |
512K |
BIOS ROM (Kernel) (4096K max) |
-- |
-- |
-- |
0xFFFE0000
|
0.5K |
I/O Ports (Cache Control) |
Gpu Commands
Written to port 0x1F801810
Function |
Byte |
31 |
30 |
29 |
28 |
27 |
26 |
25 |
24 |
23 |
22 |
21 |
20 |
19 |
18 |
17 |
16 |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Clear Cache |
0 |
0x01 |
0 |
Function |
Byte |
31 |
30 |
29 |
28 |
27 |
26 |
25 |
24 |
23 |
22 |
21 |
20 |
19 |
18 |
17 |
16 |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Set Screen Width |
0 |
0x06 |
End
X |
Start X |
Function |
Byte |
31 |
30 |
29 |
28 |
27 |
26 |
25 |
24 |
23 |
22 |
21 |
20 |
19 |
18 |
17 |
16 |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Send image to
Framebuffer |
0 |
0xA0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
Y |
X |
|
2 |
H |
W |
|
3 |
Pixel
2 |
Pixel
1 |
|
.. |
.. |
... |
|
n |
Pixel
n*2+1 |
Pixel
n*2 |
Function |
Byte |
31 |
30 |
29 |
28 |
27 |
26 |
25 |
24 |
23 |
22 |
21 |
20 |
19 |
18 |
17 |
16 |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Screen Memory
Each pixel is represented by one BIG ENDIAN word, in the format %-BBBBBGGGGGRRRRR
Endian
The N64 is BIG ENDIAN
the PSX is LITTLE ENDIAN
| |
Buy my Assembly programming book on Amazon in Print or Kindle!
Available worldwide! Search 'ChibiAkumas' on your local Amazon website!
Click here for more info!
Buy my Assembly programming book on Amazon in Print or Kindle!
Available worldwide! Search 'ChibiAkumas' on your local Amazon website!
Click here for more info!
Buy my Assembly programming book on Amazon in Print or Kindle!
Available worldwide! Search 'ChibiAkumas' on your local Amazon website!
Click here for more info!
|