Giter Club home page Giter Club logo

knloader's Introduction

knloader

Game Launcher for ZX Spectrum Next (https://kounch.github.io/knloader/)

Demo Video

Do you have a ZX Spectrum Next, but have trouble remembering which is the best option to launch your programs? knloader to the rescue!

This a set of NextBASIC programs which you can configure to remember, and then use, your preferred way to launch other programs (Next/+3e Mode, 128K mode, USR 0, etc.). As a bonus, you can put some images (like game covers or loading screens).

These programs aren't a replacement for the incorporated Browser, nor offer any other function than to launch other programs.


English

Official web page: https://kounch.github.io/knloader/

A ZIP file with the latest version is available following this link

Software Requirements

  • NextZXOS (version 1.3.2). Docs, downloads, etc. here

Installation

  • Create knloader.bdt file using the text editor of your choice or the included utility script. See the included manual (PDF) for instructions. Optionally, create cache file(s) with the included utility.

  • Copy together knloader.bas, knlauncher, knzml, from one of the distribution language folders (en for english, es for spanish, etc.), and the new knloader.bdt or the cache file(s) to any place in your SD card.

Use

Use the browser or command line to navigate to the folder where knloader.bas, knlauncher, knzml and knloader.bdt are. Load knloader.bas.

On first run, if they don't exist, cache files will be created from the data inside database file knloader.bdt.

First Boot

The main interface shows a list of the programs found in the database file.

First Boot

You can use the cursor keys or a joystick (Kempston or MD) to move and select the program that you want to load. Then, press ENTER, 0 or the joystick button to launch.


Frequently Asked Questions

  • How many loading modes are there?

At the moment, the loading mode can be one of these (TZX, PZX and Pi audio modes require an accelerated Next to function properly):

0  - 3DOS (Next)
1  - TAP
2  - TZX (fast)
3  - DSK (AUTOBOOT)
4  - TAP (USR 0)
5  - TZX (USR0 - Fast)
6  - TAP (Next)
7  - TZX (Next - Fast)
8  - DSK (Custom Boot)
9  - TAP (PI Audio)
10 - TZX
11 - TAP (USR 0 - PI Audio)
12 - TZX (USR 0)
13 - TAP (PI Audio - Next)
14 - TZX (Next)
15 - NEX
16 - Snapshot (Z80, SNX, SNA, etc.)
17 - Z-Machine Program
18 - 3DOS
19 - TAP (48K)
20 - TZX (48K - Fast)
21 - TAP (48K - Pi Audio)
22 - TZX (48K)
23 - TAP (LOAD "" CODE)
24 - TZX (LOAD "" CODE - Fast)
25 - TAP (LOAD "" CODE - USR 0)
26 - TZX (LOAD "" CODE - USR0 - Fast)
27 - TAP (LOAD "" CODE - USR 0 - PI Audio)
28 - TZX (LOAD "" CODE - USR 0)
29 - TAP (LOAD "" CODE - 48K)
30 - TZX (LOAD "" CODE - 48K - Fast)
31 - TAP (LOAD "" CODE - PI Audio - 48K)
32 - TZX (LOAD "" CODE - 48K)
33 - PZX (fast)
34 - PZX (USR0 - Fast)
35 - PZX (Next - Fast)
36 - PZX
37 - PZX (USR 0)
38 - PZX (Next)
39 - PZX (48K - Fast)
40 - PZX (48K)
41 - PZX (LOAD "" CODE - Fast)
42 - PZX (LOAD "" CODE - USR0 - Fast)
43 - PZX (LOAD "" CODE - USR 0)
44 - PZX (LOAD "" CODE - 48K - Fast)
45 - PZX (LOAD "" CODE - 48K)
  • What do i need to load PZX files?

In order to load PZX files you need two things; an accelerated Next, and running pzxinstall.bas. This program will copy pzx2wav (part of PZX Tools) to your accelerated Raspberry Pi. See the manual for more extended instructions.

  • What formats are supported for the image files?

The file must be a full ZX Spectrum Next screen image file. It can be in SCR, SLR, SHC, SL2 or BMP format.

  • Does this software write anything to the SD card?

The programs create a preferences file named opts.tmp inside the same folder where knloader.bas is installed.

They also create a variable number of cache files inside /tmp/knloader. This is necessary to speed up the program execution and overcome RAM limitations for large database files. However, if the database file is not changed, these will become read only on all subsequent executions.

For all other operations, temporary files are created in the RAM disk.


Castellano

Página web oficial: https://kounch.github.io/knloader/

Se puede obtener un fichero ZIP con la última versión siguiendo este enlace.

Requisitos de Software

  • NextZXOS (versión 1.3.2). Documentos, descargas, etc. aquí.

Instalación

  • Crear un archivo knloader.bdt con un programa editor de texto con el script incluído. Veáse el manual (PDF) para más instrucciones. Opcionalmente, crear archivo(s) de cache usando el script correspondiente.

  • Copiar, juntos, knloader.bas, knlauncher, knzml, desde una de las carpetas de idioma de la distribución (en en inglés, es para castellano, etc.), y el nuevo archivo knloader.bdt o los datos de cache al lugar que se desee de la tarjeta SD.

Uso

Acceder usando el programa Browser, o con otro método, hasta la carpeta donde están knloader.bas, knlauncher, knzml y knloader.bdt. Cargar knloader.bas.

En la primera ejecución, si no existiesen, se crearán archivos de caché desde la información del archivo de datos knloader.bdt.

First Boot

La interfaz principal muestra una lista de los programas encontrados en el archivo de datos.

First Boot

Se pueden utilizar las teclas de cursor o un joystick compatible (modo Kempston o MD) para moverse y elegir el programa a cargar. Entonces, pulsar ENTER, 0 o el botón del joystick para ejecutarlo.


Preguntas frecuentes

  • ¿Cuántos modos de carga hay?

En este momento, el modo de carga puede ser uno de los siguientes (los modos TZX, PZX y Pi Audio requieren un ZX Spectrum Next Accelerated para funcionar correctamente):

0  - 3DOS (Next)
1  - TAP
2  - TZX (rápido)
3  - DSK (auto arranque)
4  - TAP (USR 0)
5  - TZX (USR0 - rápido)
6  - TAP (Next)
7  - TZX (Next - rápido)
8  - DSK (arranque personalizado)
9  - TAP (PI Audio)
10 - TZX
11 - TAP (USR 0 - PI Audio)
12 - TZX (USR 0)
13 - TAP (PI Audio - Next)
14 - TZX (Next)
15 - NEX (Next)
16 - Snapshot
17 - Programa de Z-Machine (Next)
18 - 3DOS
19 - TAP (48K)
20 - TZX (48K - rápido)
21 - TAP (48K - Pi Audio)
22 - TZX (48K)
23 - TAP (LOAD "" CODE)
24 - TZX (LOAD "" CODE - rápido)
25 - TAP (LOAD "" CODE - USR 0)
26 - TZX (LOAD "" CODE - USR0 - rápido)
27 - TAP (LOAD "" CODE - USR 0 - PI Audio)
28 - TZX (LOAD "" CODE - USR 0)
29 - TAP (LOAD "" CODE - 48K)
30 - TZX (LOAD "" CODE - 48K - rápido)
31 - TAP (LOAD "" CODE - PI Audio - 48K)
32 - TZX (LOAD "" CODE - 48K)
33 - PZX (rápido)
34 - PZX (USR0 - rápido)
35 - PZX (Next - rápido)
36 - PZX
37 - PZX (USR 0)
38 - PZX (Next)
39 - PZX (48K - rápido)
40 - PZX (48K)
41 - PZX (LOAD "" CODE - rápido)
42 - PZX (LOAD "" CODE - USR0 - rápido)
43 - PZX (LOAD "" CODE - USR 0)
44 - PZX (LOAD "" CODE - 48K - rápido)
45 - PZX (LOAD "" CODE - 48K)
  • ¿Qué se necesita para poder cargar archivos PZX?

Para poder cargar ficheros PZX se necesitan dos cosas; un Next Accelerated, y ejecutar una vez pzxinstall.bas. Este programar copiará a la Raspberry Pi pzx2wav (que forma parte de PZX Tools). Vea el manual para instrucciones más detalladas.

  • ¿Qué formatos pueden tener las imágenes?

Debe ser un archivo de imagen de pantalla completa. Puede ser en el formato SCR, SLR, SHC, SL2 o BMP.

  • ¿Se modifican o crean datos en la tarjeta SD?

Los programas crean un archivo de preferencias llamado opts.tmp en la misma carpeta donde se encuentre knloader.bas.

También crean un número variable de archivos de caché en /tmp/knloader. Esto es algo necesario para que la ejecución del programa sea a una velocidad adecuada, así como para superar limitaciones de RAM para archivos de datos grandes. Sin embargo, si no se modifica el archivo de datos, estos nuevos ficheros serán de sólo lectura en todas las ejecuciones posteriores.

Para las demás operaciones, se crean ficheros temporales en el disco RAM.


Copyright

Copyright (c) 2020-2022 kounch

PZX->WAV convertor Copyright (C) 2007 Patrik Rak

Some of the code used to launch programs has been adapted from the official NextZXOS distribution (especifically from browser.cfg, tapload.bas and tzxload.bas).

Spectrum Next and System/Next are © SpecNext Ltd.

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE

knloader's People

Contributors

kounch avatar spectrumcomputing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

knloader's Issues

Autosave

Thanks for this great loader.
Just a question:
What is the Autosave feature / what happens if enabled/disabled.

cache build fails on "unexpanded" machine

In my unexpanded zx spectrum next I get an error whenever I try to build the cache file.

Apparently I cannot use bank 48. This line:
6070 LET %k=13:BANK 48 ERASE 0:LET %j=0:;Current Bank, Current Base Address
fails with "Out of Memory"

I guess that the right thing to do would be to check the MAXBNK System Variable...

Clarification on the knloader.bdt file

Not sure if you prefer issue here or FB, but starting here for now.

I suspect my own issue is not quite following the manual properly (and I'd be happy to help the docs via PR if you like).

The manual says

Create knloader.bdt file (see below for more instructions).

But then below is reads "navigate to where … knloader.bdt are" - yet the file doesn't exist as part of the release (so I'm guessing I've got the wrong part).

The next section is called "Database file format" - it's descriptive, but I wasn't sure if this meant I should write this file myself or if this is how it was generated (and from the earlier instructions I thought it would be generated).

This section states the first line must be the root path (in my case /ROMS) - so I thought to create the file knloader.bdt with /ROMS\n, but this caused errors in the loader (2\t6410).

So if the file does need to be created manually, the first line is the search path, but the path for the game is included in the record, so I wasn't sure if this was relative or absolute, i.e.

/ROMS
Batman,4,/ROMS/Batman/,Batman.tap

Or if it's

/ROMS
Batman,4,/Batman/,Batman.tap

I do feel like I've just got the manual wrong (but again, I'd be happy to help propose any changes to help clarify for simpletons like me!)

BDT parsing not working properly with files in root path

As reported on Facebook:

If the BDT generator is pointed to /TEST/SUBFOLDER the resulting BDT file looks like this (partial):

/TEST
Program in TEST,1,,Program in TEST.tap
Program in SUBFOLDER,1,SUBFOLDER,Program in SUBFOLDER.tap

On the Next, this launches both programs perfectly.

If it's pointed to the root instead, the BDT file looks like this:

/
Program in ROOT,1,.,Program in ROOT.tap
Program in TEST,1,TEST,Program in TEST.tap
Program in SUBFOLDER,1,TEST/SUBFOLDER,Program in SUBFOLDER.tap

In this case all programs give a File Not Found error on the Next.

If I manually edit the BDT file before generating the cache and I change the ',.,' to ',,' to match the format of the first example, the first program will load but the other two will still give File Not Found errors.

If instead I change '/' to 'C:/' this will load the second and third programs, but the first will give a File Not Found.

If I make both changes, all of the programs give a File Not Found again. Maddening.

It looks as though in the subfolder version there's no trailing '/' in the home path or the folder paths, but there are implied '/'s between the home path and the subfolders and between the subfolders and the files. If this implied '/' is also being applied in the root version, I'm wondering if this is what's generating invalid paths?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.