3 ms·
Seeing 6502 assembly language made me feel a bit nostalgic - sixteen year-old me spent quite a lot of time coding in it for a year or so, first on my Vic 20 the
by andyjohnson0 4y ago
Seeing 6502 assembly language made me feel a bit nostalgic - sixteen year-old me spent quite a lot of time coding in it for a year or so, first on my Vic 20 then on an Acorn Electron. I was surprised to find that I can still almost read it and, browsing an instruction set reference just now, I'm impressed all over again by its succinctness.
Wiki has a few notes on the game hardware and implementation at [1]. The Quadrascan graphics processor, which presumably ran the code in 'asteroids_vector_rom.asm', doesn't seem to be well described on the net (as far as I can tell) but there's a hardware service manual for the colour version at [2]. It seems to me from reading it that the vector processor was tightly integrated with the CRT tube, and the manual has lots of scary/exciting warnings about high voltages and potential tube implosion.
[1] https://en.wikipedia.org/wiki/Asteroids_(video_game)#Hardware https://en.wikipedia.org/wiki/Asteroids_(video_game)#Hardwar...
[2] https://www.manualslib.com/manual/689160/Atari-Quadrascan-92-053.html https://www.manualslib.com/manual/689160/Atari-Quadrascan-92...
- commandlinefan 4y ago> sixteen year-old me spent quite a lot of time coding in it for a year or so I always assumed this was what I would be doing for a living when I grew up - I was honestly a little disappointed that high-level languages had progressed so far by the time I joined the workforce.
- tenebrisalietum 4y agoI think deep knowledge of any assembly helps with any type of programming. You'll have very good perspective of how the CPU and RAM really work, even if modern CPUs are more complex and you have caching and out-of-order in the mix.
- andyjohnson0 4y ago> I think deep knowledge of any assembly helps with any type of programming. I very much agree. I've never written any assembly-level code as part of my work, but having an appreciation of the concepts at that level helped me as newbie C/C++ developer in the mid nineties. Nowadays I work slmost entirely in the .net stack, but even there having even a shallow knowledge of the "next level down" helps - the concept of a jitted language only really makes sense if you grok what the jitter is emitting. And the idea of compiler optimisations is easier to understand if you get that language constructs can be realised in different ways, with different costs, as machine code. Abstraction layers are certainly easier to think about if you see them (even shallowly) from both sides.
- lordfrito 4y agoTons of additional information here from an Atari staff engineer who worked on some of the XY games. [1] [2] [1] https://www.jmargolin.com/vgens/vgens.htm https://www.jmargolin.com/vgens/vgens.htm [2] http://www.jmargolin.com/xy/xymon.htm http://www.jmargolin.com/xy/xymon.htm
- andyjohnson0 4y agoFascinating - particularly the description of the state machine implementation. Thank you.
- detrites 4y agoYou might find ARM assembly interesting, especially the simpler 16-bit "thumb" subset used on various embedded devices (eg, RP2040). It was apparently inspired by the 6502 ISA, and still exhibits many similarities to this day.