dosbox

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Locked
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

dosbox

Post by crazyc »

Edit:
0.71 patch
0.71 binary (rename to EBOOT.PBP if you have to)
0.71 conf file
0.60 binary

Nothing below this line applies to the newest version! It's just there for context.

This patch, when applied to dosbox 0.60 and linked with these library functions, arwin's p-sprint and SDL (with 8-bit surface patch), gets dosbox running on the psp. Later versions use an array too large to fit in the PSP memory for indexing memory pages while this version has high level emulation of dpmi. I've tested simcity 2000 and tie fighter and they run although very slowly, a lot of optimization will be need if this will be usable. Note that stat fails if the root of the memory stick is what is being checked therefore it cannot be mounted. Mounting ms0:/psp works fine though. Also there is currently no mouse or joystick support.
Last edited by crazyc on Fri Aug 31, 2007 6:08 am, edited 3 times in total.
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

nice work... what are your thoughts on supporting keyb+mouse+joystick in a single SDL app?
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Re: dosbox

Post by Arwin »

crazyc wrote:This patch, when applied to dosbox 0.60 and linked with these library functions, arwin's p-sprint and SDL (with 8-bit surface patch), gets dosbox running on the psp. Later versions use an array too large to fit in the PSP memory for indexing memory pages while this version has high level emulation of dpmi. I've tested simcity 2000 and tie fighter and they run although very slowly, a lot of optimization will be need if this will be usable. Note that stat fails if the root of the memory stick is what is being checked therefore it cannot be mounted. Mounting ms0:/psp works fine though. Also there is currently no mouse or joystick support.
Will you release a package? Could be fun to try something like Word Perfect 4.1 on it ... :)
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

rinco wrote:nice work... what are your thoughts on supporting keyb+mouse+joystick in a single SDL app?
Well, dosbox is a special case, I probably could use a configuration screen to select joystick or mouse emulation for the analog stick and triggers, but I see no reason for this or any app to have both emulated at the same time.
Will you release a package? Could be fun to try something like Word Perfect 4.1 on it ... :)
Here's an elf binary and config file. I'm too lazy to make a PBP.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

crazyc wrote:
rinco wrote:nice work... what are your thoughts on supporting keyb+mouse+joystick in a single SDL app?
Well, dosbox is a special case, I probably could use a configuration screen to select joystick or mouse emulation for the analog stick and triggers, but I see no reason for this or any app to have both emulated at the same time.
Will you release a package? Could be fun to try something like Word Perfect 4.1 on it ... :)
Here's an elf binary and config file. I'm too lazy to make a PBP.
Awesome, thanks! It works :) (file assistant rules)

What version of p-sprint did you use btw? The latest? (63a) It looks like an older version, because the directional keys are mapped differently, but I'm not sure and you might have changed a few things.

Anyway, it's very nice. I'm off looking for some DOS progs now.

A.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Yeah, from the looks of it many keys didn't quite turn out right, in terms of mapping. The directional keys and numbers seem to work pretty ok when I'm using PEDIT, but the directional keys are mapped wrongly. For instance, where left should have been left-left, left-left is actually now the Insert key (in controls mode - hold up and press x. Funtion and numbers mode is hold left and press x).

The 'y' is gone completely (left-up). All the other alphabet keys seem to be there though. I'm using PEDIT 4.0 to test, nice freeware version of the EDIT.COM with some additional features.

Most programs I'm running seem to crash with a Bus Error though. I just did a more or less successful setup of arachne (the web browser for dos) but when booting up I get another bus error (data) 8802BAB8 / 0000001C

The lack of a Y is pretty annoying actually :D Several setups ask for pressing that key.
Wraggster
Posts: 121
Joined: Fri Aug 26, 2005 7:40 am
Contact:

Post by Wraggster »

anychance of a compiled version of Dosbox :)
Webmaster of http://www.dcemu.co.uk

DCEMU The Worlds Only Homebrew & Gaming Network of Sites.
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

Arwin wrote:Yeah, from the looks of it many keys didn't quite turn out right, in terms of mapping. The directional keys and numbers seem to work pretty ok when I'm using PEDIT, but the directional keys are mapped wrongly. For instance, where left should have been left-left, left-left is actually now the Insert key (in controls mode - hold up and press x. Funtion and numbers mode is hold left and press x).
You can see the translation table I used in the patch. Directional keys are not mapped because I wasn't sure how you handle them (make code for up arrow in at set 2 is E0,75, is that what you return?) and it was just quick and dirty for testing anyway.
Arwin wrote:The 'y' is gone completely (left-up). All the other alphabet keys seem to be there though. I'm using PEDIT 4.0 to test, nice freeware version of the EDIT.COM with some additional features.
Not sure what happened here. I'm sure fairly y is mapped correctly.
Arwin wrote:Most programs I'm running seem to crash with a Bus Error though. I just did a more or less successful setup of arachne (the web browser for dos) but when booting up I get another bus error (data) 8802BAB8 / 0000001C
Is the first number the faulting pc and do the other programs crash at the same address? That's a kernel address, are you using 1.5? If so the crash is probably in kernel strncpy, it would help to know what ra is when it crashes.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

crazyc wrote:You can see the translation table I used in the patch. Directional keys are not mapped because I wasn't sure how you handle them (make code for up arrow in at set 2 is E0,75, is that what you return?) and it was just quick and dirty for testing anyway.
The keycodes for the arrows are 37,38,39,40 (left,up,right,down) and that's what p-sprint returns.

Actually though my documentation for version 0.50a is incorrect there, so if you used that, I think this may be the cause - I'll fix that asap! It looks like that's the problem, as some of the directional keys are in the place of the Function keys, and I think this is something that I had wrong in my old not-updated documentation.

EDIT: looking at the documentation, the Function keys are wrong, but not the arrow keys.

A few more examples, up-right is now cursor right, and triangle-up is cursor left.

(And of course I understand that this is a quick version, and even then it turns out quite well - even some of the ctrl/alt combinations seem to work sometimes. )
Not sure what happened here. I'm sure fairly y is mapped correctly.
It's just that one key. So maybe something small.
Arwin wrote:Is the first number the faulting pc and do the other programs crash at the same address? That's a kernel address, are you using 1.5? If so the crash is probably in kernel strncpy, it would help to know what ra is when it crashes.
Yes, I'm using 1.5. It usually doesn't even get to the memory dump, I've only seen a table with the registers once. I will post all crashes I have right here.

EDIT: the documentation is now updated.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Wraggster wrote:anychance of a compiled version of Dosbox :)
See the link to the elf and conf files above. Just download them (use save as because they're renamed to .txt), remove the .txt extention, and put them on your PSP, then start them using File Assistant.

(if you really need a PBP and can't make one yourself with for instance elf2pbp then you can find one in the pspupdates thread on dosbox - just search for 'dosbox')
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

In this post I'll log the errors I get.

Often I just get:

Bus error (data)

And nothing else. Home key still works, but after I select 'Yes' it's stuck at 'Please wait ..."
Wraggster
Posts: 121
Joined: Fri Aug 26, 2005 7:40 am
Contact:

Post by Wraggster »

bit hard to use i find at the mo

maybe if theres a way of having an auto set up for some games

so it goes straigh to the game
Last edited by Wraggster on Wed Aug 31, 2005 1:16 am, edited 1 time in total.
Webmaster of http://www.dcemu.co.uk

DCEMU The Worlds Only Homebrew & Gaming Network of Sites.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Wraggster wrote:downloads are down ?
Seems like it. I grabbed the 1.0 PBP from the pspupdates thread and put it up for you here:

http://www.niwra.nl/psp/dosbox-psp.zip
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

Arwin wrote:In this post I'll log the errors I get.

Often I just get:

Bus error (data)

And nothing else. Home key still works, but after I select 'Yes' it's stuck at 'Please wait ..."
With what apps?
downloads are down ?
Works fine here.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

crazyc wrote:With what apps?
As specified:

Setup of Arachne 1.85 (dos browser)

psview (pdf viewer using pdf2ps and gs - will try the separate apps later and edit here)

civ2

xenon2 (game, hangs after selecting 256 VGA, without an error - just stops)
EDIT: discovered it doesn't hang, just reads Enter differently. I can find combos to run through the selection of video modes, but no Enter that it accepts.

EDIT: same with pinball fantasies's setsound configuration. No enter, and no esc being read.

Config.exe (kind of a sysinfo)
This one is the only one that gives a full crash:
ra: 0890B810

Exception: Bus error (instr)
EPC: 0
Cause: 18
Status: 60008613
BadVAddr: 30A40490

For the Windos setup, I'm not sure - seems to run quite well but then I get stuck on confirming the setup with the Y button :D

Paratrooper (paratrop.com - tiny old game)
Sorry, doesn't work on t he Monochrome Display Adapter. You must have a Color/Graphics Monitor Adapter in order to play this game. :D


Just tried Wordperfect 5.1, seems to run fine! :) Except that backspace isn't read properly ... very odd. Enter not either, but then Escape works fine again. Something weird going on, maybe strange keyboard driver.

EDIT: now I even just got an error during 'dir' at the prompt. That happened one time before today (and once more, without the status message)

Exception - Bus error (data)
EPC - 8801BAB8
Cause - 0000001C
Status - 60008603

EDIT: oh, and the mouse has never worked so far. Don't know if that's normal.

Sopwith just works ... lol. Not sure what the keys are, except the bomb with which I keep blowing myself up.
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

Arwin wrote: As specified:

Setup of Arachne 1.85 (dos browser)

psview (pdf viewer using pdf2ps and gs - will try the separate apps later and edit here)

civ2

xenon2 (game, hangs after selecting 256 VGA, without an error - just stops)
EDIT: discovered it doesn't hang, just reads Enter differently. I can find combos to run through the selection of video modes, but no Enter that it accepts.

EDIT: same with pinball fantasies's setsound configuration. No enter, and no esc being read.

Config.exe (kind of a sysinfo)
This one is the only one that gives a full crash:
ra: 0890B810

Exception: Bus error (instr)
EPC: 0
Cause: 18
Status: 60008613
BadVAddr: 30A40490

For the Windos setup, I'm not sure - seems to run quite well but then I get stuck on confirming the setup with the Y button :D

Paratrooper (paratrop.com - tiny old game)
Sorry, doesn't work on t he Monochrome Display Adapter. You must have a Color/Graphics Monitor Adapter in order to play this game. :D


Just tried Wordperfect 5.1, seems to run fine! :) Except that backspace isn't read properly ... very odd. Enter not either, but then Escape works fine again. Something weird going on, maybe strange keyboard driver.
If you can it would help to see if these work in the pc version of dosbox .6.
Arwin wrote:EDIT: now I even just got an error during 'dir' at the prompt. That happened one time before today (and once more, without the status message)

Exception - Bus error (data)
EPC - 8801BAB8
Cause - 0000001C
Status - 60008603
Again that is a kernel address, I haven't had this happen to me. If you see the whole crash, what is badvaddr?
EDIT: oh, and the mouse has never worked so far. Don't know if that's normal.
Haven't done this yet.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Ok, config.exe doesn't work in dosbox 0.63 pc version either, so that makes sense. Also, I've made a config file using the pc version for pinball fantasies, and after that it st arts up, though it's twice as slow as booting Win95 with bochs and after all the nice intro images, it took so long for a game screen to appear that I gave up, doubting it will ever appear at all.

The other version of paratrooper works, and so does alleycat (woohoo). Of course, none of these games are really playable. One exception is the text adventure 'softporn', the inspiration for leisure suit larry. But I can't type the 'y' there either so I can't buy a whiskey :D or give money etc. All of a sudden a 'y' seems such a vital letter ;)

I also changed the config to disable everything I wasn't using anyway, like sound, midi controller, etc. Most stuff seems to work, albeit very slowly and if it's not too heavy, or requires a 'y' to be pressed before install :D. Going to try the browser again now.
Wraggster
Posts: 121
Joined: Fri Aug 26, 2005 7:40 am
Contact:

Post by Wraggster »

Is it ok to post this as an early wip release on my site or would you rather i dont.

a lot of people would be interested but ill honor your decision :)
Webmaster of http://www.dcemu.co.uk

DCEMU The Worlds Only Homebrew & Gaming Network of Sites.
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

Wraggster wrote:Is it ok to post this as an early wip release on my site or would you rather i dont.

a lot of people would be interested but ill honor your decision :)
Go ahead.
Wraggster
Posts: 121
Joined: Fri Aug 26, 2005 7:40 am
Contact:

Post by Wraggster »

awesome

newsposted here --> http://psp-news.dcemu.co.uk

and release mirrored/screenshots here --> http://psp-news.dcemu.co.uk/pspdosbox.shtml

any probs ill change it ;)

thanks for a great early release
Webmaster of http://www.dcemu.co.uk

DCEMU The Worlds Only Homebrew & Gaming Network of Sites.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Wraggster wrote:awesome

newsposted here --> http://psp-news.dcemu.co.uk

and release mirrored/screenshots here --> http://psp-news.dcemu.co.uk/pspdosbox.shtml

any probs ill change it ;)

thanks for a great early release
Don't forget to mention some of the known issues, like some key mapping problems in the control/function keys and the missing 'y' key. ;)
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Arwin said...
A warning here - this is a very early implementation, and there are notably some bugs in the p-sprint keymappings. The function keys aren't properly mapped and the control keys are in slightly different places. And, most notably, the 'y' key is missing! This can be really annoying at times.

Also, not all programs seem to read the Enter and/or Backspace keys in the same way.

I recommend adding 'c:' to the final line of the .conf file so you don't have to type it to change drive (the ':' is currently a bit tricky to type - we'll be working on that).

I'll make something to help people use p-sprint (a website that translates text into keypress symbols), but here are a few simple ones you might need:

start = Enter
cross = space
down = backspace

right, right | circle, circle | triangle, square = dir

square-left: backward slash
circle-right: forward slash

You might also want to look at this: Image

1:23 AM


Arwin said...
oh and if you would have to type something like "c:" anyway, that's:

square,circle (c)
hold triangle,press up, release both, press left (:)

1:28 AM


Arwin said...
The texteditor PEDIT seems to work quite well btw.

Arrow keys are garbled somehow in this dosbox version and seem to be mapped in group 1 rather than 2 (hold left and press cross to activate or deactivate group 1, hold up and press cross to activate or deactivate group 2):

triangle,up: left
up,right: right
right, up: up
up,left: down

left,left: insert

and they are in group 1 instead of group 2

1:43 AM
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Crazyc, I found an interesting article that probably explains why some programs can read the Enter key, and some don't:

http://support.microsoft.com/default.as ... -us;Q81740

Also tested Qbasic:

Exception - Bus Error (instr)
EPC - 00000000
Cause - 00000018
Status 60008613
BadVAddr - 00000000

ra: 08909728
chaos
Posts: 135
Joined: Sun Apr 10, 2005 5:05 pm

Post by chaos »

wow, too bad qbasic doesn't run.. it could be the most powerful programming tool ever unleashed for psp ;)
Chaosmachine Studios: High Quality Homebrew.
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

Arwin wrote:Arwin said...
A warning here - this is a very early implementation, and there are notably some bugs in the p-sprint keymappings. The function keys aren't properly mapped and the control keys are in slightly different places. And, most notably, the 'y' key is missing! This can be really annoying at times.
I've switched to a new translation table which is based on keyid instead of keycode and key input seems to work better now. I'm also adding mouse support which should be done soon, but i've messed up the drawing code. Once that's fixed I'll put out a new version.

I don't think so, very few apps use the dos con driver, most read use the bios functions or read the keyboard port directly.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

crazyc wrote:I've switched to a new translation table which is based on keyid instead of keycode and key input seems to work better now.
Maybe you'll consider sending me a copy before release, and I'll make sure every key is tested, including some CTRL and ALT combinations. ;)
I don't think so, very few apps use the dos con driver, most read use the bios functions or read the keyboard port directly.
Yeah, I looked some more at dosbox and started to realise that is probably true. But it did seem to explain why some had trouble with keys like Return.

Anyway, let me know if/when I need to test anything.
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

Arwin wrote: Maybe you'll consider sending me a copy before release, and I'll make sure every key is tested, including some CTRL and ALT combinations. ;)
I just put up a new version with mouse and hopefully fixed keyboard support at the same links above. Just post if there are any problems.

Oh yeah, the mouse pointer is controlled by the nub and the buttons are the triggers.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

crazyc wrote:
Arwin wrote: Maybe you'll consider sending me a copy before release, and I'll make sure every key is tested, including some CTRL and ALT combinations. ;)
I just put up a new version with mouse and hopefully fixed keyboard support at the same links above. Just post if there are any problems.

Oh yeah, the mouse pointer is controlled by the nub and the buttons are the triggers.
Awesome, it seems to all work just fine! :) Certainly the 'y' button is back, and the mouse works in PEDIT too. I can use Alt-F to get into the menu, and the arrows work nice also. So far no problems.

Would be nice if the cursor could blink a bit faster, but that probably has to do with the overall speed anyway and isn't really that important. It's faster already than the previous version, that's for sure.

I had a similar crash as I used to have (only three of the debug lines appearing, last one containing 1C) with WordPerfect, but it was already acting up with the previous version (crashing after I tried to answer the question if another copy of wordperfect was active, except now it crashes before that - WP is dodgy anyway ;) ).

Arrows work, home and end work, F1 works, ctrl-shift and alt seem to work properly at least most of the time, all in all I think we have a worthwhile new release here, as far as I am concerned :)

PEDIT now seems fully functional with just about all shortcuts intact!

Only problem I've found so far is that I can't seem to do an ALT-F1 though ... (should be hold left, press circle, release both, press left).

After some more testing, I seem to get the next letter in the alphabet instead. So if I try alt-o, I get a 'p'. If I try alt-s, I get a 't' ... looks like a little bug.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

I still sometimes get a crash upon dir ... also, I can't do a cd \ or cd .. - never could in the previous version either. No idea if that is a general dosbox problem but I don't think so.

When I run the WinDos setup I get (after confirming the default directory):

Exception - Bus error (da

That's as far as it goes. Afterwards, the folder is created, but no files present.

EDIT: Starting VDE194, I get:

Exception - Bus error (data)
EPC - 8802BAB8
Cause - 1C
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

Arwin wrote:I still sometimes get a crash upon dir ... also, I can't do a cd \ or cd .. - never could in the previous version either. No idea if that is a general dosbox problem but I don't think so.

When I run the WinDos setup I get (after confirming the default directory):

Exception - Bus error (da

That's as far as it goes. Afterwards, the folder is created, but no files present.

EDIT: Starting VDE194, I get:

Exception - Bus error (data)
EPC - 8802BAB8
Cause - 1C
There's a problem with one of the new library functions or maybe the way I used them while working around fstat and ftruncate. Unfortunatly without a full register dump, it's hard to track down.
Locked