English Amiga Board Amiga Lore



Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 15 August 2006, 21:44   #1
Qube
Registered User
Qube's Avatar
 
Join Date: Aug 2006
Location: England
Posts: 181
xdms 1.3.2

Has anyone compiled xdms 1.3.2 for win32/dos cmd?

I've had a look and can't get the makefile to run with mingw32, tried manually creating the object files but it looks like there are a few defines to fix etc.

Wondered if anyone had compiled it?

http://zakalwe.fi/~shd/foss/xdms/

Q;
Qube is offline  
AdSense AdSense  
Advertisement:
Old 16 August 2006, 01:22   #2
Adderly
[Satan^God]
Adderly's Avatar
 
Join Date: Oct 2005
Location: Germany
Posts: 701
Send a message via ICQ to Adderly
wow, new "Added an option for salvaging broken DMS images"!
This is exactly what i coded into another dms unpacker to depack broken images beyond the dms-error! See here: http://eab.abime.net/showthread.php?t=24636
I'll try to compile this new (unofficially) xdms version...
Adderly is offline  
Old 16 August 2006, 05:46   #3
poohbear
Registered User
 
Join Date: Jan 2004
Location: Toronto / Canada
Posts: 65
Try running "./configure" from bash within Cygwin. That will build Makefile from Makefile.in. If you don't have Cygwin, I can post the output.

One small problem I ran into is that mkstemp doesn't appear to be in MinGW. Deprecated POSIX function perhaps?

mkstemps is defined in %MINGW%\lib\libiberty.a, and a quick glance of the GNU mkstemps suggests that mkstemp(p) is equivalent to mkstemps(p,0). So change, lines 288-289 from:

strcpy(tname, "/tmp/xdmsXXXXXX");
fd = mkstemp(tname);

to:

strcpy(tname, "xdmsXXXXXX");
fd = mkstemps(tname,0);

(unless you have a writeable /tmp directory).

Then modify your Makefile (or makefile.in before running ./configure) in the src directory to link with libiberty.a:

xdms: $(OBJS)
$(CC) $(LFLAGS) $(OBJS) -liberty -o $@

The resulting binary successfully unpacked a DMS.
poohbear is offline  
Old 16 August 2006, 10:46   #4
Adderly
[Satan^God]
Adderly's Avatar
 
Join Date: Oct 2005
Location: Germany
Posts: 701
Send a message via ICQ to Adderly
ah yes, that is exactly the reason why i modified a different dms-unpacker and not the xdms source coz it's not easy portable. I wasn't able to compile it and have no motivation to fix this because there are other dms-unpacker with sourcecode in portable C out there on Aminet...
If someone was able to build a win32 or dos executable please zone it for us. Thanks!
Adderly is offline  
Old 16 August 2006, 12:17   #5
shd
Registered User
 
Join Date: Aug 2006
Location: Tampere / Finland
Age: 36
Posts: 21
Quote:
Originally Posted by poohbear
One small problem I ran into is that mkstemp doesn't appear to be in MinGW. Deprecated POSIX function perhaps?
You should have emailed me. I can fix the problem directly in the source tree.

Quote:
mkstemps is defined in %MINGW%\lib\libiberty.a, and a quick glance of the GNU mkstemps suggests that mkstemp(p) is equivalent to mkstemps(p,0). So change, lines 288-289 from:

strcpy(tname, "/tmp/xdmsXXXXXX");
fd = mkstemp(tname);

to:

strcpy(tname, "xdmsXXXXXX");
fd = mkstemps(tname,0);

(unless you have a writeable /tmp directory).
One has to have a write /tmp directory, that's a basic requirement for UNIX programs.

Next version (hopefully released soon) will have the fix.
shd is offline  
Old 16 August 2006, 12:20   #6
shd
Registered User
 
Join Date: Aug 2006
Location: Tampere / Finland
Age: 36
Posts: 21
Quote:
Originally Posted by Adderly
ah yes, that is exactly the reason why i modified a different dms-unpacker and not the xdms source coz it's not easy portable. I wasn't able to compile it and have no motivation to fix this because there are other dms-unpacker with sourcecode in portable C out there on Aminet...
If someone was able to build a win32 or dos executable please zone it for us. Thanks!
Support for new platforms are added as someone requests it and is willing to help me. It seems mingw support will happen now.
shd is offline  
Old 16 August 2006, 16:06   #7
Adderly
[Satan^God]
Adderly's Avatar
 
Join Date: Oct 2005
Location: Germany
Posts: 701
Send a message via ICQ to Adderly
I used undms 1.3 (12.2.98) from Aminet.
Seems it is based on the xdms source, at least Andre Rodrigues de la Rocha is mentioned for his help. It is portable C, i was able to compile it without any needed modifications using Visual C for Windows. Not as mighty as the xdms original but maybe usefull if you want it portable for other platforms.

shd, can you tell us more about "the salvaging broken DMS images" function of your xdms version? How does it work? Does it skip the broken track? Can it handle all kind of dms-errors? etc.

It's very good to have this feature since there are a lot of broken dms images out there!
Adderly is offline  
Old 16 August 2006, 16:32   #8
shd
Registered User
 
Join Date: Aug 2006
Location: Tampere / Finland
Age: 36
Posts: 21
Quote:
Originally Posted by Adderly
shd, can you tell us more about "the salvaging broken DMS images" function of your xdms version? How does it work? Does it skip the broken track? Can it handle all kind of dms-errors? etc.
It basically just ignores CRC checking but writes the correct amount of data to the disk. You will of course lose some data, but it tries to write as much data on the broken track as it can. One will get some garbage data too. After an error it continues with the next track. It's not sophisticated as it can't reason anything from the broken data.
shd is offline  
Old 16 August 2006, 16:56   #9
shd
Registered User
 
Join Date: Aug 2006
Location: Tampere / Finland
Age: 36
Posts: 21
Quote:
Originally Posted by poohbear
mkstemps is defined in %MINGW%\lib\libiberty.a, and a quick glance of the GNU mkstemps
I can't see mkstemps() on a UNIX system. What version of MinGW do you have? A person with

$ uname
MINGW32_NT-5.1

failed to compile a version having mkstemps().
Quote:
gcc -liberty u_heavy.o xdms.o u_deep.o u_init.o u_quick.o
u_medium.o u_rle.o tables.o pfile.o maketbl.o getbits.o
crc_csum.o -o xdms
xdms.o:xdms.c.text+0x74c): undefined reference to `mkstemps'
collect2: ld returned 1 exit status
Please checkout the latest xdms from the CVS tree and test it. It automatically detects mingw and uses mkstemps() instead of mkstemp().

As far as I know, mkstemps() only depends on #include <unistd.h> and that header file is included from xdms.c.
shd is offline  
Old 16 August 2006, 18:20   #10
poohbear
Registered User
 
Join Date: Jan 2004
Location: Toronto / Canada
Posts: 65
Quote:
Originally Posted by shd
You should have emailed me. I can fix the problem directly in the source tree.
I only compiled it last night in response to Qube's question, but, yes, it would have been a good idea for me to mail you also. Thanks for preempting it!

Quote:
Originally Posted by shd
One has to have a write /tmp directory, that's a basic requirement for UNIX programs.
Windows, I'm afraid. There's probably a Win32 API function to fetch Profile\Local Settings\Temp, but I don't have it to hand.

Quote:
Originally Posted by shd
Next version (hopefully released soon) will have the fix.
Thank you!
poohbear is offline  
Old 16 August 2006, 18:34   #11
poohbear
Registered User
 
Join Date: Jan 2004
Location: Toronto / Canada
Posts: 65
Quote:
Originally Posted by shd
I can't see mkstemps() on a UNIX system. What version of MinGW do you have? A person with

$ uname
MINGW32_NT-5.1

failed to compile a version having mkstemps().
I don't have a uname with my MinGW distribution from 2003 (it could be that the other person has MSYS instead of MinGW). The gcc version is:

> gcc --version
gcc (GCC) 3.2.3 (mingw special 20030504-1)

Old, but I can't upgrade it for compatibility with other projects.

I have no idea of the status of mkstemp/mkstemps on systems. It could well be that mkstemps is the deprecated function. Darwin seems to support both, so perhaps I should switch after all. :-)

http://developer.apple.com/documenta...kstemps.3.html

Quote:
Originally Posted by shd
Please checkout the latest xdms from the CVS tree and test it. It automatically detects mingw and uses mkstemps() instead of mkstemp().

As far as I know, mkstemps() only depends on #include <unistd.h> and that header file is included from xdms.c.
I can't see a CVS repository linked from:

http://zakalwe.fi/~shd/foss/xdms/

Could you provide a pointer? Thanks!
poohbear is offline  
Old 16 August 2006, 19:58   #12
Qube
Registered User
Qube's Avatar
 
Join Date: Aug 2006
Location: England
Posts: 181
Wow, looks like I got a bit of interest rekindled here.

Is there any way that xdms could be updated in the future to allow unpacking of , for example, a trainer dms or patch over an existing adf file? This would reduce the need of firing up winuae to apply a dms patch to a disk image? Is this possible?

Q;
Qube is offline  
Old 16 August 2006, 23:48   #13
shd
Registered User
 
Join Date: Aug 2006
Location: Tampere / Finland
Age: 36
Posts: 21
Quote:
Originally Posted by poohbear
I don't have a uname with my MinGW distribution from 2003 (it could be that the other person has MSYS instead of MinGW). The gcc version is:
That's very strange. Uname is supposed to be a mechanism to determine the kernel and OS.

Quote:
I can't see a CVS repository linked from:

http://zakalwe.fi/~shd/foss/xdms/

Could you provide a pointer? Thanks!
Sorry, CVS instructions are now included on the page:

Code:
$ cvs -d :server:uadecvs@zakalwe.fi:/home/cvs/uade-cvsroot login 
$ cvs -d :server:uadecvs@zakalwe.fi:/home/cvs/uade-cvsroot co xdms 
$ cd xdms
But, it will not work without uname command, so we have to figure out something else.
shd is offline  
Old 16 August 2006, 23:51   #14
shd
Registered User
 
Join Date: Aug 2006
Location: Tampere / Finland
Age: 36
Posts: 21
Quote:
Originally Posted by Qube
Is there any way that xdms could be updated in the future to allow unpacking of , for example, a trainer dms or patch over an existing adf file? This would reduce the need of firing up winuae to apply a dms patch to a disk image? Is this possible?
Could you send me an example dms and an associated patch file for reference? It could be possible. Also, please tell me how you would want to use it; what kind of parameters for xdms or would you rather issue two commands? My email address is heikki.orsila@iki.fi, you can send the files there.
shd is offline  
Old 17 August 2006, 04:46   #15
poohbear
Registered User
 
Join Date: Jan 2004
Location: Toronto / Canada
Posts: 65
Quote:
Originally Posted by shd
That's very strange. Uname is supposed to be a mechanism to determine the kernel and OS.


Sorry, CVS instructions are now included on the page:

Code:
$ cvs -d :server:uadecvs@zakalwe.fi:/home/cvs/uade-cvsroot login 
$ cvs -d :server:uadecvs@zakalwe.fi:/home/cvs/uade-cvsroot co xdms 
$ cd xdms
But, it will not work without uname command, so we have to figure out something else.
Thanks for the CVS information. I identified the password using l33t h4x0ring skills. ;-)

As to uname, MinGW on its own is a port of GCC and friends, so one gets:

Code:
a2dll             dsw2mak           mingw32-g++.exe   redir.exe
addr2line.exe     exchndl.dll       mingw32-gcc.exe   reimp.exe
ar.exe            g++.exe           mingw32-make.exe  res2coff.exe
as.exe            g77.exe           mingwm10.dll      size.exe
c++.exe           gcc.exe           nm.exe            strings.exe
c++filt.exe       gccbug            objcopy.exe       strip.exe
cpp.exe           gcov.exe          objdump.exe       unix2dos.exe
dlltool.exe       gdb.exe           pexports.exe      unprotoize.exe
dllwrap.exe       gprof.exe         protoize.exe      windres.exe
dos2unix.exe      ld.exe            ranlib.exe
drmingw.exe       mingw32-c++.exe   readelf.exe
I ran the configure script under Cygwin which does have its own uname. That uname reports:

Code:
  CYGWIN_NT-5.1
I also have another uname from unxutils that reports:

Code:
  WindowsNT
In other words, I wouldn't hope for a reliable uname on a Windows machine!

If you want a test for MinGW, you could use:

Code:
  mingw=$(gcc --version |grep -i mingw32)
to pick up on this part of the "gcc --version" output:

Code:
  gcc (GCC) 3.2.3 (mingw special 20030504-1)
By the way, doesn't the library link flag have to appear after the object module with the undefined reference? In src/Makefile.in, I think you'll need the "-liberty" flag to appear after $(OBJS).
poohbear is offline  
Old 17 August 2006, 09:43   #16
Adderly
[Satan^God]
Adderly's Avatar
 
Join Date: Oct 2005
Location: Germany
Posts: 701
Send a message via ICQ to Adderly
Quote:
Originally Posted by shd
Could you send me an example dms and an associated patch file for reference? It could be possible. Also, please tell me how you would want to use it; what kind of parameters for xdms or would you rather issue two commands? My email address is heikki.orsila@iki.fi, you can send the files there.
Wow, this feature would be great! Writing just the new tracks to an existing adf image!
May i suggest "a" as command for "apply DMS archive to existing disk image" or something like this.
-> xdms a xxxxx.dms +yyyyy.adf
Ofcourse the name of the adf image is not optional anymore with this function. I've included a dms image and a crackfix also as dms for a game released by Paradox for testing.

@poohbear: I hope you can manage it to give us a Windows/dos version!
Attached Files
File Type: zip dms.zip (617.4 KB, 213 views)
Adderly is offline  
Old 17 August 2006, 09:45   #17
Adderly
[Satan^God]
Adderly's Avatar
 
Join Date: Oct 2005
Location: Germany
Posts: 701
Send a message via ICQ to Adderly
Quote:
Originally Posted by Qube
Wow, looks like I got a bit of interest rekindled here.

Is there any way that xdms could be updated in the future to allow unpacking of , for example, a trainer dms or patch over an existing adf file? This would reduce the need of firing up winuae to apply a dms patch to a disk image? Is this possible?

Q;
Aye, Great thread!
Adderly is offline  
Old 17 August 2006, 10:24   #18
Adderly
[Satan^God]
Adderly's Avatar
 
Join Date: Oct 2005
Location: Germany
Posts: 701
Send a message via ICQ to Adderly
ok, here are some defect dms images for testing.

included are:
flt-cup.dms : dms error#8 on track24
grandnt2: dms error#8 on track42

->nasty errors, of you "test" the image with original dms or xdms the test shows no error but if actually depacked you'll get an error!

I've unpacked this images already with my modified undms V1.3 version, of course with some errors (bytes not original) on the erroneous track but the tracks that follow are rescued. Please try also with your xdms 1.3.2 version.

next one is a dms-error i could not depack beyond the error:

theunt01.dms : dms error#6 on track 6
->"test" dms-image will show this error and you cannot depack beyond track 6. I hope your xdms version can depack this one!
Attached Files
File Type: zip dms_errors.zip (1.73 MB, 102 views)
Adderly is offline  
Old 17 August 2006, 10:46   #19
Paul
RIP Friends
Paul's Avatar
 
Join Date: Sep 2005
Location: UK
Posts: 2,157
This thread deserves to be in Coders Heaven forum, so thread moved
Paul is offline  
Old 17 August 2006, 10:47   #20
shd
Registered User
 
Join Date: Aug 2006
Location: Tampere / Finland
Age: 36
Posts: 21
Quote:
Originally Posted by poohbear
I identified the password using l33t h4x0ring skills. ;-)
Sorry for that.. Indeed, the password is uadecvs.

Quote:
Code:
  mingw=$(gcc --version |grep -i mingw32)
Ok. Fixed.

Quote:
By the way, doesn't the library link flag have to appear after the object module with the undefined reference? In src/Makefile.in, I think you'll need the "-liberty" flag to appear after $(OBJS).
Ah. News to me. And the anonymous mingw users confirmed that to be true.

Please checkout the new version and see if it works now.
shd is offline  
AdSense AdSense  
Advertisement:
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help With xDMS Aleph Five support.Apps 5 23 May 2010 12:43
xDMS vs. GNU99 andreas Coders. General 2 06 October 2009 17:26
Please avoid xDMS with files which contain headers andreas project.TOSEC (amiga only) 5 31 March 2006 16:47
Who can program an xDMS clone with logging ability? andreas Coders. General 10 08 October 2003 18:23

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:19.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Page generated in 0.21679 seconds with 12 queries