Eli5: how exactly did game developers put their game on a N64 cartridge? And how did the pins on the cartridges allow you to play the game once inserted into the game system?


Also, how did they mass produce said cartridges with said game on them?

Bonus question: same question with cd’s

In: 7

A game cartridge is similar to a usb drive or any other storage device. The game which is a bunch of data and logic is stored on it. When plugged in the console reads the information and executes commands.

CDs are similar/same instead of being like a usb drive the work like a record. Little pits in the the reflective material in the disk spiral around like a record. A laser and light detector detects the pits (either 1or 0). That is data and logic read into the console. (Same as above the consoles executes the commands and uses the information.)

It all starts with Encoding: There is a way to save both text and number in only 1 and 0s. For example 0001 would be 1(4-bit interpretation if you want do dive into it more) 0010= 2 0011=3 and so on. The game console can read this encoded text and numbers and do what the game developer wants it to do. For example “draw a white line from the top left corner to the bottom right corner”. Or “Rotate the line clockwise around the center point of the screen”. Of course a mario is a bit more complex to draw then a line so for that we use pictures. One way to do this, is simply savimg all of the pixels (essentially little dots of colour) that combined make Up Mario and draw them again where we want mario to be on the screen.
Now as to how the game developers put that code on the machine: Inside the Cardridge is a memory chip (Imagine a usb stick). Once you put the Cardridge in, some of the pins start connecting power to the Cardridge and once it is powered up the console and the Cardridge can “talk” with each other using encoded text. So the Cardridge says: “Hey N64, Draw mario in the middle of the screen.”
Console: “What does mario look like?” Now the Cardridge sends the little color dots that make Up Mario and the console shows it on the screen.
CDs work the same way just instead of a usb stick it has little bumbs on its surface. If there is a bump it is a 1 if not it is a 0.
As for mass production CDs can be copied since they have phisical bumps. As for N64 Cardridges they save the game on the USB-Stick before building the Cardridge around it.

Very crudely, a ROM chip contains thousands (or millions) of individual bytes, each in a numbered location. You send a number to the chip, and it sends back the data in that location.

Because everything in a computer is numbers this makes things very easy. You can represent the game as a long list of numbers, and then each of these is in the corresponding location in the chip.

Numbers are processor instructions. So the CPU goes to the first location, pulls some numbers from it and those numbers tell the CPU what to do.

For developers, they had special cartridges that could connect to a computer directly via a cable. You would write your code on another computer and test it on the real console.

Or some dev carts had a programmable chip on them (kind of like a USB thumb drive), you could put any game code on there.

The pins are like the pins on USB devices, it gave the console a way to access the data on the cartridge.