4 ms·
> Would the original game have been written in assembly? And if so, would the source have looked similar to this? Yes, and probably somewhat. The programmers w
by khedoros1 9y ago
> Would the original game have been written in assembly? And if so, would the source have looked similar to this?
Yes, and probably somewhat. The programmers were Japanese, so variable names would almost certainly be different, and the assembler this code was written for is actually for the CPU in the Super Famicom/SNES, so although I'm not sure when the assembler was written, it certainly wasn't around in 1984 when this game was being written. I think that the notation style is based on Nintendo's system development documentation, though.
The NES would actually be a good place to look at some assembly, at least to get a basic idea of how it works. There aren't many operations, they're pretty easy to understand. There are only a few registers, and no layers of historic cruft layered on top ofit. The same (well, very close) CPU was used in a lot of computers from the same era: https://en.wikipedia.org/wiki/MOS_Technology_6502#Computers_and_games https://en.wikipedia.org/wiki/MOS_Technology_6502#Computers_...
- Narishma 9y ago> the assembler this code was written for is actually for the CPU in the Super Famicom/SNES Super Mario Bros is an NES game.
- khedoros1 9y agoI know that; I played that game for years before the SNES came out, but the assembler supports the Ricoh 5A22 that was used in the SNES. The Ricoh 2A03 used in the NES is basically a subset of the SNES' processor. I was commenting on the fact that since the assembler itself supports the 16-bit variants of the processor family, it couldn't be the same assembler that would have been used to build the original NES code, so the exact assembly language used might not be a precise match either.