Interesting Dosbox Bug


chronoboy

Still Fresh
Joined
Nov 17, 2007
Messages
29
Hey everyone,

I am just playing around with the latest release of DOSBox, and created a neat little GP2X DOSBox test app, which tests various functionality for debugging reason. I originally created this, as one app I made a while back in DOS just doesn't like DOSBox on the GP2X. Just wondering if anybody here has some insight on this problem.

Basically, if the application creates a new file, and attempts to delete it before exiting the application, it causes an error and aborts. I believe it may be a syncing issue with the GP2X.

Anyways, if anybody is interested in this testing application for DOSBox, I'll include a link here and soon add it to the Archive for others can download it as well. I will be adding a test for the touchscreen, so it can be calibrated by the developers. I'll make the touchscreen test output a text file with debugging data of where the mouse/pointer was placed and where it was requested to be placed. This should make developing the touchscreen ability for DOSBox a bit easier.

So far, the tests are, file write, file read, graphics, and PC Speaker. There a special file called gp2x.key included in the archive. This file is contains the key mappings just in case you want to use the app on a real PC to compare output. If this special file is deleted, it will merely prompt you at startup to re-assign the keys.

You can download the GP2X DOSBox tests from here: http://www.gp2x.iamkevin.ca/dl/dosbox-tests.zip
The source code is included, which is in QB 7.1 PDS .BAS format.

I will add a touchscreen test as soon as I can.

If anybody can figure out why the file write test fails the first time around, please post the fix. I am in the process of porting all of my old DOS projects to the GP2X, any help in this issue would be great.
 
Well, I added the touchscreen test, I will update my file and also add it to the gp2x archive for others.

Here is the debugging data obtained:

X1: 100
Y1: 100
X2: 104
Y2: 88
X1: 30
Y1: 130
X2: 34
Y2: 112
X1: 40
Y1: 60
X2: 42
Y2: 53
X1: 110
Y1: 40
X2: 112
Y2: 36
X1: 10
Y1: 90
X2: 20
Y2: 77

From what I can tell, DOSBox is picking up the touch about 10 pixels about the actual touch. The X-Axis appears to be fine, just the Y-Axis is off by about 10 pixels.

X1 and Y1 are the actual locations of the boxes. Where X2 and Y2 is where the touch got picked up. For now, I can code apps with this funny offset, and release a patch when DOSBox is updated. However, this slight issue should not affect most games, just be sure to touch the screen a bit lower from where you want to really touch.

Anyways, great work with DOSBox port so far, keep it up.
 
Pickle said:
Are you deleting the file from your dos program or are you deleting it from within dosbox?

Both, as my DOS program is deleting the file, and the DOS program is running within DOSBox.
 
Last edited by a moderator:
chronoboy said:
Pickle said:
Are you deleting the file from your dos program or are you deleting it from within dosbox?

Both, as my DOS program is deleting the file, and the DOS program is running within DOSBox.

Are you sure its not something to do with just your dos program? I.e Can you run the same code in real dos and it works?
 
Last edited by a moderator:
Back
Top