Page 1 of 1

Hex editing in VB Studio 2008

Posted: Wed Mar 11, 2009 5:10 pm
by HaLo2FrEeEk
Hi. I've downloaded and installed Visual Basic Studio 2008 and I want to make an app for extracting screenshots out of Halo 3 and Gears of War CON files. I know the offsets for the screenshots, and I know there are programs that do this already, but I want to make one so I can start to learn this sort of thing. I'm very interested in it.

The problem I'm having is opening a file and reading it as HEX data. How would I go about doing this? I already have a FileOpenDialog object and a button to initiate it, I just want to know how to read it as HEX.

The offsets for Halo 3 screenshots are D000 and E000, so I'd need a way to detect which one is being used. The offset for Gears screenshots is always (I think) E000.

Can someone please help me out getting started? Everyone has to start somewhere, right?

Re: Hex editing in VB Studio 2008

Posted: Thu Mar 12, 2009 8:06 am
by LuxuriousMeat
HaLo2FrEeEk wrote:Hi. I've downloaded and installed Visual Basic Studio 2008 and I want to make an app for extracting screenshots out of Halo 3 and Gears of War CON files. I know the offsets for the screenshots, and I know there are programs that do this already, but I want to make one so I can start to learn this sort of thing. I'm very interested in it.

The problem I'm having is opening a file and reading it as HEX data. How would I go about doing this? I already have a FileOpenDialog object and a button to initiate it, I just want to know how to read it as HEX.

The offsets for Halo 3 screenshots are D000 and E000, so I'd need a way to detect which one is being used. The offset for Gears screenshots is always (I think) E000.

Can someone please help me out getting started? Everyone has to start somewhere, right?
Your not gonna get anywhere with those static offsets. I suggest you read up on the structure of CON files, and the basics of programming before even attempting this or you'll probably just end up giving up.

Re: Hex editing in VB Studio 2008

Posted: Thu Mar 12, 2009 3:54 pm
by HaLo2FrEeEk
Ok, listen, I've spent days looking at and studying my CON files, if there's something I'mmissing now I'm not going to find it.

The title of the game starts at offset 1692, the png tile for the game starts at offset 171A, if there is somewhere in the file that points to the offset where the image is, please help me find it.

Re: Hex editing in VB Studio 2008

Posted: Fri Mar 13, 2009 3:07 am
by ImpactPro
How many bytes do you want to read? Also if they are hex offsets then you need to do it like this in Visual Studio, 0xOffset or in vb &hOffset (I think thats right for vb, I dont do vb)

Re: Hex editing in VB Studio 2008

Posted: Fri Mar 13, 2009 3:09 am
by DrXThirst
Use C# Express Edition 2008.

Re: Hex editing in VB Studio 2008

Posted: Fri Mar 13, 2009 3:45 am
by HaLo2FrEeEk
Is C# better for this kind of work? i've heard VB is the easiest to learn.

Re: Hex editing in VB Studio 2008

Posted: Fri Mar 13, 2009 5:31 am
by DrXThirst
Yes, by far. No, C# was easier IMO.

Re: Hex editing in VB Studio 2008

Posted: Fri Mar 13, 2009 7:02 am
by HaLo2FrEeEk
Are you talking about the Visual C# Express, the free download from Microsoft? I can't afford to buy any program right now. So would the Visual C# one work? And if I do download that, will you help me out with getting started? I don't want anyone to write the code for me, just nudge me in the right direction, remember I'm a web developer, I'm using to starting variables with a $ and always, ALWAYS putting a ; at the end of a line. Phail without them.

Re: Hex editing in VB Studio 2008

Posted: Fri Mar 13, 2009 7:19 am
by ImpactPro
Yes that would work just fine, and C# is better and easyer IMO aswell.

Re: Hex editing in VB Studio 2008

Posted: Sun Mar 15, 2009 10:10 am
by DrXThirst

Re: Hex editing in VB Studio 2008

Posted: Sun Mar 15, 2009 11:30 am
by HaLo2FrEeEk
I already downloaded and installed it. I'm having a harder time with it than I was with VB!

Re: Hex editing in VB Studio 2008

Posted: Mon Mar 16, 2009 5:04 pm
by unknownv2
HaLo2FrEeEk wrote:Hi. I've downloaded and installed Visual Basic Studio 2008 and I want to make an app for extracting screenshots out of Halo 3 and Gears of War CON files. I know the offsets for the screenshots, and I know there are programs that do this already, but I want to make one so I can start to learn this sort of thing. I'm very interested in it.

The problem I'm having is opening a file and reading it as HEX data. How would I go about doing this? I already have a FileOpenDialog object and a button to initiate it, I just want to know how to read it as HEX.

The offsets for Halo 3 screenshots are D000 and E000, so I'd need a way to detect which one is being used. The offset for Gears screenshots is always (I think) E000.

Can someone please help me out getting started? Everyone has to start somewhere, right?
Like Lux said, those static offsets are useless. Understanding the STFS structure will allow you to determine whichever block the file starts at.

Re: Hex editing in VB Studio 2008

Posted: Mon Mar 16, 2009 5:36 pm
by HaLo2FrEeEk
So...is everyone going to keep telling me that or maybe help me start understanding the STFS structure? I mean there's only so much I can do right now. And if I'm only planning on doing this for Gears shots right now, and from my research all screenshots gow start at E000, why do I need to do it differently?

Re: Hex editing in VB Studio 2008

Posted: Mon Mar 16, 2009 7:34 pm
by LuxuriousMeat
HaLo2FrEeEk wrote:So...is everyone going to keep telling me that or maybe help me start understanding the STFS structure? I mean there's only so much I can do right now. And if I'm only planning on doing this for Gears shots right now, and from my research all screenshots gow start at E000, why do I need to do it differently?
Just because the files you looked at use the 3rd block doesn't mean that they all do.

Re: Hex editing in VB Studio 2008

Posted: Tue Mar 17, 2009 1:59 am
by HaLo2FrEeEk
I have 34 Gears Screenshots on my computer right now, in all of them the jpeg starts at E000. Please, if there's something missing, at this point I won't find it on my own. Please help me, but in the other thread, I'm not using VB anymore.