中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-15 02:01
47,813 topics / 349,902 posts / today 4 new / 48,257 members
DOS软件下载 & 游戏分享 (下载室) » Wrote a software for converting HD-COPY IMG to ordinary IMA format floppy disk images
Printable Version  9,055 / 22
Floor1 rgwan Posted 2018-03-20 00:22
初级用户 Posts 8 Credits 22
Cut the chatter, post the source code!

https://github.com/rgwan/hdcopy-tools

Compiled program download:

http://upload.cn-dos.net/img/2357.zip

Also, looking for the extended font of UCDOS 3.1! Greatly appreciated! Planning to do some compression and optimization so that they can continue to be useful!

[ Last edited by rgwan on 2018-3-20 at 00:23 ]
Floor2 LoggerVick Posted 2018-03-20 00:31
中级用户 Posts 212 Credits 365
But maybe few people will download your attachment. I'll give it a bump first.
Floor3 LoggerVick Posted 2018-03-20 00:36
中级用户 Posts 212 Credits 365
Originally posted by rgwan at 2018-3-20 00:22:
Cut the chatter, post the source code!

https://github.com/rgwan/hdcopy-tools

Download compiled programs:

http://upload.cn-dos.net/img/2357.zip

Also seeking UCDOS 3.1 version expansion ...

I have inquired about the font in the alliance group I joined. If available, I should prompt you to download from that group.

[ Last edited by LoggerVick on 2018-3-20 at 00:46 ]
Floor4 rgwan Posted 2018-03-20 08:46
初级用户 Posts 8 Credits 22
Floor5 crshen Posted 2018-03-20 12:19
中级用户 Posts 126 Credits 447
The program is good, but the English sentences are a bit inconsistent. Earlier it's decompress, later it's Decode, there's a bit of a difference between the two. Also, I have a small suggestion. For such DOS programs, it's best to use TC or BC, in DOS text format. GCC is a bit complicated for many beginners. The C99 standard is relatively late, and the program only uses the data types in stdint.h. If it's changed to the older standard C89, it's more convenient for everyone to learn.
Floor6 crshen Posted 2018-03-20 13:25
中级用户 Posts 126 Credits 447
Just switched to TC2.0, and serious problems were found during testing under DOS after compilation. It seems that the analysis of the img format of hd-copy is not comprehensive. The img confirmed to be of hd-copy 2.0a cannot be extracted, only a 32k header is written. Then tested the gcc-compiled version, which is completely incompatible with DOS, can run under cmd, but exits with an error when extracting the img.
Floor7 crshen Posted 2018-03-20 13:38
中级用户 Posts 126 Credits 447
Since the source code is under the awesome WTFPL open source license, I just modified it randomly.

The DOS version source code can be seen in the 14th floor below, and the download address is on the 15th floor.



[ Last edited by crshen on 2018-3-21 at 16:24 ]
Floor8 rgwan Posted 2018-03-20 18:59
初级用户 Posts 8 Credits 22
Can you send me the faulty Image? Additionally, this program doesn't actually run in a DOS environment. It's designed to work with Windows/Linux and for use in virtual machines.

Also, I made some fixes, not sure if they work for your Image.



[ Last edited by rgwan on 2018-3-20 at 19:01 ]
Floor9 LoggerVick Posted 2018-03-20 22:11
中级用户 Posts 212 Credits 365
Originally posted by rgwan at 2018-3-20 18:59:
Can you send me the faulty Image? Additionally, this program does not actually run in a DOS environment. It is designed to work with Windows/Linux for use with virtual machines.

Furthermore, I have made some fixes, not sure about ...

He doesn't add QQ friends, you can join the group and search for crshen then he will see and can send it to you.
Floor10 LoggerVick Posted 2018-03-20 22:38
中级用户 Posts 212 Credits 365
Or try the new DOS era commemorative CD, the email left by crshen
Floor11 LoggerVick Posted 2018-03-20 23:06
中级用户 Posts 212 Credits 365
crshen:@[Forum]Willard knows that I'm on night shift at work today and can't reply to him. I won't sleep all night, and I'll need to sleep the whole day tomorrow. I estimate I'll reply to him after 4 PM tomorrow.
Floor12 crshen Posted 2018-03-21 15:36
中级用户 Posts 126 Credits 447
Reply to rgwan:
After testing, the program can basically decompress the img of HD - copy, but there are some flaws in the source code:
1. The for loop of i is obviously wrong. Looking at the img format document, byte tracks; // total tracks - 1, here it is counted from 0, 80 tracks are displayed as 79, so it is necessary to change for (i = 0; i <= maxTrackCount; i++) to otherwise, some relatively full disks will lack one track of data.
2. For the judgment of k == 0 in for (k = 0; k < dataLen; k++), it will be carried out tens of thousands of times for almost each track, which affects the efficiency. It can be changed to:
escByte = payload[0];
for (k = 1; k < dataLen; k++){}
Floor13 crshen Posted 2018-03-21 15:44
中级用户 Posts 126 Credits 447
Software testing environment:
1. Ubuntu 16.04, compiled with gcc, runs normally in the command line;
2. Win7 x64 + CodeBlocks 17.12 mingw, runs normally in the cmd environment;
3. XP + cfree5.0 default gcc3.45, runs normally in the cmd environment;
4. DOS 6.22 + Turbo C 2.0, runs normally, copied to win98, runs normally under command.

Testing methods:
1. Disk image, select 10 HD-COPY img from the starting DOS website of mys, including 1.44M and 1.2M;
2. Execute with a single command line;
3. Execute with a batch script: for %i in (dir *.img) do dehd.exe %i dest\%i (convert all HD-COPY format img in the current directory to standard format img, and save to the same name file in the dest directory).
Floor14 crshen Posted 2018-03-21 15:51
中级用户 Posts 126 Credits 447
First, thank rgwan for sharing the source code. Here is the DOS version I modified, which can be compiled with TC2.0 or BC3.1.

Due to the memory limitations of DOS, it's impossible to directly apply for a large amount of memory like in protected mode. Therefore, data decoding needs to frequently perform file reads and writes. The disk IO speed is naturally not as fast as memory, and the efficiency is worse than the CMD version.



[ Last edited by crshen on 2018-3-21 at 16:27 ]
Floor15 crshen Posted 2018-03-21 16:08
中级用户 Posts 126 Credits 447
The source code files and pre-compiled programs can be downloaded from Baidu Netdisk:
DOS Software Sharing\Extract HD-COPY image to standard img.rar

pan.baidu.com/s/1toVeHvm1PHUL1d-dstROmA
Password: b5n5


Or join the QQ group: Zhonghua DOS Union (8393170) and download from the group files.

[ Last edited by crshen on 2018-3-21 at 16:25 ]
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023