Hacking wwt+wit: Wiimms WBFS+ISO Tools

jivaros

Member
Newcomer
Joined
Sep 29, 2009
Messages
8
Trophies
0
XP
12
Country
France
Hi,

Thanks you for the --cache on stdin option !
I have been testing only one file (R7FPGD, success) because i encountered the same problem than with the former wbfs tool on the second file :
if the effective size of the iso is greater than the available space on the wbfs partition, wwt will try to add the iso, fail, and the iso won't be visible, but will still use all the remaining space on the disk (no free space)

Maybe this bug only affects the --cache option.

QUOTE said:
***** wwt: Wiimms WBFS Tool v0.05a r246M - Dirk Clemens - 2009-10-14 *****
WBFS #1 opened: /dev/sdb2
- ADD [R2TP41,0M] -
!! home/sam/downloads/wwt-v0.05a-r247/bin/wwt: ERROR #8 [WBFS ERROR] in wbfs_add_disc() @ libwbfs/libwbfs.c#589
!! home/sam/downloads/wwt-v0.05a-r247/bin/wwt: no space left on device (disc full)
!! home/sam/downloads/wwt-v0.05a-r247/bin/wwt: ERROR #8 [WBFS ERROR] in cmd_add() @ wwt.c#1111
!! home/sam/downloads/wwt-v0.05a-r247/bin/wwt: Error while creating disc [R2TP41] @/dev/sdb2

FSCK wanted !
wink.gif

I have keeped the trace if needed (maybe not really interresting).

edit : in other terms, wwt ls says
35 GiB used, 0 MiB ~ 0 GiB free
and wwt df says
size used used% free discs file (sizes in MiB)
--------------------------------------------------------------
41808 41808 100% 0 13/215 /dev/sdb2
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,286
Trophies
0
Location
Germany
Website
wiimmfi.de
XP
1,428
Country
Germany
@jivaros:
I know this bug (see "Known bugs") and I don't need the trace dump.
That is one reason for planning a fsck. But first i must learn more about the wbfs subsystem and that takes a while.

And when --cache will work for much games then I will enable it by default and remove the option.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,286
Trophies
0
Location
Germany
Website
wiimmfi.de
XP
1,428
Country
Germany
wwt: Wiimms WBFS Tool v0.06a - 2009-10-15
A command line WBFS tool for linux.

I have updated the tool. The first post with more details is updated too.

I have tested this tool very well and the software do what I want but I can't give any warranty. I have made different import and export (ISO and WDF) tests with about 20 games and the resulting ISO images are absolute identical as the source files.

wwt is now Beta and I'm using it as replacement for the tool 'wbfs'.


Download: http://wiimm.de/x/./wwt-v0.06a-r258.tar.gz (Documentation is included)
More Infos about WDF: http://svn.wiimm.de/open/wii/trunk/wiimms-...WDF.txt?view=co

Last changes:
Code:
wwt V0.06a r258 - 2009-10-15

- If adding from a pipe the cache (option --cache) is enabled automatically.
- Signal handler implemented for INT, TERM, USR1 and USR2. (see docu)
- Bug fix: INIT failed if formatting a block device.
- Bug fix: EXTRACT: Wrong file size calculation for double layer discs if
ÂÂ a zero filled block at the end of the image is found (ISO and WDF).

The --cache option is object to test. If adding a file from pipe fails then please use the binary wwt from 'debug/' folder and add the file again without piping and without --cache. The debug version create a file called '_trace.tmp' which much info. I need this file for analysis.
 

Bauldrick

Well-Known Member
Member
Joined
Jan 22, 2009
Messages
103
Trophies
0
XP
100
Country
Wiimm said:
There is a script called scripts/test-ADD+EXTRACT.sh :
Just call it with a list of ISO or WDF files: it will add and extract the image with various options and compare the results. It needs much time ....

I had to remove the space before `
 

mousex

Well-Known Member
Member
Joined
Jan 23, 2009
Messages
986
Trophies
0
XP
114
Country
United States
I made some dirty hacks to compile your tools on OS X (10.6.1, so Intel only).
I just tested wwt and extracted a small game (234MB), ran it through wdf2iso/iso2wdf and everything worked.
The problems on OS X are:<ul><li>O_LARGEFILE, O_NOATIME are not supported</li><li>open64, lseek64, ftruncate64 and all the 64 functions are not supported</li><li>I had to remove the -static flag form the makefile (first original wbfs port had the same problem)</li></ul>This is not recommended for daily use, it was just a quick hack to get it work on OS X, don't know how it works with big files yet.
Here is the diff
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->diff wiimms-wbfs-tool 2/Makefile wiimms-wbfs-tool/source/Makefile
105d104
< LDFLAGSÂÂÂÂÂÂÂÂ+= -static
Only in wiimms-wbfs-tool/source/: templates.sed
Only in wiimms-wbfs-tool/source/: version.h
diff wiimms-wbfs-tool 2/wbfs-interface.c wiimms-wbfs-tool/source/wbfs-interface.c
745c745
< ÂÂÂÂÂÂÂÂÂÂÂÂ: (off64_t)w->disc->p->n_wii_sec_per_disc * 0x4000;
---
> ÂÂÂÂÂÂÂÂÂÂÂÂ: (off_t)w->disc->p->n_wii_sec_per_disc * 0x4000;
diff wiimms-wbfs-tool 2/wdf-cat.c wiimms-wbfs-tool/source/wdf-cat.c
150c150
< enumError do_cat ( File_t * f, off64_t src_off, u64 size64 )
---
> enumError do_cat ( File_t * f, off_t src_off, u64 size64 )
diff wiimms-wbfs-tool 2/wdf-dump.c wiimms-wbfs-tool/source/wdf-dump.c
209c209
<ÂÂÂÂ int fd = open(fname,O_RDONLY|O_LARGEFILE|O_NOATIME|O_NONBLOCK,0);
---
>ÂÂÂÂ int fd = open(fname,O_RDONLY|O_NONBLOCK,0);
295c295
<ÂÂÂÂ if ( lseek64(fd,wh.chunk_off,SEEK_SET) == (off64_t)-1
---
>ÂÂÂÂ if ( lseek(fd,wh.chunk_off,SEEK_SET) == (off_t)-1
diff wiimms-wbfs-tool 2/wii-disc.c wiimms-wbfs-tool/source/wii-disc.c
446c446
< enumError ReadWDF ( WDF_Info_t * wi, off64_t off, void * buf, u32 count )
---
> enumError ReadWDF ( WDF_Info_t * wi, off_t off, void * buf, u32 count )
607c607
< enumError WriteWDF ( WDF_Info_t * wi, off64_t off, const void * buf, u32 count )
---
> enumError WriteWDF ( WDF_Info_t * wi, off_t off, const void * buf, u32 count )
620c620
<ÂÂÂÂ const off64_t data_end = off + count;
---
>ÂÂÂÂ const off_t data_end = off + count;
756c756
< enumError WriteSparseWDF ( WDF_Info_t * wi, off64_t off, const void * buf, u32 count )
---
> enumError WriteSparseWDF ( WDF_Info_t * wi, off_t off, const void * buf, u32 count )
776c776
<ÂÂÂÂ const off64_t data_end = off + count;
---
>ÂÂÂÂ const off_t data_end = off + count;
844c844
< ÂÂÂÂconst off64_t off = (off64_t)offset << 2;
---
> ÂÂÂÂconst off_t off = (off_t)offset << 2;
851c851
< ÂÂÂÂÂÂÂÂ(off64_t)offset << 2,
---
> ÂÂÂÂÂÂÂÂ(off_t)offset << 2,
865c865
< ÂÂÂÂÂÂÂÂ(off64_t)offset << 2,
---
> ÂÂÂÂÂÂÂÂ(off_t)offset << 2,
882,883c882,883
<ÂÂÂÂ const off64_t off = (off64_t)lba * sector_size;
<ÂÂÂÂ const off64_t end = off + count;
---
>ÂÂÂÂ const off_t off = (off_t)lba * sector_size;
>ÂÂÂÂ const off_t end = off + count;
901,902c901,902
<ÂÂÂÂ const off64_t off = (off64_t)lba * sector_size;
<ÂÂÂÂ const off64_t end = off + count;
---
>ÂÂÂÂ const off_t off = (off_t)lba * sector_size;
>ÂÂÂÂ const off_t end = off + count;
919c919
< ÂÂÂÂÂÂÂÂ(off64_t)lba * sector_size,
---
> ÂÂÂÂÂÂÂÂ(off_t)lba * sector_size,
934c934
< ÂÂÂÂÂÂÂÂ(off64_t)lba * sector_size,
---
> ÂÂÂÂÂÂÂÂ(off_t)lba * sector_size,
diff wiimms-wbfs-tool 2/wii-disc.h wiimms-wbfs-tool/source/wii-disc.h
107,108c107,108
< ÂÂÂÂoff64_t file_size;ÂÂÂÂÂÂÂÂ// the size of the (virtual) ISO image
< ÂÂÂÂoff64_t max_virt_off;ÂÂÂÂÂÂÂÂ// maximal used offset of virtual image
---
> ÂÂÂÂoff_t file_size;ÂÂÂÂÂÂÂÂ// the size of the (virtual) ISO image
> ÂÂÂÂoff_t max_virt_off;ÂÂÂÂÂÂÂÂ// maximal used offset of virtual image
170c170
< enumError ReadWDFÂÂÂÂ( WDF_Info_t * wi, off64_t off, void * buf, u32 size );
---
> enumError ReadWDFÂÂÂÂ( WDF_Info_t * wi, off_t off, void * buf, u32 size );
175,176c175,176
< enumError WriteWDFÂÂÂÂ( WDF_Info_t * wi, off64_t off, const void * buf, u32 size );
< enumError WriteSparseWDF( WDF_Info_t * wi, off64_t off, const void * buf, u32 size );
---
> enumError WriteWDFÂÂÂÂ( WDF_Info_t * wi, off_t off, const void * buf, u32 size );
> enumError WriteSparseWDF( WDF_Info_t * wi, off_t off, const void * buf, u32 size );
diff wiimms-wbfs-tool 2/wtest.c wiimms-wbfs-tool/source/wtest.c
55c55
< enumError WriteBlock ( WDF_Info_t * wi, char ch, off64_t off, u32 count )
---
> enumError WriteBlock ( WDF_Info_t * wi, char ch, off_t off, u32 count )
diff wiimms-wbfs-tool 2/wwt-file.c wiimms-wbfs-tool/source/wwt-file.c
847,849c847,849
< ÂÂÂÂÂÂÂÂ// second try: use lseek64() (needed for block devices)
< ÂÂÂÂÂÂÂÂinfo->file_size = lseek64(F.fd,0,SEEK_END);
< ÂÂÂÂÂÂÂÂif ( info->file_size == (off64_t)-1 )
---
> ÂÂÂÂÂÂÂÂ// second try: use lseek() (needed for block devices)
> ÂÂÂÂÂÂÂÂinfo->file_size = lseek(F.fd,0,SEEK_END);
> ÂÂÂÂÂÂÂÂif ( info->file_size == (off_t)-1 )
diff wiimms-wbfs-tool 2/wwt-lib.c wiimms-wbfs-tool/source/wwt-lib.c
131c131
<ÂÂÂÂ TRACE_SIZEOF(off64_t);
---
>ÂÂÂÂ TRACE_SIZEOF(off_t);
636c636
< ÂÂÂÂÂÂÂÂf->st.st_size = lseek64(f->fd,0,SEEK_END);
---
> ÂÂÂÂÂÂÂÂf->st.st_size = lseek(f->fd,0,SEEK_END);
638c638
< ÂÂÂÂÂÂÂÂlseek64(f->fd,0,SEEK_SET);
---
> ÂÂÂÂÂÂÂÂlseek(f->fd,0,SEEK_SET);
663,664c663,664
< ÂÂÂÂÂÂÂÂÂÂÂÂO_RDONLY|O_LARGEFILE|O_NOATIME,
< ÂÂÂÂÂÂÂÂÂÂÂÂO_LARGEFILE );
---
> ÂÂÂÂÂÂÂÂÂÂÂÂO_RDONLY,
> ÂÂÂÂÂÂÂÂÂÂÂÂ0 );
673,674c673,674
< ÂÂÂÂÂÂÂÂÂÂÂÂO_RDWR|O_LARGEFILE|O_NOATIME,
< ÂÂÂÂÂÂÂÂÂÂÂÂO_LARGEFILE );
---
> ÂÂÂÂÂÂÂÂÂÂÂÂO_RDWR,
> ÂÂÂÂÂÂÂÂÂÂÂÂ0 );
690,691c690,691
< ÂÂÂÂÂÂÂÂÂÂÂÂO_CREAT|O_LARGEFILE|O_WRONLY|O_TRUNC|O_EXCL,
< ÂÂÂÂÂÂÂÂÂÂÂÂO_CREAT|O_LARGEFILE );
---
> ÂÂÂÂÂÂÂÂÂÂÂÂO_CREAT|O_WRONLY|O_TRUNC|O_EXCL,
> ÂÂÂÂÂÂÂÂÂÂÂÂO_CREAT );
712c712
<ÂÂÂÂ const int open_flags = O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_EXCL;
---
>ÂÂÂÂ const int open_flags = O_WRONLY|O_CREAT|O_TRUNC|O_EXCL;
806c806
<ÂÂvoid DefineCachedArea ( File_t * f, off64_t off, size_t count )
---
>ÂÂvoid DefineCachedArea ( File_t * f, off_t off, size_t count )
820c820
<ÂÂÂÂ off64_t off_end = (( off + count + f->st.st_blksize - 1 )
---
>ÂÂÂÂ off_t off_end = (( off + count + f->st.st_blksize - 1 )
832c832
< ÂÂÂÂoff64_t ptr_end = ptr->off + ptr->count;
---
> ÂÂÂÂoff_t ptr_end = ptr->off + ptr->count;
844c844
< ÂÂÂÂÂÂÂÂoff64_t new_end = ptr->off + ptr->count;
---
> ÂÂÂÂÂÂÂÂoff_t new_end = ptr->off + ptr->count;
1121c1121
<ÂÂstatic FileCache_t * XCacheHelper ( XPARM File_t * f, off64_t off, size_t count )
---
>ÂÂstatic FileCache_t * XCacheHelper ( XPARM File_t * f, off_t off, size_t count )
1196,1197c1196,1197
< ÂÂÂÂÂÂÂÂÂÂÂÂ? lseek64(f->fd,(off64_t)0,SEEK_CUR)
< ÂÂÂÂÂÂÂÂÂÂÂÂ: (off64_t)-1;
---
> ÂÂÂÂÂÂÂÂÂÂÂÂ? lseek(f->fd,(off_t)0,SEEK_CUR)
> ÂÂÂÂÂÂÂÂÂÂÂÂ: (off_t)-1;
1199c1199
<ÂÂÂÂ if ( f->file_off == (off64_t)-1 )
---
>ÂÂÂÂ if ( f->file_off == (off_t)-1 )
1223c1223
< enumError XSeekF ( XPARM File_t * f, off64_t off )
---
> enumError XSeekF ( XPARM File_t * f, off_t off )
1246c1246
< ÂÂÂÂoff64_t skip_size = off - f->file_off;
---
> ÂÂÂÂoff_t skip_size = off - f->file_off;
1287,1288c1287,1288
< ÂÂÂÂÂÂÂÂÂÂÂÂ? fseeko(f->fp,off,SEEK_SET) == (off64_t)-1
< ÂÂÂÂÂÂÂÂÂÂÂÂ: f->fd == -1 || lseek64(f->fd,off,SEEK_SET) == (off64_t)-1;
---
> ÂÂÂÂÂÂÂÂÂÂÂÂ? fseeko(f->fp,off,SEEK_SET) == (off_t)-1
> ÂÂÂÂÂÂÂÂÂÂÂÂ: f->fd == -1 || lseek(f->fd,off,SEEK_SET) == (off_t)-1;
1298c1298
< ÂÂÂÂf->file_off = (off64_t)-1;
---
> ÂÂÂÂf->file_off = (off_t)-1;
1313c1313
< enumError XSetSizeF ( XPARM File_t * f, off64_t off )
---
> enumError XSetSizeF ( XPARM File_t * f, off_t off )
1320c1320
<ÂÂÂÂ if (ftruncate64(f->fd,off))
---
>ÂÂÂÂ if (ftruncate(f->fd,off))
1348c1348
< ÂÂÂÂoff64_t my_off = f->cur_off;
---
> ÂÂÂÂoff_t my_off = f->cur_off;
1449c1449
< ÂÂÂÂf->file_off = (off64_t)-1;
---
> ÂÂÂÂf->file_off = (off_t)-1;
1508c1508
< ÂÂÂÂf->file_off = (off64_t)-1;
---
> ÂÂÂÂf->file_off = (off_t)-1;
1533c1533
< ÂÂÂÂ|| f->file_off == (off64_t)-1 || f->file_off < f->max_off )
---
> ÂÂÂÂ|| f->file_off == (off_t)-1 || f->file_off < f->max_off )
1556c1556
<ÂÂÂÂ off64_t off = f->file_off + ( (ccp)ptr - (ccp)iobuf );
---
>ÂÂÂÂ off_t off = f->file_off + ( (ccp)ptr - (ccp)iobuf );
1598c1598
< enumError XReadAtF ( XPARM File_t * f, off64_t off, void * iobuf, size_t count )
---
> enumError XReadAtF ( XPARM File_t * f, off_t off, void * iobuf, size_t count )
1608c1608
< enumError XWriteAtF ( XPARM File_t * f, off64_t off, const void * iobuf, size_t count )
---
> enumError XWriteAtF ( XPARM File_t * f, off_t off, const void * iobuf, size_t count )
1618c1618
< enumError XWriteSparseAtF ( XPARM File_t * f, off64_t off, const void * iobuf, size_t count )
---
> enumError XWriteSparseAtF ( XPARM File_t * f, off_t off, const void * iobuf, size_t count )
1643c1643
< ÂÂÂÂÂÂÂÂ(off64_t)lba * f->sector_size,
---
> ÂÂÂÂÂÂÂÂ(off_t)lba * f->sector_size,
1663c1663
< ÂÂÂÂÂÂÂÂ(off64_t)lba * f->sector_size,
---
> ÂÂÂÂÂÂÂÂ(off_t)lba * f->sector_size,
diff wiimms-wbfs-tool 2/wwt-lib.h wiimms-wbfs-tool/source/wwt-lib.h
199c199
< ÂÂÂÂoff64_tÂÂÂÂoff;ÂÂÂÂÂÂÂÂÂÂÂÂ// file offset
---
> ÂÂÂÂoff_tÂÂÂÂoff;ÂÂÂÂÂÂÂÂÂÂÂÂ// file offset
237,239c237,239
< ÂÂÂÂoff64_t file_off;ÂÂÂÂ// current real file offset
< ÂÂÂÂoff64_t cur_off;ÂÂÂÂ// current virtual file offset
< ÂÂÂÂoff64_t max_off;ÂÂÂÂ// max (real&virtual) file offset
---
> ÂÂÂÂoff_t file_off;ÂÂÂÂ// current real file offset
> ÂÂÂÂoff_t cur_off;ÂÂÂÂ// current virtual file offset
> ÂÂÂÂoff_t max_off;ÂÂÂÂ// max (real&virtual) file offset
281c281
<ÂÂvoid DefineCachedAreaÂÂÂÂ( File_t * f, off64_t off, size_t count );
---
>ÂÂvoid DefineCachedAreaÂÂÂÂ( File_t * f, off_t off, size_t count );
296,297c296,297
< enumError XSeekFÂÂÂÂ ( XPARM File_t * f, off64_t off );
< enumError XSetSizeFÂÂÂÂ ( XPARM File_t * f, off64_t off );
---
> enumError XSeekFÂÂÂÂ ( XPARM File_t * f, off_t off );
> enumError XSetSizeFÂÂÂÂ ( XPARM File_t * f, off_t off );
301,303c301,303
< enumError XReadAtFÂÂÂÂ ( XPARM File_t * f, off64_t off,ÂÂÂÂÂÂ void * iobuf, size_t count );
< enumError XWriteAtFÂÂÂÂ ( XPARM File_t * f, off64_t off, const void * iobuf, size_t count );
< enumError XWriteSparseAtF( XPARM File_t * f, off64_t off, const void * iobuf, size_t count );
---
> enumError XReadAtFÂÂÂÂ ( XPARM File_t * f, off_t off,ÂÂÂÂÂÂ void * iobuf, size_t count );
> enumError XWriteAtFÂÂÂÂ ( XPARM File_t * f, off_t off, const void * iobuf, size_t count );
> enumError XWriteSparseAtF( XPARM File_t * f, off_t off, const void * iobuf, size_t count );<!--c2--></div><!--ec2-->
And the binaries+source:
<a href="http://www.megaupload.com/?d=4D70EHVT" target="_blank">http://www.megaupload.com/?d=4D70EHVT</a>

Maybe this helps wiim making the source multi platform, I don't know but as you can't test it on OS X I thought I write you what will break the compile there.
By the way, there are still warnings this way but I didn't care for them yet.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->******-**********-Mac Pro:source ******$ make
awk: calling undefined function strftime
input record number 1, file
source line number 1
awk: calling undefined function strftime
input record number 1, file
source line number 1
***ÂÂobject iso2wdf.o
iso2wdf.c:32:20: warning: malloc.h: No such file or directory
***ÂÂobject debug.o
***ÂÂobject wwt-lib.o
wwt-lib.c: In function ‘XWriteSparseF’:
wwt-lib.c:1532: warning: cast from pointer to integer of different size
***ÂÂobject wii-disc.o
wii-disc.c:9:20: warning: malloc.h: No such file or directory
wii-disc.c: In function ‘WriteWDF’:
wii-disc.c:696: warning: format ‘%8x’ expects type ‘unsigned int’, but argument 4 has type ‘long int’
wii-disc.c:730: warning: format ‘%8x’ expects type ‘unsigned int’, but argument 4 has type ‘long int’
***ÂÂÂÂtool iso2wdf
***ÂÂobject wdf-cat.o
wdf-cat.c:32:20: warning: malloc.h: No such file or directory
wdf-cat.c: In function ‘help_exit’:
wdf-cat.c:88: warning: format not a string literal and no format arguments
***ÂÂÂÂtool wdf-cat
***ÂÂobject wdf-dump.o
wdf-dump.c:32:20: warning: malloc.h: No such file or directory
wdf-dump.c: In function ‘help_exit’:
wdf-dump.c:94: warning: format not a string literal and no format arguments
***ÂÂÂÂtool wdf-dump
***ÂÂobject wdf2iso.o
wdf2iso.c:32:20: warning: malloc.h: No such file or directory
wdf2iso.c: In function ‘help_exit’:
wdf2iso.c:93: warning: format not a string literal and no format arguments
***ÂÂÂÂtool wdf2iso
***ÂÂobject wtest.o
wtest.c:32:20: warning: malloc.h: No such file or directory
***ÂÂobject dclib-utf8.o
***ÂÂobject libwbfs.o
***ÂÂobject rijndael.o
***ÂÂobject titles.o
***ÂÂobject wbfs-interface.o
wbfs-interface.c:10:20: warning: malloc.h: No such file or directory
***ÂÂobject wiidisc.o
***ÂÂobject wwt-file.o
wwt-file.c:16:20: warning: malloc.h: No such file or directory
***ÂÂÂÂtool wtest
***ÂÂobject wwt.o
wwt.c:33:20: warning: malloc.h: No such file or directory
wwt.c: In function ‘help_exit’:
wwt.c:277: warning: format not a string literal and no format arguments
wwt.c: In function ‘check_options’:
wwt.c:1793: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
***ÂÂÂÂtool wwt
HINT: try 'make help'<!--c2--></div><!--ec2-->
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,286
Trophies
0
Location
Germany
Website
wiimmfi.de
XP
1,428
Country
Germany
wwt: Wiimms WBFS Tool v0.07a - 2009-10-19
A command line WBFS tool for linux.

I have updated the tool. The first post with more details is updated too.

I have tested this tool very well and the software do what I want but I can't give any warranty. I have made different import and export (ISO and WDF) tests with about 20 games and the resulting ISO images are absolute identical as the source files.

wwt is now Beta and I'm using it as replacement for the tool 'wbfs'.


Download: http://wiimm.de/x/./wwt-v0.07a-r273.tar.gz (Documentation is included)
More Infos about WDF: http://opensvn.wiimm.de/viewvc/wii/trunk/w...WDF.txt?view=co

Last changes:
Code:
wwt V0.07a r273 - 2009-10-19

- Check the MAGIC "5d-1c-9e-a3" at position 0x18 of ISO files.
- New script: convert-iso-to-wdf.sh: Find ISO files and convert it to WDF.
ÂÂ The converted WDF will be compared with the source and removed if differ.
- 'iso2wdf' and 'wdf2iso' may convert through stdin->stdout.
- Script test-wdf-tools.sh: Positive test is now done with >2 million files.
ÂÂ I declare WDF as stable. I have converted all my games to WDF.
- The source is now more compatible for non linux/386 machines.
- Source files renamed.
- The binaries are linked without -static now. Hope that makes no problems.

Sources comes with GPL2. Checkout the sources directly from the SVN repository or browse the source with any browser.

@mousex:
I have made many changes in accordance with your proposals and you log. Please make it again and send me the complete log output. And see the point above (svn repos).
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,286
Trophies
0
Location
Germany
Website
wiimmfi.de
XP
1,428
Country
Germany
Today I have installed cygwin and tried to compile the wwt tools.
Only some changes in the makefile are needed and all programs are build!
I haven't much time for testing: I have done only a few small and fast tests: It works! And auto scanning of USB drives works too!

Feel free to make you own tests: http://wiimm.de/x/wwt-v0.07a-r275-win32.zip (Be carefull: ALHPA)
 

mousex

Well-Known Member
Member
Joined
Jan 23, 2009
Messages
986
Trophies
0
XP
114
Country
United States
SVN rev 275 compiles on first try on OS X 10.6.1
wink.gif
Nothing serious anymore.
Compile log:
QUOTE said:
Mac Pro:wiimms-wbfs-tool mousex$ make clean
*** rm *.{o,d,tmp,bak} */*.{tmp,bak} ./_mode.flag iso2wdf wdf-cat wdf-dump wdf2iso wtest wwt
Mac Pro:wiimms-wbfs-tool mousex$ make
*** object iso2wdf.o
*** object debug.o
*** object lib-std.o
lib-std.c: In function ‘XWriteSparseF’:
lib-std.c:1565: warning: cast from pointer to integer of different size
*** object lib-wdf.o
lib-wdf.c: In function ‘WriteWDF’:
lib-wdf.c:695: warning: format ‘%8x’ expects type ‘unsigned int’, but argument 4 has type ‘long int’
lib-wdf.c:729: warning: format ‘%8x’ expects type ‘unsigned int’, but argument 4 has type ‘long int’
*** tool iso2wdf
*** object wdf-cat.o
wdf-cat.c: In function ‘help_exit’:
wdf-cat.c:87: warning: format not a string literal and no format arguments
*** tool wdf-cat
*** object wdf-dump.o
wdf-dump.c: In function ‘help_exit’:
wdf-dump.c:93: warning: format not a string literal and no format arguments
*** tool wdf-dump
*** object wdf2iso.o
wdf2iso.c: In function ‘help_exit’:
wdf2iso.c:92: warning: format not a string literal and no format arguments
*** tool wdf2iso
*** object wtest.o
*** object dclib-utf8.o
*** object libwbfs.o
*** object rijndael.o
*** object titles.o
*** object wbfs-interface.o
*** object wiidisc.o
*** object wwt-file.o
*** tool wtest
*** object wwt.o
wwt.c: In function ‘help_exit’:
wwt.c:276: warning: format not a string literal and no format arguments
wwt.c: In function ‘check_options’:
wwt.c:1795: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
*** tool wwt
HINT: try 'make help'
I hope the changes you made have no negative side effects for non Apple users, I don't have the knowledge about the things like O_LARGEFILES on different systems or the open64 functions
wink.gif
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,286
Trophies
0
Location
Germany
Website
wiimmfi.de
XP
1,428
Country
Germany
@mousex
Thanks for your effort.
mousex said:
I hope the changes you made have no negative side effects for non Apple users, I don't have the knowledge about the things like O_LARGEFILES on different systems or the open64 functions
wink.gif

I found that -DLARGE_FILES and/or -D_FILE_OFFSET_BITS=64 do all for me that I need for large files. O_LARGEFILES is not necessary.

I have one whish:
take this little program, compile it with "gcc -E -dM proggi.c" and send me the output. It shows all predefined macros.
CODEint main ( int argc, char ** argv ) {ÂÂreturn 0; }

P.S.:
The output of env with vars which declares system and os would also be great
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,286
Trophies
0
Location
Germany
Website
wiimmfi.de
XP
1,428
Country
Germany
wwt: Wiimms WBFS Tool v0.07b - 2009-10-20
A command line WBFS tool set for various os.

I have updated the tool. The first post with more details is updated too.

I have tested this tool very well and the software do what I want but I can't give any warranty. I have made different import and export (ISO and WDF) tests with more than 50 games and the resulting ISO images are absolute identical as the source files.

wwt is now Beta and I'm using it as replacement for the tool 'wbfs'.


Download:Last changes:
Code:
wwt V0.07b r278 - 2009-10-20

- cygwin support.
- minor bug fixes.

Sources comes with GPL2. Checkout the sources directly from the SVN repository or browse the source with any browser.
 

Bauldrick

Well-Known Member
Member
Joined
Jan 22, 2009
Messages
103
Trophies
0
XP
100
Country
I hate to ask, but could you possibly add ETA on add extract etc...? Like wbfs has, e.g :

ETA 4:59 [OOOo ]

Thanks again, I've converted 3/4 of my games to .wdf so far
smile.gif
 

mousex

Well-Known Member
Member
Joined
Jan 23, 2009
Messages
986
Trophies
0
XP
114
Country
United States
These are the variables without things like username and HOME, I don't know exactly how to get the System type/OS but at the beginning of configure scripts I get this (uname gives just "Darwin" the Unix-sub-system of OS X):
Code:
Mac Pro:testdisk-6.12-WIP $ ./configure
checking build system type... i386-apple-darwin10.0.0
checking host system type... i386-apple-darwin10.0.0
checking target system type... i386-apple-darwin10.0.0
This may change when running on older OS X (I think Leopard is 9.X) or with 64-bit kernel (then i386 should become x86-64), I'm running the default 32-bit kernel.
Code:
Mac Pro:wiimms-wbfs-tool marius$ printenv 
DEVKITPPC=/opt/devkitPro/devkitPPC
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/bash
Apple_PubSub_Socket_Render=/tmp/launch-N60EJ3/Render
TERM_PROGRAM_VERSION=272
LC_ALL=de_DE.UTF-8
COMMAND_MODE=unix2003
DEVKITPRO=/opt/devkitPro
SSH_AUTH_SOCK=/tmp/launch-6PqW6W/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0:3
PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
LANG=de_DE.UTF-8
SHLVL=1
DISPLAY=/tmp/launch-T1TAFQ/:0
_=/usr/bin/printenv
And here is your request
QUOTE said:
Mac Pro:wiimms-wbfs-tool $ gcc -E -dM proggi.c
#define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __DEC64_DEN__ 0.000000000000001E-383DD
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 2147483647
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __FLT_EVAL_METHOD__ 0
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __DEC64_MAX_EXP__ 384
#define __SHRT_MAX__ 32767
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
#define __APPLE_CC__ 5646
#define __UINTMAX_TYPE__ long unsigned int
#define __DEC32_EPSILON__ 1E-6DF
#define __block __attribute__((__blocks__(byref)))
#define __SCHAR_MAX__ 127
#define __USER_LABEL_PREFIX__ _
#define __STDC_HOSTED__ 1
#define __DEC64_MIN_EXP__ (-383)
#define __DBL_DIG__ 15
#define __FLT_EPSILON__ 1.19209290e-7F
#define __LDBL_MIN__ 3.36210314311209350626e-4932L
#define __DEC32_MAX__ 9.999999E96DF
#define __strong
#define __APPLE__ 1
#define __DECIMAL_DIG__ 21
#define __LDBL_HAS_QUIET_NAN__ 1
#define __DYNAMIC__ 1
#define __GNUC__ 4
#define __MMX__ 1
#define __FLT_HAS_DENORM__ 1
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_HAS_INFINITY__ 1
#define __DEC32_MIN_EXP__ (-95)
#define OBJC_NEW_PROPERTIES 1
#define __LDBL_HAS_DENORM__ 1
#define __DEC32_MIN__ 1E-95DF
#define __weak __attribute__((objc_gc(weak)))
#define __DBL_MAX_EXP__ 1024
#define __DEC128_EPSILON__ 1E-33DL
#define __SSE2_MATH__ 1
#define __amd64 1
#define __tune_core2__ 1
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __GXX_ABI_VERSION 1002
#define __FLT_MIN_EXP__ (-125)
#define __x86_64 1
#define __DBL_MIN__ 2.2250738585072014e-308
#define __LP64__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __DBL_HAS_DENORM__ 1
#define __NO_INLINE__ 1
#define __DEC_EVAL_METHOD__ 2
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __FLT_MANT_DIG__ 24
#define __VERSION__ "4.2.1 (Apple Inc. build 5646)"
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC128_MIN_EXP__ (-6143)
#define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1060
#define __SIZE_TYPE__ long unsigned int
#define __DEC32_DEN__ 0.000001E-95DF
#define __FLT_RADIX__ 2
#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
#define __SSE_MATH__ 1
#define __k8 1
#define __LDBL_DIG__ 18
#define __x86_64__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 9223372036854775807L
#define __FLT_HAS_INFINITY__ 1
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __DEC64_MANT_DIG__ 16
#define __DEC32_MAX_EXP__ 96
#define __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL
#define __LITTLE_ENDIAN__ 1
#define __LDBL_MANT_DIG__ 64
#define __CONSTANT_CFSTRINGS__ 1
#define __DEC32_MANT_DIG__ 7
#define __k8__ 1
#define __WCHAR_TYPE__ int
#define __pic__ 2
#define __FLT_DIG__ 6
#define __INT_MAX__ 2147483647
#define __FLT_MAX_EXP__ 128
#define __BLOCKS__ 1
#define __DBL_MANT_DIG__ 53
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ int
#define __SSE__ 1
#define __LDBL_MIN_EXP__ (-16381)
#define __MACH__ 1
#define __amd64__ 1
#define __LDBL_MAX_EXP__ 16384
#define __SSP__ 1
#define __LDBL_MAX_10_EXP__ 4932
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define _LP64 1
#define __GNUC_PATCHLEVEL__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __INTMAX_MAX__ 9223372036854775807L
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __PIC__ 2
#define __FLT_MAX__ 3.40282347e+38F
#define __SSE2__ 1
#define __FLT_MIN_10_EXP__ (-37)
#define __INTMAX_TYPE__ long int
#define __DEC128_MAX_EXP__ 6144
#define __GNUC_MINOR__ 2
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
#define __STDC__ 1
#define __PTRDIFF_TYPE__ long int
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-4931)
#define __GNUC_GNU_INLINE__ 1
#define __SSE3__ 1
I hope there are some usefull information in there
tongue.gif
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,286
Trophies
0
Location
Germany
Website
wiimmfi.de
XP
1,428
Country
Germany
Bauldrick said:
I hate to ask, but could you possibly add ETA on add extract etc...? Like wbfs has, e.g :

ETA 4:59 [OOOo ]

Thanks again, I've converted 3/4 of my games to .wdf so far
smile.gif
multiple choice:
[ ] RTFM
[ ] -vv

I'm working on an environ var (WWT_OPT) for default settings.

@mousex:
Thanks for all. Yes, it helps.
 

mousex

Well-Known Member
Member
Joined
Jan 23, 2009
Messages
986
Trophies
0
XP
114
Country
United States
I just started the 64-bit kernel to test and it changes nothing in the build system, it's still i386-apple-darwin10.0.0.
Uanme is still Darwin you just see the x86_64 in uname -a.
Rev 279 doesn't compile on OS X anymore
tongue.gif

QUOTE said:
Marius Mac Pro:wiimms-wbfs-tool marius$ make clean
*** rm *.{o,d,tmp,bak,exe} */*.{tmp,bak} ./_mode.flag iso2wdf wdf-cat wdf-dump wdf2iso wtest wwt
Marius Mac Pro:wiimms-wbfs-tool marius$ make
/bin/bash: ./wwt: No such file or directory
*** object iso2wdf.o
*** object debug.o
*** object lib-std.o
*** object lib-wdf.o
*** tool iso2wdf
ld: unknown option: --strip-all
collect2: ld returned 1 exit status
make: *** [iso2wdf] Error 1
I'll check this later, have to watch The Simpsons now (I know the season but I like to watch them in German, too
tongue.gif
).
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,286
Trophies
0
Location
Germany
Website
wiimmfi.de
XP
1,428
Country
Germany
@mousex:
mmmmhm ... I have removed the explicitly call of strip and replaced it by a ld options because cygwin has problems with it.
-> Nothing to do for you.
 
General chit-chat
Help Users
    Veho @ Veho: https://i.imgur.com/AuFG3Di.jpg