Topic: Reading a given type of file / trial and error?
Posted: Sat Nov 12, 2011 10:18 pm
Hi,
I have another question, in what I am sure will continue to be a long line of absolutely n00b questions... But I'm not a Pro, so forgive me!
I am a little curious about File formats. There are a LOT of files out there these days, and a lot of seemingly different "formats" of files (*.EXT).
I have always wondered how people "come up with" a format to store their data, and why there are so many file extensions.
Of course there are the easy cases where someone has just renamed a text file or some such.. But it seems to me like we only really have a handful of ways we can actually write data to a file? (Text / Binary / and?????).
I have always been interested in the idea of opening up files and peeking at what is inside... usually its just a bunch of ugly looking symbols or "null" symbols, etc. Or I get lucky and come across a renamed text file..
But what makes the true "file formats" like say a JPEG file, or a Photoshop .PSD file, or a 3D Model from a modelling app, or a Microsoft Word document; what makes them so different from each other?? How do people "reverse engineer" file readers for a format they really want to crack open so they can look at the data?
This interest mainly comes out of all the older utilities from the early days I would play with, which were specifically made to open game resource files, or open individual files and show you the image inside it, or play the sound, or whatever.
Do you need some really learned skills to build your own file reader? From my perspective it would probably be hard enough for me even if I were trying to build a reader for an established file type with an Open Standard that is published.. I can't imagine how people can do it for proprietary or non-published formats; or how the process even starts in either case.
I really like NES and other console music for instance, and people have utilities that will aid in extracting the song data from the actual ROMS; but even doing that with the tools made for you, they say a background in ASM (or 6502 ASM in particular for the NES) and stuff like that is strongly recommended, or even required.
I just find this whole subject very interesting.. I have so many ideas for tutorials that experienced PB coders could be writing, its not funny (and yes building your own file reader/parser is one of them)
I have another question, in what I am sure will continue to be a long line of absolutely n00b questions... But I'm not a Pro, so forgive me!
I am a little curious about File formats. There are a LOT of files out there these days, and a lot of seemingly different "formats" of files (*.EXT).
I have always wondered how people "come up with" a format to store their data, and why there are so many file extensions.
Of course there are the easy cases where someone has just renamed a text file or some such.. But it seems to me like we only really have a handful of ways we can actually write data to a file? (Text / Binary / and?????).
I have always been interested in the idea of opening up files and peeking at what is inside... usually its just a bunch of ugly looking symbols or "null" symbols, etc. Or I get lucky and come across a renamed text file..
But what makes the true "file formats" like say a JPEG file, or a Photoshop .PSD file, or a 3D Model from a modelling app, or a Microsoft Word document; what makes them so different from each other?? How do people "reverse engineer" file readers for a format they really want to crack open so they can look at the data?
This interest mainly comes out of all the older utilities from the early days I would play with, which were specifically made to open game resource files, or open individual files and show you the image inside it, or play the sound, or whatever.
Do you need some really learned skills to build your own file reader? From my perspective it would probably be hard enough for me even if I were trying to build a reader for an established file type with an Open Standard that is published.. I can't imagine how people can do it for proprietary or non-published formats; or how the process even starts in either case.
I really like NES and other console music for instance, and people have utilities that will aid in extracting the song data from the actual ROMS; but even doing that with the tools made for you, they say a background in ASM (or 6502 ASM in particular for the NES) and stuff like that is strongly recommended, or even required.
I just find this whole subject very interesting.. I have so many ideas for tutorials that experienced PB coders could be writing, its not funny (and yes building your own file reader/parser is one of them)