As posted on my private website (http://norecess.cpcscene.net/), 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 (https://www.cpcwiki.eu/forum/programming/faster-txt_output-bb5a-routine/msg231260/#msg231260).
- 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 (http://norecess464.weebly.com/catrun.html)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:
(http://norecess464.weebly.com/uploads/6/0/2/5/6025013/catrun-chasehq_orig.png)
it's a great tool for everyone with legacy storage! good news it's ok with M4 too ;D
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.
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 ! 👍😉
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.
Great and quick workflow...
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?
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.
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.
I think that was because there were only shortcuts making it really hard to control?
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).
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!
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.
I will try...
xesrjb
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.
Quote from: McArti0 on 14:14, 15 September 23Quote 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.
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.
(http://norecess464.weebly.com/uploads/6/0/2/5/6025013/catrun11-delete_orig.png)
(http://norecess464.weebly.com/uploads/6/0/2/5/6025013/catrun11-rename_orig.png)
Pretty cool tool for now!
...if you integrate "C" for copy we will have a very lean "norton/midnight commander" clone. ;D
This seems amazing ! Thank you ;D
It's cool you upgrade CATRUN
This should be proposed as default ROM with any configuration :P
perfect!
thanks a lot! :)
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)
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!
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! (https://user.fm/files/v2-796bdeaca87f7db348f4a317f5b0546f/CATRUN12.zip)
Thanks to @poulette73 & @OffseT for the preliminary testing!
@norecess464Thanks for the tool
? what slot would be best for the ROM.
Is the ROM called by |CATRUN ?
Thanks
Keep Safe
Ray
Hello
@Audronic The tool is called with the RSX called |CATRUN , yes.
But, when the ROM gets initialized at startup, it installs a system-wide shortcut:
- Amstrad CPC 464 users: press Shift+TAB to auto-type |CATRUN from the BASIC prompt
- Amstrad CPC 6128 users: press Control+TAB to auto-type |CATRUN from the BASIC prompt
Please take note that once the tool is launched, the H key allows to print the embedded Help.
Have a good day!
@norecess464 Thanks for the info
What slot is preferred for the Rom to reside 1 - 6 -- 8 -14 ?
Thanks
Keep Safe
Ray
@Audronic Oh sorry yes, I realize I did not answer your original question.
Any location for the ROM is OK.
The ROM doesn't depend on anything special at initialization time.
Just for fun, sharing here a photo of CATRUN showing the content of a folder (managed internally through UniDOS).
Here the current folder is "Games" on my UMS: storage (cf. pointing to the Albireo USB Key storage).
Some games get listed there... if I select one of those folders, CATRUN will enter it and display its catalogue. The "startup file" will be automatically selected (because CATRUN searches for the most common launcher files) and I will be able to run the program from there.
Still from there, please take note that with this V1.2 I can now use CLR key to get back to the root folder of the UMS: storage, DEL key to go to parent folder, or press N key to create a new folder.
Today I also used CATRUN to rename the name of few folders, and I was also able to delete (erase) some existing folders too.
To be honest with you, I find it really handy to access those features "while displaying a simple CAT".
(https://user.fm/files/v2-e8ae6005945e9a701ddceef44ee5d588/CATRUN_UniDOS.jpg)
Cannot test it for now and never used it, will for sure when I bring my CPC on the table.
Does it work with |LS on M4 with long filename support?
Thank you.
QuoteDoes it work with |LS on M4 with long filename support?
Thanks for asking this question, because it's not a trivial one for sure. The short answer is "no", but wait! there is a long answer too...
Before adding the feature "browse mass storage content" to CATRUN, I took some time to "analyze the mass storage market" on the Amstrad CPC.
There are many options available today -- most of those are truly awesome, huge sincere congrats to
@ikonsgr,
@Duke ,
@TotO ,
@PulkoMandy ...
Unfortunately, all those boards come with a different way to access those storages. Usually, a custom ROM overriding AmsDOS (or something close to it)
As a developer, I can't own ALL the boards around, that would be just insane (would you buy all the existing video-cards for your PC ?!).
So I had to make a choice and I decided to consider UniDOS from
@OffseT as being the "DirectX" of the mass storages, since its goal is to abstract all the existing boards into a single, unified API.
"One API to rule them all"
I hope you understand my point!
Best regards,
Arnaud
ps. UniDOS provides support for M4 "nodes" (I don't know the status for USIfAC 2).
ps2. CATRUN will NOT crash when browsing content from the M4, USIfAC 2... you will just not be able to navigate through the Folder hierarchy with it. (thanks
@poulette73 for the testing!).
ps3. yes I totally agree,
@OffseT should pay me for all those kind comments about his work :D
Quote from: norecess464 on 23:59, 06 December 23Any location for the ROM is OK.
The ROM doesn't depend on anything special at initialization time.
@norecess464 Ok Thanks
I will give it a try
Keep Safe
Ray
No worries, I was just curious :-)
I totally understand.
New version ! Nothing major, only a small iteration here.
Changelog V1.3 (20th of Dec 2023)
- fixed a rare bug with visual selection when doing an action on files + vertical scrolling
- direct calls to |ERA and |COPY RSXs for multi-selection (in other words: this removes the limit of 9 files max. to be auto-typed in BASIC prompt)
Click here to download new version 1.3 (https://user.fm/files/v2-15b378a279772100bd2e433db8d7d931/CATRUN13.zip)
Thanks!
Hi
@norecess464 I just came across it today, installed it and immediately the benefit is apparent. This is a very useful ROM - Many thanks for your great work.
Thanks
I have read that it is valid for the Duke M4... would I run SNA files on that board?
Thanks for your interest!
Sorry, CatRun doesn't provide direct support for the M4. I claimed this at a time when I did not have a M4 myself, my comment was based on what other users told me back then.
But now I have an M4 and I have been able to test it against CatRun :)
So it's a "small" yes; you can run programs from the M4 with CatRun, but you can't navigate through folder hierarchy nor access M4 specific features (SNA DSK opening etc).
This is expected / by design. CatRun does not directly support Usifac, M4, etc.. but it does support UniDOS. UniDOS abstracts the M4 with its dedicated node, so if you have UniDOS installed and that you are using the dedicated M4 Unidos node, it will work fine (with folder hierarchy navigation etc).