WIN - DOS conversion
Moderator: Graphics Moderators
WIN - DOS conversion
This is a requested tutorial how to convert dos graphics to win and vice versa.
I will explain first how to convert .exe files from win to dos.
1. Find out to which grf file the .exe is corresponding to, on dos mode use the command: nameoffile.exe -l. You will also get information about the changed spritenumbers. Remember them.
2. Rename the corresponding grf file to a win file. Do this by adding a "r" in the filename. For example trg1.grf will be trg1r.grf. Execute the exe file. Rename the file back to its original name.
3. Decode the grf file. You can use the grf wizard for this, get it on Andrex`s site. You will be asked which colour palette should be used, take the Win palette. You will get a folder named "sprites". Rename it to "spriteswin", or whatever you want. Now decode the file again, using the dos palette. This is necessary when the exe file changes the size of the sprite.
4. You now have two pcx - files, one with the win colours, one with the dos colours. For the next step you can use any graphic program which can handle pcx files. Open the file with the win palette (in the spriteswin folder), copy the sprites you have remembered in the first step and copy them in the file with the dos palette. They must be on the same place, do this careful. Save the file. You will not need the win palette file (yes, in the sriteswin folder) anymore, delete it.
5. Encode the sprites now, use again the wizard for the easiest way. You can use also the wizard to create an exe file for your conversion.
6. Sometimes there are graphic errors like blinking dots, you have to remove them manually. Do this by changing the colour with a similar one. But this is very seldom.
A dos - win conversion works on the same way, but have in mind that you have to rename the grf file from win to dos (remove the "r"), copy the sprites from the dos palette pcx file....
For a grf conversion, like the traffic sets for example, start at step 3. You will have to copy/paste all sprites in the pcx file.
This looks very complicated, maybe it is not the best way to do this, but it works well, and that is the point. Try it a few times, you will understand why and how it works, and you can convert a file in a few minutes. Or ask someone to do it for you, for example me.
I will explain first how to convert .exe files from win to dos.
1. Find out to which grf file the .exe is corresponding to, on dos mode use the command: nameoffile.exe -l. You will also get information about the changed spritenumbers. Remember them.
2. Rename the corresponding grf file to a win file. Do this by adding a "r" in the filename. For example trg1.grf will be trg1r.grf. Execute the exe file. Rename the file back to its original name.
3. Decode the grf file. You can use the grf wizard for this, get it on Andrex`s site. You will be asked which colour palette should be used, take the Win palette. You will get a folder named "sprites". Rename it to "spriteswin", or whatever you want. Now decode the file again, using the dos palette. This is necessary when the exe file changes the size of the sprite.
4. You now have two pcx - files, one with the win colours, one with the dos colours. For the next step you can use any graphic program which can handle pcx files. Open the file with the win palette (in the spriteswin folder), copy the sprites you have remembered in the first step and copy them in the file with the dos palette. They must be on the same place, do this careful. Save the file. You will not need the win palette file (yes, in the sriteswin folder) anymore, delete it.
5. Encode the sprites now, use again the wizard for the easiest way. You can use also the wizard to create an exe file for your conversion.
6. Sometimes there are graphic errors like blinking dots, you have to remove them manually. Do this by changing the colour with a similar one. But this is very seldom.
A dos - win conversion works on the same way, but have in mind that you have to rename the grf file from win to dos (remove the "r"), copy the sprites from the dos palette pcx file....
For a grf conversion, like the traffic sets for example, start at step 3. You will have to copy/paste all sprites in the pcx file.
This looks very complicated, maybe it is not the best way to do this, but it works well, and that is the point. Try it a few times, you will understand why and how it works, and you can convert a file in a few minutes. Or ask someone to do it for you, for example me.
A little more feedback on Graphic files found in newgrf folder:
they can be changed easyer than .exe file, use this:
to convert such file to DOS...
they can be changed easyer than .exe file, use this:
Code: Select all
grfcodec -e tempenh2w.grf -m 1
copy tempenh2w.grf tempenh2.grf
grfcodec -e tempenh2w.grf
Dinges
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Mostly GRF files have that...
Dinges
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
So, don't do it, unless you are sure you going convert all sprites...
I glued this topic, I hope you don't mind...
I glued this topic, I hope you don't mind...
Dinges
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
So to Windows it should be as easy asDinges wrote:A little more feedback on Graphic files found in newgrf folder:
they can be changed easyer than .exe file, use this:
to convert such file to DOS...Code: Select all
grfcodec -e tempenh2w.grf -m 1 copy tempenh2w.grf tempenh2.grf grfcodec -e tempenh2w.grf
Code: Select all
grfcodec -e tempenh2.grf -m 0
copy tempenh2.grf tempenh2w.grf
grfcodec -e tempenh2w.grf
it does, I copyed, not moved it...
remember what it does
1. Make the file for DOS
2. Copy the file with another name (usualy withour 'w')
3. Make the file for WIN
Rember that if you do this, you should work in the pallete you make last (this time it is WIN)
remember what it does
1. Make the file for DOS
2. Copy the file with another name (usualy withour 'w')
3. Make the file for WIN
Rember that if you do this, you should work in the pallete you make last (this time it is WIN)
Dinges
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Code: Select all
grfcodec -e tempenh2w.grf -m 1
copy tempenh2w.grf tempenh2.grf
grfcodec -e tempenh2w.grf
- encode tempenh2w.grf to DOS palette
- make a copy of tempenh2w.grf named tempenh2.grf
- encode tempenh2w.grf again
So actually the copy is the version that should work onder DOS, right?
yes
Dinges
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
file like DBset, tempenh and other graphic files found in newgrf folder should work fine...
Dinges
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
You say you couldn't convert DBset
hmm, I wonder how MB made it then...
hmm, I wonder how MB made it then...
Dinges
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
hmmm, my tempenh DOS worked didn't itHyronymus wrote:No, I meant converting from DOS to Windows in general. And I suppose MB started in Windows and converted to DOS, something that does seem to work.
Dinges
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Longvehicles DOS seems to work, nobody cries about itGeorge wrote:If you my long vehicles are correct in dos, than win->dos convertion works. I can't check the dos version myself.Hyronymus wrote:No, I meant converting from DOS to Windows in general. And I suppose MB started in Windows and converted to DOS, something that does seem to work.
Dinges
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Who is the other person in me?
my Blog (dutch) - my Last.fm profile
Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
Who is online
Users browsing this forum: Semrush [Bot] and 17 guests