dosbox | Also contains a branch with idados support | Game Engine library
kandi X-RAY | dosbox Summary
kandi X-RAY | dosbox Summary
dosbox v0.74 manual (always use the latest version from www.dosbox.com). while we are hoping that one day dosbox will run all programs ever made for the pc, we are not there yet. at present, dosbox running on a high-end machine will roughly be the equivalent of a pentium i pc. dosbox can be configured to run a wide range of dos games, from cga/tandy/pcjr classics up to games from the quake era. type intro in dosbox for a quick tour. it is essential that you get familiar with the idea of mounting, dosbox does not automatically make any drive (or a part of it) accessible to the emulation. see the faq entry "how to start?" as well as the description of the mount command (section 4: "internal programs"). if you have your game on a cdrom you may try this guide: start: how to start? automation: do i always have to type these "mount" commands? fullscreen: how do i change to fullscreen? cd-rom: my cd-rom doesn’t work. cd-rom: the game/application can’t find its cd-rom. mouse: the mouse doesn’t work. sound: there is no sound. sound: what sound hardware does dosbox presently emulate? sound: the sound stutters or sounds stretched/weird. keyboard: i can’t type \ or : in
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dosbox
dosbox Key Features
dosbox Examples and Code Snippets
Community Discussions
Trending Discussions on dosbox
QUESTION
I am creating my first x86 assembly program. I am using VS Code as my editor and using Insight as my debugger coupled with DOSBox as my emulator.
As a start I have created a .asm
program to change to colour of the screen:
ANSWER
Answered 2021-Jun-14 at 05:29While DOSBox emulates a 32-bit CPU, DOS itself runs in 16-bit real mode, without tools like DOS4gw, used in some DOS Games, such as Doom.
I think the -f win32
command line option is to blame for this error.
QUESTION
I have a very short assembly TASM program:
...ANSWER
Answered 2021-May-23 at 21:44DOSBox adheres to the DOS rule of requiring both carriage return (13) and linefeed (10) to output a newline.
Your code only uses the linefeed and thus the text only drops a line.
QUESTION
I have a db variable in assembly containing a string, like so:
...ANSWER
Answered 2021-Mar-25 at 22:30There actually is an official API for DOS for accessing the host’s clipboard, supported in Windows 3.x and 9x. It is briefly described in article Q67675, formerly in Microsoft’s Knowledge Base.
Here’s a code sample (NASM syntax):
QUESTION
I'm programming in TASM 16bit with DOSBox and here's today's issue: Using DOS INT 21h/2Ch I can get the system's current hundredths of a second. That's good and all... until it's not.
See, I'm looking for an at least semi-accurate time measurement in milliseconds, and I'm positive it's possible.
Why, you ask? Have a look at INT 15h/86h. Using this interrupt I can delay the program in microseconds. If such precision exists, I'm sure getting milliseconds would be a walk in the park.
Some ideas I had: Using INT 70h which occurs every 1/1024 of a second, but I don't know how to listen to interrupts, nor do I want a timing system that can't be divided by 10.
This question has taken the better of me by now, and I've failed finding an already existing solution online.
Cheers in advance.
...ANSWER
Answered 2021-May-12 at 18:56A big thank you to Peter Cordes in the comments for answering, I'll now post the answer to anyone else planning on using an old-fashioned compiler from 30 years ago.
Roughly, the best clock you can get in 16bit TASM is still not enough for accuracy.
Luckily, in TASM you can "unlock" 32bit mode by using the .386
directive (as mentioned here).
Then, you can use the RDTSC
command (Read Time-Stamp Counter), but one problem.. It does not exist in TASM.
The fact it doesn't exist serves us no purpose, because all commands are in TASM (often called mnemonics) are just replacements for an OpCode, which is what defines every instruction the CPU can run.
When the Intel Pentium CPU was released, an OpCode for RDTSC was included, so if you have a CPU from it and up... You're good.
Now, how do we run the RDTSC instruction if it doesn't exist in TASM? (but does in our CPU)
In TASM, there's an instruction called db
, and with it we can run an OpCode directly.
As seen here, what we'll need to do to run RDTSC is: db 0Fh, 31h
.
And that's it! You can now run this instruction easily, and your program will still stay a mess, but a timed mess at that!
QUESTION
ANSWER
Answered 2021-Apr-27 at 12:35TASM is able to echo special characters in Extended ASCII Table by just simply typing the decimal values of each special characters like ▐ (222), █ (219), ▀ (223) and ▄ (220). Just make sure they have commas each of them and must not be the inside the quotation marks.
You can mix both strings and integers in every data string you are storing just make sure you put commas for every strings, and integers and add 13,10 as the return key and "$" to the end.
QUESTION
I'm trying to program batch script in dosbox, but there is no some commands.
For example, if I execute this code:
...ANSWER
Answered 2021-Feb-27 at 14:53command.com
-like command processor included with DosBox
is not fully compatible with command syntax of MS-DOS command.com
or especially windows NT's cmd.exe
command processors.
See this page for commands available to DosBox and their syntax. They may be similar but not the same to MS-DOS ones.
Your options are:
use a batch file that runs outside
dosbox
for anything that does not need to be inside itcopy and run
command.com
from a real MS-DOS or other DOS. You can get one from an image of a DOS boot floppy (or Windows 95, 98 or ME) which should be plentiful in the internet. Then refer to command-line manual for that DOS version. You will lose access to DosBox-specific commands inside it and it may try to needlessly hog the CPU as almost any other DOS program.write a program in any programming language that can be executed in DOS like C (free C compilers for DOS) and call it from DosBox. Some of the compilers are made free and available for download.
QUESTION
I'm working on a PC emulator using both Bochs and DOSBox as references.
When emulating the "NEG Ed" instruction (two's complement negation of a doubleword) I'm getting different results if I compile with -O0
rather than -O2
.
This is a test program with just the relevant bits:
...ANSWER
Answered 2021-Jan-31 at 13:31There are some issues in your code:
the value returned by
strtol("0x80000000", NULL, 16)
depends on the range of typelong
: if typelong
has 32 bits, the returned value should beLONG_MAX
, which is2147483647
, whereas iflong
is larger,2147483648
will be returned. Converting these values touint32_t
does not change the value as both as within the range ofuint32_t
. Typelong
on your system seems to have 64 bits. You could avoid this implementation defined behavior usingstrtoul()
instead ofstrtol()
.there is no need for the intermediary cast to
(int32_t)
: negating the unsigned value is well defined and-0x80000000
has the value0x80000000
for typeuint32_t
.furthermore, this conversion is counterproductive and the likely cause of the observed behavior as negating the value
INT32_MIN
has undefined behavior because of signed arithmetic overflow. With optimisations enabled, the compiler determines that you are extracting the sign as if bybool sign = -(int32_t)value < 0
and simplifies this expression asbool sign = (int32_t)value > 0
, which is correct for all values exceptINT32_MIN
for which the compiler considers any behavior to be OK, since the behavior is undefined anyway. You can check the code on Godbolt's Compiler Explorer.you use type
bool
without including: the program should not compile. Is this a copy/paste error or do you compile as c++? The C99
_Bool
semantics add an implicit test in the intialization statement, but it would be better to make it explicit and write:
QUESTION
Programs using SDL2, for instance games built with pygame and the Mednafen emulator, do not work correctly with the default Xmonad configuration. When they are started in fullscreen mode, their window isn't shown. Here is a minimal reproducible example of an SDL2 program that fails to show its window:
...ANSWER
Answered 2021-Jan-19 at 02:13While I don't have much to say about the details of what's going on, I apparently succeeded in reproducing your issue by poking at my own xmonad.hs
. After removing the call to ewmh
from it, running your program resulted in an empty fullscreen window, rather than a red one. That being so, changing your minimal configuration to...
QUESTION
I got an assignment where I have to add 2 numbers and display the result. I'm having problems with displaying them in console. Instead of displaying the number, it displays the representation of ascii[ for numbers that adding are greater then 9. For example: 8 + 9 = 17 and it prints the letter A.
How can I display the number and not the ascii?
Bellow is the code I'm working with.
...ANSWER
Answered 2021-Jan-12 at 09:13You would have to do the following in (pseudo code):
QUESTION
I have a program written in tasm
under dosbox
(its text is provided below).
Is is produced by my own c-written compiler for abstract pl.
I am trying to compile and run it in the following way:
ANSWER
Answered 2021-Jan-05 at 02:08My version of tasm emits a
*Warning* Assuming segment is 32 bit
You should use the .386
after the .MODEL SMALL
to keep segments 16 bit, or explicitly emit 16 bit segments instead of using the simplified directives.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dosbox
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page