Preview: cbmshell, an interactive file processor
Moderator: Moderators
Preview: cbmshell, an interactive file processor
I've been developing a general-purpose utility called cbmshell that allows you to manipulate files within disk images. Think of it as a combination of c1541 and petcat but much more open-ended.
It's written in Python so should run on any platform, available from PyPI
https://pypi.org/project/cbmshell/
Documentation available here:
https://cbmshell.readthedocs.io/en/latest/
It's currently alpha quality, please back up any valuable image before trying it out. I plan to keep extending it, next feature will be to also support tape images.
Feedback welcome.
[edit: readthedocs link now live]
It's written in Python so should run on any platform, available from PyPI
https://pypi.org/project/cbmshell/
Documentation available here:
https://cbmshell.readthedocs.io/en/latest/
It's currently alpha quality, please back up any valuable image before trying it out. I plan to keep extending it, next feature will be to also support tape images.
Feedback welcome.
[edit: readthedocs link now live]
Last edited by srowe on Mon Mar 22, 2021 8:50 am, edited 1 time in total.
- chysn
- Vic 20 Scientist
- Posts: 1204
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Re: Preview: cbmshell, an interactive file processor
I might not have a sufficient Python version, but I'll check it out if I can.
macOS Big Sur has 2.7.16, which seems new enough as far as 2.7 goes, but maybe not new enough for pip. But I'm no Python expert, so I'm not sure.
macOS Big Sur has 2.7.16, which seems new enough as far as 2.7 goes, but maybe not new enough for pip. But I'm no Python expert, so I'm not sure.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5
WIP: MIDIcast BASIC extension
he/him/his
WIP: MIDIcast BASIC extension
he/him/his
Re: Preview: cbmshell, an interactive file processor
I should have said it requires Python3, Looks like Big Sur includes both Python 2&3.
https://apple.stackexchange.com/questio ... n-for-good
I'd appreciate the feedback if it does work on MacOS.
Re: Preview: cbmshell, an interactive file processor
Latest version now has support for .tap images in read-only mode. You can copy from tape images to disk images and/or the local filesystem.
Re: Preview: cbmshell, an interactive file processor
I've been steadily adding features and fixing bugs to the point I'm going to declare it "Done" (i.e. it satisfies all my needs). It now supports read/write to all disk formats that I'm aware of (except GEOS), read/write to .tap files and read only of T64 and PC64 files.
I'm still open to suggestions for improvements.
I'm still open to suggestions for improvements.
- chysn
- Vic 20 Scientist
- Posts: 1204
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Re: Preview: cbmshell, an interactive file processor
make ran successfully under Big Sur. I had to do
to avoid macOS complaining about directory privileges.
On the first invocation of cbm-shell, it advised that I needed to install gnureadline, which I was able to do with
And now, when I invoke cbm-shell:
My Python 3 version is 3.8.2. Am I missing another dependency?
Code: Select all
sudo -H make
On the first invocation of cbm-shell, it advised that I needed to install gnureadline, which I was able to do with
Code: Select all
sudo pip3 install gnureadline
Code: Select all
$ cbm-shell
Traceback (most recent call last):
File "/usr/local/bin/cbm-shell", line 6, in <module>
from cbm_shell.scripts.cbm_shell import main
File "/Library/Python/3.8/site-packages/cbm_shell/scripts/cbm_shell.py", line 10, in <module>
from cmd2.utils import basic_complete
ImportError: cannot import name 'basic_complete' from 'cmd2.utils' (/Library/Python/3.8/site-packages/cmd2/utils.py)
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5
WIP: MIDIcast BASIC extension
he/him/his
WIP: MIDIcast BASIC extension
he/him/his
Re: Preview: cbmshell, an interactive file processor
No, I think it's a compatibility issue with the latest version of the cmd2 module (not one of mine). As a work around for now try
Code: Select all
pip3 install --upgrade 'cmd2<2'
[Edit] Rather than installing this as root (and potentially messing something up) try using a virtualenv. They isolate package installation away from the system.
Re: Preview: cbmshell, an interactive file processor
I've fixed the compatibility issues and released a new version (1.3) that should work with either versions of cmd2.
- chysn
- Vic 20 Scientist
- Posts: 1204
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Re: Preview: cbmshell, an interactive file processor
Yes! I've got a prompt! I'll be playing around with this tomorrow. I've got a stupid Independence Day party to go to today.
Okay, it's not stupid, it's with my wife's friends. But it would be rude to bring my Mac along.
Thank you!
Okay, it's not stupid, it's with my wife's friends. But it would be rude to bring my Mac along.
Thank you!
- chysn
- Vic 20 Scientist
- Posts: 1204
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Re: Preview: cbmshell, an interactive file processor
Is there a way to take a standalone PRG file and put it into a newly-created TAP image?
Re: Preview: cbmshell, an interactive file processor
Hum, I thought I'd tested just that but there's a glitch working with an empty TAP file. Just repeat the copy command for now
Code: Select all
(venv) [srowe@gilraen Downloads]$ cbm-shell
(cbm) attach new.tap
Attached new.tap to 0
(cbm) copy dungeon.prg 0:DUNGEON
EXCEPTION of type 'FileNotFoundError' occurred with message: [Errno 2] No such file or directory: 'new.tap'
To enable full traceback, run the following command: 'set debug true'
(cbm) copy dungeon.prg 0:DUNGEON
Copying dungeon.prg to ImagePath(0:b'DUNGEON')
(cbm) $
0 <TAP image>
15 "DUNGEON" PRG
(cbm) quit
- chysn
- Vic 20 Scientist
- Posts: 1204
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Re: Preview: cbmshell, an interactive file processor
Yep, that's the exception I was getting, and the second copy works as expected. Thanks again, this is awesome!
Enormous-ass feature request: A built-in disassembler to complement list!
Re: Preview: cbmshell, an interactive file processor
Great idea. Will you enter it into the Vic20 things we want to see / hear competition too? Closes November 30th.
Vic20-Ian
The best things in life are Vic-20
Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
The best things in life are Vic-20
Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
- chysn
- Vic 20 Scientist
- Posts: 1204
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Re: Preview: cbmshell, an interactive file processor
I was going to amend my request to "If I were to write a 6502 disassembler in Python 3, could you integrate it?'
And, yeah, data's always going to be an issue. That's the way it goes.