Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
Emiliano Fierro
- Posts: 9
- Joined: 16 Nov 2019 20:21
- Location: Jiutepec, Mexico
#1
Post
by Emiliano Fierro » 16 Nov 2019 20:26
Hello everyone

I am new, my name is Emiliano Fierro and I am very interested in retro games
Recently I had a problem with hex codes
I want to convert some hex codes to the codes used by MS-DOS
I hope you help me
David was not clear in his explanation so there are two options in 2 cases
-
penpen
- Expert
- Posts: 2009
- Joined: 23 Jun 2013 06:15
- Location: Germany
#2
Post
by penpen » 17 Nov 2019 03:58
Emiliano Fierro wrote:David was not clear in his explanation so there are two options in 2 cases
Could you give some more context information and also link to the post(s) you are referring to?
Emiliano Fierro wrote:I want to convert some hex codes to the codes used by MS-DOS
Intuitively i would use environment string manipulation for that (but that might be suboptimal in your code; untested alphanumeric example):
Code: Select all
@echo off
setlocal enableExtensions disableDelayedExpansion
set "table= 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ _ abcdefghijklmnopqrstuvwxyz"
echo(%table:~0x30,1% to %table:~0x39,1%
echo(%table:~0x41,1% to %table:~0x5A,1%
echo(%table:~0x5F,1%
echo(%table:~0x61,1% to %table:~0x7A,1%
goto :eof
penpen
-
Emiliano Fierro
- Posts: 9
- Joined: 16 Nov 2019 20:21
- Location: Jiutepec, Mexico
#4
Post
by Emiliano Fierro » 17 Nov 2019 10:47
I come from another forum of The game Prince of Persia
But I will not give more details
So I wanted to change some colors and asked for help, David answered and was not very clear
Today in the morning I used a hex editor and did what I needed
But I still want to learn to use MS-DOS
-
aGerman
- Expert
- Posts: 4708
- Joined: 22 Jan 2010 18:01
- Location: Germany
#6
Post
by aGerman » 17 Nov 2019 13:45
Seems you are actually talking about DOS. Can't recall what opportunities you have on DOS to change binary data. But I'm afraid you can't do that using Batch scripting.
Steffen
-
ShadowThief
- Expert
- Posts: 1167
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
#7
Post
by ShadowThief » 17 Nov 2019 16:08
aGerman wrote: ↑17 Nov 2019 13:45
Seems you are actually talking about DOS. Can't recall what opportunities you have on DOS to change binary data. But I'm afraid you can't do that using Batch scripting.
Steffen
I'm pretty sure the only option for something that old is DEBUG.exe
-
Emiliano Fierro
- Posts: 9
- Joined: 16 Nov 2019 20:21
- Location: Jiutepec, Mexico
#8
Post
by Emiliano Fierro » 18 Nov 2019 11:33
Does anyone know the name of the codes used by MS-DOS, I need it to make the conversion
From hex to ???
-
aGerman
- Expert
- Posts: 4708
- Joined: 22 Jan 2010 18:01
- Location: Germany
#9
Post
by aGerman » 18 Nov 2019 12:25
Umm, from HEX to binary. But if you are able to use a HEX editor wherein you change the original binary file then the changed HEX values will be automatically converted back to binary as soon as you save the file.
Steffen
-
Emiliano Fierro
- Posts: 9
- Joined: 16 Nov 2019 20:21
- Location: Jiutepec, Mexico
#10
Post
by Emiliano Fierro » 18 Nov 2019 13:16
aGerman wrote: ↑18 Nov 2019 12:25
Umm, from HEX to binary. But if you are able to use a HEX editor wherein you change the original binary file then the changed HEX values will be automatically converted back to binary as soon as you save the file.
Steffen
Thanks
Do you know about any code converter?
The thing is that I want to make the files since 0
-
aGerman
- Expert
- Posts: 4708
- Joined: 22 Jan 2010 18:01
- Location: Germany
#11
Post
by aGerman » 18 Nov 2019 13:38
No. If you want to program the binary file you need to get the source code and learn the programming language used. The program to make source code to binary program code is called compiler.
To program your own game is probably more than two years of intensive learning ahead of you though.
Steffen
-
Emiliano Fierro
- Posts: 9
- Joined: 16 Nov 2019 20:21
- Location: Jiutepec, Mexico
#12
Post
by Emiliano Fierro » 18 Nov 2019 13:47
I need another format (not the binary)
I need this other format
Look at the example of the binary code
-
Attachments
-

- Screenshot_20191118-134603.png (333.33 KiB) Viewed 10492 times
-

- Screenshot_20191118-134447.png (352.41 KiB) Viewed 10492 times
-
Emiliano Fierro
- Posts: 9
- Joined: 16 Nov 2019 20:21
- Location: Jiutepec, Mexico
#13
Post
by Emiliano Fierro » 18 Nov 2019 13:51
Just consider that I'm not a programmer
I want to learn more about codes
One day I will become an engineer and I want to make my own games for the MS-DOS OS and open them with DosBox but nobody will teach me
aGerman: Right, I won't send you any PM like “answer my post” or so
This is why I need a code converter
Last edited by
Emiliano Fierro on 18 Nov 2019 13:56, edited 1 time in total.
-
aGerman
- Expert
- Posts: 4708
- Joined: 22 Jan 2010 18:01
- Location: Germany
#14
Post
by aGerman » 18 Nov 2019 13:54
The subject of this forum is Batch scripting. Please explain what your question has to do with it.
Steffen
-
Emiliano Fierro
- Posts: 9
- Joined: 16 Nov 2019 20:21
- Location: Jiutepec, Mexico
#15
Post
by Emiliano Fierro » 18 Nov 2019 13:58
aGerman wrote: ↑18 Nov 2019 13:54
The subject of this forum is Batch scripting. Please explain what your question has to do with it.
Steffen
I just want a code converter from the Hex to this format
That's all
-
Attachments
-

- Screenshot_20191118-134603.png (333.33 KiB) Viewed 10484 times