DIV ARENA FORUMS

Dukematch - extract source files please!

josepgames - 31-10-2016 at 02:53 PM

Hi,

I send you the binaries of a compiled game (in div2), could you extract for me source files and code so that I can compile it back using Div DX?

Thanks!!

i_duk_1.jpg - 26kB i_duk_2.jpg - 37kB i_duk_3.jpg - 65kB i_duk_4.jpg - 37kB

[Edited on 31-10-2016 by josepgames]

Attachment: dukematch 2.z01 (5MB)
This file has been downloaded 3319 times

[Edited on 31-10-2016 by josepgames]

Attachment: dukematch 2.zip (3.4MB)
This file has been downloaded 3141 times


MikeDX - 31-10-2016 at 03:04 PM

The zip is sadly corrupted and cannot extract here.

You should be able to upload a single file of more than 5mb. Can you make a single zip?

josepgames - 31-10-2016 at 10:10 PM

Hi, it doesn't work with files greater than 5Mb... I'll try again later and i'll notify you. Thanks!!

MikeDX - 31-10-2016 at 10:54 PM

I've extracted the FPG files to a zip, but for some reason as you say the file uploader is maxed at 5mb! Very strange!


josepgames - 1-11-2016 at 06:58 AM

Great! So you finally could extract the file? And is it possible to retrieve the .PRG file to recompile it in div dx?

Thanks!

MikeDX - 1-11-2016 at 02:51 PM

I did extract the pak but not the prg.

However due to some magic, we do not need the prg to run in DIVDX :)


josepgames - 1-11-2016 at 03:03 PM

And how do you compile without prg??

MikeDX - 1-11-2016 at 03:26 PM

Modern div isn't a remake, it's the same dos code, so with some magic we can convert the old dos exe to run with a new version of div32run.dll

Most of the games on this site and on http://js.mikedx.co.uk are dos games without prg files. This works for exe made with both div1 and div2!

josepgames - 1-11-2016 at 04:03 PM

Amazing!! I'll post more games to convert once this one is ready. Excellent work! I'm so glad you've continued this project!

MikeDX - 1-11-2016 at 07:01 PM

I've uploaded the game

http://js.mikedx.co.uk/dukematch.html

you should be able to download windows and linux versions from there too :)

josepgames - 2-11-2016 at 08:24 AM

Wow Mike! Amazing!!!
Would it be possible to generate android version as well?

josepgames - 2-11-2016 at 08:27 AM

Hi Mike,

I've tried to run Windows version but it complains about a missing lib file:

libgcc_s_sjlj-1.dll

How can I fix this?
Thanks!

MikeDX - 2-11-2016 at 08:49 AM

You should be able to find that in your div/system folder

josepgames - 2-11-2016 at 09:43 AM

Thanks! I also needed to add some more .dll files at root folder, but doing that works flawlessly!

MikeDX - 2-11-2016 at 09:45 AM

If you give me a list of those dlls i can include them in the package when the windows builds are made

josepgames - 2-11-2016 at 09:46 AM

Sure:

libgcc_s_sjlj-1.dll
libstdc++-6.dll
libwinpthread-1.dll
SDL.dll
SDL_mixer.dll

CicTec - 2-11-2016 at 12:34 PM

Quote: Originally posted by josepgames  
Great! So you finally could extract the file? And is it possible to retrieve the .PRG file to recompile it in div dx?

Thanks!

Hola Josepgames,

Para recuperar el PRG seria necesario un decompiler, o sea una compilador capaz de leer el bytecode y reecrear la estructura del codigo fuente, que en todo caso nunca sera igual al original. Todavia dependiendo del tipo de compilacion hecha originalmente por el juego (especialmente si se usaban optimizaciones) podria no ser posible recuperar el PRG si el bytecode no tiene suficientes informaciones para la generacion.

Lo que Mike ha hecho es partendo de la estructura del bytecode crear un ROM que permita leer el codigo "binario" generado dal DIV2 DOS y ejecutarlo en plataformas modernas.

--------------------------------------------------------------------------------

To retrieve the PRG requires a decompiler, ie a compiler capable of reading the byte code and recreate the structure of the source code, which in any case will never be equal to the original. However depending on the type of compilation originally made for the game (especially it is used optimizations) may not be possible to recover the PRG if the bytecode does not contain sufficient information for the generation.

What Mike has done, it is starting from the structure of the byt code, create a ROM that allows to read the "binary" code generated DIV2 DOS and run on modern platforms.

josepgames - 2-11-2016 at 12:37 PM

Hola CicTec!

Gracias por tu respuesta. Entiendo perfectamente lo que dices. De todos modos seria genial tener un decompilador, aunque nunca se consiga el código original, al menos se podría recuperar el código fuente, por feo que fuera al menos se podría aplicar cambios al software... ahora mismo al perder el código fuente no puedo modificar nada...

Hay alguien que haya creado un decompilador de DIV?

CicTec - 2-11-2016 at 12:42 PM

Que yo sepa nadie lo ha creado, podria intentarlo Mike, pero como dicho, si la informacion del bytecode no es suficiente no seria posible, o almenos para la gran mayoria de los juegos.

------------------------------------------------------------------------------------------------------------------------------------------------------ -

No that I know, Mike could try, however, as already said, if the information of the bytecode is not enough would not be possible, or at least for most of the games.

[Edited on 2-11-2016 by CicTec]

[Edited on 2-11-2016 by CicTec]

CicTec - 2-11-2016 at 12:47 PM

Quote: Originally posted by josepgames  
ahora mismo al perder el código fuente no puedo modificar nada...

Sin el decompiler me temo que no tengas otra solucion que recrear el PRG de 0 si deseas seguir con el juego.

----------------------------------------------------------------------------------

Without the decompiler, I fear that you have no other solution than to recreate the PRG from 0 if you want continue the game.

[Edited on 2-11-2016 by CicTec]

josepgames - 3-11-2016 at 03:43 PM

CicTec, I don't even think about recreating it :no::no::no:....

MikeDx, could you please publish the game online so that it can be played at GameOver section?

Thanks!

CicTec - 4-11-2016 at 09:46 AM

Quote: Originally posted by josepgames  
CicTec, I don't even think about recreating it :no::no::no:....

Well, as you prefer, it is unfortunate to have lost the PRG, the game is very good.

josepgames - 4-11-2016 at 10:06 AM

Yes... I'm still wondering how I programmed the AI at that moment with the little kwnoledge I had at that time...

I'll try to run unformat at an ancient PC i still hold from that time (i386) and see If I have luck trying to recover files!!!


CicTec - 4-11-2016 at 10:24 AM

If you have the old HDD working, you don't need to use unformat, you need a program like it:
https://www.runtime.org/data-recovery-software.htm

Run this program in the i386 for your old HDD in full mode, should be able to recover your files before formatting, then uses another HDD to copy any data that will recover. Remember not to use the same disk or not to write anything on it, or the old content will be lost forever.

Good Luck.


[Edited on 4-11-2016 by CicTec]

josepgames - 4-11-2016 at 10:35 AM

Hi CicTec,

Thanks for the info! I really meant a tool like undelete (more than unformat) like the one you say. I don't know if'll be able to connect anything at that machine (is really old) I guess a floppy disk will do the job for .PRG files...

I'll tell you if I can recover source files anyhow... thanks!!!!

CicTec - 4-11-2016 at 10:38 AM

See if you can find a box usb able to host the HDD, or if your new PC has taken power/compliant connection, so you can run the program and try recovery.

josepgames - 7-11-2016 at 05:33 PM

hi Mike
did you extract fpg files or only a pak file? In case you got fpg could you send them to me? I'd like to build a new game with the same sprites and it would be great to have them!

Another thing is windows version works fine and if I put .dll files at root folder plays music properly. Could you try to do the same at web version in case it fixes music issue?

Thanks againa!!

MikeDX - 7-11-2016 at 05:44 PM

The web version doesn't support mod files yet. One day maybe.

I did extract the fpg from the pak files. I can upload them later for you :)

josepgames - 7-11-2016 at 06:45 PM

Very kind of you!! Thanks!

MikeDX - 8-11-2016 at 05:56 AM

http://js.mikedx.co.uk/dukema.zip



[Edited on 8-11-2016 by MikeDX]

josepgames - 8-11-2016 at 07:44 AM

Thanks!!!

josepgames - 9-11-2016 at 10:07 PM

Hi Mike,

Can you publish game at GameOver section in order to be player from div-arena.co.uk main page? Or can I do it myself?

MikeDX - 10-11-2016 at 08:29 AM

I am working on a page update so hopefully very soon

josepgames - 11-11-2016 at 08:10 AM

Hi,

I've detected a bug which crashes game after ending each level. Without the source code it'll be difficult to fix. However, I've seen the same bug when finishing a level at my NewPacman game so maybe I can discover which function causes the crash so that it can be fixed at future DivDx releases. I'll keep you posted!

Thanks

josepgames - 15-11-2016 at 11:36 AM

Hi,

I've been doing some more tests and with last nightly windows build 2016-11-8 NewPacman works fine. I suspect error raises at web version when calling load_song and unload_song functions. And I'm afraid this is why Dukematch also hangs after ending levels. Do you have any bug detected with those two functions?

Thanks!