ntvcm icon indicating copy to clipboard operation
ntvcm copied to clipboard

Include Directories

Open Kroc opened this issue 10 months ago • 1 comments

Given that, naturally, NTVCM doesn't support drive letters, subdirectories or user-areas, I'd like a way to 'include' multiple other folders in order to mimic the presence of additional drives / user-areas in a real CP/M system. E.g. ntvcm --include-dir "some_dir" --include-dir "other_dir" [...]

When opening a file, the current directory is checked, and if the file is not found, each of the additional include directories are tested.

Separate from this request, it might be desirable to allow direct binding of directories to CP/M drive letters: E.g. ntvcm -A "fdd/a" -B "fdd/b" -C "fdd/c", where parameters -A to -P map directories to CP/M drives A-P.

Kroc avatar Feb 11 '25 10:02 Kroc

Thanks for these suggestions!

I think implementing include directories in this way would be tough since every file open would have to check if it seems like the calling app is trying to open an include file and act appropriately. It'd be an odd place in the stack for such a check that I worry would end up being likely to have bugs and unintended consequences.

Your drive letter idea would solve the include file problem as that's how many C compilers are setup to work from the CP/M days. Other CP/M emulators do exactly as you suggest. The upside is that it means people don't have to copy include files (or any other files) into a shared folder with their source code. This would be especially helpful when a project can be built with multiple C compilers that can't be mixed in a single folder. I'm thinking about how/if to do this and will get back to you.

davidly avatar Feb 11 '25 15:02 davidly