China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-30 04:05
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Disk sector reading and writing, partition information management tool Dsptw (updated on 2008.11.29) View 112,540 Replies 565
Floor 391 Posted 2008-11-14 12:04 ·  中国 上海 浦东新区 电信
初级用户
Credits 83
Posts 38
Joined 2007-01-17 04:38
19-year member
UID 76759
Gender Male
Status Offline
Floor 392 Posted 2008-11-15 14:12 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
This program can run in both win32 environment and DOS environment.
Attachments
DISKRW.rar (40.09 KiB, Downloads: 746)
Floor 393 Posted 2008-11-18 17:39 ·  中国 广西 河池 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Hello, Hero of October 1, 1995! Your DSPT is very useful. I have used it several times in other programs for partition identification, it's really great, thank you!

There are two questions. Actually, they are the same problem. I would like to ask:
How to use DSPTW to get the partition ID?
How to directly change the partition ID using DSPTW? (This problem is very important. I know that other software such as WINPM or DISKGEN can directly view or modify the partition system identification or ID under WIN. Can dsptw achieve this function with parameters?
Thank you, waiting online...

(One more thing, is it more convenient to package the instruction file and dsptw.exe into a RAR file together?)

[ Last edited by qwe123456 on 2008-11-18 at 17:41 ]
Floor 394 Posted 2008-11-18 19:16 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Originally posted by qwe123456 at 2008-11-18 17:39:
Hello, Master 19951001! Your DSPT is very useful. I have used it several times in other programs to identify partitions, which is really great. Thank you!

There are two questions. Actually, these are the same problem. I would like to ask:
...


DSPTW
/ChangeType: Change Partition Type.
type: 00-FF.
partno: Partition Number.
Windows 一键还原
http://www.yjhy.com
Floor 395 Posted 2008-11-18 19:27 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by qwe123456 at 2008-11-18 17:39:
Hello, Master 19951001! Your DSPT is very useful. I have used it several times in other programs to identify partitions, which is really great. Thank you!

There are two questions. In fact, they are the same problem. Please advise:
...


Here are the partition values I use in the program for judgment:

ID Partition Type
0x01 DOS_FAT12
0x05 Extended
0x04 DOS_FAT16
0x06 DOS_FAT16
0x07 HPFS/NTFS
0x0b Win95_FAT32
0x0c Win95_FAT32
0x0e Win95_FAT16
0x0f Extended_LBA
0x82 Linux_Swap
0x83 Linux_Native
0x85 Linux_Extended
0x11 Hide_FAT12
0x14 Hide_FAT16
0x16 Hide_FAT16
0x17 Hide_HPFS/NTFS
0x27 Hide_HPFS/NTFS
0x1b Hide_FAT32
0x1c Hide_FAT32
0x1e Hide_FAT16
0x42 Dynamic_Disk
0x93 Hide_Linux
0xd7 HIDE_DELL
0xdd HIDE_DELL
0xdb HIDE_DELL
x0de HIDE_DELL
0x12 HIDE_FAT
0xbc ATI_SEC_ZONE
0xa5 FreeBSD


If it is not in the above list, the program will print out the partition's ID value. The program can directly modify the partition's ID value:

DSPTW
/ChangeType: Change Partition Type.
type: 01-FF.
partno: Partition Number.

For example, executing the command dsptw 0 /l displays the result as:
Disk Parts Cylinders Heads Sectors TotalSectors Mbytes DiskSerialNumber
0 8 30401 255 63 488392065 238472 9QE314TB

No. Dr Tag FileSystem Volume Act StartPos Sectors MBytes FreeMB
1 C: Pri Win95_FAT32 WINXP Yes 63 61448562 30004 2723
2 I: Pri HPFS/NTFS DATA 61448625 61432560 29996 451
3 J: Pri HPFS/NTFS WIN2003 122881185 61432560 29996 347
4 D: Log HPFS/NTFS ISO 184313808 61432497 29996 226
5 E: Log HPFS/NTFS movie 245746368 61432497 29996 1154
6 F: Log HPFS/NTFS DATA_1 307178928 61432497 29996 1455
7 G: Log HPFS/NTFS HACKER 368611488 61432497 29996 1296
8 H: Log HPFS/NTFS MOVIE_2 430044048 58348017 28490 113

Executing the command: dsptw 0 /changetype:ee:8 will change the partition ID of the partition numbered 8 (disk H:) to 0xee.

[ Last edited by 19951001 on 2008-11-18 at 19:31 ]
Floor 396 Posted 2008-11-18 19:35 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
The DOS version of dspt hasn't been updated for a long time. Can you update the DOS version of dspt or release an amphibious version?
Windows 一键还原
http://www.yjhy.com
Floor 397 Posted 2008-11-18 19:52 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by lianjiang2004 at 2008-11-18 19:35:
The DOS version of dspt has not been updated for a long time. Can you update the DOS version of dspt or release an amphibious version?


I will be relatively busy from now until the end of the year. The plan to update dspt is probably going to be next year.
Floor 398 Posted 2008-11-18 20:14 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
There is a netizen sending me a message, inquiring about whether the standard MBR code is used in the command:

DSPTW
/MBR: ReBuild Disk Main Boot Record.
/NOBACK: Don't Backup old MBR.

The MBR code I use in the program is as follows:

static BYTE mbr={
0x33,0xc0,0x8e,0xd0,0xbc,0x00,0x7c,0xfb,0x50,0x07,
0x50,0x1f,0xfc,0xbe,0x1b,0x7c,0xbf,0x1b,0x06,0x50,
0x57,0xb9,0xe5,0x01,0xf3,0xa4,0xcb,0xbe,0xbe,0x07,
0xb1,0x04,0x38,0x2c,0x7c,0x09,0x75,0x15,0x83,0xc6,
0x10,0xe2,0xf5,0xcd,0x18,0x8b,0x14,0x8b,0xee,0x83,
0xc6,0x10,0x49,0x74,0x16,0x38,0x2c,0x74,0xf6,0xbe,
0x10,0x07,0x4e,0xac,0x3c,0x00,0x74,0xfa,0xbb,0x07,
0x00,0xb4,0x0e,0xcd,0x10,0xeb,0xf2,0x89,0x46,0x25,
0x96,0x8a,0x46,0x04,0xb4,0x06,0x3c,0x0e,0x74,0x11,
0xb4,0x0b,0x3c,0x0c,0x74,0x05,0x3a,0xc4,0x75,0x2b,
0x40,0xc6,0x46,0x25,0x06,0x75,0x24,0xbb,0xaa,0x55,
0x50,0xb4,0x41,0xcd,0x13,0x58,0x72,0x16,0x81,0xfb,
0x55,0xaa,0x75,0x10,0xf6,0xc1,0x01,0x74,0x0b,0x8a,
0xe0,0x88,0x56,0x24,0xc7,0x06,0xa1,0x06,0xeb,0x1e,
0x88,0x66,0x04,0xbf,0x0a,0x00,0xb8,0x01,0x02,0x8b,
0xdc,0x33,0xc9,0x83,0xff,0x05,0x7f,0x03,0x8b,0x4e,
0x25,0x03,0x4e,0x02,0xcd,0x13,0x72,0x29,0xbe,0x46,
0x07,0x81,0x3e,0xfe,0x7d,0x55,0xaa,0x74,0x5a,0x83,
0xef,0x05,0x7f,0xda,0x85,0xf6,0x75,0x83,0xbe,0x27,
0x07,0xeb,0x8a,0x98,0x91,0x52,0x99,0x03,0x46,0x08,
0x13,0x56,0x0a,0xe8,0x12,0x00,0x5a,0xeb,0xd5,0x4f,
0x74,0xe4,0x33,0xc0,0xcd,0x13,0xeb,0xb8,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x56,0x33,0xf6,0x56,
0x56,0x52,0x50,0x06,0x53,0x51,0xbe,0x10,0x00,0x56,
0x8b,0xf4,0x50,0x52,0xb8,0x00,0x42,0x8a,0x56,0x24,
0xcd,0x13,0x5a,0x58,0x8d,0x64,0x10,0x72,0x0a,0x40,
0x75,0x01,0x42,0x80,0xc7,0x02,0xe2,0xf7,0xf8,0x5e,
0xc3,0xeb,0x74,0x49,0x6e,0x76,0x61,0x6c,0x69,0x64,
0x20,0x70,0x61,0x72,0x74,0x69,0x74,0x69,0x6f,0x6e,
0x20,0x74,0x61,0x62,0x6c,0x65,0x00,0x45,0x72,0x72,
0x6f,0x72,0x20,0x6c,0x6f,0x61,0x64,0x69,0x6e,0x67,
0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6e,
0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x00,0x4d,
0x69,0x73,0x73,0x69,0x6e,0x67,0x20,0x6f,0x70,0x65,
0x72,0x61,0x74,0x69,0x6e,0x67,0x20,0x73,0x79,0x73,
0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8b,0xfc,0x1e,
0x57,0x8b,0xf5,0xcb,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x55,0xaa
};
Floor 399 Posted 2008-11-18 21:33 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by lianjiang2004 at 2008-11-18 19:35:
The DOS version of dspt hasn't been updated for a long time. Can you update the DOS version of dspt or release an amphibious version?


This is the amphibious version of dspt. There is no update; it just integrates the original dspt.com and dsptw.exe into one amphibious program
Attachments
dspt.rar (50.91 KiB, Downloads: 110)
Floor 400 Posted 2008-11-18 22:02 ·  中国 山东 菏泽 联通
银牌会员
★★★
Credits 1,246
Posts 488
Joined 2003-11-11 00:00
22-year member
UID 12699
Gender Male
Status Offline
I wonder if VISTA will blue screen after using this command?

DSPTW

It is said that FDISK /MBR will cause VISTA to fail to boot.

[ Last edited by wang6610 on 2008-11-18 at 22:03 ]
Floor 401 Posted 2008-11-18 22:20 ·  中国 广西 河池 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Originally posted by 19951001 at 2008-11-15 14:12:
This program can run in both win32 environment and DOS environment.

Is there a mistake???
I use DSPTW 0 /l normally

But when using diskrw 0 /l, it prompts that the command is incorrect (HELP). It's the same under XP and DOS. I have downloaded it twice again, still the same. Is the command incorrect?
Floor 402 Posted 2008-11-18 22:40 ·  中国 广西 河池 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Originally posted by lianjiang2004 at 2008-11-18 19:16:


DSPTW
/ChangeType: Change Partition Type.
type: 00-FF.
partno: Partition Number.

Thank you very much, great expert!!!!!
After downloading the new version, it has been successful.
The previous version (August) didn't work, and when the partition ID was 12, it was displayed as Unform_type.
The new version can now display as FAT normally, and CHANGEtype can also be used normally. Thanks again!
(Other IDs have not been tested)

But there is a problem:
When the ID is 12, the commands Unhide or hide cannot run!!!
Even if the Id is changed from 12 to 06 (original FAT16), it is necessary to restart to perform Hide operation and assign drive letters:
The suggestion I want to put forward is: There is a small software showdrive.exe, which can display hidden partitions in real time and assign drive letters. (It seems that I heard that this software also obtained code from DSPT). Can the great expert make unhide\hide have the same function?
(showdrive only displays hidden partitions in real time and automatically assigns drive letters, and does not change the nature of hidden ID. After restart, it continues to be hidden)

[ Last edited by qwe123456 on 2008-11-18 at 22:45 ]
Floor 403 Posted 2008-11-19 18:18 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by qwe123456 at 2008-11-18 22:20:

Is there a mistake???

I use DSPTW 0 /l normally

But when using diskrw 0 /l, it prompts that the command is incorrect (HELP). It's the same under both XP and DOS. I have downloaded it twice again, still the same. Is the command incorrect?


For the incorrect usage of diskrw, please check the help of diskrw. diskrw cannot display partition information. Its function is disk sector reading and writing and display.
Floor 404 Posted 2008-11-19 18:32 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by wang6610 at 2008-11-18 22:02:
I wonder if VISTA will have a blue screen after using this command?

DSPTW

It is said that FDISK /MBR will cause VISTA to fail to boot.



Will VISTA have a blue screen after using this command? I haven't used this, and this MBR is taken from the fixmbr command of Windows xp.
Floor 405 Posted 2008-11-23 17:13 ·  中国 广西 河池 宜州区 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Originally posted by lianjiang2004 at 2008-11-18 19:16:


DSPTW
/ChangeType: Change Partition Type.
type: 00-FF.
partno: Partition Number.

I'm sorry, I would like to ask again, corresponding to this command, what is the partition ID of a certain partition? (As shown in floor 395?)
‹ Prev 1 25 26 27 28 29 38 Next ›
Forum Jump: