Hex editing in VB Studio 2008

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
User avatar
HaLo2FrEeEk





Posts: 170
Joined: Fri Aug 10, 2007 9:25 pm

Hex editing in VB Studio 2008

Post 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?
User avatar
LuxuriousMeat





Posts: 824
Joined: Thu Nov 03, 2005 6:43 pm
Location: zzzzzzzzzzzzzzzz
Contact:

Re: Hex editing in VB Studio 2008

Post 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.
Image
User avatar
HaLo2FrEeEk





Posts: 170
Joined: Fri Aug 10, 2007 9:25 pm

Re: Hex editing in VB Studio 2008

Post 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.
ImpactPro





Posts: 152
Joined: Sun Sep 28, 2008 12:26 pm
Location: In ur IP Stealing ur Info

Re: Hex editing in VB Studio 2008

Post 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)
Image
User avatar
DrXThirst




Connoisseur Foundry Pyre

Posts: 3011
Joined: Fri Jun 29, 2007 6:28 am
Location: Georgia
Contact:

Re: Hex editing in VB Studio 2008

Post by DrXThirst »

Use C# Express Edition 2008.
Image
User avatar
HaLo2FrEeEk





Posts: 170
Joined: Fri Aug 10, 2007 9:25 pm

Re: Hex editing in VB Studio 2008

Post by HaLo2FrEeEk »

Is C# better for this kind of work? i've heard VB is the easiest to learn.
User avatar
DrXThirst




Connoisseur Foundry Pyre

Posts: 3011
Joined: Fri Jun 29, 2007 6:28 am
Location: Georgia
Contact:

Re: Hex editing in VB Studio 2008

Post by DrXThirst »

Yes, by far. No, C# was easier IMO.
Image
User avatar
HaLo2FrEeEk





Posts: 170
Joined: Fri Aug 10, 2007 9:25 pm

Re: Hex editing in VB Studio 2008

Post 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.
ImpactPro





Posts: 152
Joined: Sun Sep 28, 2008 12:26 pm
Location: In ur IP Stealing ur Info

Re: Hex editing in VB Studio 2008

Post by ImpactPro »

Yes that would work just fine, and C# is better and easyer IMO aswell.
Image
User avatar
HaLo2FrEeEk





Posts: 170
Joined: Fri Aug 10, 2007 9:25 pm

Re: Hex editing in VB Studio 2008

Post by HaLo2FrEeEk »

I already downloaded and installed it. I'm having a harder time with it than I was with VB!
User avatar
unknownv2





Posts: 1041
Joined: Sun Oct 14, 2007 8:31 am
Location: Florida

Re: Hex editing in VB Studio 2008

Post 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.
User avatar
HaLo2FrEeEk





Posts: 170
Joined: Fri Aug 10, 2007 9:25 pm

Re: Hex editing in VB Studio 2008

Post 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?
User avatar
LuxuriousMeat





Posts: 824
Joined: Thu Nov 03, 2005 6:43 pm
Location: zzzzzzzzzzzzzzzz
Contact:

Re: Hex editing in VB Studio 2008

Post 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.
Image
User avatar
HaLo2FrEeEk





Posts: 170
Joined: Fri Aug 10, 2007 9:25 pm

Re: Hex editing in VB Studio 2008

Post 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.
Post Reply