VERY simple question...

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

User avatar
Travesty
Newbie
Posts: 7
Joined: Wed Oct 27, 2004 9:06 pm

VERY simple question...

Post 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?
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post 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.
marinedalek
Coder
Posts: 12
Joined: Sun Oct 10, 2004 4:46 am
Contact:

Post by marinedalek »

The sourcecode is somewhere on this page. In the QB1.1 section, I think.
Guest

Post 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?
marinedalek
Coder
Posts: 12
Joined: Sun Oct 10, 2004 4:46 am
Contact:

Post 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.
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post 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.
User avatar
Travesty
Newbie
Posts: 7
Joined: Wed Oct 27, 2004 9:06 pm

Post 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...
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post 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.
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post 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?)
Image
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

Nathan1993, what the hell are you talking about? :?
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

Well, he turned 21 *gulp gulp gulp*
Image
User avatar
Travesty
Newbie
Posts: 7
Joined: Wed Oct 27, 2004 9:06 pm

Post 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:
Last edited by Travesty on Wed Nov 03, 2004 6:51 pm, edited 1 time in total.
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

Temp file hosting: www.QuickHost.tk
I have left this dump.
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

Digital Blackie often offers hosting to "homeless" BASIC programmers as well. Not much, but better than nothing. :D
User avatar
Travesty
Newbie
Posts: 7
Joined: Wed Oct 27, 2004 9:06 pm

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

Post 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
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post 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?
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
Guest

Post 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.
User avatar
Travesty
Newbie
Posts: 7
Joined: Wed Oct 27, 2004 9:06 pm

Post by Travesty »

That was me, BTW...
Bah, can't seem to stay logged into any forums! :P
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post 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.
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
Post Reply