Go Back > Extra Stuff > Linux

Thread Tools
Old 2004-03-21, 02:34   #1
geoff's Avatar
Mar 2003
New Zealand

13×89 Posts
Default file magic for mprime save files

From the mprime source code I see that the save files for ECM and P-1 tests have a magic number, so I have made the following entries for /etc/magic so the 'file' program will recognise them:

# ECM save file eNNNNNNN
0	ulong	0x1a2b3cd4	Prime95 ECM data,
>4	ulong	x		version %lu,
>24	ulong	x		B1=%lu,
>12	ulong	x		curve #%lu,
>8	ulong	0		in stage 1,
>>28	ulong	x		at prime %lu
>8	ulong	1		in stage 2,
>>32	ulong	x		at prime %lu
# P-1 save file mNNNNNNN
0	ulong	0x1a2b3c4d	Prime95 P-1 data,
>4	ulong	x		version %lu,
>16	ulong	x		B1=%lu,
>28	ulong	>0		B2=%lu,
>8	ulong	0		in stage 1
>8	ulong	1		in stage 2
>8	ulong	2		complete
>8	ulong	3		in stage 1
There is more information in the files that would be nice to be able to extract, such as actual P-1 progress rather than just which stage it is in, but I am not sure how to do it with 'magic' format. This is an example of the output from file:

$ file e0001522 
e0001522: Prime95 ECM data, version 1, B1=44000000, curve #152, in stage 2, at prime 453577741
geoff is offline   Reply With Quote

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
P-1 Save File Compatability PageFault Software 10 2012-04-05 01:26
Save files, Vista and version 25.3 drew Software 9 2008-06-02 05:30
Continuing to Stage 2 p-1 with save file. jasong Factoring 5 2007-11-20 21:23
p95 v2.34 not writing save files during P-1 stage 2 geoff Software 4 2003-06-11 08:33
P-1 save files didn't save work outlnder Software 1 2003-01-19 23:01

All times are UTC. The time now is 20:55.

Tue Oct 20 20:55:24 UTC 2020 up 40 days, 18:06, 1 user, load averages: 1.84, 1.77, 1.85

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.