View previous topic - View next topic |
Author |
Message |
JimKurth Monkey-Butler
Joined: 01 Apr 2007 Posts: 53 Location: Houston, TX
|
Posted: Thu Jan 03, 2008 8:27 pm Post subject: Memory issues in QB with WinXP |
[quote] |
|
I'm using QB run from a DOS shell and I understand the 640KB limit and you canīt use other segmented memory while working in the IDE. My problem is QB will crash when I run this program. I want to allocate 256,000 Bytes and get a segment address that I can use for this as a double buffer for my graphics (to hold 320x200x24). I use interrupt &H21 and my sub looks like the code below. I believe this is the right way because I've done this from DOS before but QB (after compiled) wants to crash to WinXP. Any Ideas or suggestions around this?
Thanks.
Jim
PS: Windows tells me Illegal Function Error and must close it.
Allocate:
regs.ax = &h4800
regs.bx = &h4000 ' 16384 decimal (blocks of 16 bytes)
call INTERRUPT (&h21,regs,regs)
BUFFERSEGMENT = regs.ax
Deallocate:
regs.ax = &h4900
regs.es = BUFFERSEGMENT
call INTERRUPT(&h21,regs,regs)
|
|
Back to top |
|
|
RedSlash Mage
Joined: 12 May 2005 Posts: 331
|
Posted: Fri Jan 04, 2008 1:11 am Post subject: |
[quote] |
|
Wow, people actually still program for DOS? I've dropped that ages ago.
DOS is pretty much obsolete now. WinXP barely supports DOS with its poor emulation. You might want to try to run your DOS apps under an older compatibility mode:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q301911
or run it under an emulator such as Dosbox.
I think it would be wise to switch to something like FreeBASIC which targets 32-bit systems (which is somewhat compatible with QB) and has good support for gaming and stuff.
|
|
Back to top |
|
|
BadMrBox Bringer of Apocalypse
Joined: 26 Jun 2002 Posts: 1022 Location: Dark Forest's of Sweden
|
Posted: Fri Jan 04, 2008 3:21 pm Post subject: |
[quote] |
|
Best solution I got is probably one you dont want to hear and that freebasic.
What's interesting is that the code runs from QB but not when compiled. As Reddy mentioned, try to run your exe under win95 compatibility if you haven't allready. _________________
|
|
Back to top |
|
|
JimKurth Monkey-Butler
Joined: 01 Apr 2007 Posts: 53 Location: Houston, TX
|
Posted: Sun Jan 06, 2008 9:52 am Post subject: didn't work |
[quote] |
|
BadMrBox wrote: | Best solution I got is probably one you dont want to hear and that freebasic.
What's interesting is that the code runs from QB but not when compiled. As Reddy mentioned, try to run your exe under win95 compatibility if you haven't allready. |
I tried a bunch of different scenarios. Even tried making in Debug.exe and compiling it to .COM but that didn't work. I tried different Compatibility-memory issues but that had no effect, still returning an error code upon return from that DOS function. I've set using High memory access, buffered on auto and a bunch of other settings but no success.
The only other possibility I can think of is to restart into DOS prompt from a boot disk and then try it. It is just odd because before I was able to do it when i first did it from a compiled QB program. Maybe there is a program using most of my high memory that I wasn't using before.
I'll try again in a couple days when i get access to my floppy drive to see any more possibilities.
|
|
Back to top |
|
|
JimKurth Monkey-Butler
Joined: 01 Apr 2007 Posts: 53 Location: Houston, TX
|
Posted: Sun Jan 06, 2008 10:01 am Post subject: |
[quote] |
|
RedSlash wrote: | Wow, people actually still program for DOS? I've dropped that ages ago.
DOS is pretty much obsolete now. WinXP barely supports DOS with its poor emulation. You might want to try to run your DOS apps under an older compatibility mode:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q301911
or run it under an emulator such as Dosbox.
I think it would be wise to switch to something like FreeBASIC which targets 32-bit systems (which is somewhat compatible with QB) and has good support for gaming and stuff. |
I used to program a lot of code back in 1995-1999 (made a GIF2BSV program and a game never released called Chemist Spelunker (similar to lode runner but without enemies and more of a puzzle game)) but I left for military reasons, after i got out i went to college and graduated and now i'm back in 2007. That's why Im still stuck in the QB era. :) As for FB, I've heard all stuff from it and how all the QB programmers have moved onto FB but I still want to be able to use QB to it's fullest. Maybe use FB as a very last resort.
However, I have not heard of DOSBOX before, so maybe I will check that out. Thanks.
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Mon Jan 07, 2008 11:22 pm Post subject: |
[quote] |
|
JimKurth wrote: | As for FB, I've heard all stuff from it and how all the QB programmers have moved onto FB |
hmm..that is not accurate.
I went from QB to C/C++ & Allegro then to Python & PyGame, now to C# & Managed DirectX or C# & XNA depending on the project.
I toyed with FB a little, but for most things I found it too much of a bother to use.
I sat down to port someof my qb games to FB...it took forever, and the results were less than usable.
I then ported the qb code to C then to Python.
The best results (most playable, and most like qb reactions) were in Python. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
JimKurth Monkey-Butler
Joined: 01 Apr 2007 Posts: 53 Location: Houston, TX
|
Posted: Tue Jan 08, 2008 2:46 am Post subject: |
[quote] |
|
DeveloperX wrote: | JimKurth wrote: | As for FB, I've heard all stuff from it and how all the QB programmers have moved onto FB |
hmm..that is not accurate.
I went from QB to C/C++ & Allegro then to Python & PyGame, now to C# & Managed DirectX or C# & XNA depending on the project.
I toyed with FB a little, but for most things I found it too much of a bother to use.
I sat down to port someof my qb games to FB...it took forever, and the results were less than usable.
I then ported the qb code to C then to Python.
The best results (most playable, and most like qb reactions) were in Python. |
I tried going to C/C++. I have many books on it (game programming, learning to program in it, windows applications, etc) but I still have the same problem with Visual C++. My code will never compile correctly. I even used codes from the books teaching me how to use Visual C++ 6 (which is what I had) and did everything correctly 500 times and still wouldn't compile. Then tried the direct file and that didn't even work (Thank you, Learn Visual C++ 6.0 in 6 weeks). After that, I just gave up and made things more of a hobby. Since I know QB fairly well, I stick to it. I know that's the programmer's curse. Still, I know I'll never become a real programmer so just smaller hobby games is what keeps me going. I know mostly the architecture of C/C++. Windows Programming of course is completely different and I found a guide on how Windows apps work (code-wise) but I lost the link. I'd like to use DirectX and code with VC++ express, and make fast games using great libraries, but it's tough and I don't think I have that dedication to learn it anymore.
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
|
Back to top |
|
|
Nodtveidt Demon Hunter
Joined: 11 Nov 2002 Posts: 786 Location: Camuy, PR
|
Posted: Wed Jan 09, 2008 2:46 pm Post subject: |
[quote] |
|
Also, don't forget that you will need XP with SP2 to run XNA. if you're using a "free" version of XP, good luck getting SP2 to install. I was able to pull it off after about 6 hours of hacking XP to pieces, but it wasn't easy. Maybe a better, more elegant solution has come out since then, who knows. But of course, if you're one of those people that actually paid for XP, you should have no problem here.
Programming in Windows doesn't have to be complex, it just depends on the language and libraries you use. If you're used to procedural coding, trying C++ with DirectX will be a real nightmare because you have to learn OOP and be quite proficient with it. If you just want to get down to business right away, something like mingw with OpenGL will feel right at home for you; C is very easy to learn if you're already used to procedural programming (especially BASIC, going from BASIC to C is very easy). Of course, FB is also very easy to use if you're already used to QB, there's just a few differences (and lately, they've been working hard to improve QB backwards compatibility). _________________ If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
|
|
Back to top |
|
|
JimKurth Monkey-Butler
Joined: 01 Apr 2007 Posts: 53 Location: Houston, TX
|
Posted: Wed Jan 09, 2008 11:35 pm Post subject: |
[quote] |
|
Nodtveidt wrote: | Also, don't forget that you will need XP with SP2 to run XNA. if you're using a "free" version of XP, good luck getting SP2 to install. I was able to pull it off after about 6 hours of hacking XP to pieces, but it wasn't easy. Maybe a better, more elegant solution has come out since then, who knows. But of course, if you're one of those people that actually paid for XP, you should have no problem here. |
I'm one of those that paid for the full home version. I customized my laptop from Dell.com and paid somewhere around $240 for WinXP Home. Ouch!
Nodtveidt wrote: |
Programming in Windows doesn't have to be complex, it just depends on the language and libraries you use. If you're used to procedural coding, trying C++ with DirectX will be a real nightmare because you have to learn OOP and be quite proficient with it. If you just want to get down to business right away, something like mingw with OpenGL will feel right at home for you; C is very easy to learn if you're already used to procedural programming (especially BASIC, going from BASIC to C is very easy). Of course, FB is also very easy to use if you're already used to QB, there's just a few differences (and lately, they've been working hard to improve QB backwards compatibility). |
I dove straight into VC++ 6 Pro when it first came out (also installed DXSDK 6 which was newest version at the time) and I was confused and battered. I could make a cheesy window app of a gui (MFC Wizard) but no real programming involved. I learned C a long time ago and it works great with converting from BASIC. I'm not sure of the major differences between C & C++. I've been able to make DOS apps in C/C++ (simple apps like text editor, sprite movement, text-game), but when I tried getting into Windows with VC++ I didn't get far at all. I felt like the guy who can't finish a rubicks cube.
I'd like to use VC++ and use a lot of fast graphic routines and libraries already developed and not have to make my own but the problem is how to program it all. OOP is relatively simple to understand (an object for functions, and to reference anything) but to program with... Good LORD!
I've tried FB but I think I'd rather go with VC++ or XNA and C# as I've been getting more interested in
Anyway, that's my 2 cents.
|
|
Back to top |
|
|
Nodtveidt Demon Hunter
Joined: 11 Nov 2002 Posts: 786 Location: Camuy, PR
|
Posted: Wed Jan 09, 2008 11:57 pm Post subject: |
[quote] |
|
OOP is simple on the surface but yes, to code in it is a bloody nightmare sometimes. But whatever you choose, stick with it and you won't regret it. _________________ If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
|
|
Back to top |
|
|
RedSlash Mage
Joined: 12 May 2005 Posts: 331
|
Posted: Thu Jan 10, 2008 1:25 am Post subject: |
[quote] |
|
Quote: | if you're using a "free" version of XP, good luck getting SP2 to instal |
LOL, I love how you quote "free".
But whether you paid for or using a "free" version is probably not as much of an issue as to whether your target audience is running SP2. Because if your audience doesn't run SP2, then no one can play your game. Does XNA work with Vista yet?
VC++ express is currently not so straight forward to set up for development, but the VC# express package is rock-solid out of the box.
|
|
Back to top |
|
|
Verious Mage
Joined: 06 Jan 2004 Posts: 409 Location: Online
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Thu Jan 10, 2008 5:11 am Post subject: |
[quote] |
|
RedSlash wrote: |
But whether you paid for or using a "free" version is probably not as much of an issue as to whether your target audience is running SP2. Because if your audience doesn't run SP2, then no one can play your game. Does XNA work with Vista yet?
VC++ express is currently not so straight forward to set up for development, but the VC# express package is rock-solid out of the box. |
I've got Vista Home Premium; and Visual C# Express 2005 and XNA GameStudio 2.0 all run perfectly fine.
I also got my c# games to run in linux using "mono" (a cool cross-platform .NET implementation) and hand-copying the managed directx9 and xna framework files to my linux machine. :D _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
|
Page 1 of 2 |
All times are GMT Goto page 1, 2 Next
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|