Page 1 of 2

porting DOSBox

Posted: Wed Jul 20, 2011 8:26 pm
by geo650
Hello!

We've got one more operating system available for our TV devices! It is DOS :)

I've been waiting for this so long but nobody made it (?)
Today I ported DosBox 0.74 for my B650.
Porting is not finished because there are some problems (not working PgUp ,PgDn, End, Home and arrow keys, restarting at exit etc.)
Tested only for a few minutes with DOS Navigator, Woflenstein 3D and Alone in the Dark demo. Of course it is impossible to play without cursor keys, but I am sure it can be done (somewhere in gui/sdl_mapper.cpp or gui/sdlmain.cpp I believe).

Here are some snapshots:
(DELETED)

Binary package (for testing only, not final release):
http://uploading.com/files/aede9e2c/Dos ... review.zip
(run as Game in Content Library)

Original project (and source code):
http://www.dosbox.com/

Enjoy.

Re: porting DosBox

Posted: Wed Jul 20, 2011 11:29 pm
by erdem_ua
Ah! It's looking good.I wonder how many dos games that we could play :)

Re: porting DOSBox

Posted: Sat Jul 23, 2011 11:36 am
by geo650
erdem_ua wrote:Ah! It's looking good.I wonder how many dos games that we could play :)
I wonder, too. Some of them are listed on dosbox website. Of course, some games may not work at all. Never mind. It is a tool not only for games.

I have fixed SDL keyboard functions so all USB keys are working well now. No support for remote control at this stage. You may exit DOSBox by keyboard, but...
The main problem is a bug in exit procedure when it restarts the TV. I hope to figure out how to baypass this bug and release working DOSBox this weekend. Well, moras86 prepared bautiful Content Library icons already! Stay tuned. Thanks.


EDITED @ 2011-07-23:

And...

...you can try it:

DOSBox 0.74 R1 for SamyGO:
http://www.2shared.com/file/9CaLZXKC/DO ... amyGO.html

source code:
http://www.2shared.com/file/fFH8cQAG/DO ... _sour.html


Yesterday, I was able to install and run Windows 3.11 on my B650 :D See photos below...

(DELETED)

Although I don't recommend playing with Windows on Samsung TV because it works veeeeeeeery slowly. Installation lasted for a few hours. Windows is loading in 2-3 minutes. Maybe someone with better knowledge of DOSBox could optimize and speed-up this. Never mind. It's time to run some DOS software on Samsung TV.

Be informed that there is a problem with exiting from DOSBox (exit command or CTRL+F9): TV creates coredump and restarts. Maybe someone wish to look into sources (esp. src/gui/sdlmain.cpp) and tell what is going wrong.

Enjoy.

Re: porting DOSBox

Posted: Sat Jul 23, 2011 12:11 pm
by juusso
Big respect, geo650,

I still can`t stop laughing after i red your post :lol:

Re: porting DOSBox

Posted: Sat Jul 23, 2011 3:19 pm
by erdem_ua
:cry: I think you are not aware what you have done.
AFAIK, It's first M$ Windows OS that runs on TV. Until now, they didn't know if this possible..
So you have opened new era and give them an idea of that "M$ products could run on Television too" for free.
Man, M$ will make billions from this why do you give it for free? They will invade everywhere with new CrapWare product.
I think they will call this as "Windows TV". You have to patent this thing ASAP or I believe M$ will take it from you. :lol:

Re: porting DOSBox

Posted: Sat Jul 23, 2011 10:20 pm
by geo650
HI! :lol: You might be right. That's the thing I have done earlier with my Symbian mobile phone and look what happened... windows phones... :lol:
Of course I wasn't the first to run Windows 3.x on DOSBox/ARM, but I executed Windows (1.x?) on Symbian Epoc32 many years ago using XTM DOS emulator.
Just for fun.

Of course if Windows were written/compiled for ARM cpu it would be really fast on this 600MHz CPU. Today I was playing for a minute with XFormer (Atari XL emulator) on ported DOSBox and it worked very slowly as opposed to "native" Atari800 emulator which runs much faster.

Remember - it is just for fun. Enjoy. :mrgreen:

Hopefully, there is no chance to run Windows 7 that way. ;)

(There will be no patent. If I had made one, I would agree with M$ policy of software licensing. I disagree. No patents!)

Re: porting DOSBox

Posted: Mon Jul 25, 2011 7:45 pm
by geo650
luki92 wrote:...I have plugged USB<-->PS2 converter...
What is the problem with?
I have the same problem with my USB-to-PS2 converter. Maybe the question should be asked to the author(s) of keyboard/mouse HID modules (evdev.ko and usbhid.ko). DOSBox indirectly uses these modules to process keyboard signals. In fact, it uses SDL functions to read keyboard state.

LEDs blinked once (2) because power has been provided to the keyboard.
BTW, there are different USB-to-PS2 converters, with different chips inside. They may behave differently.

(5) Remote control signals are not processed by DOSBox at all. I know something happens after pressing a button (xxxxxx... characters appear) but it must be a side effect.


P.S. Alt. solution for you: buy any cheap USB keyboard. I recommend Tesco Value keyboard (price below 13PLN! ~~ 3.15EUR) which works well.

Re: porting DOSBox

Posted: Fri Sep 02, 2011 1:21 pm
by geo650
luki92 wrote:EDIT: How is USB keyboard detected? Could you post me dmesg output? Maybe adding some links in /dev/ would solve the problem?
I don't know. I am using ready modules without deep knowledge about that.


Now,

I wanted to fix DOSBox 0.74 (release 1) problem of restarting at exit. Then DOSBox 0.74 R2 was born (see: http://wiki.samygo.tv/index.php5/Conten ... ist#DOSBox). There are strange things done because 0.74 R1 restarts at SDL_Quit() command or even before (while deleting config objects). So I decided to find out which objects cause this problem. And I have found that initializing object #4, #6 and #8 (sorry, I don't know their names) cause problems when are deleted at end of try{} command. Besides, there is one problem with setting SDL environment variable before init (putenv(const_cast<char*>("SDL_DISABLE_LOCK_KEYS=1"));) and a problem with SDL_INIT_TIMER in SDL_Init(). Removing all these things made exit smooth and well-performed.
Changes were made in src/misc/setup.cpp and src/gui/sdlmain.cpp source files.

Since I have removed 3 initializations (calling of Section::ExecuteInit() methods) some things may not work in DOSBox 0.74 R2. I am a little tired to check what things were abandoned (maybe soundcard support) but generally DOSBox 0.74 R2 seems to work quite well.

Probably this is not the end of porting, but at least you can exit smoothly to Content Library now.
Enjoy.