Playstation: how it was
At the end of the first half of the 90s, the first console from Sony, Playstation 1 or PSX, entered the CIS market. It can be considered unique from many points of view, but perhaps for all of us the main difference was that finally a full-fledged video appeared in the games, sane 3D graphics, as well as the ability to be saved not with a password, frantically looking for a piece of paper (forgive me readers for the awkward comparison that arose in their heads), and, as befits a white person, on digital media.

In fact, this console marked a quiet revolution in game programming. That is what I would like to talk about today. And moreover, if you want to write your own game for a console gathering dust in the pantry, thus avenging creative impotence experienced in adolescence, then under the cut you can get an idea of how to do this.
It is important to know:
Few people know, but programming for other common consoles of that time was hell (from the point of view of a programmer who does not have a love for assembler). The gamedev of that time was more like modern programming of microcontrollers, with all the ensuing consequences - the lack of a normal interface to the file system, manual generation of the sound frequency, access to I / O ports for each operation, and assembler, assembler, a lot of assembler. There were other minor joys like several processors in one console, or RAM that did not have a continuous range. You can’t remember all the little things. The only prefix of the time that could boast of humanism towards programmers was the Panasonic 3DO, which nevertheless did not find popularity in the CIS (and the rest of the world, too).
To understand the degree of hopelessness that occurred when programming for the then most common consoles, take a look at these characteristics:
Of course, there were tricks to increase the capabilities of cartridge consoles - a cartridge, in fact, an electronic circuit, with many conclusions, not all of which were designed to read data from the cartridge ROM. What can be placed on the diagram? Yes, anything - additional RAM, a ROM controller with the ability to map data from large games into a valid I / O address space. The main thing is that the console supports an interface for interacting with similar cartridge devices. And she, as a rule, supported! Thus, programming of games was not limited to code development; sometimes it was necessary to “finish” the game in hardware in order to somehow surpass the meager capabilities of the consoles of that time. However, few of the many who have Dendy in the post-Soviet space are fortunate enough to deal with cartridges,
This ugliness ended with the advent of the Playstation: firstly, the console had pretty impressive features and could compete with computers of the time running DOS (which led to a considerable number of games that were ported from PC to Playstation), and secondly, the game was now located on a compact -disk, which meant the impossibility of any hardware tricks. In short, the arrival of the Playstation laid the foundation for two eras - the one when crutches were considered good practice, and the one when crutches were considered crutches. But when one era replaces the other, there are always retrograds that hold holy past covenants - it is thanks to their dedicated work that several games have entered the market that work only on the earliest revisions of the Playstation. So, changing the port addresses of devices from revision to revision, Sony engineers softly,
Programming for the Playstation was so simple that in addition to special hardware stations (Dev Unit), sold to professional game developers for about $ 35,000, Sony released a special version of the console for home developers called Net Yaroze and comparable in price to the console itself.
It has already been said above that for early consoles, programming was conducted almost exclusively in assembler. In the case of the Playstation, the C standard became the de facto development standard. Normal C, without assembler inserts, port communications and any serious restrictions - you no longer had to write your strncat implementation or write your own library for input-output, if you just wanted to read the file from disk.
Another important difference from previous consoles was that the developer received a full-fledged API interface for all the hardware capabilities of the console like a coprocessor for vector computing. The SDK supplied by Sony had wrappers for everything that could come in handy, which made it possible to truly ignore the features of the console. As a result, porting games from under DOS often turned around just rewriting the layers responsible for graphics and sound.
In general, the development for a typical programmer was of this nature: to the Playstation, through the connector shown in the figure, a development module was connected that connected to the computer. Through this bridge, the EXE file was loaded into the RAM of the console, and through it the output of debugging information to the computer was possible. Just as many artisanal web studios now lack Apple technology to test their applications, developers of games for the Playstation lacked Dev Units. Thus, the large incomprehensible port on the back of the console should serve as a silent reminder that some things do not change even after almost two decades.

Of course, far from each of the developers had the self-control to write a game on the disgusting S. And then an ambitious developer’s crown weapon was used - a makeshift programming language. It is authentically known that at least 2 series of games suffered such a fate - Crash Bandicoot, which was written in the self-made dialect of Lisp, as well as the entire Final Fantasy line up to part 9, whose engine migrated through a bunch of platforms and had its own interpreted assembler. You can read about creating both games here:
Crash Bandicoot: http://all-things-andy-gavin.com/2011/02/02/making-crash-bandicoot-part-1/
Final fantasy: http: // q- gears.sourceforge.net/gears.pdf
The significance of the Playstation is also that its disks could be read on any computer and recorded on it. That gave rise to a wave of piracy unprecedented for other consoles. Now in order to make the translation of the game it was enough to have a disassembler for the MIPS architecture, as well as a CD-ROM writer. Perhaps it is the fact that the translation of these games required so little gave rise to such poor quality of the first translations. This can be regarded as an ideal illustration of the division of people into techies and humanities: when a person had enough English knowledge enough to study the disassembler guide, at the output we received a translation so abundantly flavored with jargon and obscenities that the plot of the game was somewhat lost; on the other hand, when the texts selected by the debugger were sent for translation to a philology student who wanted to earn some money,
The other side of the relative ease of modifying the game software code was the ability to collect several games on one disc, to the delight of limited kids. For the most popular games, trainers were sewn in - downloaders, who, to death, stained the decrement of lives, cartridges, etc.
The demoscene was surprisingly small and did not really form to this day. Therefore, I urge everyone who has had anything to do with console game piracy to talk about it! I will be very grateful to those with whom I can communicate on this topic in detail.
Massively, games for the Playstation ceased to be released around 2002-2003, but enthusiasts do not give up and are trying to continue this noble cause. You can do this in two ways - that is how many decent SDKs exist for the Playstation today. You can read about where to get both at the end.
This is the official SDK released by Sony for professional game developers. It contains the C compiler, as well as all the necessary libraries. There are also many tools for processing graphics and converting it to a format suitable for processing Playstation, some of the tools are already useless due to the availability of modern analogs, some are unclear why - the documentation for them has been lost.
This SDK really allows you to write high-quality games, but it has one drawback - it is designed to work under Windows 95-98, already on XP you may run into problems. But even with it, creating games using 3D models will be difficult - in those days quite specific 3D editors were used, and the SDK contains only a tool for converting models from formats long ago.
In general, this SDK is worth trying only to understand what the programmers had to work on at that time and how imperfect their tools were compared to today.
Since 2008, a completely open SDK has been born, based on the GCC compiler and developing to this day. It allows you to create only 2D games - well, or, if you feel the strength to write an engine for rendering 3D in C, then everyone is open to you. Writing a video player on it will also be problematic, but overall this is the best option to start programming.
Of the nice advantages - with the help of this SDK you can compile things like gzip, libpng, etc. - any modern plain C code. So the author managed to compile earlier versions of Lua to work on the Playstation. Therefore, if you know any library designed to work in microcontrollers that implements basic work with 3D graphics, such as rendering polygons or mapping texture, this will be a good help for the project.
The documentation is currently being written by me, and in my free time. But there are code examples, using which, writing your Super mario or analogue of almost any flash game is more than possible.
In addition, this SDK works successfully under both Windows and Linux. But what a sin to conceal - beneath everything under which you can only collect it.
The community of enthusiasts is divided into 2 groups, depending on the use of the SDK. At the same time, the group that uses Psy-Q has a more "iron" focus, such as modding consoles. Thus, there is a dispersal of efforts of an already small number of people. The habitats of members of both communities also vary :
Psy-Q:
irc: irc.eversible.com #psxdev
forums: http://psxdev.net/
PSXSDK:
irc: irc.freenode.net #unhaut
forums: http: // unhaut. fav.cc/forums
project site: http://code.google.com/p/psxsdk
If you know any Russian-speaking communities involved in developing for Playstation or translating games, or if you did these games in your time, or you still have some tools or documentation from people you knew and were involved in, please, write to me! Moreover, if you have information about hardware-independent C-libraries for rendering 3D graphics, which are also undemanding to resources, then again - write!

In fact, this console marked a quiet revolution in game programming. That is what I would like to talk about today. And moreover, if you want to write your own game for a console gathering dust in the pantry, thus avenging creative impotence experienced in adolescence, then under the cut you can get an idea of how to do this.
Some facts
It is important to know:
- Playstation was the first common console to support normal full-color video playback. To do this, the console had a special chip that supported hardware decoding of a format close to JPEG. Nevertheless, the developers had to manually draw each frame and synchronize the audio track.
- Due to hardware limitations, it was impossible to copy a bitmap larger than 256x256 pixels into video memory at a time - so all panoramas in the background were drawn in 2-4 passes.
- To play from pirated disks, the console had to be chipped; for this, a special controller was soldered to the console motherboard, giving the Playstation a lasting illusion that a cheap disc in its bowels is a licensed disc. Finding an unchipped console in the CIS was most likely impossible. In the West, the same problem was solved more legally - for this, a disk swapping trick was used: during the BIOS boot, a licensed disk was inserted, and immediately after it a blank with the game that was required to be launched.
- Memory card - a regular flash drive with a capacity of 128 kB.
- There was a mouse for the Playstation. But who knew about this?
- On the console, you could play a Video CD. But who knew where to get them?
- The release of Playstation 1 in the vast expanses of Far Asia was suspended only because Sony needed large production capacities in order to increase the release of Playstation 3. March 23 could be considered a day of mourning.
- Most games for the Playstation have a resolution of 320x240.
- Almost all of the Chinese Playstation clones on the market today run games in emulation mode, while the hardware differs from the original, which leads to the inoperability of some games. But you can watch a DVD bought in a nearby tent.
- The last game for the Playstation, which is neither a reissue nor a handicraft, was released in 2005. In total, about 8,000 games were released.
- Just like events like Perl Workshop are being held, then developer meetings were held to exchange experiences and demonstrate prototypes of games under development. The material of each such rally was released on a disc, the contents of which were very similar to what was on the black demo disks that came with the Playstation. If you collect them all, then you can look down on local philatelists.
- The most common method of “cutting” games in order to create pirated collections was to replace all video files with short “stubs” - second clips with a black screen.
- There were fights in game clubs due to the fact that there was not enough space on memory cards for everyone. In general, the relative cheapness of the Playstation has led to the fact that the first gaming clubs massively opened on its basis. So it was in the periphery, in the capitals, clubs with Sega or just computers were before.
Where does the difference begin?
Few people know, but programming for other common consoles of that time was hell (from the point of view of a programmer who does not have a love for assembler). The gamedev of that time was more like modern programming of microcontrollers, with all the ensuing consequences - the lack of a normal interface to the file system, manual generation of the sound frequency, access to I / O ports for each operation, and assembler, assembler, a lot of assembler. There were other minor joys like several processors in one console, or RAM that did not have a continuous range. You can’t remember all the little things. The only prefix of the time that could boast of humanism towards programmers was the Panasonic 3DO, which nevertheless did not find popularity in the CIS (and the rest of the world, too).
To understand the degree of hopelessness that occurred when programming for the then most common consoles, take a look at these characteristics:
Console | CPU | RAM amount | Media Limitations | Video Memory Capacity |
---|---|---|---|---|
Dendy / nes | 1.66-1.79 MHz | 2 kb | 48 kb | 2 kb |
Sega mega drive | 7.61 MHz | 64 kb | 4 MB | 64 kb |
Playstation 1 | 33.8688 MHz | 2 MB | about 700 MB | 1 MB |
Of course, there were tricks to increase the capabilities of cartridge consoles - a cartridge, in fact, an electronic circuit, with many conclusions, not all of which were designed to read data from the cartridge ROM. What can be placed on the diagram? Yes, anything - additional RAM, a ROM controller with the ability to map data from large games into a valid I / O address space. The main thing is that the console supports an interface for interacting with similar cartridge devices. And she, as a rule, supported! Thus, programming of games was not limited to code development; sometimes it was necessary to “finish” the game in hardware in order to somehow surpass the meager capabilities of the consoles of that time. However, few of the many who have Dendy in the post-Soviet space are fortunate enough to deal with cartridges,
This ugliness ended with the advent of the Playstation: firstly, the console had pretty impressive features and could compete with computers of the time running DOS (which led to a considerable number of games that were ported from PC to Playstation), and secondly, the game was now located on a compact -disk, which meant the impossibility of any hardware tricks. In short, the arrival of the Playstation laid the foundation for two eras - the one when crutches were considered good practice, and the one when crutches were considered crutches. But when one era replaces the other, there are always retrograds that hold holy past covenants - it is thanks to their dedicated work that several games have entered the market that work only on the earliest revisions of the Playstation. So, changing the port addresses of devices from revision to revision, Sony engineers softly,
Programming for the Playstation was so simple that in addition to special hardware stations (Dev Unit), sold to professional game developers for about $ 35,000, Sony released a special version of the console for home developers called Net Yaroze and comparable in price to the console itself.
How was it done
It has already been said above that for early consoles, programming was conducted almost exclusively in assembler. In the case of the Playstation, the C standard became the de facto development standard. Normal C, without assembler inserts, port communications and any serious restrictions - you no longer had to write your strncat implementation or write your own library for input-output, if you just wanted to read the file from disk.
Another important difference from previous consoles was that the developer received a full-fledged API interface for all the hardware capabilities of the console like a coprocessor for vector computing. The SDK supplied by Sony had wrappers for everything that could come in handy, which made it possible to truly ignore the features of the console. As a result, porting games from under DOS often turned around just rewriting the layers responsible for graphics and sound.
In general, the development for a typical programmer was of this nature: to the Playstation, through the connector shown in the figure, a development module was connected that connected to the computer. Through this bridge, the EXE file was loaded into the RAM of the console, and through it the output of debugging information to the computer was possible. Just as many artisanal web studios now lack Apple technology to test their applications, developers of games for the Playstation lacked Dev Units. Thus, the large incomprehensible port on the back of the console should serve as a silent reminder that some things do not change even after almost two decades.

Of course, far from each of the developers had the self-control to write a game on the disgusting S. And then an ambitious developer’s crown weapon was used - a makeshift programming language. It is authentically known that at least 2 series of games suffered such a fate - Crash Bandicoot, which was written in the self-made dialect of Lisp, as well as the entire Final Fantasy line up to part 9, whose engine migrated through a bunch of platforms and had its own interpreted assembler. You can read about creating both games here:
Crash Bandicoot: http://all-things-andy-gavin.com/2011/02/02/making-crash-bandicoot-part-1/
Final fantasy: http: // q- gears.sourceforge.net/gears.pdf
How was it done with us
The significance of the Playstation is also that its disks could be read on any computer and recorded on it. That gave rise to a wave of piracy unprecedented for other consoles. Now in order to make the translation of the game it was enough to have a disassembler for the MIPS architecture, as well as a CD-ROM writer. Perhaps it is the fact that the translation of these games required so little gave rise to such poor quality of the first translations. This can be regarded as an ideal illustration of the division of people into techies and humanities: when a person had enough English knowledge enough to study the disassembler guide, at the output we received a translation so abundantly flavored with jargon and obscenities that the plot of the game was somewhat lost; on the other hand, when the texts selected by the debugger were sent for translation to a philology student who wanted to earn some money,
The other side of the relative ease of modifying the game software code was the ability to collect several games on one disc, to the delight of limited kids. For the most popular games, trainers were sewn in - downloaders, who, to death, stained the decrement of lives, cartridges, etc.
The demoscene was surprisingly small and did not really form to this day. Therefore, I urge everyone who has had anything to do with console game piracy to talk about it! I will be very grateful to those with whom I can communicate on this topic in detail.
Game Dev Features
Massively, games for the Playstation ceased to be released around 2002-2003, but enthusiasts do not give up and are trying to continue this noble cause. You can do this in two ways - that is how many decent SDKs exist for the Playstation today. You can read about where to get both at the end.
Psy-q
This is the official SDK released by Sony for professional game developers. It contains the C compiler, as well as all the necessary libraries. There are also many tools for processing graphics and converting it to a format suitable for processing Playstation, some of the tools are already useless due to the availability of modern analogs, some are unclear why - the documentation for them has been lost.
This SDK really allows you to write high-quality games, but it has one drawback - it is designed to work under Windows 95-98, already on XP you may run into problems. But even with it, creating games using 3D models will be difficult - in those days quite specific 3D editors were used, and the SDK contains only a tool for converting models from formats long ago.
In general, this SDK is worth trying only to understand what the programmers had to work on at that time and how imperfect their tools were compared to today.
PSXSDK
Since 2008, a completely open SDK has been born, based on the GCC compiler and developing to this day. It allows you to create only 2D games - well, or, if you feel the strength to write an engine for rendering 3D in C, then everyone is open to you. Writing a video player on it will also be problematic, but overall this is the best option to start programming.
Of the nice advantages - with the help of this SDK you can compile things like gzip, libpng, etc. - any modern plain C code. So the author managed to compile earlier versions of Lua to work on the Playstation. Therefore, if you know any library designed to work in microcontrollers that implements basic work with 3D graphics, such as rendering polygons or mapping texture, this will be a good help for the project.
The documentation is currently being written by me, and in my free time. But there are code examples, using which, writing your Super mario or analogue of almost any flash game is more than possible.
In addition, this SDK works successfully under both Windows and Linux. But what a sin to conceal - beneath everything under which you can only collect it.
Community
The community of enthusiasts is divided into 2 groups, depending on the use of the SDK. At the same time, the group that uses Psy-Q has a more "iron" focus, such as modding consoles. Thus, there is a dispersal of efforts of an already small number of people. The habitats of members of both communities also vary :
Psy-Q:
irc: irc.eversible.com #psxdev
forums: http://psxdev.net/
PSXSDK:
irc: irc.freenode.net #unhaut
forums: http: // unhaut. fav.cc/forums
project site: http://code.google.com/p/psxsdk
If you know any Russian-speaking communities involved in developing for Playstation or translating games, or if you did these games in your time, or you still have some tools or documentation from people you knew and were involved in, please, write to me! Moreover, if you have information about hardware-independent C-libraries for rendering 3D graphics, which are also undemanding to resources, then again - write!