View Issue Details

IDProjectCategoryView StatusLast Update
0000294fileGeneralpublic2021-10-28 15:53
ReporterJamie Assigned Tochristos  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.40 
Fixed in Version5.42 
Summary0000294: Magic bytes c64 .dfi format
DescriptionHello everyone,

attached is a patch for recognizing the c64 .dfi file format.

Currently such files are reported as data:

    $ file --version
    file-5.40
    magic file from /usr/share/file/misc/magic
    seccomp support included

    $ file --keep-going 10_Years_HVSC.dfi
    10_Years_HVSC.dfi: data

I got the structure from https://www.lemon64.com/forum/viewtopic.php?t=37415&sid=494dc2ca91289e05dadf80a7f8a968fe (at the bottom).
More general information about the format can be found at https://www.c64-wiki.com/wiki/DreamLoad.

An example file can be found in the HVSC Commodore 64 music collection, for example at https://kohina.duckdns.org/HVSC/C64Music/10_Years_HVSC.dfi.

Do you think it makes sense to include this?

Best,
Jamie
Tagsmagic

Activities

Jamie

2021-10-21 21:06

reporter  

c64.patch (476 bytes)   
diff --git a/magic/Magdir/c64 b/magic/Magdir/c64
index 52a4e22..6bb9639 100644
--- a/magic/Magdir/c64
+++ b/magic/Magdir/c64
@@ -11,6 +11,13 @@
 0	string		C64\40CARTRIDGE	CCS C64 Emultar Cartridge Image
 0	belong		0x43154164	X64 Image
 
+0	byte	0
+>1	string	DREAMLOAD\40FILE\40ARCHIVE
+>>0x17	byte	0	DFI Image
+>>>0x1a	leshort	x	version: %d.
+>>>0x18	leshort	x	\b%d
+>>>0x1c	lelong	x	tracks: %d
+
 0	string		GCR-1541	GCR Image
 >8	byte		x		version: %i
 >9	byte		x		tracks: %i
c64.patch (476 bytes)   

Jamie

2021-10-21 21:09

reporter   ~0003649

With the patch applied, the output is as follows:

    $ file --magic-file tmp.magic 10_Years_HVSC.dfi
    10_Years_HVSC.dfi: DFI Image version: 1.0 tracks: 4

christos

2021-10-28 15:53

manager   ~0003661

Added!

Issue History

Date Modified Username Field Change
2021-10-21 21:06 Jamie New Issue
2021-10-21 21:06 Jamie File Added: c64.patch
2021-10-21 21:06 Jamie Tag Attached: magic
2021-10-21 21:09 Jamie Note Added: 0003649
2021-10-28 15:53 christos Assigned To => christos
2021-10-28 15:53 christos Status new => assigned
2021-10-28 15:53 christos Status assigned => resolved
2021-10-28 15:53 christos Resolution open => fixed
2021-10-28 15:53 christos Fixed in Version => 5.42
2021-10-28 15:53 christos Note Added: 0003661