News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_norecess464

New tool (ROM) called CATRUN to fasten the CAT+RUN workflow

Started by norecess464, 06:44, 15 September 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

norecess464

As posted on my private website, I just released a new tool called CATRUN !

CATRUN is a simple tool for the Amstrad CPC machines to fasten the process of disc's content discovery / launch a program.

When inserting a new disc into the machine, I bet than 95% of the regular Amstrad CPC users will first type the CAT command from the BASIC prompt to discover its content, then type RUN"FILENAME to launch a targeted program.

With CATRUN, the user can press CTRL+TAB at machine startup (or any other time, of course) to show the list of files stored on the disc, then use the arrow keys to select the targeted file to execute, and finally press RETURN to exit back to BASIC prompt and auto-type the RUN command. Few key presses are saved in the process, while enhancing (a little bit !) the launching experience.

While selecting a file, It's also possible to:
  • type ESC key to just get back to BASIC (cf. discard the RUN command)
  • type TAB key to redo a catalogue discovery (cf. when the user is willing to change disc and rebrowse its content)
And that's all :)

There are few things to know:
  • supports both MODE 1 and MODE 2. If the current video mode is MODE 0, then a regular CAT will be applied and the user will get back to BASIC
  • to be available system-wide from the BASIC prompt, this program is distributed as a ROM to be installed on a ROMBoard (X-MEM etc.)
  • the program only takes few bytes for the ROM initialization (cf. required for the system handling of |CATRUN shortcut through Control+Tab keys). The execution itself of the program does not require any extra RAM!
  • if the catalogue on disc appears to be a CATART, then a regular CAT will be applied and the user will get back to BASIC
  • if the catalogue appears to be impossible to browse for whatever reasons, then a regular CAT will be applied and the user will get back to BASIC. This happens for example with the (great!) Duke's M4 expansion not behaving internally like the regular CAT from Amstrad -- for programmers: the 2K buffer not being populated by CAS CATALOG.
  • generally speaking, this program refers only to firmware routines. It has full compatibility between 464, 664 and 6128 Amstrad CPC machines (tested)
  • a test is done to ensure that the call of |CATRUN is made from the BASIC prompt. There would be no purpose to trigger CATRUN from Protext command prompt (yes, it's possible!), for example.
  • internally relies on a "fast print routine" (faster than the standard Amstrad one), as discussed here.
  • automatically switch the disc drive to fast drive parameters (BIOS SETUP DISC). This might accelerate things a little bit...

Some extra-testing has been achieved by @poulette73 (thanks!) on multiple hardware configurations (cf. when Amsdos gets patched with custom file systems):
  • M4 Board + USB storage is well supported
  • RSF3 + USB storage is well supported
  • CubeMDOS, UniDOS, ParaDOS and X-Ddos work fine too

CLICK HERE TO GO TO THE DOWNLOAD PAGE

Final words.
This program is useful to me. With some luck it will also be useful to you ! :)

Big thanks to @TotO , @poulette73  & @roudoudou  for the testing & discussions. :heart:

My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

roudoudou

it's a great tool for everyone with legacy storage! good news it's ok with M4 too ;D
My pronouns are RASM and ACE

norecess464

Quote from: roudoudou on 06:51, 15 September 23it's a great tool for everyone with legacy storage! good news it's ok with M4 too ;D
Yes exactly. The purpose of the tool is to browse quickly floppy discs (Gotek, HxC...) / mounted DSKs. It's not meant to be a replacement for custom catalogs to access storage on M4/USIFAC/etc boards even if I put some extra care to detect those use-cases and redirect to the regular CAT command.
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

poulette73

Hello,

As a tester, I really enjoyed using it.
The interface couldn't be simpler and more user-friendly: you'd swear it was already original on our CPCs.

A keyboard shortcut of 2 keys to access the tool, and no need to enter the name of the program to launch.
A single press of RETURN executes the selected file.

Congratulations ! 👍😉

eto

LIKE!

After 38 years this little pain is going away :) highly appreciated!

Could this be taken even a step further? In many cases the cat will only return a file called "disk.*" or with many originals, no directory is available and you then have to type |cpm. 
Would it be possible to have a second command, e.g. |diskrun or |dr which first checks if it's one of the "defacto" standards where it boots with |CPC, a DISK.* file is present or there is just one visible file in the directory? If it's one of those cases, it executes directly and only otherwise shows the disk contents. 

HAL6128

...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Gryzor

This is just great, I'm a sucker for keyboard shortcuts!

I always wondered why they didn't add such shortcuts from the beginning, I guess UI philosophy hadn't advanced as much?

norecess464

Quote from: eto on 09:14, 15 September 23Could this be taken even a step further? In many cases the cat will only return a file called "disk.*" or with many originals, no directory is available and you then have to type |cpm. 
Would it be possible to have a second command, e.g. |diskrun or |dr which first checks if it's one of the "defacto" standards where it boots with |CPC, a DISK.* file is present or there is just one visible file in the directory? If it's one of those cases, it executes directly and only otherwise shows the disk contents. 
I understand the request.

For a CAT that results in 1 file, well, since only one filename is presented to the user: just press RETURN to launch the said program or press ESC to cancel the process. As a user, I want to know what program I'm going to launch and still have the "power" to cancel the RUN. I like the idea of discarding an "auto-launch" feature and keeping it simple, so the program gets predictable for everyone.

I think it's important to keep the concept of "discovery" with CATRUN: I know this may appear as a weird practice, but as a user I often select a disk in my Gotek, visualize the content (CAT), and finally I make my mind for another program and switch to another disk (resulting multiple CATs in the process for 1 launch) -> hence the TAB key in the UI to refresh catalogue.

Same for |CPM, no special cases. The original CAT behaves weirdly when facing |CPM programs, so CATRUN behaves also the same. As a user, you know what to do in those use-cases.

With CATRUN, I really want to keep the thing as simple as possible, and reduce the whole concept to: "It lists files, and if files get listed, I can autotype RUN on one of those listed files". Everything else remains business as usual.
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

McArti0

Quote from: Gryzor on 10:54, 15 September 23I always wondered why they didn't add such shortcuts from the beginning, I guess UI philosophy hadn't advanced as much?

There were a lot of keyboard shortcuts in ZX Spectrum and it was seen as unprofessional.
CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

Gryzor

I think that was because there were only shortcuts making it really hard to control? 

Prodatron

Great tool, and crazy, that noone had this cool idea before! :)

Maybe Eto was speaking about this:

- if it finds a file "disc."/"disk."/"disc.bas"/"disk.bas"/"disc.bin"/"disk.bin"
- and if not, if it finds the first "*. "
- and if not, if it finds the first "*.bas"
- and if not, if it finds the first "*.bin"

...this will be preselected (in this order).

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

norecess464

Quote from: Prodatron on 14:27, 15 September 23- if it finds a file "disc."/"disk."/"disc.bas"/"disk.bas"/"disc.bin"/"disk.bin"
- and if not, if it finds the first "*. "
- and if not, if it finds the first "*.bas"
- and if not, if it finds the first "*.bin"
Ah yes, thanks for the reformulation, it's clear to me now!

Preselecting 1 file in the displayed list of filenames, it's an excellent idea, and remains 100% aligned with my wish of avoiding auto-runs.   ;)

My weekend is announced to be busy (personal life); but I might try to find some spare time to implement/experiment this!
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

00WReX

This is really nice. Thank you.

Lately I have been loading a lot of 'cdt' files after fitting a Bluetooth module into my 6128.

The amount of times I have typed |tape...

I was just wondering if there is the possibility of having a key combo to perform the |tape:run"

That would be awesome.

Cheers,

Shane

Edit: I could just assign function keys. Currently they are full. I have them assigned at boot with the 'autoexec' file on the M4 board.
The CPC in Australia...
Awa - CPCWiki

xesrjb

,,The pellet with the poison's in the vessel with the pestle; the chalice from the palace has the brew that is true."

GUNHED

Quote from: 00WReX on 07:33, 16 September 23This is really nice. Thank you.

Lately I have been loading a lot of 'cdt' files after fitting a Bluetooth module into my 6128.

The amount of times I have typed |tape...

I was just wondering if there is the possibility of having a key combo to perform the |tape:run"

That would be awesome.

Cheers,

Shane

Edit: I could just assign function keys. Currently they are full. I have them assigned at boot with the 'autoexec' file on the M4 board.
Sure, use the key def command from BASIC. So this gives you a 1 line BASIC program. Now use Softbrenner (Inicron) to put that in any ROM.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

andycadley

Quote from: McArti0 on 14:14, 15 September 23
Quote from: Gryzor on 10:54, 15 September 23I always wondered why they didn't add such shortcuts from the beginning, I guess UI philosophy hadn't advanced as much?

There were a lot of keyboard shortcuts in ZX Spectrum and it was seen as unprofessional.
They're not really "shortcuts" per se, they're just how you have to type things in. And since you don't have the option of just typing things out the long way (well until the 128 machines that did things differently), entering BASIC programs can be a bit of a hunt and peck game. Typing on the rubber keyboard was also just a bit of a challenge in general.

norecess464

New V1.1 !
To download, same URL : http://norecess464.weebly.com/catrun.html

Few improvements over the original release, thanks for your feedbacks! :-*

  • implemented pre-selection of an executable file in the catalog, based on filename (thanks Eto/Prodatron!):
     * if it finds a file "disc."/"disk."/"disc.bas"/"disk.bas"/"disc.bin"/"disk.bin"
    * and if not, if it finds the first "*. "
    * and if not, if it finds the first "*.bas"
    * and if not, if it finds the first "*.bin"
    Very useful, most of the time it's accurate.
    Of course, user must still press RETURN key to trigger the launch of the program (cf. RUN it).
  • if we are about to display more than 42 files in MODE 1, the video-mode will be automatically switched to MODE 2 (to allow more files displayed on screen)
  • 2 new (unrelated) helpers, while I was at it:
    * it's now possible to press E or D keys ("E"rase or "D"elete) to delete the selected file. A confirmation gets presented to the user before proceeding.
    * it's now possible to press R key ("R"ename) to rename the selected file. ESC to cancel while entering the new filename.
 
Please take note that I don't plan any other releases of the tool, unless some serious stability issues are found. I have a cartridge game to complete hehe :P

Below, screenshots of the new Delete/Rename feature.




My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

HAL6128

Pretty cool tool for now!
...if you integrate "C" for copy we will have a very lean "norton/midnight commander" clone.  ;D
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

GamaSummer


roudoudou

It's cool you upgrade CATRUN

This should be proposed as default ROM with any configuration  :P

My pronouns are RASM and ACE

Prodatron


GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Urusergi

It's never too late if happiness is good :P

I'm studying the routine and it seems that the speed can be improved, and more than I thought at first.

The improvement consists simply of using the firmware routine #BDD9:

FW_KL_L_ROM_ENABLE equ #B906
FW_KL_L_ROM_DISABLE equ #B909
FW_TXT_OUTPUT equ #BB5A
FW_TXT_GET_CURSOR equ #BB78
FW_SCR_GET_MODE equ #BC11
FW_SCR_CHAR_POSITION equ #BC1A
FW_TXT_OUT_ACTION equ #BDD9


Fast_TXT_OUTPUT:

cp 32
jp c, FW_TXT_OUTPUT


push hl
push de
push bc

;ld c, a
push af

call FW_KL_L_ROM_ENABLE

call FW_TXT_GET_CURSOR
dec h
dec l
call FW_SCR_CHAR_POSITION

;ex de, hl
push hl

ld a, 9
call FW_TXT_OUT_ACTION

pop de

pop af
ld l, a
ld h, #07

add hl, hl
add hl, hl
add hl, hl
.....


In my half a page test (MODE 2) I get ~ 836.000 - 693.000us (original routine) and ~ 754.000 - 603.000us (with scroll and without scroll)




norecess464

Thanks, noted! I won't release a new version just for that (speed is "good enough" in current version). If one day I release another update of the tool (cf. not in my short-term plan) I will integrate this improvement for sure. Thanks!
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

norecess464

Version 1.2 released!

In this new version, on top of the existing features of V1.1:
  • 464 crash-fix + added Shift+TAB/COPY key usage for 464 users
  • use A or B key to switch current drive to A: or B:
  • use P key to open an ASCII file with Protext
  • use S key for multi-select files. You can combine that with delete operations.

I had some fun lately with the great UniDOS. If it gets detected:
  • current path gets displayed on top of all printed catalogues
  • use CLR key to navigate to root folder
  • use DEL key to navigate to parent folder
  • use RETURN/ENTER/COPY to navigate into a sub-folder
  • use N key to create a new folder
  • use C key to copy a file to the other logical drive (can also be combined with S key (multi-selection))

There are also some other minor improvements (build date shown in Help, don't assume AmsDOS rom is at ROM 7, etc).

Click here to download!

Thanks to @poulette73  & @OffseT  for the preliminary testing!
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

Audronic

@norecess464

Thanks for the tool

? what slot would be best for the ROM.
Is the ROM called by |CATRUN ?

Thanks

Keep Safe

Ray
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

Powered by SMFPacks Menu Editor Mod