| Author |
Message |
Enigma... Guest
|
Posted: Mon Jul 26, 2004 2:27 pm
Post subject: BMP's in gwbasic |
|
|
Don't ask why... but I'm trying to get a BMP or some other windows image in GW-BASIC.
Is there any way to do it? It doesn't have to look smashing but a 256 color picture would be nice.
The problem is... I can't get my screen 13 to work. That would be a nice start if it would.
Can you guys help me out?
greetings from holland |
|
| Back to top |
|
 |
barok_unlogged Guest
|
Posted: Wed Jul 28, 2004 12:03 am
Post subject: |
|
|
why bother with gw basic? Use qbasic... Much better. Or even Visual Basic.
you won't find a bmp loader for GWBasic. Look for one for qbasic and try to convert i guess. |
|
| Back to top |
|
 |
Enigma... Newbie

 Joined: 26 Jul 2004 Posts: 6
|
Posted: Thu Jul 29, 2004 9:46 am
Post subject: |
|
|
I know... qbasic is easier and better.
But I just wanna try if it is possible. See it as a challenge.
So can anyone help me?
Can I use Assemble maybe to access 256 color modes? |
|
| Back to top |
|
 |
knico Guest
|
Posted: Tue Oct 12, 2004 7:31 am
Post subject: |
|
|
Try google  |
|
| Back to top |
|
 |
barok_unlogged Guest
|
Posted: Tue Oct 12, 2004 11:57 pm
Post subject: |
|
|
okay... that doesn't make sense... you want to create a bitmap loader in gwbasic for the challenge... yet your asking for HELP....
kids nowadays... why don't you just head to qbasicnews?
I suggest antoni's bitmap loader. it's a geocities page... but i don't know which. |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Oct 19, 2004 10:13 am
Post subject: |
|
|
| gwbasic can't do screens with 256 colors when i remember correctly. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Oct 21, 2004 7:21 am
Post subject: |
|
|
 |
|
| Back to top |
|
 |
Enigma... Newbie

 Joined: 26 Jul 2004 Posts: 6
|
Posted: Tue Oct 26, 2004 12:02 pm
Post subject: |
|
|
But I mean...
Isn't there any way I can do that by using asembly code?
and b.t.w. I'm not saying gwbasic is better that qbasic.
please don't get me wrong here.  |
|
| Back to top |
|
 |
Interon 2.0 Experienced Member

 Joined: 24 Sep 2004 Posts: 54
|
Posted: Tue Oct 26, 2004 4:30 pm
Post subject: |
|
|
| BMPs didn't even exist when GWBasic was made, so unless there's a converter or a hack, it's about 99% impossible. |
|
| Back to top |
|
 |
Frenkel Way too much free time

 Joined: 05 May 2004 Posts: 491 Location: Netherlands
|
Posted: Wed Oct 27, 2004 5:01 am
Post subject: |
|
|
| Sure, you can do everything in assembly. |
|
| Back to top |
|
 |
Interon 2.0 Experienced Member

 Joined: 24 Sep 2004 Posts: 54
|
Posted: Wed Oct 27, 2004 9:40 am
Post subject: |
|
|
Yeah that's about 99.9% true
But then you would need to make changes to GWBasic itself, and I'm not sure how one would go about that without the original Microsoft source code.
Unless GWBasic has an internal function that allows high-resolution graphics (lots of pixels). Then you may be able to rig a BAS file that GWBasic would interpret it and draw the picture.
Or wait a moment... Isn't GWBasic's limit 64 KB? So the bitmap must be smaller than 64 KB, and even when you add a bitmap, there's not much room left for source code.
And even to accomplish this feat, you may need an enormous amount of free time, patience, and intelligence.
So IMO, you may as well leave off this ambitious project. It's probably more trouble than it's worth. |
|
| Back to top |
|
 |
barok Member

 Joined: 15 May 2004 Posts: 30 Location: bushlands of saskatchewan
|
Posted: Wed Oct 27, 2004 11:18 pm
Post subject: |
|
|
Frenkel: yes, you could do anything in assembly, but you wouldn't want to use 1000 lines of assembly to make a game that takes 10 lines of basic, would you?
Enigma: I never thought you said that gwbasic was better than qbasic. However, since most people at qbasicnews have dealt with gwbasic too, they'd be the people to go to. Basically, the people there would be able to give you over 10 times as much support and information as here. (no offense, but some of the people at qbnews are gurus.)
Interon: It doesn't matter if bitmaps weren't made before or during the time of gwbasic. As long as you understand the file format of the bitmap, you'll be fine. Basically, this guy wants a 320x200x256 colors bitmap. (he wants screen 13, that is it's resolution.) Now, 320x200= 64000 pixels. However, due to the way that screen 13 handles bits, bytes and pixels, you only need an array that's 32001 integers large. (you'll see where the one comes form in a minute.) you see, 8 bits = 1 byte. Now 1 byte = 1 pixel. you still with me? Now TWO bytes = 1 integer. So therefore, we can fit a 320x200 picture into this array: picture(32000) However, since basic starts counting from 0 instead of 1, the array should be this. (31999) Now, i said the array should be 32001. That means we have two extra integers somewhere. Those extra integers hold the length and width of the picture. It's odd, really. the first integer holds the size of the picture... IN BITS!!! Before you start panicking, remember that 8 bits = 1 byte = 1 pixel. So therefore, all we have to do is take the width of the picture and times it by 8. the height of the picture has to be in pixels. That's true.
Btw Interon, from what i understand of what your saying, your saying that gwbasic can't handle a picture that large. It can. The source to load and display the picture shouldn't be large at all, and the picture is only 32 kb large. So therefore the person can load the bitmap and still have lots of room for code. And btw, i've coded in gw before, and as i recall, i've loaded more than 64 kb of code and variables before with no ill effects...
just run gwbasic with /ah and you'll be fine. |
|
| Back to top |
|
 |
Da_Goat Moderator

 Joined: 14 Sep 2002 Posts: 2042 Location: Prescott, Arizona, USA, Earth, The Milky Way, The Universe, Nothing and Nowhere.
|
Posted: Thu Oct 28, 2004 9:52 am
Post subject: |
|
|
| Well guys, if you ever accomplish it, please put a link so I can download the BAS file, so I can be shocked and amazed... |
|
| Back to top |
|
 |
Interon 2.0 Experienced Member

 Joined: 24 Sep 2004 Posts: 54
|
|
| Back to top |
|
 |
relsoft Guest
|
Posted: Sat Dec 04, 2004 5:56 am
Post subject: |
|
|
| Enigma... wrote: | I know... qbasic is easier and better.
But I just wanna try if it is possible. See it as a challenge.
So can anyone help me?
Can I use Assemble maybe to access 256 color modes? |
Yeah, make a com file that switches the screen res using int 10h and call absolute. Or if gwbasic supports call interrupt. |
|
| Back to top |
|
 |
|