VOGONS


First post, by absamide

User metadata
Rank Newbie
Rank
Newbie

I am trying to build DOSBox to run on a ZipitZ2. This is a little box that runs Linux and has an ARM processor and 32 MB of ram, but also takes an SD Mini card. Linux runs on it with no real problem but the screen limited to 320 x 240 in size. Whenever I try to start DOSBox from a basic compile it wants to startup 640x480 which it can't do on this box. Also when the creator of this device did it they actually have a screen that is 240x320 that they built into the box sideways. This means everything run on it has to be turned 90 degrees counter clock wise.

So my questions are what I would need to change in the source code so DOSBox will only attempt to display at a maximum of 320 x 240 and how would I convince DOSBox to display everything with a 90 degree CCW turn?

Thanks for any help you can provide. If there is any other information I can provide please let me know.

Reply 1 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

did you check the various handheld ports that are made of dosbox ?
like for the PSP, Nokia N80, s60 and a few more ?

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Especially pay attention to what they're doing to sdlmain.cpp in dosbox/src/gui,
the SDL_SetVideoMode calls are triggering your current E_Exit.

and how would I convince DOSBox to display everything with a 90 degree CCW turn?

I assume you don't want to display 320x240 on a 240x320 display? Otherwise it
should "simply work" as what SDL is doing.

Reply 3 of 7, by absamide

User metadata
Rank Newbie
Rank
Newbie

I have not looked at the ports to other handhelds yet. I will see if I can check out their source for some of those files and see if I can determine what would need to be changed. Thanks for that recommendation.

For the display on the zipit it is set to be 320x240, It would just look better if I could get it to turn. Here are a couple of pictures for example. Sorry they are not cleaner.

http://home.comcast.net/~absamide/ZipitZ2.jpg

http://home.comcast.net/~absamide/Z2Dosbox.jpg

The second picture is where I have started DOSBox and it switched my screen around even though I already have exported environment variables in SDL to set it to display correctly. Apparently DOSBox is resetting those variables, or setting them to something else when it is executed.

Thanks for the information.

Reply 4 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The second picture is where I have started DOSBox and it switched my screen around even though I already have exported environment variables in SDL to set it to display correctly.

That looks like an SDL problem to me, there's nothing in dosbox that forces
a special screen orientation. Check what video mode is requested for that
look (a possibly modified video mode, on a regular system dosbox would
request a 640x400 video mode) and what a simple SDL test application
produces when directly setting that mode.

Reply 5 of 7, by cenobite666

User metadata
Rank Newbie
Rank
Newbie

I faced a similar problem when I was porting DOSBox to A320/Nanonote.

Here's what I did:

I forced the main screen to be the native size of your LCD screen:

sdl.surface=SDL_SetVideoMode(320,240,0,SDL_SWSURFACE);

Subsequent calls to changing video mode are replaced with creating a surface instead. ie

sdl.surface=SDL_CreateRGBSurface(SDL_SWSURFACE,width,height,bpp,rmask,gmask,bmask,0xff);

I then #define SDL_Flip with my own blit routine which either copies the screen directly if the resolution is <= 320x240 or does some scaling if it's larger.

Reply 6 of 7, by absamide

User metadata
Rank Newbie
Rank
Newbie

Thanks. What I am using to get things to look right in the screens currently is:

SDL_VIDEO_FBCON_ROTATION="CCW" which sets it to show up correctly. I am wondering if I need to incorporate that somewhere into DOSBox for my particular setup. Not really sure just how rough it would be or if it would be a simple addition once the video has been initialized.

I will have to look into those options and see what I can make work.

Reply 7 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I am wondering if I need to incorporate that somewhere into DOSBox for my particular setup.

There should be already some setenv of SDL variables in sdlmain.cpp,
just be sure it's done before SDL is initialized.