Author Topic: BNDSH ROM - Help required  (Read 894 times)

0 Members and 1 Guest are viewing this topic.

Offline krusty_benediction

  • CPC664
  • ***
  • Posts: 145
  • Country: fr
  • Liked: 106
  • Likes Given: 38
BNDSH ROM - Help required
« on: 20:35, 29 July 17 »
Some weeks ago, I have started the project BNSH which is supposed to bring a better user experience on the CPC in a non intrusive way: you launch the CPC and - you can use it as when it has been created - or you can use it with extra-functionnalities (presence of additional commands, history of the commands typed, autocompletion on filenames/command names, shortest way to type RSX commands, etc). Indeed these functionnalities allow you to do the same things by typing less.
Currently the ROM needs a M4 if you want to download DSK on cpcrulez and a memory card if you want to not lost memory.The main code consists in a replacement of the system call TEXT_INPUT.
The code is still not enough mature to be widely spread; and I doubt I will have enough time to finalize and spread it;I need to focus on demo code, not to code a tool only used by me.

So if people are interested, the project is available here
You can:
  • download the ROM to install it (I only tested slot 1)
  • fill issues to list all the remaining issues I have missed
  • fill issues to request additional functionnalities
  • propose pull requests to fix (or partly fix) some issues
  • propose pull rquests to add additional functionnalities

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.018
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3452
  • Likes Given: 6206
Re: BNDSH ROM - Help required
« Reply #1 on: 15:49, 21 August 17 »
Sounds very interesting, so I'm pasting here the readme, if I may :)

# Benediction Shell

## Purpose

 Minimalist shell for Amstrad CPC with m4. People not interest by QuickCMD by No Recess may not be interest by bndsh...
 Bndsh consists in a simple line editor where you'll type various commands.
 The additional value in comparison to the BASIC prompt of the Amstrad is the ability to propose completions a better integration of RSX with string parameters and a native folder management.

The main difference between BNDSH and QUICKCMD is that QUICKCMD is an application, whereas BNDSH replace the system call `TEXT_INPUT` (&BD5E) by a modified one.

However, fell free to test and provide patches as there are tons of bugs.

## Usage

The line edition is similar to the one provided by the BASIC and can be used in the following way: `COMMAND [ARGUMENT...]`.

 - If command is an `internal command` the internal command is executed.
 - If command is an `RSX`, the RSX is executed with the following string arguments (currently only up to 2 arguments are possible).
 - If command is a `folder` then it becomes the working directory.
 - If command is a `file` then the firmware tries to load and launch it. If it succeed you have no more access to bndsh. (highly limited has bndsh is still not in ROM)
 - Otherwise the system displays an error message.

 The current `internal command`s are:

  - `basic` to inform that the remaining part of the line concerns a BASIC instruction (only useful when a commad/executable/RSX has the same name than a BASIC instruction and would be automatically selected instead)
  - `clear` to clear the screen (as `cls`).
  - `crtc` to display crtc number.
  - `exit` to jump to BASIC interpreter
  - `header` to display the header of a file
  - `help` to display the list of internal commands
  - `ls` similar to cat (M4 required)
  - `more` print an ASCII file on screen
  - `mv` rename a file (some order of parameters than `mv` of unix, not `|REN` of `AMSDOS`)
  - `pwd` to print the current working directory (M4 required)
  - `rom` to manage the roms (currently nothing more that a listing)

 The original shortcuts are:

  - left: move cursor to the left
  - right: move cursor to the right
  - CONTROL + left: move cursor to the beginnig of the line
  - CONTROL + right: move cursor to the end of the line
  - CONTROL + up: move cursor to the beginnig of the text
  - CONTROL + down: move cursor to the end of the text
  - SHIFT + left: move copy cursor to the left
  - SHIFT + right: move copy cursor to the right
  - SHIFT + up: move copy cursor to the up
  - SHIFT + down: move copy cursor to the dowa
  - CONTROL + TAB: switch between insert/replace modes
  - BREAK: breaks the input control flow
  - ENTER: validate and execute the instruction of the line by the BASIC interpreter

The additional shortcuts are:

  - TAB: control autocompletion on filenames, RSX, internal commands. **Note that there are still bugs there**
  - ENTER: before the BASIC interpreter manages the line, the shell execute its own instructions

The additional `RSX` commands are:

 - `|DSKSEARCH,"KEY"` or `DSKSEARCH KEY` makes a search on CPCRULEZ and print on screen pairs of code and filename (M4 ROM needed)
- `|DSKGET,"CODE"` or `DSKGET CODE` download the 1st DSK file from the archive identified by the code (given by DSKSEARCH). **A current limitation of the `|HTTPGET` RSX imposes to manually rename the downloaded file: `MV BRIDGE.PHP MYDSK.DSK`.**

## Additional features I plan to code

 - Better integration of RSX (currently only 2 string arguments are possible ...)
 - More internal commands if needed
 - Ability to bypass internal commands or rsx
 - Better RAM management (use the latest page of the latest bank available on the machine in order to work on CPC6128 without extra RAM)

## Known bugs

 - Autocompletion is a bit capricious (files search fails elswhere than in the root folder, completion sometimes fail)
 - The ROM must be deactivate to launch some program (ESC at startup) with RUN"XXX; no idea why
 - The auto run features considers that the file is a binary one (so expect a nice reboot for basic ones)

## Construction

$ ./ make

## Requirements

  - Mandatory

    - Ramcard or equivalent (Megaflash, X-Mem, M4, ...)
    - Additional Memory (X-Mem, ...)

  - Optional

    - M4 (the project has less interest without it)

## Installation & launch

Use your rom manager to put `BNDSH.ROM` in the slot of your choice. Note that I have never tested in another place than 1.
The indirection is automatically installed.

If you want to disable BNDSH, pres `ESC` while the firmware initialises the ROMs.
ILLLDLRDRank57.7KAgel0+1n/awhoissourceRankTrafficVideo Adv0Adv Disp AdsMore dataSummary reportDiagnosisDensity01n/a