Difference between revisions of "NextZXOS"

From SpecNext official Wiki
Jump to: navigation, search
(NextOS: finished renaming to NextZXOS)
(Supported File Formats)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= NextZXOS =
+
== NextZXOS ==
  
NextZXOS is one of the Operating Systems that is integrated into the Next.  It's based on the +3E DOS which is in turn an extension of the +3 DOS as found on the ZX Spectrum +3. It provides access to the extra memory via integrated Ram Disk as well as SD cards. It also supports CP/M Plus file structures and partitions on the SD card (although support of CP/M for the Next is still being developed), FAT16 and FAT32 partitions, the latter with full 255 character Long File Names (LFN). NextZXOS additionally supports NextBASIC's 128K full screen editor and does not need USR0 mode to operate.
+
===Acknowledgments / Copyrights===
 +
* Always keep up to date by check the documentation at : https://gitlab.com/thesmog358/tbblue/-/tree/master/docs/nextzxos
 +
* 3e, NextZXOS and NextBASIC are © Garry Lancaster.
  
USING FROM NextBASIC
+
[[File:NextZXOS.png|thumb|NextZXOS]]
  
-directory structure
+
'''NextZXOS''' is the official operating system for the ZX Spectrum Next. It provides a modern and flexible environment for working with files, writing BASIC programs, and accessing various modes of the Next hardware. It builds upon the foundations of the [https://worldofspectrum.org/zxplus3e/ +3e ROM] and adds substantial enhancements in usability, editor features, and system integration.
  
-navigating directories
+
=== Overview ===
 +
NextZXOS includes a graphical main menu, enhanced editor, file browser, and support for multiple legacy and modern modes. It is designed to be user-friendly while offering deep functionality for advanced users and developers.
  
-tap files
+
=== Main Features ===
 +
* Customisable colour schemes for menus and editor using <code>.editprefs</code> and <code>.ecs & .bcs</code> files.
 +
** There is a utility bundled with the distro called [https://github.com/StalePixels/CUINT .CUINT] By D Xailor Rimron-Soutter, which is a handy GUI tool for editing colours.
 +
* Enhanced menu system showing RAM availability, clock speed, and real-time clock (if present).
 +
* Support for various boot options including:
 +
** 48K BASIC, 128K BASIC, ZX80, ZX81 modes
 +
** CP/M environment (with appropriate drive images)
 +
** Interface 2 and compatible cartridge booting (e.g. Dandanator)
 +
* Integrated file browser with support for file associations and configuration via <code>browser.cfg</code>.
 +
* Command line access.
  
-snapshots
+
=== NextBASIC Editor ===
 +
The NextBASIC editor in NextZXOS offers a powerful and modernised programming environment. It includes support for multiple column modes, syntax highlighting, extended editing keys, and advanced features like token and graphics character entry.
  
-new things coming
+
==== Display Modes ====
 +
* Supports 32, 64, and 85-column text display.
 +
* 64 and 85-column modes use Timex hi-res graphics (monochrome) with unique cursor shapes instead of colours.
 +
* Cursor types indicate current mode:
 +
** Normal: blue / lower-half bar
 +
** CAPS: cyan / upper-half bar
 +
** GRAPHICS: magenta / vertical bar
 +
** EXTEND: green / striped bar
 +
** Error marker: red / outline block
  
PROGRAMMING WITH NextZXOS
+
[[File:NextZXOS-2.png|thumb|Custom Editor Colours]]
  
--Files and Streams
+
==== Extended Keyboard Shortcuts ====
--the command line
+
Keyboard shortcuts improve editing speed and efficiency, especially for long programs. Most are triggered using the <code>EXTEND</code> key:
 +
 
 +
* <code>EXTEND + EDIT</code> – Toggle full/lower screen editor
 +
* <code>EXTEND + CURSOR LEFT/RIGHT</code> – Move to start/end of line
 +
* <code>EXTEND + CURSOR UP/DOWN</code> – Move up/down 10 lines
 +
* <code>EXTEND + GRAPHICS</code> – Jump to start of program
 +
* <code>EXTEND + CAPS LOCK</code> – Jump to end of program
 +
* <code>TRUE VIDEO</code> – Move left one word
 +
* <code>INVERSE VIDEO</code> – Move right one word
 +
* <code>EXTEND + TRUE VIDEO</code> – Delete word to the left
 +
* <code>EXTEND + INVERSE VIDEO</code> – Delete word to the right
 +
* <code>EXTEND + DELETE</code> – Delete character to the right
 +
* <code>EXTEND + 9</code> – Delete to start of line
 +
* <code>EXTEND + 0</code> – Delete to end of line
 +
* <code>EXTEND + 1</code> – Toggle between token and symbol entry for A S D F G Y U Q
 +
* <code>EXTEND + 2</code> – Toggle display of tokens in strings
 +
 
 +
==== Editor Menu Options ====
 +
The <code>EDIT</code> menu includes:
 +
* <code>Command Line</code> – Switch to direct command entry mode
 +
* <code>32/64/85</code> – Cycle through available column widths
 +
* <code>Screen</code> – Toggle between top or bottom screen editing
 +
* <code>Autonumber</code> – Start automatic line numbering
 +
* <code>Renumber</code> – Renumber entire program (starting at 10, step 10)
 +
* <code>Clear</code> – Clear all variables and reset RAMTOP
 +
* <code>Token keys</code> – Toggle whether A S D F G Y U Q produce symbols <code>~ \ | { } [ ] (c)</code> (the default), or the codes corresponding to keyword tokens on the keys.
 +
* <code>String tokens</code> – Toggle whether graphics characters (default) or token names are shown in strings
 +
* <code>Guide</code> – Open the NextBASIC help guide
 +
* <code>Exit</code> – Exit the editor and return to the main menu
 +
 
 +
==== Graphics Character Entry ====
 +
Graphics mode allows entry of user-defined characters and block graphics. Some combinations require <code>CAPS SHIFT</code>, <code>SYMBOL SHIFT</code>, or the <code>DRIVE</code> button (on the left of the case):
 +
 
 +
{| class="wikitable"
 +
! Key Combination !! Character Type !! ASCII Code
 +
|-
 +
| <code>GRAPH</code> or <code>9</code> || Exit graphics mode || -
 +
|-
 +
| <code>0</code> or <code>DELETE</code> || Delete character to left || -
 +
|-
 +
| <code>1–8</code> || Block characters (on keys) || 128–135
 +
|-
 +
| <code>CAPS + 1–8</code> || Inverse block graphics || 136–143
 +
|-
 +
| <code>A–Z</code> || UDGs A–Z || 144–169
 +
|-
 +
| <code>SYM + 1–8</code> || Extended UDGs (1–8) || 170–177
 +
|-
 +
| <code>SYM + A–Z</code> || Extended UDGs (a–z) || 178–203
 +
|-
 +
| <code>DRIVE + A–Z</code> || Underlined extended UDGs (a–z) || 204–229
 +
|-
 +
| <code>CAPS + A–Z</code> || Underlined extended UDGs (A–Z) || 230–255
 +
|}
 +
 
 +
==== Keyword Token Entry ====
 +
Keyword tokens are entered using different modes:
 +
 
 +
* **Tokens shown above a key** – Entered by pressing <code>EXTEND</code>, then pressing the key (e.g., <code>EXTEND + I</code> for <code>CODE</code>)
 +
* **Top-row tokens** – Entered in graphics mode with <code>CAPS SHIFT</code> held down (e.g., <code>GRAPH</code> to enter graphics mode, then <code>CAPS SHIFT + I</code> for <code>INPUT</code>)
 +
* **Second-row tokens** – Entered in normal mode with <code>SYMBOL SHIFT</code> (e.g., <code>SYMBOL SHIFT + I</code> for <code>AT</code>)
 +
 
 +
Note: A S D F G Y U Q are overridden for symbols by default. Use <code>EXTEND + 1</code> to toggle them back to token mode.
 +
 
 +
==== Additional Notes ====
 +
* The editor mode is independent of the BASIC execution mode. If a program switches display modes (e.g., with <code>LAYER</code>), the editor will return to its previous mode after the program ends.
 +
* Syntax highlighting is available in colour modes.
 +
* Maximum line length is 1280 characters (enforced by <code>.TXT2BAS</code>).
 +
 
 +
 
 +
=== Command Line ===
 +
The Command Line mode provides direct access to NextBASIC commands, dot commands, and scripting features. It is similar to the NextBASIC editor but without displaying any currently loaded BASIC program. This makes it especially useful for:
 +
 
 +
* Performing disk operations (e.g., <code>CAT</code>, <code>.MOUNT</code>, etc.)
 +
* Running dot commands and utilities
 +
* Issuing individual BASIC or system-level instructions
 +
 
 +
Editor options include:
 +
* Autonumbering and renumbering of BASIC lines
 +
* Clearing variables and restoring memory with the <code>Clear</code> function
 +
* Switching between token keys and graphic string display modes
 +
* Customisable screensaver using the <code>SPECTRUM SCREEN$</code> command
 +
 
 +
You can still enter and execute individual BASIC lines in this mode, but they are not stored or editable as part of a program listing.
 +
 
 +
 
 +
=== File Browser ===
 +
The built-in browser provides a user-friendly interface for managing and launching files from the SD card.
 +
 
 +
==== Supported File Formats ====
 +
The browser recognises a wide range of file formats and handles them accordingly via the <code>browser.cfg</code> configuration file:
 +
 
 +
Some examples:
 +
 
 +
* <code>.TAP</code> – Support for TAP file loading and saving.
 +
* <code>.Z80</code>, <code>.SNA</code> – Snapshot files, loaded into memory to resume saved states.
 +
* <code>.BAS</code> – BASIC programs, optionally tokenised and editable in NextBASIC.
 +
* <code>.SCR</code> – 6912-byte screen images, viewable or usable within programs.
 +
* <code>.NEX</code> – Next executable files, launched directly as standalone programs.
 +
* <code>.DSK</code> – Disk images, can be mounted with appropriate dot commands.
 +
* <code>.P3D</code> – CP/M virtual drives used by the CP/M loader.
 +
* <code>.TXT</code> – Plain text files, optionally tokenisable using <code>.TXT2BAS</code>.
 +
 
 +
Additional file types can be defined or overridden using the <code>browser.cfg</code> system. Wildcards (e.g., <code>*</code>, <code>?</code>) are supported for flexible file matching.
 +
 
 +
==== Browser Features ====
 +
* File filtering via wildcard
 +
* File association with custom commands
 +
* Long filename support
 +
* Rename, copy, paste, delete, and mkdir operations
 +
* Launching or attaching files using <code>SYM+ENTER</code> or defined actions
 +
 
 +
=== Configuration and Customisation ===
 +
* User menus can override defaults via <code>enMenus.cfg</code>
 +
* Editor and browser settings are configurable with dot commands and config files
 +
* Startup behaviour can be modified via <code>AUTOEXEC.BAS</code>
 +
 
 +
=== Additional Tools ===
 +
* Onboard calculator with extended editing modes
 +
* Tape tester for volume calibration
 +
* Tools submenu for configuring the system
 +
 
 +
=== Notes ===
 +
NextZXOS is under active development. Features and commands may evolve over time. See the included Guide accessible from the main menu for up-to-date documentation.

Latest revision as of 18:50, 6 April 2025

NextZXOS

Acknowledgments / Copyrights

NextZXOS

NextZXOS is the official operating system for the ZX Spectrum Next. It provides a modern and flexible environment for working with files, writing BASIC programs, and accessing various modes of the Next hardware. It builds upon the foundations of the +3e ROM and adds substantial enhancements in usability, editor features, and system integration.

Overview

NextZXOS includes a graphical main menu, enhanced editor, file browser, and support for multiple legacy and modern modes. It is designed to be user-friendly while offering deep functionality for advanced users and developers.

Main Features

  • Customisable colour schemes for menus and editor using .editprefs and .ecs & .bcs files.
    • There is a utility bundled with the distro called .CUINT By D Xailor Rimron-Soutter, which is a handy GUI tool for editing colours.
  • Enhanced menu system showing RAM availability, clock speed, and real-time clock (if present).
  • Support for various boot options including:
    • 48K BASIC, 128K BASIC, ZX80, ZX81 modes
    • CP/M environment (with appropriate drive images)
    • Interface 2 and compatible cartridge booting (e.g. Dandanator)
  • Integrated file browser with support for file associations and configuration via browser.cfg.
  • Command line access.

NextBASIC Editor

The NextBASIC editor in NextZXOS offers a powerful and modernised programming environment. It includes support for multiple column modes, syntax highlighting, extended editing keys, and advanced features like token and graphics character entry.

Display Modes

  • Supports 32, 64, and 85-column text display.
  • 64 and 85-column modes use Timex hi-res graphics (monochrome) with unique cursor shapes instead of colours.
  • Cursor types indicate current mode:
    • Normal: blue / lower-half bar
    • CAPS: cyan / upper-half bar
    • GRAPHICS: magenta / vertical bar
    • EXTEND: green / striped bar
    • Error marker: red / outline block
Custom Editor Colours

Extended Keyboard Shortcuts

Keyboard shortcuts improve editing speed and efficiency, especially for long programs. Most are triggered using the EXTEND key:

  • EXTEND + EDIT – Toggle full/lower screen editor
  • EXTEND + CURSOR LEFT/RIGHT – Move to start/end of line
  • EXTEND + CURSOR UP/DOWN – Move up/down 10 lines
  • EXTEND + GRAPHICS – Jump to start of program
  • EXTEND + CAPS LOCK – Jump to end of program
  • TRUE VIDEO – Move left one word
  • INVERSE VIDEO – Move right one word
  • EXTEND + TRUE VIDEO – Delete word to the left
  • EXTEND + INVERSE VIDEO – Delete word to the right
  • EXTEND + DELETE – Delete character to the right
  • EXTEND + 9 – Delete to start of line
  • EXTEND + 0 – Delete to end of line
  • EXTEND + 1 – Toggle between token and symbol entry for A S D F G Y U Q
  • EXTEND + 2 – Toggle display of tokens in strings

Editor Menu Options

The EDIT menu includes:

  • Command Line – Switch to direct command entry mode
  • 32/64/85 – Cycle through available column widths
  • Screen – Toggle between top or bottom screen editing
  • Autonumber – Start automatic line numbering
  • Renumber – Renumber entire program (starting at 10, step 10)
  • Clear – Clear all variables and reset RAMTOP
  • Token keys – Toggle whether A S D F G Y U Q produce symbols ~ \ | { } [ ] (c) (the default), or the codes corresponding to keyword tokens on the keys.
  • String tokens – Toggle whether graphics characters (default) or token names are shown in strings
  • Guide – Open the NextBASIC help guide
  • Exit – Exit the editor and return to the main menu

Graphics Character Entry

Graphics mode allows entry of user-defined characters and block graphics. Some combinations require CAPS SHIFT, SYMBOL SHIFT, or the DRIVE button (on the left of the case):

Key Combination Character Type ASCII Code
GRAPH or 9 Exit graphics mode -
0 or DELETE Delete character to left -
1–8 Block characters (on keys) 128–135
CAPS + 1–8 Inverse block graphics 136–143
A–Z UDGs A–Z 144–169
SYM + 1–8 Extended UDGs (1–8) 170–177
SYM + A–Z Extended UDGs (a–z) 178–203
DRIVE + A–Z Underlined extended UDGs (a–z) 204–229
CAPS + A–Z Underlined extended UDGs (A–Z) 230–255

Keyword Token Entry

Keyword tokens are entered using different modes:

  • **Tokens shown above a key** – Entered by pressing EXTEND, then pressing the key (e.g., EXTEND + I for CODE)
  • **Top-row tokens** – Entered in graphics mode with CAPS SHIFT held down (e.g., GRAPH to enter graphics mode, then CAPS SHIFT + I for INPUT)
  • **Second-row tokens** – Entered in normal mode with SYMBOL SHIFT (e.g., SYMBOL SHIFT + I for AT)

Note: A S D F G Y U Q are overridden for symbols by default. Use EXTEND + 1 to toggle them back to token mode.

Additional Notes

  • The editor mode is independent of the BASIC execution mode. If a program switches display modes (e.g., with LAYER), the editor will return to its previous mode after the program ends.
  • Syntax highlighting is available in colour modes.
  • Maximum line length is 1280 characters (enforced by .TXT2BAS).


Command Line

The Command Line mode provides direct access to NextBASIC commands, dot commands, and scripting features. It is similar to the NextBASIC editor but without displaying any currently loaded BASIC program. This makes it especially useful for:

  • Performing disk operations (e.g., CAT, .MOUNT, etc.)
  • Running dot commands and utilities
  • Issuing individual BASIC or system-level instructions

Editor options include:

  • Autonumbering and renumbering of BASIC lines
  • Clearing variables and restoring memory with the Clear function
  • Switching between token keys and graphic string display modes
  • Customisable screensaver using the SPECTRUM SCREEN$ command

You can still enter and execute individual BASIC lines in this mode, but they are not stored or editable as part of a program listing.


File Browser

The built-in browser provides a user-friendly interface for managing and launching files from the SD card.

Supported File Formats

The browser recognises a wide range of file formats and handles them accordingly via the browser.cfg configuration file:

Some examples:

  • .TAP – Support for TAP file loading and saving.
  • .Z80, .SNA – Snapshot files, loaded into memory to resume saved states.
  • .BAS – BASIC programs, optionally tokenised and editable in NextBASIC.
  • .SCR – 6912-byte screen images, viewable or usable within programs.
  • .NEX – Next executable files, launched directly as standalone programs.
  • .DSK – Disk images, can be mounted with appropriate dot commands.
  • .P3D – CP/M virtual drives used by the CP/M loader.
  • .TXT – Plain text files, optionally tokenisable using .TXT2BAS.

Additional file types can be defined or overridden using the browser.cfg system. Wildcards (e.g., *, ?) are supported for flexible file matching.

Browser Features

  • File filtering via wildcard
  • File association with custom commands
  • Long filename support
  • Rename, copy, paste, delete, and mkdir operations
  • Launching or attaching files using SYM+ENTER or defined actions

Configuration and Customisation

  • User menus can override defaults via enMenus.cfg
  • Editor and browser settings are configurable with dot commands and config files
  • Startup behaviour can be modified via AUTOEXEC.BAS

Additional Tools

  • Onboard calculator with extended editing modes
  • Tape tester for volume calibration
  • Tools submenu for configuring the system

Notes

NextZXOS is under active development. Features and commands may evolve over time. See the included Guide accessible from the main menu for up-to-date documentation.