psxsdk

car

A textured car driving in from the distance, at sixty frames a second or thirty.

Controls

The d-pad moves the car across and up and down, the symbol buttons turn it, and L1 and L2 bring it nearer and push it further. Start switches between sixty frames a second and thirty. Select quits.

A port of Sony's Net Yaroze demo "car" (Sony, 1995, "60frame" in its source): an Alfa Romeo Giulietta, a textured model wearing seven textures, drives in from the distance and then turns slowly at the center of the screen under one light, at 640 by 240 interlaced. The demo is about frame rate: Start switches it between sixty frames a second and thirty, which the library's font reports, and the controls double their steps at thirty so that the car moves at the same speed either way.

Differences from the original:

  • The textures and model are read off the disc into the program's own memory. The original's batch script sent them to fixed addresses.
  • The drive in moves the car by whole units each frame, as the original's integer coordinate ends up doing: it adds 1 + i/20 in floating point and C truncates the sum towards zero, which rounds the step up while the car is behind the viewpoint. The port reproduces that arithmetic.
  • The speed line is printed in a font window the port opens. The original prints without opening one.

Nothing allocates after startup.

Source on GitHub