Hacking WBFSSync

Omega Frost

Well-Known Member
Newcomer
Joined
Jun 27, 2009
Messages
84
Trophies
0
XP
46
Country
Brazil
@Wiimm

For now, the only way to use cISO is using the console application (Console.exe) through the command:

unciso filein fileout -s

filein: source file, must be a cISO
fileout: destination file, output will be an iso or syncscrub
-s: optional parameter, extract the cISO to syncscrub instead of iso
 

Omega Frost

Well-Known Member
Newcomer
Joined
Jun 27, 2009
Messages
84
Trophies
0
XP
46
Country
Brazil
Interesting format, well organized and flexible, more than mine i have to admit because of the split, i'll see what i can do with it...
 

Wiimm

Developer
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
Omega Frost said:
Interesting format, well organized and flexible, more than mine i have to admit because of the split, i'll see what i can do with it...
I have already installed it into my wbfs tool and tested it: It works fine. With the additional tools iso2wdf and wdf2iso i have converted more than 1 million files (all files that users in a research institute collect; and yes WDF is not ISO depended) and compared the results: no errors found.
Only split support is missing. If you wait 2-3 weeks I will have implemented all and have written a sample implementation with comments.

BTW: The implementation has no tricks, it resides in the usual WBFS wrapper functions.
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
CRAP!!!! So I just fired up your program and it asked if I want to update. i said yes to the update and then i clicked on the settings screen and i get all this to pop up. if im not in the settings screen, i don't get the messages, but it eventually crashes.
errorwbfs.png
 

Omega Frost

Well-Known Member
Newcomer
Joined
Jun 27, 2009
Messages
84
Trophies
0
XP
46
Country
Brazil
Sorry, i found this bug but i forgot to fix it on v07, it will try to close the settings on every operation update, in 2.0.08 i changed it to only when the user try to change something.
 

gizmomelb

Well-Known Member
Member
Joined
Jul 13, 2006
Messages
926
Trophies
1
XP
1,658
Country
Australia
Hi, very interesting project and nice work so far!

I was wondering if you've got any information regarding Hermes cISO format please? I'd like to add read support for cISO format files to the Dolphin emulator but I'm not having any luck finding information regarding the cISO format.

Thank you.
 

Omega Frost

Well-Known Member
Newcomer
Joined
Jun 27, 2009
Messages
84
Trophies
0
XP
46
Country
Brazil
@gizmomelb

As far as i can understand unhexing values from a cISO, the file is build this way:

The Header has 32768 bytes, the size of a Wii Sector;
The first 4 bytes are the file id, the string 'CISO';
The next 4 bytes are the WBFS sector size used in the file, the variable is an unsigned int;
The next bytes are the wbfs sector usage table, each byte represents one sector where 0 is a not used sector.

There is also a padding after the usage table, because it does not have necessarily 32760 bytes, it's size depends of the wbfs sector size

Keep in mind that you need to find the number of wbfs sectors per disc used by the cISO file in order to know the usage table size, to do that:

Code:
//WiiSectorSize is a constant of size 32768
WiiSectorsPerWBFSSector = WbfsSectorSize / WiiSectorSize

//WiiSectorsPerDisc is a constant of size 143432 * 2
WBFSSectorsPerDisc = WiiSectorsPerDisc / WiiSectorsPerWbfsSector;

After the Header, there are the used sectors, each one with "WbfsSectorSize" bytes.
 

gizmomelb

Well-Known Member
Member
Joined
Jul 13, 2006
Messages
926
Trophies
1
XP
1,658
Country
Australia
Hi, thank you very much for the info - it certainly gives me something to get started with. I'll post here if I work it all out and add cISO support (and I'll look at WBF as well) to Dolphin. Thank you for your help and sharing of knowledge.
 

nubecoder

Well-Known Member
Newcomer
Joined
May 20, 2009
Messages
82
Trophies
0
Age
44
Website
www.nubecoder.com
XP
125
Country
United States
I'd like to add that it is very easy to adjust iso renaming code to support ciso, simply offset by one wii disc sector (32768).

While dealing with cISO for my prog I did the same as Omega Frost (using a hex editor to inspect and compare to a standard iso, etc) to get my initial info.

Also if it helps at all Hermes does include his source with every release.

=]
 

DarkMatterCore

Finding my light.
Developer
Joined
May 30, 2009
Messages
1,292
Trophies
1
Age
28
Location
Madrid, Spain
Website
github.com
XP
2,606
Country
Spain
This is such a good WBFS related program. I like the way you made the GUI,
biggrin.gif
. BTW, I noticed there was no Spanish language file, so...

1 = "Favoritos"
2 = "Escritorio"
3 = "Documentos"
4 = "Computadora"
5 = "Librería"
6 = "Carátulas"
7 = "Carátulas..."
8 = "Copiar juego desde un DVD al directorio actual"
9 = "Añadir carpeta a la librería"
10 = "Remover carpeta de la librería"
11 = "Cambiar vista"
12 = "Configuraciones"
13 = "Contribuye al proyecto WBFSSync"
14 = "Ayuda Online"
15 = "Formatear el dispositivo a WBFS"
16 = "Cambiar el nombre y/o el código/TitleID del juego seleccionado"
17 = "Organizar los contenidos de la carpeta"
18 = "Operaciones"
19 = "Registro"
20 = "Portapapeles"
21 = "Disco local"
22 = "Disco removible"
23 = "Unidad WBFS"
24 = "Unidad de CD/DVD"
25 = "Desconocido"
26 = "Pendiente"
27 = "Cancelado"
28 = "Desconocido"
29 = "Copiando"
30 = "Moviendo"
31 = "Eliminando"
32 = "Cambiando"
33 = "Descomprimiendo RAR"
34 = "Descomprimiendo Scrub"
35 = "Comprimiendo Scrub"
36 = "Formateando"
37 = "Clonando dispositivos"
38 = "Descargando carátulas"
39 = "Actualizando"
40 = "Operación"
41 = "Fuente"
42 = "Destino"
43 = "Progreso"
44 = "Nombre"
45 = "Tipo/Código"
46 = "Región"
47 = "Tamaño"
48 = "Carpeta de archivos"
49 = "Archivo"
50 = "Imagen de disco de Wii"
51 = "Imagen de disco de Wii comprimida"
52 = "Unidades de disco duro"
53 = "Dispositivos de almacenamiento extraíble"
54 = "Dispositivos WBFS"
55 = "Esta carpeta está vacía."
56 = "Región desconocida"
57 = "Dispositivo inválido"
58 = "No es posible mover archivos a esta carpeta"
59 = "El dispositivo no está listo"
60 = "El dispositivo está en uso"
61 = "Acceso denegado"
62 = "¿Estás seguro de querer remover la carpeta seleccionada de la librería?"
63 = "¿Estás seguro de querer cancelar la operación en progreso?"
64 = "¿Estás seguro de querer cancelar todas las operaciones en espera?"
65 = "Selecciona una unidad en donde se exportarán las carátulas"
66 = "Hay un archivo con el mismo nombre en este directorio. ¿Quieres reemplazarlo?"
67 = "¿Estás seguro de querer eliminar el(los) archivo(s) seleccionado(s) permanentemente?"
68 = "¿Estás seguro de querer eliminar la(s) caráctula(s) seleccionada(s) permanentemente?"
69 = "¿Estás seguro de querer remover la(s) carpeta(s) seleccionada(s) de la librería?"
70 = "Uno o más ficheros no pueden ser eliminados"
71 = "No fue posible renombrar el archivo"
72 = "El formato de unidad eliminará todos los datos encontrados en la partición. ¿Quieres continuar?"
73 = "El campo {0} contiene carácteres ilegales"
74 = "El campo {0} debe poseer la estructura 'Código - Nombre', en donde 'Código' debe poseer 6 carácteres y 'Nombre' no debe dejarse en blanco y tener por lo menos {1} carácter"
75 = "¿Aplicar los cambios en las configuraciones antes de salir?"
76 = "Una nueva actualización está disponible '{0}'. ¿Quieres descargarla ahora mismo?"
77 = "Nombre"
78 = "Ruta"
79 = "Ancho"
80 = "Alto"
81 = "Explorador"
82 = "Reproducir sonido al cambiar de directorio"
83 = "Cerrar la ventana de formato"
84 = "Carátulas:"
85 = "Descargar carátulas automáticamente"
86 = "Descargar carátulas 3D *"
87 = "Exportar a una unidad compatible"
88 = "Actualizar: *"
89 = "Sólo notificar"
90 = "Idioma *"
91 = "Piel/Tema: *"
92 = "Registro:"
93 = "Guardar registro"
94 = "Guardar registro de excepciones/errores"
95 = "Excluir unidades de un formato:"
96 = "Loaders:"
97 = "Editar"
98 = "Aplicar"
99 = "Cancelar"
100 = "OK"
101 = "* El programa debe reiniciarse para que los cambios tengan efecto"
102 = "Código - Nombre"
103 = "Editar Loader"
104 = "Renombrar Disco"
105 = "Selecciona una carpeta a añadir a la librería"
106 = "Descargar y sincronizar carátulas"
107 = "Exportar carátulas a {0}"
108 = "Organizar"
109 = "Cortar"
110 = "Copiar"
111 = "Pegar"
112 = "Eliminar"
113 = "Renombrar"
114 = "Formatear"
115 = "Comprimir"
116 = "Descomprimir"
117 = "Configuraciones"
118 = "Acerca de..."
119 = "Ayuda"
120 = "Contribuir al proyecto WBFSSync"
121 = "Cerrar"
122 = "Enviar a"
123 = "Añadir carpeta a la librería"
124 = "Remover todas las carpetas de la librería"
125 = "Carátulas"
126 = "Lado a lado"
127 = "Lista"
128 = "Detalles"
129 = "Nunca"
130 = "Siempre"
131 = "Una vez al día"
132 = "Una vez a la semana"
133 = "Cargando configuraciones"
134 = "Cargando idioma {0}"
135 = "Error al cargar el idioma. Se usará el idioma por defecto: 'Pt-Br'"
136 = "Mapear dispositivos"
137 = "Encontrados {0} dispositivo(s), {1} WBFS"
138 = "Cargando lista de carátulas"
139 = "Encontrada(s) {0} carátula(s)"
140 = "Cargando librería"
141 = "Encontrado(s) {0} juego(s) en {1} carpeta(s)"
142 = "Cargando piel/tema {0}"
143 = "Error al cargar piel/tema {0}. Se usará aquel por defecto: {1}"
144 = "Fallo crítico: piel/tema por defecto no encontrado"
145 = "Aplicando piel/tema"
146 = "Sincronizando carátulas"
147 = "Encontrada(s) {0} nueva(s) carátula(s)"
148 = "Imposible analizar loader: el nombre no puede estar vacío"
149 = "Imposible analizar loader '{0}': el parámetro 'Ancho' o 'Largo' no es un número entero positivo"
150 = "Actualizando dispositivos"
151 = "Actualizando librería"
152 = "Listo"
153 = "No fue posible descargar la carátula '{0}': el archivo no existe"
154 = "El archivo '{0}' no existe"
155 = "El directorio '{0}' no existe"
156 = "El dispositivo '{0}' no está listo"
157 = "No hay espacio libre suficiente para completar la operación"
158 = "El archivo posee un formato no soportado o está corrupto"
159 = "Imposible buscar nuevas actualizaciones del programa"
160 = "Imposible completar la descarga de la actualización '{0}'"
161 = "El programa ya está actualizado"
162 = "Actualización completada"
163 = "La actualización fue cancelada por el usuario"
164 = "El objeto {0} produjo un error desconocido {1}"
165 = "{0}: OK" //Código 0
166 = "Piel/tema por defecto no encontrado"
167 = "Un error inesperado ocurrió en la ejecución del programa y éste será cerrado. Si el problema persiste, reporta el error en el sitio web http://wbfssync.codeplex.com/"
168 = "Extraer juegos de forma automática para Scrubbearlos"
169 = "Las actualizaciones surtirán efecto cuando reinicies la aplicación"
170 = "Unidades ignoradas por la aplicación: *"
171 = "La carátula {0} está corrupta y será eliminada"
172 = "¿Aplicar las configuraciones?"
173 = "Actualizar la versión de SyncScrub de forma automática"

//Códigos de erro para WBFSDevice
-1 = "{0}: Fallo"
-2 = "{0}: Operación abortada"
-3 = "{0}: Código de identificación incorrecto para la partición(Magic) {1}"
-4 = "{0}: Guardado el tamaño del sector no coincidente desde la información de la partición '{1}'"
-5 = "{0}: Guardado el conteo de sectores no coincidentes desde la información de la partición '{1}'"
-6 = "{0}: Acceso denegado"
-7 = "{0}: No hay suficientes bloques para continuar con la operación"
-8 = "{0}: El disco no es uno válido de Wii"
-9 = "{0}: Disco no encontrado"
-10 = "{0}: Un disco con el mismo nombre o código ya existe {1}"
-11 = "{0}: Error crítico"
-12 = "{0}: Error nativo de Windows '{1}'"
-13 = "{0}: Argumento inválido '{1}'"
-14 = "{0}: El nombre del disco es muy largo y será reducido a '{1}'"
-15 = "{0}: El código del disco es muy largo y será reducido a '{1}'"
-16 = "{0}: El código del disco es muy pequeño y será rellenado con '{1}'"

//Códigos de erro para IOManager
-1001 = "{0}: Fallo"
-1002 = "{0}: Una operación ya está en progreso"
-1003 = "{0}: Proceso inválido"
-1004 = "{0}: El proceso ha sido cerrado"
-1005 = "{0}: Argumento inválido '{1}'"
-1006 = "{0}: El contexto está cerrado y no puede ser usado"
-1007 = "{0}: El proceso está en uso por otro contexto"
-1008 = "{0}: El contexto bloqueó el proceso"
-1009 = "{0}: El contexto no bloqueó el proceso"
-1010 = "{0}: Error nativo de Windows '{1}'"
-1011 = "{0}: Acceso denegado"
-1012 = "{0}: Error durante la operación de búsqueda '{1}'"
-1013 = "{0}: Error durante la operación de lectura '{1}'"
-1014 = "{0}: Error durante la operación de escritura '{1}'"
-1015 = "{0}: Error al cerrar el archivo '{1}'"
-1016 = "{0}: Error durante el cerrado del proceso"
-1017 = "{0}: Error, el proceso todavía está abierto"

//Códigos de erro para ScrubDisc
-2001 = "{0}: El códigop de identificación de SyncScrub es incorrecto '{1}'"
-2002 = "{0}: Versión no soportada por la aplicación '{1}'"
-2003 = "{0}: Incoherencia de datos en el disco"

-2004 = "{0}: Argumento inválido '{1}'"
-2005 = "{0}: Fallo"
-2006 = "{0}: Operación abortada"

Maybe that might come in handy for some people.
 

Omega Frost

Well-Known Member
Newcomer
Joined
Jun 27, 2009
Messages
84
Trophies
0
XP
46
Country
Brazil
As you can notice, the updates are less frequent, don't worry, the project is still up, but i am in a very busy and probably will be until jan ~ feb 2010, so the updates can be less frequent, i will try to release a new update this week including some bug fixes with the library (not critical, don't worry).

@nubecoder

Thanks, i'll check the code to see if there's any more aspect of the cISO to consider.

@PabloACZ

Thanks for the contribution, i will upload the code to the SVN repository and will be included with the next versions.
 

pccfatman

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
208
Trophies
0
XP
77
Country
United States
Hey Omega,

Thanks for the great proggy, I love it. Can't wait to see what else you have coming
smile.gif


Just a note, when I first started the program and it was updating covers, I entered the config to change language and it kept asking to save(i think, I dont read spanish)

Perhaps in a future release you could have the proggy ask what default language to use when it is started for the first time, although it wasn't too hard to figure out how to switch it, it might be nice for others.

Another suggestion (if it's not already there and i'm just blind). Would it be possible to add a "Download Cover" option to the right click context menu to allow downloading of a single cover. I also turned off auto download covers, but after that can't seem to download covers at all unless I turn it back on and restart the program.

Also, would it be possible to add drag/drop functionality to the program, so I could drag iso/ciso/syncscrub files from my pc to my wbfs drive (dunno how to implement the reverse other than a context menu at drop to determine write to iso or syncscrub)

Would it also be possible to add a large cover view (for us blind folks)?

Thats all I can think of atm, I'll post more later if I find any bugs or think of any more work I can add to your already busy schedule
smile.gif
 

gizmomelb

Well-Known Member
Member
Joined
Jul 13, 2006
Messages
926
Trophies
1
XP
1,658
Country
Australia
Omega Frost - I was wondering if you might please consider adding cISO support to your transfer manager as well - as I've got all of my cISO images as files archived on an NTFS partition (which I generally use WBFS-Manager to them transfer them to my 120GB WBFS formatted USB drive when I actually want to play them (but WBFS-Manager has a heap of issues, notably not treating files >2GB correctly etc.)

Thank you.
 

pccfatman

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
208
Trophies
0
XP
77
Country
United States
I believe it already has preliminary cISO via the console program, and in one of his posts he said he still needed to implement it into the GUI.

I thought of something else
tongue.gif


When using the rename function, would it be possible to separate the GameID and the title, I seem to keep renaming the ID right out of my games and causing an unhandled exception, I apparently have clumsy fingers
 

pccfatman

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
208
Trophies
0
XP
77
Country
United States
Just came up with another one, If I have 2 copies of a game, one pal and one NTSC with different gameID's but the same name, I can't add them both to the WBFS drive without renaming one of them.
Im assuming you made it check based on the name and not the gameID, is this the case or am I missing something?
 

hackotedelaplaqu

Well-Known Member
Member
Joined
Jan 10, 2009
Messages
606
Trophies
1
Website
wiibrew.org
XP
1,196
Country
France
Same issue as pccfatman here with my custom GH3 games.
Ids aren't the same but all named "GH3 Custom".
Customs covers don't display either (only one, the same for all the 5 games).

Also, I noticed that Tale of Symphonia is shown as a PAL game but it's NTC-U.
Any idea about that ?

Finaly, the app crashs when you set library dirs but they arent accessible (eg : on a removable media).

Besides, it's a very good WBFS tool !
Keep the good work !
 

Omega Frost

Well-Known Member
Newcomer
Joined
Jun 27, 2009
Messages
84
Trophies
0
XP
46
Country
Brazil
@pccfatman

I am aware of this bug, i have already fixed it with a few other errors and i am doing a full test because of some concurrent access to library isos are hanging the application.

I have also added the Drag'n'Drop and individal (selected isos) cover download, the drag'n'drop is only from the PC to WBFSSync.

You are having problems with the rename functionality? Could you please post the Exception code?

As for the same-name bug, it isn't a bug, the program checks both Code and Name to avoid mistaken results, some WBFS routines that i implemented allow get the disc by name, also i don't know how other managers work to get the discs.

About the Language problem, since the .inf names are an ISO standard for naming, the next release will do auto selection on startup or fallback to English instead of Portuguese.

The covers were supposed to be just a 'hint' when browsing the game, larger covers can be done, but it can take a while...

@hackotedelaplaque

Is your 'Tales of Symphonia' a PAL recoded to NTSC?

@gizmomelb

WBFSSync grew a little bit on supported formats, i need to redesign it's structure to allow a better implementation for all files, it's a major work. Doing 'if' chains inside every code to get the format is starting to get uggly...

You can aways count on the COnsole application
 

pccfatman

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
208
Trophies
0
XP
77
Country
United States
Hey Omega,

Thanks for the response, here is a ss of the exception, hope it helps

exceptions.jpg



This error occurs when renaming a file but leaving off the gameID and just putting the name of the game, IE: XXXXX - Game Name, Renamed to just Game name

I get a few games that are NTSC that show as PAL as well, although I couldn't tell you the titles, I just remember running across them at one point, but since it didn't really matter to me I didn't think to say anything (my bad)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Crazy people actually spend $50 on that stuff
  • BigOnYa @ BigOnYa:
    Towelie runs my farm, he's awesome.
  • SylverReZ @ SylverReZ:
    @K3Nv2, Polly is still around from what I've heard.
  • K3Nv2 @ K3Nv2:
    @SylverReZ, is Pollys alt I knew it
  • BigOnYa @ BigOnYa:
    Yea I see him every once whi!e , incognito
  • SylverReZ @ SylverReZ:
    @K3Nv2, I'm not him. Keep looking.
    +1
  • K3Nv2 @ K3Nv2:
    Still don't know why he left unless someone really hurt his feelings
  • K3Nv2 @ K3Nv2:
    Don't know why people get so emotional online just get over it ffs
    +2
  • BigOnYa @ BigOnYa:
    He was the ass of gbatemp, everyone knocked on him, I honestly felt bad, even though I was guilty myself, but he egged it all on himself,
  • BigOnYa @ BigOnYa:
    But he still here, but under dif name, he pm me sometimes still even.
  • K3Nv2 @ K3Nv2:
    It's like they think we'll be in their bed pissing on it the next day
  • BigOnYa @ BigOnYa:
    I feel like gbatemp should make t-shirts or memorabilia to remember the lost ones. I bet the Polly shirts would sell out quick.
  • K3Nv2 @ K3Nv2:
    Nah that could actually bring lawsuits
  • K3Nv2 @ K3Nv2:
    Tempsuits
  • BigOnYa @ BigOnYa:
    PollySuits
  • BigOnYa @ BigOnYa:
    Your correct, Somebody would be guilty and there would be riots, then they storm the gbatemp capitol,
  • K3Nv2 @ K3Nv2:
    Online or not there are still certain rights that judges would have no issue handing out a warrant over
  • K3Nv2 @ K3Nv2:
    Just look at Kim dotcom
  • BigOnYa @ BigOnYa:
    Honestly I'm scared to, from you, but ok, lemme turn on vpn, virtual machine, private browser first
  • K3Nv2 @ K3Nv2:
    Remember that Alexa robot I gifted you
  • K3Nv2 @ K3Nv2:
    And that laptop Webcam you never tapped up
  • BigOnYa @ BigOnYa:
    That robot is here somewhere, I hear it moving around at night, but I haven't seen it for months.
  • BigOnYa @ BigOnYa:
    Oh that laptop I give to ancientboi, so you been watching him for months, and he's been watching you
  • K3Nv2 @ K3Nv2:
    Oh good more than enough material for the fbi
    +1
  • BigOnYa @ BigOnYa:
    Damn its 5 in morn, I gotta Go wake your mum and send her to work. Check ya later.
    BigOnYa @ BigOnYa: Damn its 5 in morn, I gotta Go wake your mum and send her to work. Check ya later.