6 ms·
I have very fond memories of the ZX Spectrum. By modern, or even contemporary, standards, it's a weirdly under-powered machine, yet it introduced a (mostly "con
by mdb31 5y ago
I have very fond memories of the ZX Spectrum. By modern, or even contemporary, standards, it's a weirdly under-powered machine, yet it introduced a (mostly "continental") generation to gaming, programming and much more.
The built-in BASIC made the Spectrum very accessible. But it was also quite limited, mostly due to being very slow. But: the great thing was, all the machine code that processed said BASIC was right there, in the ROM, just waiting to be examined.
I still remember disassembling the machine code responsible for handling the "LOAD" and "SAVE" commands, which were an interface between memory and the tape deck (the only long-term storage available). It was surprisingly small and elegant, and easily modified to perform certain tricks, such as varying the baud rate of the cassette interface, the order in which bytes were loaded (allowing for cool effects like "the screen is populated, but not from top-to-bottom, but the other way around), and many other things.
And this was all waaaaay before the Internet, relying on (photocopies of) library books about the Z80 and magazine articles, which arrived late-if-at-all. At some point, I'm pretty sure I had memorized the purpose of every "OS-related" memory location of the Spectrum (all 16384 bytes of it).
The complexity of today's systems makes all of that impossible. But that's mostly nostalgia talking: the capabilities of the Spectrum would be laughed away (and rightfully so) these days.
- tragomaskhalos 5y agoThere was a wonderful book called 'The Spectrum ROM disassembly' that gave a full and detailed analysis of the whole thing. A good chunk of the code was cloned from the ZX81, but as you say the tape routines were very nice, as was the stack-based calculator which was invoked via an RST call followed by opcodes for pushing numbers plus all the arithmetic and trig functions. I got knee deep into my own disassembly of the Interface 1 (?) ROM which has all the microdrive code, but never finished it :-/
- belter 5y agohttps://archive.org/details/CompleteSpectrumROMDisassemblyThe https://archive.org/details/CompleteSpectrumROMDisassemblyTh...
- razzio 5y agoAh yes that brings back memories. I knew that book inside-out. I made the ROM writable by soldering a CMOS ram chip across the ROM (was it 16KB?) and any write to the ROM would end up in the RAM. A switch selected either the ROM or RAM to read from. On startup simply copy the ROM to the RAM and flip the switch. After this operation, using 'The Spectrum ROM disassembly' book the world was your oyster. I modified the ROM routines for reading/writing those little tape drives and bypass copy protection, for experimental purposes of course :)
- YZF 5y agoI still have the book...
- mdb31 5y agoYeah, that seems to have been a pretty popular book, but I've literally never seen it. At the time, no library near me had it available, and ordering it from the UK was just too expensive for 13-year-old-me. I did have my own ROM disassembly, in two school notebooks, that I still keep to this day. Mu handwriting was pretty bad already then, though, so I prefer to think of all this as "lost in time" anyway. Decades later, I did (pre-)order and read "The ZX Spectrum ULA", which documents, in painful detail, the inner workings of the custom Ferranti chip that powered most of the Spectrum. This really did drive home the message that, no matter how much I thought I understood the low-level workings of my Speccy, there were still many lower-level layers left to explore. Which, I guess, is the central lesson of IT...
- harry8 5y agohttps://archive.org/details/CompleteSpectrumROMDisassemblyThe https://archive.org/details/CompleteSpectrumROMDisassemblyTh...
- billforsternz 5y agoI had that book and remember learning something from the very first line of code; XOR A. This clears the accumulator (of course) with a one byte instruction, improving on the more obvious LD A,0 two byte instruction I'd always used up until then.
- JoeDaDude 5y agoThere was an enterprising coder who would sell a Basic compiler the related Timex 2068 computer. It had lots of limitations, such as only allowing one dimensional arrays, but I was able to use it to implement Conway's Game of Life which I let run for days on my CRT TV.
- rcarmo 5y agoIt was a thing of wondrous beauty, pretty much all rainbows and unicorns, especially if you'd upgraded from a ZX81 :)
- deleted 5y ago[deleted]
- stevesimmons 5y agoI did a similar thing with the ROM of the VIC-20. I didn't have a printer though. So I wrote out the entire BASIC ROM in 6502 assembly language, longhand, in my school exercise books starting from the empty pages at the back... My greatest sense of accomplishment came from figuring out how floating point arithmetic worked in an 8-bit processor, and then the sin, cos and tan functions.
- noobermin 5y agoI could have a rant about your last line there. I even long for the days of the 00s when web programming was much more simpler albeit a little hairy. The obtuseness of modern js development is obscene and with little sincere justification. I think it's true capabilities bring about some minimum level of complexity but the level of complexity in modern software sometimes seems rather unnecessary.
- mdb31 5y agoI sort-of get what you're saying here, I think, but I'm not sure you're right. As an inquisitive young person, you are, quite likely, at some point confronted with something that seems like magic. If you're truly (or perhaps excessively?) inquisitive, you try to dissect that magic. Sometimes that leads to true understanding, sometimes just to confusion, or at best the understanding that you don't understand. The "home computers" of the 1980s were still simple enough to allow "true understanding". But only up to some point: I could find my way around a ZX Spectrum memory map just fine, but could I have built such a machine from scratch? No way! In hindsight, I only understood a very small portion of the technology I was working with, even though that understanding was absolutely mindblowing at the time. Today, that portion would very likely have been "higher up the stack": let's say, I would be an absolute master of the DOM using Javascript, instead of a master of the ZX Spectrum ROM using Z80 assembly. But would that portion be less "worthy" or less useful? I'm not so sure...
- laputan_machine 5y agoI don't think GP is talking about JavaScript dom manipulation, i think they are talking about typescript/babel/webpack/esm basically even before nyou start programming in a high level language like js you have to use a bunch of tools that you don't even know how they work, it's just some magic config you set up and cross your fingers. But maybe I'm reading too much into their post. I'm a dev of 12 years who cut my teeth on assembly and c, i currently write "modern" js and I feel this way, if it's far too complicated for me, it's going to be even worse for a newbie
- 5y ago