Page 1 of 1

Disk image editor for Linux?

Posted: Wed Jun 28, 2017 5:32 am
by ral-clan
Hi, is there a .d64 editor available for Linux? Right now I am running DirMaster for Windows under WINE, but would rather have a Linux native utility for this. I'd like something that can not only edit disk images, but export files from disk images to other disk images and take them out of disk images (and put them into disk images).

Thanks,

Re: Disk image editor for Linux?

Posted: Wed Jun 28, 2017 8:55 am
by groepaz
i'm just use commandline utils like c1541 for that - at least they arent a buggy mess like that dirmaster thing =P

edit: there is diskimagery from lallafa - but i wouldnt recommend it, its also very buggy.

Re: Disk image editor for Linux?

Posted: Wed Jun 28, 2017 2:28 pm
by srowe
I started writing a python module to manipulate .d64 images. At present it can only read and update the directory and dump the contents of files. It would be easy enough to add functions to update/write files, then simple wrapper scripts could use it to do the sort of stuff you're looking for.

Re: Disk image editor for Linux?

Posted: Wed Jun 28, 2017 2:44 pm
by R'zo
I know your seeking Linux but this disk editor for Windows works very nicely. Allows import/export.

http://www.d64editor.com

Re: Disk image editor for Linux?

Posted: Mon Jul 03, 2017 7:49 am
by ral-clan
I'm trying out c1541 in the VICE package, but can't understand how to properly copy a file in the host system directory TO a .d64 image.
The tutorials online are not comprehensive enough to explain the proper syntax to a new user.

For example, if I invoke it from the Linux command line:
brent@brent-OptiPlex-GX620:~/Downloads/PET_software$ c1541 write test.prg testdisk.d64
This is the error output:
Error - Cannot open file `write'.
cannot open file `write'
Error - Cannot open file `test.prg'.
cannot open file `test.prg'
c1541 V4.1 (VICE 3.1 svn r33328)
Copyright 1995-2017 The VICE Development Team.
C1541 is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type `show copying' to see the conditions.
There is absolutely no warranty for C1541. Type `show warranty' for details.
If I enter the "interactive mode" my simply starting c1541, I get a WRITE PROTECT error:
brent@brent-OptiPlex-GX620:~/Downloads/PET_software$ c1541
c1541 V4.1 (VICE 3.1 svn r33328)
Copyright 1995-2017 The VICE Development Team.
C1541 is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type `show copying' to see the conditions.
There is absolutely no warranty for C1541. Type `show warranty' for details.
c1541 #8> attach testdisk.d64
c1541 #8> write testfile.prg test
ERR = 26, WRITE PROTECT ON, 00, 00
cannot open `TESTFILE.PRG' for writing on image
floppy write failed
c1541 #8>
I have no idea what I'm doing wrong, or even if I'm doing anything correctly!

Please help!

Re: Disk image editor for Linux?

Posted: Mon Jul 03, 2017 8:02 am
by ral-clan
I figured it out.

The .d64 I was using was copied from the TPUG CD-ROM library, so it still had the read-only flag on it. I changed the write permission in Linux, then I could write the file to the disk using

write testfile.prg test

(when in interactive mode)

or

c1541 testdisk.d64 -write testfile.prg test
(when in the Linux command line)

Both write the file "testfile.prg" on the host system to a file called "test" on the .d64

Re: Disk image editor for Linux?

Posted: Sun Mar 04, 2018 5:02 pm
by ral-clan
I learned a little more. It was frustrating trying to figure this out....so for anyone trying to use this utility, If you are in the directory with the files you want to copy to a disk image, then:

Copy a file in the host system directory TO a .d64 image

Using the c1541 command in Linux (provided by VICE).

Create a D64 image:
c1541 -format <diskname,id> d64 <my_diskimage.d64>

Then write files from the directory into this disk image:

Enter interactive mode by typing "c1541"
Attach a disk image by typing the command: attach <diskname.d64>
Copy files from the directory you are in into the disk image by typing: write <source file name> <destination file name>

example:
write test.prg test
(when in interactive mode)

or

c1541 diskname.d64 -write testfile.prg test
(when in the Linux command line)

Both write the file "testfile.prg" on the host system to a file called "test" on the .d64

Make sure the D64 image is not write-protect flagged (as it would be if copied from a CD-R).

Re: Disk image editor for Linux?

Posted: Mon Mar 05, 2018 11:13 am
by orion70
Geez, this is so... Linux :). Thanks for that.
I compiled VICE in my Lubuntu distro, and didn't know it was so complex before my Win10 setup left me with an infinite loop at boot time...

Re: Disk image editor for Linux?

Posted: Mon Mar 05, 2018 12:09 pm
by ral-clan
orion70 wrote:Geez, this is so... Linux :). Thanks for that.
I compiled VICE in my Lubuntu distro, and didn't know it was so complex before my Win10 setup left me with an infinite loop at boot time...
You shouldn't have to compile VICE for Lubuntu. I use Lubuntu (which I really like) and it has VICE in the repository already.
However, if you have problems with the screen having the proper ratio during resizing, and if that bothers you, like it did with me, then you might need to compile.

The c1541 command line utility included in VICE for manipulating disk images is actually pretty good, other than not having a GUI.
It's just that the documentation sucks so bad. No one explains how to use it in a way that anyone but a linux veteran can understand.
All it needs is a user friendly manual and it would be fine.

Re: Disk image editor for Linux?

Posted: Mon Mar 05, 2018 2:46 pm
by orion70
Ah, OK. Not that I knew anything about this command, even that it existed :oops: . It also provides with "geowrite" -"read" and -"extract" options!

Code: Select all

man c1541
or

Code: Select all

c1541 -help
contain a lot of info. A proper manual would help a lot, I agree.

As for xVIC functionality, surprisingly enough, a lot of 16k TAP files don't work at all (CPU jam). See the other thread about Anirog's Jump Jet. Maybe wrong configuration, but where? I don't get many technicalities in compiling. So yep, I'll just stick to the repository standard VICE, and keep my bad aspect ratio. Maybe it will work better.

Re: Disk image editor for Linux?

Posted: Mon Mar 05, 2018 3:43 pm
by groepaz

Re: Disk image editor for Linux?

Posted: Mon Mar 05, 2018 4:02 pm
by ral-clan
Those are a little better. Thanks.