VOGONS


Qbasic help

Topic actions

First post, by dstokes1957

User metadata
Rank Newbie
Rank
Newbie

I use dosbox to run and create old Qbasic games. I have a desktop shortcut which I use to open the dosbox program. When opened, it brings up the Qbasic dialog box. After I clear this, I click on the tab, chose open. A box with all my Qbasic games come up, I chose and open the one I want. Then I run it. On my old laptop, I had a desktop shortcut for every Qbasic game I had. All I had to do was click on the one I wanted, and it would open dosbox, then open and load the game ready to play. But losing mo old computer, I lost all the shortcut. I can not remember the command line and perimeters needed to be placed in the command box of the shortcut to recreate the shortcuts. Does anyone know how to word it in order to recreate these shortcuts.

Don Stokes

Reply 2 of 21, by dstokes1957

User metadata
Rank Newbie
Rank
Newbie

This is the command I placed inside the target box of the shortcut that opens the dosbox program. But there needs to something added to open dosbox and the open and run the game.

"C:\Program Files\DOSBox-0.74\DOSBox.exe" -fullscreen -c "mount c c:\basic" -c "c:" -c "qbasic.exe" -c exit -noconsole -userconf

Don Stokes

Reply 3 of 21, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

what's the command you have to enter in dosbox to start your game? replace -c "qbasic.exe" with that.

btw.
-fullscreen -c "mount c c:\basic" -c "c:"
can all be set in the config.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 4 of 21, by dstokes1957

User metadata
Rank Newbie
Rank
Newbie

When I click on the dosbox shortcut that is on my desktop, it opens and the Qbasic dialog box comes up thet shows Welcome to MS-DOS. Then I push ECS key, click on file tab and then chose open from drop down box. Another box opens which shows all the Qbasic games that I have. I chose one, and the program loads. Then I hit F5 which runs the program. I remember that I added more to the command that was in the target box of that I posted awhile ago that would bypass having to go through these steps. The shortcut that I had for my individual games would open dosbox, load the game and then run it. But I can't remember what the extra command was.

"C:\Program Files\DOSBox-0.74\DOSBox.exe" -fullscreen -c "mount c c:\basic" -c "c:" -c "qbasic.exe" -c exit -noconsole -userconf

I added more to the end of the above command that would do what I wanted,but I can't remember waht it was.

All the games end with .bas extention

Don Stokes

Reply 6 of 21, by kao

User metadata
Rank Member
Rank
Member

If using GWBASIC or QBASIC on DOSBox, please keep in mind that it does not support Ctrl+Break, so if programs perform an infinite loop, they can't be exited except by closing out the entire thing. Running an image of an actual DOS version will solve this problem.

Reply 7 of 21, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
kao wrote:

If using GWBASIC or QBASIC on DOSBox, please keep in mind that it does not support Ctrl+Break, so if programs perform an infinite loop, they can't be exited except by closing out the entire thing. Running an image of an actual DOS version will solve this problem.

Official DOSBox does not support the Ctrl-Break key at the hardware level, so booting DOS isn't going to help with that. Booting DOS does provide break handling for Ctrl-C, but BASIC interpreters and runtimes disable the DOS break handler and only watch for a break key. You can press Ctrl-ScrollLock to break most forms of BASIC because that was the break on XT-style keyboards, and that works in DOSBox with or without booting DOS.

Reply 8 of 21, by MaxWar

User metadata
Rank Oldbie
Rank
Oldbie

Creating old Qbasic games, Awesome, Now thats Retro 😀

FM sound card comparison on a Grand Scale!!
The Grand OPL3 Comparison Run.

Reply 9 of 21, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

[Thread moved to DOSBox General Section]

Reply 10 of 21, by kao

User metadata
Rank Member
Rank
Member

Official DOSBox does not support the Ctrl-Break key at the hardware level, so booting DOS isn't going to help with that. Booting DOS does provide break handling for Ctrl-C, but BASIC interpreters and runtimes disable the DOS break handler and only watch for a break key. You can press Ctrl-ScrollLock to break most forms of BASIC because that was the break on XT-style keyboards, and that works in DOSBox with or without booting DOS.

Ok I tried that with BASIC and it worked. IIRC, Ctrl-Break is a function of the BIOS INT 9h keyboard handler and apparently DOSBox doesn't implement this.

I wonder if Ctrl+Scroll Lock will work with LucasArts games since people have complained on here before that you can't exit them in DOSBox because of no Ctrl+Break.

Reply 11 of 21, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I wonder if Ctrl+Scroll Lock will work with LucasArts games since people have complained on here before that you can't exit them in DOSBox because of no Ctrl+Break.

It won't work with DOSBox's internal DOS emulation because it doesn't call INT 23h when a break key is pressed. Maniac Mansion and Zak McKracken hook INT 23h to terminate themselves directly, which is actually non-standard because INT 23h is supposed to return with a yes/no signal that tells DOS to either terminate the program or restart the interrupted function call. LucasArts stopped doing that in later games.

Reply 12 of 21, by kao

User metadata
Rank Member
Rank
Member

It won't work with DOSBox's internal DOS emulation because it doesn't call INT 23h when a break key is pressed. Maniac Mansion and Zak McKracken hook INT 23h to terminate themselves directly, which is actually non-standard because INT 23h is supposed to return with a yes/no signal that tells DOS to either terminate the program or restart the interrupted function call.

Ah, I see. It's explained in here. http://helppc.netcore2k.net/interrupt/int-23

I assume what they're doing is to remap INT 23h so that when Ctrl-Break is pressed, it jumps to the game's exit routine instead of the DOS Ctrl-Break handler.

LucasArts stopped doing that in later games.

I know that. They switched the exit command to Alt-X.

Somewhat unrelated, but did you know that the Maniac Mansion included in DOTT doesn't work on 8086 machines? They probably stuck some 286 instructions in there since the parent game needed it to run anyway.

Reply 13 of 21, by dstokes1957

User metadata
Rank Newbie
Rank
Newbie

Perhaps I haven't quite explained what it is that I trying to do. I use dos box to run the old Qbasic program, because I make games. I have a desktop shortcut to open the dosbox program. When it opens, it opens to a screen which states, Welcome to MS-DOS. I push the esc keep to clear then I click on the file tab, select open. A white box appears with all the games which by the way end in the bas extention. Once I choose mt game, it loads and then I hit F5 to run. I had an old laptop which I had a desktop shortcut to every game. All I had to do was click on it and all the steps list above was done by itself. The dosbox program would open and then the specified game would load and run. But then my laptop wouldn't work and I was unable to get anything off of it. I have forgotten the command I placed inside the target box of the shortcut to once again create a desktop shortcut to my games.
Below is the command that is inside the target box of the shortcut to open the dosbox program:

"C:\Program Files\DOSBox-0.74\DOSBox.exe" -fullscreen -c "mount c c:\basic" -c "c:" -c "qbasic.exe" -c exit -noconsole -userconf

I remember that I added something to the end of this command that would open a specific game but I can't remember what it was. This is the help I need. I have all the games in a folder on my C drive labeled basic. I just need someone to please figure out the words that I need to add to the above command that would allow me to recreate a desktop shortcut for each game that I have

Don Stokes

Reply 14 of 21, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

We understand fine. What I meant earlier, you probably need another argument in your qbadic command. Perhaps -c "qbasic.exe game.bas" - i have no idea how qbasic loads something. Last time I did this was some decades ago

Edit via http://m.computing.net/answers/dos/running-qb … batch/8128.html
it's got to be -c "qbasic.exe \run game.bas"

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 15 of 21, by dstokes1957

User metadata
Rank Newbie
Rank
Newbie

That did not work. But thanks for trying

Don Stokes

Reply 16 of 21, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Thanks for being verbose. Did you check the link? Because I made the wrong slash.
Anyway I suggest you know try to find out how to directly run qbasic programs on your own. Google can do wonders.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 17 of 21, by dstokes1957

User metadata
Rank Newbie
Rank
Newbie

I have tried and tried to remember the command to open the dosbox program, then load and run a specific qbasic game, but to no avail. I just don't know. Thanks to all who responded to my post. I know there's a way to do this, but I guess I'll never remember.

Don Stokes

Reply 18 of 21, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Works fine here to run a QBasic game like this. Dunno what you're doing wrong... maybe you've got something in your conf file that interferes. The content of the Target textbox on my shortcut is: "C:\Program Files\DOSBox-0.74\DOSBox.exe" -fullscreen -c "mount c c:\dos\dos5" -c "c:" -c "qbasic.exe /run gorilla.bas" -c exit -noconsole -userconf

Somewhat unrelated, but did you know that the Maniac Mansion included in DOTT doesn't work on 8086 machines? They probably stuck some 286 instructions in there since the parent game needed it to run anyway.

The Tandy support is also b0rked in that "version" (renaming MANIAC.OVL to MANIAC.EXE to run the game standalone).

Reply 19 of 21, by kao

User metadata
Rank Member
Rank
Member

The Tandy support is also b0rked in that "version" (renaming MANIAC.OVL to MANIAC.EXE to run the game standalone).

The original standalone executable is 70k, while the DOTT one (what you find on most abandonware sites) is 63k, so that's how you can tell them apart.

In general, it seems that the VGA/hi-res versions of LucasArts games are much easier to find on the net. I have an original copy of EGA Last Crusade and I'm sure I've never seen anything but the VGA one on abandonware sites. Same with EGA Loom and MI.

I'd like to get an original of EGA Monkey Island if it ever shows up on Ebay, even though I have the VGA version from the LucasArts CGC Pack.