Page 1 of 2

VERY simple question...

Posted: Wed Oct 27, 2004 9:18 pm
by Travesty
Hey all, new to the forums. The name's Mike, 20 years old. I started programming in GW-BASIC/BASICA at age 12, Moved up to QBasic 1.1 shortly thereafter, and for several years now have been into Visual Basic, and more recently, Visual C++. I will save the remainder of my introduction for later, but for now I will ask my simple question...

I would like to figure out the file format of the QB.INI file for QB45. I have most of the basics for this file format down, but there are a few settings in the header that I can't quite pinpoint. The first three bytes make up the prefix string "QBP". As for the QB Paths, there is always a byte indicating the length of the string for a pathname, which seems to immediately precede the pathname's string itself. The bytes inbetween the prefix string and the pathname strings are questionable, however...

I am trying to figure the whole type structure to this file so that I can write a simple utility that can automatically read/write a user's QB Path settings, amongst other things. Any ideas?

Posted: Wed Oct 27, 2004 11:39 pm
by Nodtveidt
Sourcecode for QB has been available for awhile now. I'm not sure where to get it off the top of my head, but try doing a google search for it. It might offer some assistance.

Posted: Thu Oct 28, 2004 4:23 am
by marinedalek
The sourcecode is somewhere on this page. In the QB1.1 section, I think.

Posted: Thu Oct 28, 2004 10:21 pm
by Guest
Nekrophidius wrote:... but try doing a google search for it. It might offer some assistance.
Thanks, however I already know how forums usually are (I was a moderator for the once popular StarCraft/StarForge programming site known as TeamSE), so I know how tiring it is to see people who type before they research. Because of this, I never go near a forum with a question in mind without the "google searches," etc at firsthand. In other words, before I even joined this forum, I spent about an hour searching the keyword "QB.INI" only to find downloads and misc. information...
marinedalek wrote:The sourcecode is somewhere on this page. In the QB1.1 section, I think.
Unfourtunately, I have no idea what subject you guys are on, here. That link sent me to a download page which describes the history of BASIC. I already have QB 1.1 & QB 4.5. Perhaps my question wasn't blunt enough?

Let me try this again... With a simple goal of recapping on my older days of programming, I am making a utility for QB 4.5 (using VB 6.0) that will help a user manage all of their QuickBasic 4.5 needs - Everything from Library Management, to fast code generation/editing, to running QB with custom settings, and so forth - and all I need to continue with this project is the abilility to read (and possibly write) to and from the QB.INI file. If I could do this, I could allow this utility to adapt to the user's QB settings automatically...

So my question is, can anyone help me guess the file structure of the QB.INI file for QuickBasic 4.5? Perhaps, compatible to place into a TYPE stucture?

Posted: Fri Oct 29, 2004 5:17 am
by marinedalek
Somewhere in there will be the text colours etc. Unfortuantely, two 4-bit numbers will be merged into a single 8-bit byte so you'll have to separate them in QB (first 4 bits = byte \ 16 - you must use backslash - and last 4 bits = byte mod 16). You'll have to change the colours in QB and look for changes in the file.

Posted: Fri Oct 29, 2004 7:55 pm
by Nodtveidt
Anonymous wrote:In other words, before I even joined this forum, I spent about an hour searching the keyword "QB.INI" only to find downloads and misc. information...
I wasn't referring to googling for qb.ini, I was referring to googling for the sourcecode to QB 4.5.

Posted: Fri Oct 29, 2004 9:08 pm
by Travesty
marinedalek:
Very useful info indeed. Thanks! Also, I believe QB45's INI file saves the settings of the Options Menu itself, correct (the "Full System Menu" option, for instance)?

nekrophidius:
oOo... really? The actual source code that makes up QB? I was unaware that something of that nature would be released to the general public. If that's the case, A few more questions come to mind: Was it leaked (and is it legal), is it official (from the peeps down @ Microsoft), what language would this code be in (Assembly or possibly C, I would assume), and is it one of the downloads on the page that marinedalek kindly directed me to (those links appeared to download the actual QB programming packages to me)?

I don't dare go near anything leaked from Microsoft. They have eyes and ears hidden to the naked eye... Sometimes I wonder if Bill Gates occasionally spies on people from his top secret underground computer chamber near the center of the earth and digitally sets their microwaves on and off the fritz for laughs when he's bored...

Off Topic:
Yea, it's my B-Day! 21 years old now - W00T! Time for some REAL fun...

Posted: Sat Oct 30, 2004 9:18 am
by Nodtveidt
Well then, happy (one-day belated) birthday then :)

I don't know if it's official or not or if it was leaked...it was likely reverse-engineered. It's not like Microsoft just goes giving this stuff out for free unless it was leaked (like Windows Longhorn was...nice attempt at a cover-up, but people already knew what happened long before they went on their 'we did it on purpose' scheme). It's assembly and C (I believe someone noted that it was QuickC, to be specific) but again, I'm not sure of the origin of the source.

Posted: Sat Oct 30, 2004 8:26 pm
by {Nathan}
Did you get drunk? You know, puke on the crap folder segments on your hard drive??? (Hmm... why is it a hard drive when there are no soft drives?)

Posted: Sun Oct 31, 2004 7:12 am
by Nodtveidt
Nathan1993, what the hell are you talking about? :?

Posted: Sun Oct 31, 2004 8:54 am
by {Nathan}
Well, he turned 21 *gulp gulp gulp*

Posted: Mon Nov 01, 2004 12:06 am
by Travesty
Happy halloween! :twisted:
Nathan1993 wrote:Did you get drunk? You know, puke on the crap folder segments on your hard drive??? (Hmm... why is it a hard drive when there are no soft drives?)
Nathan1993 wrote:Well, he turned 21 *gulp gulp gulp*
Heheh, no. I am currently an official brokeass, so my time for that kind of fun will have to wait, unfortunately.

About the source... It's certainly caught my interest, however since my last post, I was able to decode the bytes in QB.INI and at the same time create a few TYPE structures to cover it. I will make the code available to everyone in this community, however I don't think I really have anywhere that I could upload it unless this forum accepts attachments. The code is a BAS module and contains the following:
  • A series of TYPE structures (QBINI_HEADER, QBINI_COLORS, QBINI_SETTINGS, QBINI_PATHS, & QBINI_FILE).
  • 3 Enumerations (QB_TEXTTYPE, QB_DISPCOLOR, & QB_COLORTYPE).
  • 1 Misc. Constant (LAUNCHQB As Boolean = TRUE).
  • 7 Functions(LoadQBSettings, CreateQBFile, SaveQBSettings, GetDefaultSettings, GetQBColor, SetQBColor & RunQB).
The code was made using VB6, and unfourtunately (and I apologize for this) is NOT backward compatible to QB itself - However, the "VB to QB" conversion of most to all of the code is more than possible. I guess I just felt too lazy to do both. :P Besides, I don't see any need for the use of this code in QB anyways. One more thing, I made this code functional, NOT perfect! Meaning, please feel free to correct/improve anything where needed. Well, enjoy! I'm off to start on that utility program (using my newly created module, of course)...

EDIT:
The module can be downloaded at http://quickhost.qbtk.com/download.php?id=308
... Tell me what yall think! :wink:

Posted: Mon Nov 01, 2004 4:33 am
by Z!re
Temp file hosting: www.QuickHost.tk

Posted: Mon Nov 01, 2004 7:22 am
by Nodtveidt
Digital Blackie often offers hosting to "homeless" BASIC programmers as well. Not much, but better than nothing. :D

Posted: Wed Nov 03, 2004 7:13 pm
by Travesty
Thanks guys! :D I took the liberty of updating the link to http://quickhost.qbtk.com/download.php?id=308, as well as re-editing the link in my previous post.

So far, the application I am developing (which, by the way, I am leaning toward the name "QB Library Manager" or "QBLIBMAN" for short) with this module has the following features lined up:
  • Automatic QuickBasic file detection
  • QuickBasic Library (*.qlb) detection/management, & editor (possibly, dunno yet)
  • VB-Style QuickBasic BAS Module editor (This should be fun!...)
  • The ability to run QuickBasic with various settings attached
  • User-Defined Plug-In support (This won't take effect for awhile, though)
  • ...Your ideas here!
As soon as the first beta pops about, I'll let everyone know. Until then, keep your comments/suggestions out in the open! I'll try my best to keep an eye out.

Posted: Fri Nov 19, 2004 11:59 am
by ian
make sure you add support for LPT1 in Windows XP
for people who build robotics/interfaces etc.

Its frustrating that XP won't allow QB to have access to the ports...
there is a third party program called access that updates the permissions to allow this, but perhaps you can build it in! :D

Posted: Fri Nov 19, 2004 4:35 pm
by MystikShadows
Travesty wrote:Thanks guys! :D I took the liberty of updating the link to http://quickhost.qbtk.com/download.php?id=308, as well as re-editing the link in my previous post.

So far, the application I am developing (which, by the way, I am leaning toward the name "QB Library Manager" or "QBLIBMAN" for short) with this module has the following features lined up:
This link didn't work....could you email it me? srichard@adaworld.com?

Posted: Sun Jan 02, 2005 4:55 am
by Guest
I have good news and bad news...

BAD NEWS:
I am sad to announce that this project has been cancelled due to the recent reformatting of my hard drive. :cry: Damn spyware/viruses (grr!)

GOOD NEWS:
I now have Lavasoft's Ad-Aware 6, Aluria's Spyware Eliminator, and Spybot Search & Destroy, so this shouldn't happen again. :)
Also, last time I heard, MysticShadows is quite a ways into the development of a related 32-bit application, which will support a VERY numerous amount of features, including the feature to manipulate QB's internal settings through the use of my QBINI.BAS module. For more information, either contact MysticShadows, or wait for an announcement post related to this information.

Posted: Sun Jan 02, 2005 4:57 am
by Travesty
That was me, BTW...
Bah, can't seem to stay logged into any forums! :P

Posted: Sun Jan 02, 2005 9:40 am
by MystikShadows
Oh I knew it was you :-). Indeed. I'm getting some screenshots ready that I'll upload to my server. To give you guys a hint of how things are coming along and the direction they are taking too :-). Of course now, I'll also have to add FreeBasic to the bunch ;-). Hmm Wondering if I shouldn't isolate everything and make a freebasic only version AND one for the other QB compilers.