Switch to full style
Data recovery and disk repair questions and discussions related to old-fashioned SATA, SAS, SCSI, IDE, MFM hard drives - any type of storage device that has moving parts
Post a reply

ROM ver. Identifier - v1.0

August 23rd, 2012, 14:35

for some of us here it might be useless but really i came up with this idea since am too lazy
to check it in Winhex and asked my Developers (Partners) to do it and save some of my time here

i would like to share it with you guys here...

next release will be even much better

Thank you forum members/Admins

:wink: :wink:
:yayaya:


file can be downloaded from here: http://files.hddguru.com/download/Other ... dentifier/

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 15:08

From what I see it's .Net app (that probably won't work in DOS mode as specified) and it support some WD flashes

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 15:26

it should work my dear if you have .net 2.0 or later

have a look
Attachments
rom_ID.JPG

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 15:34

it definitely should, in command prompt, you probably meant that
I wonder what's the practical value of this program
It returns internal version of the first found module with ROYL header, I might be missing something here but I cannot come with any idea where I could actually use that kind of information

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 15:42

Just in case somebody wants to share another opinion on the code

Code:
namespace GetID
{
    using System;
    using System.IO;
    using System.Runtime.InteropServices;
    using System.Text;

    internal class Program
    {
        private static byte[] _RoylCode = Encoding.ASCII.GetBytes("ROYL");

        private static void FindIdInFile(string path)
        {
            long num;
            string str;
            if (FindIdInFile(path, out num, out str))
            {
                Console.WriteLine(string.Concat(new object[] { "Found ID at offset ", num, " [0x", num.ToString("X"), "]: ", str }));
            }
            else
            {
                Console.WriteLine("ID not found!");
            }
        }

        private static bool FindIdInFile(string path, out long offset, out string id)
        {
            using (FileStream stream = File.OpenRead(path))
            {
                while (stream.CanRead)
                {
                    if (((stream.ReadByte() == _RoylCode[0]) && (stream.ReadByte() == _RoylCode[1])) && ((stream.ReadByte() == _RoylCode[2]) && (stream.ReadByte() == _RoylCode[3])))
                    {
                        offset = stream.Seek(12L, SeekOrigin.Current);
                        byte[] buffer = new byte[8];
                        if (stream.Read(buffer, 0, 8) == 8)
                        {
                            id = Encoding.ASCII.GetString(buffer);
                            return true;
                        }
                    }
                }
                offset = -1L;
                id = null;
                return false;
            }
        }

        private static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                Console.WriteLine("No file path specified.");
                Environment.ExitCode = -1;
            }
            else
            {
                string path = args[0];
                if (path.StartsWith("\"") && path.EndsWith("\""))
                {
                    path = path.Substring(1, path.Length - 2);
                }
                if (!File.Exists(path))
                {
                    Console.WriteLine("'" + args[0] + "' is not a valid file path.");
                    Environment.ExitCode = -1;
                }
                else
                {
                    FindIdInFile(args[0]);
                }
            }
        }
    }
}

Last edited by Doomer on August 23rd, 2012, 15:43, edited 1 time in total.

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 15:43

Well, for me because am too lazy searching in Winhex i asked for it, anyway, this is the prototype the new one will be in GUI
drag-n-drop with the same function.

for WHY or whats the use of it?

as i said, am too lazy looking, also might help newbies here, or anyone wanted fast results of it.

not bad idea i guess?

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 15:44

einstein9 wrote:not bad idea i guess?

Well, now I feel like I'm definitely missing something
How one could use that ID?
Last edited by Doomer on August 23rd, 2012, 15:51, edited 1 time in total.

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 15:51

Oh, I think I figured that out
You need add additional check for Module ID. The module ID you are looking for is 4F :)
Because on the picture you are getting it from module 0A :)

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 15:59

Hummm :row: :smokers: :druunk: heheheh (this is the intro.. - just kidding)

well for some newbies here who ask for FW resources sometimes, they always start with hdd model # & SN .... and so on
till someone here replies back asking for ROM ver. which again newbies need some time to get used to it
and ask the direct question providing model + ROM ver. in case if PCB is totally dead (for example w/o U12)

or if people like ME for example, too lazy to look into HEX to find match donors (which always happens really all the time)

i have a backup of many resources in 2 NAS for the most well known tools collected/bought it during my DR
some of them are ROM`s which again too lazy to go through it and save it in a way which is easy to find it later.

those are some of the reasons why i needed it, and shared it here...

:row: :smokers: :druunk: heheheh (this is the end.. - just kidding)

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 16:02

yes, for the ROM revision you need to add Module ID check
Because right now it doesn't work

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 16:03

oooh, many replies from you while am writing.... ehehhehe

about the picture, i was refering to the app. since u said not working

and the code is very simple, nothing hidden, any programmer can do it my dear... :wink:

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 16:04

Doomer

http://lel1996stardollblog.files.wordpr ... -small.jpg


i cannot reply to 3 posts @ the same time

give me a break.... heheh

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 16:08

Doomer's (correct) point is that it is not returning the correct answer

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 16:17

i guess guys and you too Doomer are right

will ask my developer about that

hehehe

thnx for the feedback


did u find this useful as an idea? or not?
Attachments
rom2.JPG

Re: ROM ver. Identifier - v1.0

August 23rd, 2012, 18:18

einstein9 wrote:did u find this useful as an idea? or not?

IDK, if you have an ability to read ROM, you shouldn't have questions about its version

Re: ROM ver. Identifier - v1.0

November 3rd, 2012, 5:53

Updated v2 with GUI

can be downloaded in files section: http://files.hddguru.com/download/Other ... dentifier/

Thank you
Post a reply