You are free to use this code under the terms of this MIT license. Comments and suggestions are welcome, and it is available for download from this repository.

https://github.com/breakintoprogram/lib-spectrum-next

If you do find this code useful, and wish to contribute, then feel free to buy me a ko-fi.

The code is generally written with readability in mind rather than performance, unless performance is the goal, such as the scroll routine.

The demos are in the following directory structure:

  •  Demo
    • demo_3d.z80 – rudimentary 3D engine that demonstrates the Layer 2 filled vector graphics library

Compile the relevant demo from the Demo directory; the demo will then include required library files from the Lib directory.

Compilation Instructions

  1. Install and configure your toolchain (see this page for more details)
  2. Download lib-spectrum-next from github
  3. Start ZEsarUX from its application folder
  4. Open the folder Break Into Program / ZX Spectrum in Visual Studio Code
  5. Open a source file (i.e. demo_scroll.z80) from the Demo folder
  6. Select Terminal > Run Build Task from the top menu of Visual Studio Code.
    • The file opened for edit in Visual Studio Code is the one built out.
    • The code should compile with no errors and create a NEX file in the same folder as the source file. It will also create a LST file for the debugger.
  7. Select Debug > Run Without Debugging from the top menu of Visual Studio Code.
    • The created NEX file will be sent to ZEsarUX and should start running.