3 ms·
So, 2 registers and 16-bit math in software? Was this common, or did games find a way around it?
by blt 12y ago
So, 2 registers and 16-bit math in software? Was this common, or did games find a way around it?
- daeken 12y agoYes, it was common. Also common was to have entities in your game exist on a grid, and multiply/shift those positions to get screen coordinates, when they were needed.
- ddingus 12y agoSure. Toss up some side bar / status / score thing, and run the game in 8 bit coordinates. Or, double up on movement, make the game 160 pixels, and just run that way. The multi-color mode on C64 is 160 pixels, and that got used for a ton of games. Finally, mixed screen setups. Sprites, high resolution (320) and multi-color (160) all were used concurrently. The coordinates for those could easily be 8 bits, and just operate in regions of the screen.
- pkaye 12y agoWell the 6502 didn't have many registers but the CPU and SRAM were of similar speed back then so most of the temporary values were stored in SRAM. Not too long ago I did firmware on an 8-bit processor using the C language. It would support 32/16/8-bit variables. You just have to choose the smallest one possible to be most efficient.