English | MP4 | AVC 1920×1080 | AAC 44KHz 2ch | 189 Lessons (34h 40m) | 10.46 GB
Learn to program games for the original Sony PlayStation console using MIPS assembler & the C programming language
This course is a deep dive into the world of PlayStation programming! We’ll explore the PS1 hardware, understand its sub-components, and learn how to code games using MIPS assembler & the C programming language. We’ll also learn how to use a PS1 SDK library paired with a modern development toolchain to be more productive and push fast polygons out of our console.
We are about to enter the 5th generation of 32-bit consoles. This era brings with it many technology milestones, such as the adoption of CPUs based on RISC architecture and a preference for coding using a high-level language instead of writing games using plain assembly. We will start by learning the basics of MIPS assembly and evolve to use a C compiler with a PS1 SDK to develop our final project.
The tools you’ll need
The original SDK was designed for Windows/PC, so you can either use the original 16/32-bit libraries on a 32-bit operating system (Windowx XP), or you can use a modern C compiler with Visual Studio Code on a 64-bit operating system (Windows 10/11). Emulating a Windows system on macOS or Linux is also possible!
Do I need a real PS1?
Not at all. You can easily run all the exercises and the final project on a PlayStation emulator. At the end, we will burn a CD ISO and test it on a real console, but that’s optional.
Is this course for you?
This is a self-contained course teaching concepts from the ground up. However, it is expected from students a basic understanding of coding (if-else, loops, functions).
If you like retro programming & want to learn more about the early days of 3D games, then this course is definitely for you!
Table of Contents
1 Starting our Journey
2 How to Take this Course
3 Placing the PlayStation in History
4 PS1 Hardware Overview
5 The MIPS CPU
6 Memory & Endianness
7 Memory Map
8 CPU Registers & Load Instructions
9 Store, Add, & Subtract Instructions
10 Jump & Branch Instructions
11 Exercise Our First MIPS Code
12 Going Over Our First MIPS Code
13 Installing the ARMIPS Assembler
14 Assembling our MIPS Code
15 PSX-EXE File Format
16 Emulator & Step-By-Step Execution
17 Fixing Off-By-One Error
18 Pseudo-Instructions
19 The MIPS Pipeline
20 Some Warm Up Exercises
21 Solving our Warm Up Exercises
22 Register Shorthand
23 Factorial Exercise
24 Solving our Factorial Exercise
25 Factorial Subroutine
26 Negative Numbers
27 Sign Extension
28 Logical Instructions
29 Bitshifting Instructions
30 Examples of CISC & RISC Machines
31 CISC vs RISC Instructions
32 The PlayStation Graphics System
33 Drawing Primitives
34 GPU Packets
35 Sending Display Control Packets to GP1
36 Sending VRAM Access Packets to GP0
37 Clear Display Area
38 Drawing a Flat-Shaded Triangle
39 Drawing a Flat-Shaded Quad
40 Drawing a Gouraud-Shaded Triangle
41 Flat-Shaded Triangle Subroutine
42 Coding our Flat Triangle Subroutine
43 Stack & Stack Pointer
44 Stack Parameters
45 Stack & Heap Space
46 Variables
47 Variable Alignment
48 Vector Alignment
49 Copying Image Data to VRAM
50 Using Bitshifting to Multiply & Divide
51 BPP Display Mode
52 Taking Advantage of our Delay Slots
53 Moving from MIPS Assembly to C
54 Installing Tools on Windows 11
55 Installing Tools on Windows XP
56 Compiling a Simple Psy-Q Project
57 Double-Buffer Screen
58 Psy-Q Integer Data Types
59 Psy-Q Primitive Types
60 Ordering Table & Primitive Buffer
61 Sorting Primitives into the OT
62 Sorting a Gouraud Quad into the OT
63 A Review of Pointers
64 The Arrow Operator
65 A Review of 3D Projection
66 Vertices & Face Indices
67 The Geometry Transformation Engine
68 Basic 3D Transformations
69 RotTransPers Function
70 Coding a Rotating 3D Cube
71 Normal Clip
72 Coding Quads as Cube Faces
73 Reviewing Floating-Point Numbers
74 Fixed-Point Numbers
75 Implementing a Bouncing Cube
76 Different Transform Matrix per Object
77 Wait, Can I use Floats
78 GTE Register Set
79 Inline GTE Instructions
80 RTPT vs. RTPS
81 Reading Joypad State
82 Joypad Input with BIOS Functions
83 Joypad Header & Implementation
84 Header File for OT & Primitive Buffer
85 Header File for Display Routines
86 Camera Space
87 The Look-At Transformation
88 The LookAt Function
89 Coding the Look-At Camera Model
90 CD-ROM Basics
91 Generating an ISO on Windows XP
92 Generating an ISO on Windows 11
93 A Function to Read Files from the CD
94 Understanding the MODEL.BIN File
95 Dynamically Allocating Buffers
96 Heap Initialization on Windows 11
97 Interpreting Bytes as Numbers
98 Handling Different Order of Bytes
99 Reading Vertices & Faces from a File
100 UV Coordinates, TPAGE, & CLUT
101 Installing TIM Tool
102 TIM File Format
103 Read TIM File from the CD
104 Textured Cube Faces
105 Wobbly Textures
106 Polygon Jitter
107 Dev Tools CD Samples
108 Intro to our Final Project
109 Importing Project Assets
110 PRM File Layout
111 Reading Object Name from PRM File
112 Reading Vertices from PRM File
113 Handling Different Primitive Types
114 Reading Primitives from PRM File
115 Drawing Flat-Shaded Object Faces
116 Using sizeof with Variable Name
117 CMP File Layout
118 Reading Number of Textures from File
119 Reading TIM Sizes from File
120 A Function to Extract LZSS Data
121 Texture Structs
122 Uploading CMP Textures to VRAM
123 Global Texture Store Array
124 Rendering Textured Triangles
125 Visualizing Textured 3D Objects
126 Loading Multiple CMP Files
127 Exercise Linked List of Objects
128 Linked List Implementation
129 Joypad Press & Release
130 Reading Scene Objects from CD
131 Camera-Object Distance Check
132 Drawing Scene Objects
133 Track Sections & Faces
134 Structs for Sessions & Faces
135 Reading Vertices, Faces, & Sections
136 Function to Render Track Sections
137 Shrinking Track Vertices
138 Exercise Testing Face Flags
139 Drawing Quad Lines
140 Avoiding the GTE 16-bit Limitation
141 Clamping Overflow Values
142 Loading Track Texture Tiles
143 Manually Position Textures in VRAM
144 Loading Track Face UV Coords
145 Flip Face Texture
146 Tessellation & Polygon Subdivision
147 Drawing Quads Recursively
148 A Function to Draw Quads Recursively
149 Subdividing UV Coordinates
150 T-junctions
151 Ship Struct
152 Adding the Ship Header File
153 Movement in Game Physics
154 Changing the Thrust Magnitude
155 Applying the Thrust Force
156 Yaw, Pitch, & Roll
157 Populating our Rotation Matrix
158 Coding the Object’s Orientation
159 Drawing XYZ Axis
160 Accelerating in the Nose’s Direction
161 Placing Camera Behind the Ship
162 Yaw Velocity
163 Maximum Yaw Velocity
164 Roll Left & Right
165 Rethinking Section Rendering
166 Initializing Ship’s Nearest Section
167 Update Ship’s Nearest Section
168 Rendering Track Ahead
169 Clamping Track Vertices to 16 bits
170 Loading Track Session Normals
171 Drawing Section Normals
172 Loading the Section Base Vertex
173 Projected Ship Height
174 Coding the Projected Ship Height
175 Track Attraction & Repulsion Forces
176 Preventing Negative Height Values
177 Audio & SPU
178 Converting WAV to VAG
179 Playing a VAG Sound Effect
180 Pitch & Sampling Frequency
181 Exercise Countdown Audio
182 Countdown Sound Effects
183 Background Music
184 Recording an Audio Track
185 Adding Audio Track to ISO
186 Play Audio Track Implementation
187 Play Background Audio Track
188 Adding Scene Objects & Audio
189 Conclusion & Next Steps
Resolve the captcha to access the links!