dosbox

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

Moderators: cheriff, TyRaNiD

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

Post by Arwin »

I can imagine. I'm not getting one anyway.

Amazingly though, I just tried Xenon 2 Megablast, and however incredibly slow it is, it does work. :)
skeezixcodejedi
Posts: 29
Joined: Tue Aug 30, 2005 10:37 am
Contact:

Post by skeezixcodejedi »

bah, Xenon 2 is an ST and Amiga game. It stunk in DOS, and CaSTaway is fast :) For Civ, use CaSTaway as well.

DOS.. Wizardry 7, Eye of the Beholder, Dune 2 .. woowoo :)

DOSBox usually performs badly until you hit about 600MHz or so; how does she fare on the poor PSP?

jeff
--
Have you played Atari today?
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

I've uploaded a new binary fixing the vde194 crash. Here's the change, it's self explanatory.

Code: Select all

@@ -240,7 +254,7 @@
        if ((len>0) && (newdir[len-1]!='\\')) {
                // It has to be a directory !
                struct stat test;
-               if (stat(newdir,&test)==-1)                     return false;
+               if &#40;stat&#40;newdir,&test&#41;<0&#41;                       return false;
                if &#40;&#40;test.st_mode & S_IFDIR&#41;==0&#41;        return false;
        &#125;;
        int temp=access&#40;newdir,F_OK&#41;;
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

skeezixcodejedi wrote:bah, Xenon 2 is an ST and Amiga game. It stunk in DOS, and CaSTaway is fast :) For Civ, use CaSTaway as well.

DOS.. Wizardry 7, Eye of the Beholder, Dune 2 .. woowoo :)

DOSBox usually performs badly until you hit about 600MHz or so; how does she fare on the poor PSP?

jeff
Yeah, I had a few Atari STs during the best part of my teens and later an Amiga as well. I know Bleem is the best emulator in existence but I couldn't get those guys to port it to the PSP or give us the source. The Atari is extremely emulateable, as CaSTaway also shows, and it is the only one for which most ROMs are actually legal and free of charge, including TOS ...

You can play Civ on the SNES emu also btw. :D

She doesn't fare too well on the poor PSP at the moment, because she's not being optimised or anything.

I think she might actually do well in theory though, if someone is skilled enough to use the Media Engine, a.k.a. MIPS R4000 number 2, to say emulate the main processor, and use the main MIPS R4000 to emulate the rest, or something like that.

But that'll probably be hard work.

@crazyc: looks good.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

I found your problem related to 'Slow games' AS an expert with dosbox. Im guessing that the CPU cycles arent high enough

put them about 10000 (in dosbox.conf)
phage13
Posts: 3
Joined: Thu Oct 27, 2005 11:51 am

Post by phage13 »

I have downloaded and implemented the files from that are provided form here
http://www.niwra.nl/psp/dosbox-psp.zip
http://home.wi.rr.com/crazyz/dosbox.patch How do I install this patch
http://home.wi.rr.com/crazyz/stat_trunc.c How do I install these library files

However I am having problems with operating Dosbox. Essentially they are the same problems that Arwin was having i.e.
1. The p-srint combination does not produce a "Y" key.
2. The p-sprint "Enter" button does not appear to be acting properly.
3. No mouse input.

These problems are preventing me from using Dosbox effectively.

I have installed dosbox and was interested in running some small LOGO programs. PCLogo version 4 seems to run fine. The slowness of the emulation is not a problem since it allows one to see the logo commands slowly creating the desired patterns. Not having a Y key is a bit of a pain (so is producing the " code but it is posible).

I was also interested in running some very old flightsims of less than 1 meg on size but cannot get past the splash screen for each sim.

Would it be possible for someone to make available the latest dosbox with the patch in a 1.0 or 1.5 eboot format? Also, how do I install the patch and library files.

Thank You

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

Post by Arwin »

I'm using the .elf and .config files that crazyc put up in his opening post. I start these using File Assistant ++, but if you want them as a PBP I suggest picking up the ELF2PBP tool somewhere on pspupdates.
phage13
Posts: 3
Joined: Thu Oct 27, 2005 11:51 am

Post by phage13 »

Thanks Arwin and crazyc
Things seem to be working OK now. I now have a mouse and functioning Y key :)
Cheers
uesugi_kaili
Posts: 2
Joined: Sat Nov 19, 2005 4:10 pm

Post by uesugi_kaili »

I have downloaded all the files that phage13 had noted
however, I am completed lost. I don't even know how to make the dosbox run in my psp. Can someone please tell me what are the steps that I need to do in order to get everything right?

Thanks.

uesugi_kaili
phage13
Posts: 3
Joined: Thu Oct 27, 2005 11:51 am

Post by phage13 »

hi uesugi,

You have two options.
Option1. Download the files that crazyc has provided in the third message in the thread. The first will be saved as dosbox. You must change the name of this to dosbox.elf
The second file will be saved as dosbox.conf
Create a folder on your psp called dosbox. Now place the dosbox.elf and dosbox.conf in this folder.
Now go to, say, www.pspudates.com and download and install the fileassistant+++ programme.
Run the fileassistant programme and select the dosbox.elf file. You will then be given an option to run that file. Do this and dosbox will start.

Option2.
Download the 2 files provided by crazyc and rename the dosbox file to dosbox.elf as before.
Download a the elf2pbp programme which can be found at pspupdates.com
Run the elf2pbp programme and convert the dosbox.elf file into an eboot.pbp file. Now use the kxploit programme if you need to run dosbox with firmware1.5. The dosbox.conf file goes in the dosbox folder along with the eboot.pbp file

Option1 is the simplest.
uesugi_kaili
Posts: 2
Joined: Sat Nov 19, 2005 4:10 pm

Post by uesugi_kaili »

it works! thanks a lot!

uesugi
oninotsume
Posts: 1
Joined: Sun Dec 25, 2005 3:32 pm
Location: Japan

Is this still under development?

Post by oninotsume »

Sorry if this question has already been proposed, or if I unwittingly say something very nooby, but is Dosbox for the PSP still under development? It sounds like such a great idea. I'm thinking it would be awesome to play some of my old dos games like Willy Beamish, Wing Commander, Ultima, Rise of the Dragon, etc., but is that hoping too much from the PSP?
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Re: Is this still under development?

Post by crazyc »

oninotsume wrote:Sorry if this question has already been proposed, or if I unwittingly say something very nooby, but is Dosbox for the PSP still under development? It sounds like such a great idea. I'm thinking it would be awesome to play some of my old dos games like Willy Beamish, Wing Commander, Ultima, Rise of the Dragon, etc., but is that hoping too much from the PSP?
I've had problems getting it to work after I upgraded my toolchain, I am still working on it at a slow pace though. I don't know if it will ever be fast enough to play any of those games.
planetusa
Posts: 21
Joined: Tue Dec 06, 2005 3:03 pm
Location: Asheville
Contact:

Post by planetusa »

I myself haven't been able to get a binary of dosbox to work, but it's good to hear there's a few fixes out there.

How fast do you think it would be for say games like commander keen and the like? Old school side scrollers....

Also, eventually, will it be possible to map certain buttons (d-pad to arrow keys, ctrl to x, alt to o, etc) using a config file?


Michael
planetusa
Posts: 21
Joined: Tue Dec 06, 2005 3:03 pm
Location: Asheville
Contact:

Re: Is this still under development?

Post by planetusa »

oninotsume wrote:Sorry if this question has already been proposed, or if I unwittingly say something very nooby, but is Dosbox for the PSP still under development? It sounds like such a great idea. I'm thinking it would be awesome to play some of my old dos games like Willy Beamish, Wing Commander, Ultima, Rise of the Dragon, etc., but is that hoping too much from the PSP?
You could play rise of the dragon via the sega cd emulator.....

I do.


Michael
manaox2
Posts: 2
Joined: Sat Mar 25, 2006 6:35 pm

Post by manaox2 »

Good luck with your DOSBox project CrazyC. I am really looking forward to a new version. I really could use a psprint pic guide (there are also some really nice new keyboards you could implement being made at pspupdates) inside the emu and some increased compatibility. I'll donate if your in need. I don't know what to do with myself trying to get this to happen. :(
Murdock
Posts: 110
Joined: Sun May 21, 2006 2:14 am

Post by Murdock »

Hi!

JUst wanted to ask what prevents u crazyC from creating a more compatible and more fluidly running version?

I mean this beta from '05 seems to work pretty nice, but I actually can't run ANY game needs 33 mhz ... so this DosBox is pretty useless. I mean of course it needs alot of power to emulate even a 33 mhz unit, but this should be realizable. I actually can't even code one line and I appreciate ur work alot, but why did u stop working on it? I think it is pretty sad that u don't develop this project any further. Back in the days there were alot of very good games that I'd love to see running on the PSP.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

Commander keen 4!!!!!!!!!!!!!!!!!!!!!!
dangerous DAVEEEEEEEEEEEEEEEEe
Windows 3.11 running winfish!!!!!!!!!!!!!!!!

At least release the source :P
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

Now that i've got a working toolchain again, I've posted a new patch and binary at the earlier links. Threading the input code provides a nice speedup, the Warcraft 2 main menu is reached in about a minute. To build it you'll need this ftruncate implementation and to run it a fix needs to be made to SDL. In the SDL video code, if a video mode change occurs to a paletted mode when the palette memory was already allocated, this->hidden->tpsm will be set to GU_PSM_8888 not GU_PSM_T8.

Code: Select all

int ftruncate&#40;int fd, off_t length&#41;
&#123;
	int ret;
	SceOff oldpos;
	if &#40;!__PSP_IS_FD_VALID&#40;fd&#41;&#41; &#123;
		errno = EBADF;
		return -1;
	&#125;

	switch&#40;__psp_descriptormap&#91;fd&#93;->type&#41;
	&#123;
		case __PSP_DESCRIPTOR_TYPE_FILE&#58;
			if &#40;__psp_descriptormap&#91;fd&#93;->filename != NULL&#41; &#123;
				if &#40;!&#40;__psp_descriptormap&#91;fd&#93;->flags & &#40;O_WRONLY | O_RDWR&#41;&#41;&#41;
					break;
				return truncate&#40;__psp_descriptormap&#91;fd&#93;->filename, length&#41;;
				/* ANSI sez ftruncate doesn't move the file pointer */
			&#125;
			break;
		case __PSP_DESCRIPTOR_TYPE_TTY&#58;
		case __PSP_DESCRIPTOR_TYPE_PIPE&#58;
		case __PSP_DESCRIPTOR_TYPE_SOCKET&#58;
		default&#58;
			break;
	&#125;

	errno = EINVAL;
	return -1;
&#125;
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

If you post patches for SDL/newlib/whatever I can merge them.
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

jimparis wrote:If you post patches for SDL/newlib/whatever I can merge them.
Well, ftruncate is above, fit that in as you like. Also this patch to newlib,

Code: Select all

--- include/sys/unistd.h  Thu Nov 03 10&#58;52&#58;15 2005
+++ include/sys/unistd.h  Tue Jan 23 16&#58;07&#58;24 2007
@@ -190,7 +190,7 @@
 int     _EXFUN&#40;_execve, &#40;const char *__path, char * const __argv&#91;&#93;, char * const __envp&#91;&#93; &#41;&#41;;
 #endif

-#if defined&#40;__CYGWIN__&#41; || defined&#40;__rtems__&#41; || defined&#40;__sh__&#41;
+#if defined&#40;__CYGWIN__&#41; || defined&#40;__rtems__&#41; || defined&#40;__sh__&#41; || defined&#40;PSP&#41;
 #if !defined&#40;__INSIDE_CYGWIN__&#41;
 int     _EXFUN&#40;ftruncate, &#40;int __fd, off_t __length&#41;&#41;;
 int     _EXFUN&#40;truncate, &#40;const char *, off_t __length&#41;&#41;;
The SDL problem I patched like this:

Code: Select all

--- SDL_pspvideo.c.orig Sat Feb 03 15&#58;25&#58;08 2007
+++ SDL_pspvideo.c      Thu Feb 01 22&#58;11&#58;50 2007
@@ -430,7 +430,10 @@
 #endif

        this->hidden->psm = psm_value&#40;bpp&#41;;
-       this->hidden->tpsm = this->hidden->psm;
+       if&#40;bpp == 8&#41;
+               this->hidden->tpsm = GU_PSM_T8;
+       else
+               this->hidden->tpsm = this->hidden->psm;
        this->hidden->pixel_format = pixel_format;
        this->hidden->frame = 0;
        this->hidden->frame_offset = 0;
@@ -742,10 +745,8 @@
                ret = 0;
        &#125;

-       if &#40;this->hidden->gu_palette == NULL&#41; &#123;
+       if &#40;this->hidden->gu_palette == NULL&#41;
                this->hidden->gu_palette = memalign&#40;16, 4 * 256&#41;;
-               this->hidden->tpsm = GU_PSM_T8;
-       &#125;

        palette = this->hidden->gu_palette;
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

Its good to see you back CrazyC :)

Lets hope Commander Keen with sound comes along soon!
adtbm
Posts: 6
Joined: Tue Feb 06, 2007 5:15 am

Help for a Newbie

Post by adtbm »

i have read alot and got the binary changed into an PBP.
Its working fine on my PSP. THANKS SO FAR CRAZYC YOU HAVE DONE A GREAT JOB SO FAR !!!! WOW !!!!

But now my next Question:
How do i implement the Patch, the ftruncate and the newlib ?

Or JimParis could you provide us with the new Binary, if you managed to merge them in ?

I have downloaded the Toolchain and gonna install it later on. But help would be appreciated!
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

I've posted a new patch and binary that fixes serious problems with unaligned loads and caps the framerate at 60fps. Also, joystick and mouse mode can be toggled with ltriggger+rtriggger+down+start. With this Commander Keen 3 is a bit slow but very playable.
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

Another new patch and binary. This one draws directly rather then copying the frame into SDL's buffer and disables those audio devices that are unused. Adlib emulation seems to crash occasionally avoid it for the moment (it also is rather slow so it probably should be avoided anyway).
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Where are they posted?
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

J.F. wrote:Where are they posted?
Same links as on the first page.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Okay, thanks. Just wanted to make sure.
crazyc
Posts: 408
Joined: Fri Jun 17, 2005 10:13 am

Post by crazyc »

Posted a new patch and binary. It may be placebo, but some things seem to be significantly faster now.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

Would be nice to see some control mapping now, Im tempted to try dangerous dave out as it looks normal speed


examples : d-pad is standard up, down , left and right

analog for mouse

Square = Control
circle = Alt
X = Enter
Triangle = Space
L = shift
R = another key i may have forgotten
Locked