LATEST UPDATE 18th December - Chapter 10 to 12 downloads added.

NEXT TECH Get the best from your ZX Spectrum Next

Book cover image

NEXT TECH is a book for readers who treasure the creative aspects of the pre-PC home micro scene of the late 1970s and early 80s. It helps Spectrum Next owners to progress beyond the manual that came with their computer, providing them with inspiration, expert guidance and enthusiasm spread over 500 pages. It's written for the people for whom Sir Clive Sinclair created his computers in the first place.

The Sinclair ZX Spectrum Next packs 45 years of British home computing into a nifty designer case. It combines brilliant ideas from Sinclair, Amstrad, Acorn and the Amiga in a modern system made by industry professionals who never forgot the thrills of the early micros, and who had the vision and community spirit to develop that technology further for the 21st century. It's a lot to get your head around. So Simon N Goodwin, creator of Crash magazine's Tech Tips column, has written a specialist book to help you make the most of this amazing machine.

This is what Phoebus Dokos, author of the official manual included with every ZX Spectrum Next, says about Next Tech: If you've read the Spectrum Next manual and want more, this is it! Simon has been my Sinclair reference expert for more than thirty years - now he can be yours, too.

NEXT TECH is a celebration and source of inspiration expertly researched and written over six years. From simple hardware hacks to intricate, carefully explained software components - from BASIC commands through a structured cascade of POKEs, USR calls, custom chip registers, VHDL, pointer control, sprites, graphics and sound layers, coprocessors, DMA and Z80n machine code - NEXT TECH guides the reader down a fascinating trail from 1970s DIY culture and historical accidents to the FPGA silicon that powers the Next's cores and personalities.

NEXT TECH explores the creation stories, inner logic and endless potential of classic computers that do just what you ask of them... flexible, interactive, accessible micros designed for quick learners and creative minds, now enhanced with speed, memory and storage options unimaginable in the 1980s, not forgetting modern WiFi and HDMI.

Simon N Goodwin wrote and published hundreds of clear, informative articles about the heyday of home micro-computing as Technical Editor of Crash magazine, a frequent contributor to Your Spectrum, a writer for most other UK Sinclair magazines, Personal Computer World, Computer Shopper, Amiga Format and Wireframe columnist. Simon's programs have been marketed by Atari, ATD, Codemasters, Digital Precision, Dk'tronics, EA, Quicksilva, Sega and Zynga. Simon has contributed to the system software and design of Sinclair-based micros like MGT's SAM Coupé, CST's Thor and ZX Spectrum Next.

* Includes N-GO, Xberry Pi, a bit of ARM, lots of Zilog, and (almost) no Microsoft!



How can I buy the book?

NextTech is now available as a £25 paperback worldwide through Amazon. Amazon online stores allow payment in local currencies and print on demand to limit wastage and shipping costs.

The limited-edition UK-printed wire-bound version sold out at Crash Live 2024 in Kenilworth. Pre-orders have all been sent out around the world and there are none waiting for despatch. If you ordered a wire-bound book (not an Amazon paperback) from us before Crash and that book has still not been delivered, please get in touch, with copies of any tracking messages you've received from Royal Mail or your local delivery agent, and stating your pre-order number from the first message we sent you, via the usual contact address:


Tell me more!

Next Tech is a 500-page book printed in clear, 11-point type with over a hundred illustrations, a comprehensive table of contents, and an eleven-page index at the back. The first chapter is an introduction and overview. Here's a rather condensed summary of the contents of the other chapters.

Chapter 2 delves into the details of Spectrum versions and compatibility, Next personalities, Configuration menus, Kickstarter 1 and 2 hardware differences, mouse and track-ball input options. It's mostly about hardware.

Chapter 3 explains why your modern monitor or telly might not entirely be an improvement on the one you shared in 1982, and what do about it. It discusses the pros and cons of SCART, VGA and HDMI displays, analogue screen testing, Screen capture, Composite video converter devices, and graphics configuration commands.

Chapter 4 covers hardware connections: recognising and making compatible tape leads, power supply issues, joystick choices and set-up, DIY optical input and output via the controller ports, adding a second SD slot, printing, configuring floppy discs and other plug-in interfaces. It's a chapter for hardware tinkerers, but you don't need to be able to solder to benefit from reading it, or to follow up on some of the hardware projects.

Chapter 5 turns towards software, and NextBASIC in particular. It explores BASIC benchmark speed-ups and remaining bottlenecks, program source tokenisation, variable-name look-ups, memory leaks, stream and esxDOS file operations, backups and file comparisons. It also discusses programming the Copper co-processor from BASIC for sound and graphical effects.

Chapters 6, 7 and 8 demonstrate recently-added features of NextBASIC. They present a carefully-designed text editor, while exploring the history of BASIC programming from Dartmouth College to NextBASIC 2.09, by example. The editor demonstrates how to program mouse selection and menus, keyboard polling, character sizes, integer optimisations - and the practicalities of splitting large programs and data into banks. In its own right, the text editor is a handy utility for configuration files and short texts, ripe for further customisation.

Chapter 9 details the history and development of Next systems, including ways to identify particular hardware and software versions and detect the availability of the Z80n processor. This will help you decide whether or not to upgrade your Spectrum Next and which older versions you might want to keep on spare SDs for backward-compatibility testing.

Chapter 10 dives into Z80n machine code with the first of two open-source drivers, capable of regularly running up to 64 'slot' routines in parallel with NextBASIC. This driver is written on Next with the Odin assembler. Chapter 11 demonstrates some driver 'slot routines' in action. The Z80n programs vary in length from three to almost 200 instructions. All are explained, step by step, without presuming machine-code expertise.

Chapter 12 builds substantially on the 'slot' driver and automatic sprite update system introduced in NextBASIC 2.06, with support for smoother movement and more complicated paths, including fast fixed-point arithmetic routines which take advantage of Z80n processor extensions.

Chapter 13 is all about Next's memory, explaining the difference between BASIC Banks and MMU Pages, with programs to read any RAM page and replace system fonts. After that it shows by example how to augment the Z80n by using the DMA co-processor for animation and audio streaming.

Chapter 14 tunes into Next's three built-in AY-3-8912 programmable sound generators, providing procedures to emulate BEEP better and play multi-channel audio without stopping the main NextBASIC program. It explains subtleties of program timing, and how to compensate for them in advance or on-the-fly.

Chapters 15 and 16 introduce a second driver, this time written to demonstrate the NextBASIC inline assembler. The TileDriver extends NextZXOS to allow BASIC programs to set up and PRINT Layer 3 hardware TileMap graphics, for larger (320 or 640x256 pixel), faster (0.5 or 1ms CLS) displays and animated fonts, plus sprite-like tile rotation and mirroring in hardware. all from NextBASIC and accessible to existing programs as well as new ones.

Next's FPGA is reprogrammable in hardware as well as software. Chapter 17 introduces Virtual Hardware Design and VHDL, contrasting synthesising an FPGA core with conventional programming, using examples from Next's own circuits and logic design. It shows programmers and old-school electronics hackers the principles of FPGA design, by comparison with familiar hardware and software, including contributions by SpecNext core maintainer and VHDL expert Allen Albright.

Chapter 18 demonstrates how much Next still has to offer beyond SpecNext's default configuration. It shows ways to run BBC BASIC inside NextZXOS, giving a massive increase in floating-point performance, comparing Sinclair and Acorn languages and operating systems.

NextZXOS can be temporarily replaced with alternative cores that implement Acorn computer hardware, including very capable audio and graphics add-ons, and the 'tube' co-processor interface which runs extremely fast and capacious programs on the Pi0 in parallel with Next's FPGA, with hardware display acceleration in megapixel 24-bit colour via the second HDMI port, controlled from Next through BASIC or other languages. Delivering on the 'accelerator' concept, the PiTubeDirect option brings decades of Acorn and Archimedes goodies to Next, RUNning unmodified BASIC programs thousands of times faster than an original BBC Micro, hundreds of times faster than any native Next BASIC. Programs to explore disc images and convert source between Sinclair, Acorn and Z80 BBC BASICs are included and explained in the book.

And of course there's a substantial index, right at the end. And as we find typos, we'll list any significant ones that affect the meaning here, and update the programs on the links below. Otherwise the book would never have got 'finished' ;-)




Where's all the free stuff?

While Next Tech draws on the DIY programming culture of 1980s magazines, the days of type-in frustrations are over. All the substantial programs in the book are freely available for download from this site, and directly to your ZX Spectrum Next via WiFi through the GetIt application. The programs, example sounds and graphics, are all freely distributable, with attribution, under a permissive licence ( CC-BY-NC-SA version 4) which allows purchasers of the book to freely edit and share modified copies of any of the programs in the book with attribution. Before contemplating any commercial use, please contact the author.

The text of Next Tech is not downloadable or currently available as an e-book, though parts can soon be previewed on the Amazon website, but it is planned as a series. Volume 1 will be made available digitally when the planned Volume 2 is printed, but not before 2026.

Downloads

ESXDOS hook examples
Compares text files, expects Next-standard CR line termination
VBEEP procedures in text format, for .TXT2BAS
Character set and graphics examples
Sprite Hacks from Chapter 12
The slot driver text and Odin source to accompany Chapters 10 and 11
The NextBASIC text editor (with a fix for Unix text files)
Sound and graphics DMA demos and test data
BBC BASIC examples and conversion tools
The LAYER 3 tile driver, fonts, demo and test programs *

Each Zip file includes a short readme file. The code is commented in English, but for full details, please read the book!

* The TileDriver download includes a new simple example, a LAYER 3 update of Mark Gallop's MemBrowse utility. That set will be updated to include the patches for the LAYER 3 Text Editor when it loads everything I throw at it, but our next priority is have a little rest, then check everything above already works as expected on the new Next distribution recently announced.



ERRATA

I checked and corrected four proof copies of the book before authorising the first edition print-run, and almost every page of the first release candidate benefitted from that attention. The most technical chapters were peer-reviewed and any errors still present are my entirely fault (sic). As you're probably aware, even without having to write and check 210,000 words yourself, it's remarkable how new typos appear in a previously-checked document as soon as you decide, for the n'th time, that it is 'finished'. No sooner did the Amazon preview go up than TJ spotted a missing capital letter on one of the cross-headings, which was in the first paperback proof and I'd missed in every read-through since.

It takes me four days and nights to carefully (but not perfectly) read through each proof print, and I'm sure that mistakes still slip through, despite that effort. Amazon's Print on Demand model, versus the fortnight of production lag for the UK batch, means that I have been able to catch and fix some mistakes in the first wire-bound edition in later paperbacks, though the process of updating is not without fresh risks. Text on page ii, e.g. 'PoD Rev. B', tells you if your copy has been revised since I spotted the issues listed below. If it's not there, you've got a first edition - thanks for getting the ball rolling!



First edition corrections, in order of occurrence:

Page 23: fast RAM should read fast ROM (later, -> stands for 'should read')

Page 54: other lead is the anode -> other lead is the cathode. I got anode and cathode swapped over in the first proof, then 'corrected' it to refer to the anode twice, whoops. The bottom plate is the cathode.

Page 60: bug plug -> big plug

Page 72: the heading BM7 appears twice; the first should be BM6

Page 78: for Next board read KS1 or N-Go board

Page 97: one addition and -> two additions and one

Page 228: Just 93 should be just 83

Page 261: radius between 35 and 50

Page 328: StreamModule2 has a different base address and has been added to the downloads

Page 379: updates and updates -> output and updates

Page 382: EDIT -> TAB

Page 384: ESC -> ESC, CHR$

Page 397: TimeMap -> TileMap

Page 457: This program is for BBC BASIC V; the binary download has been adapted to suit BBC BASIC 2 (slowly)

Page 459: SID chip -> SID imitation

Page 461: The word Pixels is missing from the end of the INK line in Table 11



Mistakes found since, in order of occurrence:

Page 5 (index) and

Page 68 - for uttons, read Buttons (thanks TJ)



I'm going to take a three-pronged approach to the 'living document' that you've been kind enough to invest in.

(1) Mistakes that affect the sense of the text will be collated and listed here, with corrections or clarifications.
(2) Wonky punctuation, two greengrocer's apostrophes, and the odd extra or missing word will not be, because significant and embarrassing though those glitches are, I want to concentrate on the important stuff that might otherwise mislead you.
(3) Problems that affect the programs and data can be addressed through updates of the download packages here and on GetIt, and despite our recent postal assault course I have already updated the Text Editor with a fix for Unix text files, which ironically addresses a bug caused by adding a line to check for files with no line-end markers at all. I'm aware of an issue which can leave the cursor floating past the end of a long document, and recommend paging back and forward with INV/TRUE VIDEO keys to resolve this, till a proper fix can be found, checked and shared.

Before reporting an apparent software problem, please make sure you're testing on NextBASIC 2.08 or later, and preferably the latest official release from SpecNext; if you're using a release candidate from GitLab, please repeat your test with a final distro, and start from a cleanly-rebooted system to be sure it's not caused by something you've done earlier. If I can reproduce a fault, given the exact environment in which you found it, I can probably fix it, though there are hundreds of you and only one of me so it might take a while and I might suggest a workaround in the meantime. People suggesting fixes rather than faults will get my attention soonest, especially if they've carefully tested them.

Copyright © 2024 Simon N Goodwin