maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   First porting effort.. atari800 emulator (https://talk.maemo.org/showthread.php?t=18271)

tobiasj 2008-03-24 14:40

First porting effort.. atari800 emulator
 
4 Attachment(s)
Well my respect and appreciation for you all just keeps getting higher and higher the more I try to do with my N800.

I am trying to port the atari800 emulator to os2008 and after configuring it for sdl and compiling it does work, after a fashion. (see photos)

If anyone has any hints on how to hildonize it properly (yes, I have read the 'Maemo 4.0 Porting Guide' and to be honest I had less idea how to do it when I finished reading that than I did before I read it.)

Atari800 doesn't use glade, which is the example used in the porting guide (it doesnt have a UI persay, just the window it runs in.) I am not sure it even really needs hildonizing to be honest.

Sound is another issue, when running the basic cart/rom there is supposed to be a short phht noise and then the READY prompt. well the phht noise never stops though the other sounds seem to work properly (key press and such) you can use the dpad to arrow around the screen and the center button is enter.

I am going to create a 'boot disc' for it and pop it into the 'drive' and see how much else is working.

So anyway, just putting this out there and if anyone has any tips, ideas or just wants to offer suggestions please do.

Thanks,

-John

You can find more information about this port at http://www.n8ftl.com/maemo and more information on the original at http://atari800.atari.org.

tobiasj 2008-03-24 17:51

Re: First porting effort.. atari800 emulator
 
1 Attachment(s)
Well, making progress. I now have MyDos running on it. A bluetooth keyboard works in full screen and XKBD in windowed mode..


-John

qwerty12 2008-03-24 17:52

Re: First porting effort.. atari800 emulator
 
Hehe, nice :)

Would xkbd work with it?

tobiasj 2008-03-24 18:01

Re: First porting effort.. atari800 emulator
 
1 Attachment(s)
Quote:

Originally Posted by qwerty12 (Post 159516)
Hehe, nice :)

Would xkbd work with it?

<grin> I believe it does... ;)

I just thought about that as you must have been posting, took it out of full screen and tried it. Going to try the side keyboard that Addison created for DOSBox as it would work well with this too.

-John

Gaming seems to work, though sound is not great yet..

qwerty12 2008-03-24 18:06

Re: First porting effort.. atari800 emulator
 
Lol.

About Hildonising, I don't think you really could. Just map the full screen function to F6 & fix minimising :)

tobiasj 2008-03-24 18:23

Re: First porting effort.. atari800 emulator
 
Quote:

Originally Posted by qwerty12 (Post 159523)
Lol.

About Hildonising, I don't think you really could. Just map the full screen function to F6 & fix minimising :)

I think your correct, I just need to figure out how now. ;)

I also need to figure out how SDL handles 'joysticks' so I can map joystick1 to the d-pad and fire to the center button. The games run, but you can not control them.. There are configuration options for the joystick on atari800 but I have not tested them..

Back to work...

-John

qwerty12 2008-03-24 18:34

Re: First porting effort.. atari800 emulator
 
As a fellow n00b developer (my crap port y/day :p)

Look in the c files for SDLK and something after it.

Run xev on the device and see which button does what and map that to the right button in http://www.libsdl.org/cgi/docwiki.cgi/SDLKey and change in the code.

Like middle dpad button= return (xev) = SDLK_RETURN
Full screen button at top = F6 (xev return value) = SDLK_F6

tobiasj 2008-03-24 18:57

Re: First porting effort.. atari800 emulator
 
Quote:

Originally Posted by qwerty12 (Post 159538)
As a fellow n00b developer (my crap port y/day :p)

Look in the c files for SDLK and something after it.

Run xev on the device and see which button does what and map that to the right button in http://www.libsdl.org/cgi/docwiki.cgi/SDLKey and change in the code.

Like middle dpad button= return (xev) = SDLK_RETURN
Full screen button at top = F6 (xev return value) = SDLK_F6


OK then...(with that EXTREMELY helpful information) I now have the joystick mapped to SDLK_RETURN, SDLK_LEFT, SDLK_RIGHT, SDLK_UP, and SDLK_DOWN. and I can play Bezerk. sound isnt horrible, but it is a bit slow.

The full-screen and minimize buttons I have to work on still, thats not as simple as just changing key-mappings in the code.
However thats what this is all about, learning how to port to maemo.. well that and having a wicked cool Atari130Xe on my N800 ;)

time to go back to maemo.org and see what I can find out about the hildon libs..

-John

qwerty12 2008-03-24 19:07

Re: First porting effort.. atari800 emulator
 
Quote:

Originally Posted by tobiasj (Post 159555)

The full-screen and minimize buttons I have to work on still, thats not as simple as just changing key-mappings in the code.
However thats what this is all about, learning how to port to maemo.. well that and having a wicked cool Atari130Xe on my N800 ;)

time to go back to maemo.org and see what I can find out about the hildon libs..

-John

Minimizing I don't think is provided by a keycode. The code I ported had the full screen function in it; just mapped to another button.

:), good luck with this :)

tobiasj 2008-03-24 19:32

Re: First porting effort.. atari800 emulator
 
2 Attachment(s)
Quote:

Originally Posted by qwerty12 (Post 159562)
Minimizing I don't think is provided by a keycode. The code I ported had the full screen function in it; just mapped to another button.

:), good luck with this :)

Full screen on this app is chosen at run time by a command line switch, I can not even find a command I can put in the atari800.cfg file to make it full or windowed. But! that doesn't mean it wont work.. just that it isnt set up that way yet. Though, now that I have the addison keyboard working I dont see the difference, having it windowed allows you to see the time while emulating ;)

-John "still searching maemo.org" Tobias

b-man 2008-03-27 03:20

Re: First porting effort.. atari800 emulator
 
When do you think you will be able to provide this emulator for download tobiasj? This emulator looks really interesting:D

Wes Doobner 2008-03-27 03:37

Re: First porting effort.. atari800 emulator
 
Man this looks cool... if this Atari thing works, then all I need to do is get my Star Wars movies ripped to my N800 and I'm 12 years old again!

Keep up the great work, I'm pulling for you.

tobiasj 2008-03-27 13:04

Re: First porting effort.. atari800 emulator
 
Well, I tried to make a deb yesterday and I musta done something wrong. Not only would it not install (incompatible application package) but when I forced it in (with dpkg) it didn't put any of the extra files in the correct place (atari800.cfg, the desktop file and the script to launch it) sooooo.. unless you just want a tar ball of those files and a list of where to put them it may take a few days for me to figure out what I did or didn't do..


-John

tobiasj 2008-03-27 15:26

Re: First porting effort.. atari800 emulator
 
Before I get to the nitty gritty, this is relatively unstable port at this time, however it DOES work.
At this point (and I am working on it) if you minimize it, it is lost forever (think killall), the "-" button brings up the console but if you didnt run it from xterm your hosed and then you can not close it (again killall) (but I left this because it is useful to me during testing).
Currently you need to put the roms (which you will need to find on your own, but you might want to look at http://atari800.atari.org for ideas on what to use) in /media/mmc2/atari/ROMS and this is also where I put the HD, DISKIMAGES and various other files I am using. This is configurable in both the .cfg and the launch script file to be pointed where ever you want.

the .cfg file sets most of the useful settings for you but the launch script is necessary (at least at this point) because I can not figure out how to put some of those options in the .cfg file. The most important part of this script is the floppy it mounts (which is the 'game' or dos disk you want to boot to. There are options for HD's but I didn't set them up.
Without a bluetooth keyboard you need xkbd to do much outside the joystick I have configured now and I would recommend Addison's x.xkdb template as it fits perfectly in both windowed and fullscreen modes.

OK never mind all the rest of this and see a few posts down for a real honest to goodness .deb.. :)


OK so without an further delay here is a tarball of the files you need, it 'should' uncompress them all to the proper locations, but in case it doesn't here is the TOC of the file...
Nokia-N800-51-3:~# tar -tvf atari800_2.0.3-1.tar
-rw-r--r-- 29999/29999 524 2008-03-24 23:08:30 home/user/.atari800.cfg
-rwxr-xr-x 0/0 192 2008-03-27 10:00:05 home/user/atari.sh
-rw-r--r-- 0/0 2941 2008-03-27 10:00:37 usr/share/pixmaps/atari.png
-rw-r--r-- 0/0 270 2008-03-27 10:01:56 usr/share/applications/hildon/atari800.desktop
-rwxr-xr-x 0/0 427088 2008-03-24 18:49:14 usr/bin/atari800

The file is attached (remove the .deb on the end as it is the only way I could attach it...)and good luck ;)

I will keep plugging away at it and will post revisions every time I make a significant change.


-John

qwerty12 2008-03-27 15:35

Re: First porting effort.. atari800 emulator
 
Cool, mind sharing a link on how you deb'ed it?

For Application Manager to let you install it, make the category in the user section.

So in control (I think), change the section to user/games

tobiasj 2008-03-27 15:50

Re: First porting effort.. atari800 emulator
 
oh, it isn't a deb, its a tarball with a .deb extension so I can attach it to the post.

I still have not figured out how to make the deb file. I am working on that however.

Your right about user/games, sorry I meant to move that there before I handed it out to anyone... oh bother. Next version ;)

I am looking for someplace to post it now, my web server is on a SLOW dsl line and I don't think it can take the strain of hosting this. So as soon as I find another I will just put it there and repost a link..


Thanks for the info

-John

qwerty12 2008-03-27 15:52

Re: First porting effort.. atari800 emulator
 
Quote:

Originally Posted by tobiasj (Post 160990)
oh, it isn't a deb, its a tarball with a .deb extension so I can attach it to the post.

I still have not figured out how to make the deb file. I am working on that however.

Your right about user/games, sorry I meant to move that there before I handed it out to anyone... oh bother. Next version ;)

I am looking for someplace to post it now, my web server is on a SLOW dsl line and I don't think it can take the strain of hosting this. So as soon as I find another I will just put it there and repost a link..


Thanks for the info

-John

Oh, my bad sorry lol.

dh_make requires the use of makefiles etc. It's quite odd imho. I think you should look into Khertan's PyPackager. It runs on the device itself and it's much more easier and with same functions IMO.

tobiasj 2008-03-27 19:23

Re: First porting effort.. atari800 emulator
 
2 Attachment(s)
Quote:

Originally Posted by qwerty12 (Post 160991)
Oh, my bad sorry lol.

dh_make requires the use of makefiles etc. It's quite odd imho. I think you should look into Khertan's PyPackager. It runs on the device itself and it's much more easier and with same functions IMO.

PyPackager is very easy to use, I like it a lot. THUS here is an actual deb you can install using the application manager.

All you will need to do is edit the /home/user/.atari.sh to reflect your 'floppy disk' of choice. I left my choice in the script to show how to use it.

Other options are in the /home/user/atari800.cfg file.

New screen shots are also attached. (with REAL screen capture software this time!)

-John

tobiasj 2008-03-28 01:35

Re: First porting effort.. atari800 emulator
 
OK well I just got the FULLSCREEN toggle working. I have a few more tweaks to make and then I will build a new package and post it.

Things are looking up...

;)


-John

tobiasj 2008-03-28 12:48

Re: First porting effort.. atari800 emulator
 
1 Attachment(s)
As I work more with this, I have found that the SDL joystick interferes with the keyboard (well DUH!) so, if you wish to use it as an 8bit computer and not a Game System you need to add

SDL_JOY_0_ENABLED=0

to the end of the /home/user/.atari800.cfg

and then comment it out or remove it when you want to use the d-pad as a joystick. alternately, I could remove the codings for the SDL_Joy_0 from the code and put it all in the config, but either way you would still have to change something to use the keyboard or the joystick as I have it set up now. you can add the lines:
SDL_JOY_0_ENABLED=1
SDL_JOY_0_LEFT=260
SDL_JOY_0_RIGHT=262
SDL_JOY_0_UP=264
SDL_JOY_0_DOWN=258
SDL_JOY_0_LEFTUP=263
SDL_JOY_0_RIGHTUP=265
SDL_JOY_0_LEFTDOWN=257
SDL_JOY_0_RIGHTDOWN=259
SDL_JOY_0_TRIGGER=306
SDL_JOY_1_ENABLED=0
SDL_JOY_1_LEFT=97
SDL_JOY_1_RIGHT=100
SDL_JOY_1_UP=119
SDL_JOY_1_DOWN=120
SDL_JOY_1_LEFTUP=113
SDL_JOY_1_RIGHTUP=101
SDL_JOY_1_LEFTDOWN=122
SDL_JOY_1_RIGHTDOWN=99
SDL_JOY_1_TRIGGER=9

to /home/user/.atari800.cfg and change the mappings to be whatever you want using the SDL code for whichever buttons you want.
http://www.libsdl.org/cgi/docwiki.cgi/SDLKey

Personally I hate trying to use one of the top buttons as fire when using the dpad as the movement so I have it mapped to the center button, but that being enter/return can cause problems hence the config to change it...
Attached is the latest version with the FULLSCREEN toggle working properly on the (ironically enough) Fullscreen button.

-John

tobiasj 2008-03-28 14:42

Re: First porting effort.. atari800 emulator
 
3 Attachment(s)
Yet another version, really making progress now..

In this version the SDL_Joy_0 is off by default (turn on in /home/user/.atari800.cfg)

However, the launch script has been shortened due to the fact that I have the emulation menu working now.

The menu button on the N800 will open the emulators config menu where you can set locations for ROMS, HD's, FD's. It will let you create blank floppy images, you can set the system type, basically set everything you could need.

The only glitch I have found is that on some disk images, if you 'insert' the disk and then warm restart it doesn't always survive. I have found the best way to 'insert' a disk and run what is on it is to use the 'Run Atari Program' menu option and point it at the disk image you want to use.

Attached is latest version and a couple screen-shots. You can also take a more in-depth look at it on my site at http://www.n8ftl.com/maemo/ and the original at http://atari800.atari.org


-John

rbrewer123 2008-04-06 06:57

Re: First porting effort.. atari800 emulator
 
This is fun stuff... I got the Xformer ROMS and managed to boot into BASIC. It seems to be working, but prints a funny character when I press the return key on my n810. Any tips?

tobiasj 2008-04-06 12:26

Re: First porting effort.. atari800 emulator
 
Quote:

Originally Posted by rbrewer123 (Post 165691)
This is fun stuff... I got the Xformer ROMS and managed to boot into BASIC. It seems to be working, but prints a funny character when I press the return key on my n810. Any tips?

Hmmm, thats odd, what charecter is it?
Do you have the 'keyboard' joystick turned off in the emulation settings?
I don't have a N810 so I can't test it on it. But if you dont mind doing some testing for me I am sure we can figure it out...

-John

rbrewer123 2008-04-06 15:44

Re: First porting effort.. atari800 emulator
 
Quote:

Originally Posted by tobiasj (Post 165748)
Hmmm, thats odd, what charecter is it?
Do you have the 'keyboard' joystick turned off in the emulation settings?
I don't have a N810 so I can't test it on it. But if you dont mind doing some testing for me I am sure we can figure it out...

-John

I turned off the keyboard joystick and now the middle dpad button works as return, which is enough to fiddle in BASIC. The hardkey return still prints a tiny horizontal bar at the top of the character field. I haven't figured out maemo screenshotting yet and the atari800 screenshot was not obvious if it worked or not. I'm willing to try some more testing on the n810.


All times are GMT. The time now is 14:05.

vBulletin® Version 3.8.8