× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 2/12/2014 1:14 PM, Don Cavaiani wrote:

Buck, just saw you awesome step by step! The thing I cannot get a handle on is the 'size' or record layout/format of the .lgs PC file. No how I open/parse it, there seems to be no set format - but that it is just one Binary Large OBject?

RPG programmers like us are immersed in the world of unit record
equipment, whether we ever worked with punched cards or not. It's a
really useful way to model data, but it isn't the only one.

In the PC world, the stream file is king. The file doesn't have a
record length (card size) imposed on it from the outside; it contains a
stream of bytes that a program can interpret as needed. Our files are
modelled after punched cards. Stream files are modelled after main
memory (RAM).

This memory model is much more fluid than we RPGers are accustomed to.
You might think of a stream file as holding multiple, different sized
records in sequence, one after the other. So in the case of this
ratings file, you might have something like the first 2 bytes are the
binary number of teams in the list. The next bunch of bytes are the
first team's name. The name ends with x'00'. So it might be short
(JETS0, not 'JETS ') or long (WOLVERINES0). The next 2 bytes
might be how many games are ranked. The next bunch of bytes might be
the ranking: 2 bytes for each game listed in the rank header. And so on.

Basically, you read a header that explains what is coming next, and then
read 'detail' bytes. What 'detail' bytes might be could depend on a
count in the header, a length in the header, or an implied length (like
an array of 12 games).

Anyway, pretend you're an old C program and memory is scarce and
expensive - too expensive to waste even one single byte. Everything is
scrunched into the minimum amount of space as possible. Once you start
looking at the stream file like this, it'll start to make a little more
sense.

--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.