Previous Thread
Next Thread
Print Thread
Page 1 of 7 1 2 3 4 5 6 7
#26072 01/23/07 03:11 AM
Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Thanks for sdl mame, this stuff is great.

I searched the forums but didn't find anything, so here goes w/ some questions:

With a tiny-little fiddling, I got sdl mame 111u4 to compile & run (albeit with caveats) on a sony ps3 under (yellow dog) linux.

If you don't have a patch already, I can clean it up and hand it over (set PPC = 1 in the makefile, and a handful of #define & #undefs in some source files to make headers happy (maybe better moved to CFLAGS?)).

I had to compile libsdl 1.2.11 from sources (w/ --disable-opengl or so).

I got it to run it w/ command line like this:
./mameppc -switchres -screen_aspect 16:9 -r 1124x644 mspacman

The -r 1124x644 is compatible w/ the ps3's "video mode 3" - the only "mode" through which I was able to get something other than a blank display. I don't think 1124x644 is a 'standard hd resolution', but it worked here.

The image occupies only a fraction of the available screen-space - a 1:1 mapping w/ the original resolution? I tried -prescale (& -maximize) without any difference. I'll keep digging around, but is there something else I should try?

The sound is garbled. Fwiw, I think the SDL test suite playloop sound test has similar issues. I see a reported 96000 hz speed for the sound in mspacman - seems high? - so maybe something there.

Thanks for your time,
Phil

Joined: Mar 2001
Posts: 17,258
Likes: 267
R
Very Senior Member
Very Senior Member
R Online: Content
Joined: Mar 2001
Posts: 17,258
Likes: 267
It's stuff like this that makes me a Fedora supremecist wink On PS3 FC5 SDLMAME compiles and runs literally out of the box with 2 quick makefile edits.

Anyway, the next release will have a CELL target that automates the necessary edits. Post a patch and I'll see what can be integrated without breaking the mainstream distros.

ALSA audio seems to be broken on PS3 Linux - I noticed this in MPlayer and Xine also. You might try setting whatever SDL environment variable to use OSS instead. And finally, running SDLMAME under X will make it much, much happier. You will get (software) stretch when you go full-screen, for instance.

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Cool - yeah, the yellow dog was supposed to be sony's favorite pet- but it seems relatively unremarkable? Debian distro was near and dear to me a ways back, good times. Maybe I should get another hard drive and install fedora.

Patch was next-to-nothing in terms of changes, as above, but let me go verify & make it a little more pleasent.

I only got the ps3 a few days ago, so I haven't tried out much in the way of anything yet. Rebuilt the kernel, rebuilt kboot, messed around with advancemame, then found this, ...

Thanks, I'll play w/ the OSS switches & SDL and see if anything gives, try running in X (been running from a virtual console), etc.

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
The diff is appended - works w/ small additions to the makefile.

I added a couple of comments to clarify use of some of the CFLAGS.

I'm noticing a message now (might've missed a change in my CFLAGS cleanup? Or perhaps stale build file?):
Unexpected boolean option rdtsc queried
... but this doesn't seem to matter, mame continues to execute normally.

mspacman runs @ almost perfect frame rate- though I'm still only able to use the virtual console w/ ps3 video mode 3. Trying under X11, it doesn't pop up a window; I'll poke around more, probably something dumb I did.

[root@localhost sdlmame0111u4]# diff makefile ../sdlmame0111u4-new/makefile
110a111,116
> PS3 = 1
>
> ifdef PS3
> PPC = 1
> endif
>
211a218,223
> ifdef PS3
> NAME = ${PREFIX}${TARGET}ppc
> # add -march for cell
> ARCH =
> endif
>
307a320,324
> ifdef PS3
> # -uX86_ASM needed for issue w/ src/sdl/sdltime.c
> # -DPPC_ASM for src/sdl/osinline.h
> CFLAGS += -DSDLMAME_LINUX -uSDL_PROTOTYPES_ONLY -DSDL_VIDEO_DRIVER_X11 -uX86_ASM -DPPC_ASM
> endif
[root@localhost sdlmame0111u4]#

Joined: Mar 2001
Posts: 17,258
Likes: 267
R
Very Senior Member
Very Senior Member
R Online: Content
Joined: Mar 2001
Posts: 17,258
Likes: 267
The rdtsc message is normal, it'll go away in u5.

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Recompiled & reinstalled SDL a few times, tried a bunch of stuff:


SOUND: SDL w/ --disable-alsa does something to the sound- seemingly sounds better than alsa, though not perfect. The SDL loopwave test also still is distorted (in the high-end).


GL: I rebuilt SDL w/ --enable-opengl (found libGL.so in /usr/lib). Yellow dog distro doesn't appear to include <GL/glu.h> (which SDL wanted) - though yd /usr/lib/libGLU.so exists. Commented the #include out and SDL built.

While SDL/test/testgl compiles & links, it fails w/ "Couldn't set GL mode: OpenGL not available".


WINDOW: *none* of the SDL test suite runs in a window -- all video tests go fullscreen, including testwin.c. Even after explicit unset of SDL_FULLSCREEN in video_flags before the call to "screen=SDL_SetVideoMode(h,w,bpp,video_flags)", (screen->flags & SDL_FULLSCREEN) returns set. So no windows - something's fishy.

SDL's testvidinfo reports only a fbcon device with capability of a singular fullscreen resolution of 1280x1024x32.

But if I change to /sbin/ps3videomode -v 2 (or 7) from a console, I can see a testvidinfo "Current resolution" of 576x384 (or 576x460) - even though the log still reports only the capability of a single resolution of 1280x1024x32.

In -v 2 (or -v 7), none of the graphical SDL tests work properly: either presenting a blank screen, or presenting what looks like a "scrambled interlaced" pattern of what the normal image might be.

Seems fbcon driver lacks the knowledge of ps3videomode capabilities, perhaps is the source of the SDL_FULLSCREEN bit always getting set, is the root of all evil?


I'll hack on this a bit longer- but your suggestion of FC5 install seems path of least headache- the yellow dog might do well to get a flea collar.

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Got alternate console resolutions to work, finally. Still no SDL window, just fullscreen console. Plays fine, gotta fix sound, figure out how to get joystick & driving wheel working, ...

Made some interesting finds along the way - may be old news, but in case somebody doesn't know:

If you want "true HD 720p" (1280x720 - not have bars on the sides of the screen as per- "margins" as described in linux/drivers/video/ps3fb.c), then use ps3videomode 131 -- NOT 3.

Or, /sbin/ps3videomode -v 3 -f

-f is for "full screen" which I'd've called "no-margin" or "no-border", probably got lost in translation.

If you want a "good mame experience", try ps3videomode 130 (480p) or 135 (576p), if your display device can handle it. After you switch modes (I do it from a virtual console (shift+ctrl+f2), and you have to be su), run mame as per:

./mameppc -switchres -r 720x480 mspacman
./mameppc -switchres -r 720x576 mspacman

You have to match the -r values with the ps3videomode- didn't work for me until I explicitly specified these on command line.

While it doesn't maximally fill the screen, its waaaay better (at least for me w/ a ~200 inch screen via front projector).

Now onto sound...

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Ooops, I must be more whacked on yellow-dog scooby-snacks than I realize; fwiw that key sequence for virtual console is ctrl+alt+(f1 or f2 ... f7 brings back x11-rooted console) - not shift+ctrl+f2

whatever, just bang on the keyboard a lot until it gets right.

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
So trip out - alsa works cleanly for me - its oss (/dev/dsp) that is garbled.

Thanks for the environment variable tip! Maybe that's what you meant to type above, or maybe I'm reading cross-eyed, or whatever. I'm a newbie smile

I'm using a kernel built from yellow-dog sources.

btw, fc5 is 'not optimized for the [crappy] ram in ps3'. Or at least so says wikipedia: http://en.wikipedia.org/wiki/PS3 Guess the old yellow dog might still have a few tricks up its sleeve. Whatever. Once again, maybe old news, but my reaction is no shit- where's that PSGL???

So, before launching mame, typing this:

export SDL_AUDIODRIVER=alsa

gets nice audio. It works for the SDL loopwave test too, just in case you like hearing the same "I met a woman one night, crying black & blue tears & [something or other]". Where's that from?

I'd like to get the controllers working, throw a stupid front(al lobe)-end in kernel arg init= via an iso9660 image's etc/kboot.conf; I could make a disc even my girlfriend could use. That'd be nice, she likes ms. pac man. Its crazy how anorexic chicks dig games where you eat stuff.





Last edited by Phil Hopely; 01/25/07 09:22 AM.
Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
I know it's asking a lot, but could you post a step-by-step guide on how you got this working, like what to what and where to download, how to compile , what options to use, etc...?

Thanks,
Zep--

Zep-- #26113 01/26/07 06:28 AM
Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Sure, I'll rewrite once I get to a good point.

R. Belmont endorses fedora core 5 (6?) linux distribution & runs in X. He reports it builds nearly out of the box (true for yellow-dog linux too- see above makefile changes, probably rather similar). You might prefer to go his route- he's way more clued in to current events than me; I'm just getting underway.

I used yellow dog 5 linux distribution & the "frame buffer console" driver. Not running X should give a little better memory utilization, but has downsides like using a fix-sized screen.

I've got a lot of shit dropped on my plate just today, but I'll post binaries @ my site (rosemary.dyndns.org) if there are no objections. Hope to get sixaxis online 1st (might just work w/ ps2-style controller configuration?), & I've got a ps3-bootable linux .iso (just a 'rescue-disk'-type filesystem) now, but need a front-end.


As for what to d/l, I got yellow dog linux 5 over here:
http://www.terrasoftsolutions.com/resources/ftp_mirrors.shtml

I got sdl mame 111u4 source from a thread on this fine site (I bet u5 works fine too though I've not tried yet)?

d/l-ed libsdl 1.2.11 sources from http://libsdl.org/

That's it! All the tricky parts should be documented above, albeit longwindedly.

BTW, upgrade your hard drive if you want to do 'serious development'. Finding a "sata extender" cable was not possible here in the CA bay-area. I got mine from cpustuff.com, but there's probably other good places too? I use a 22 pin extender & a 7 pin extender. 22 pin fits securely in the ps3 backplane (7 pin doesn't lock securely- you want a secure fit). Then hook the 7-pin off the other end of the 22 pin to the drive. And I hooked up a separate power supply up directly to that drive (I used a sata 3.5 inch 750 gig seagate). Its fragile, but it works fine.

22 pin extender: CUS22MF12
7 pin extender: SATAMF12I
power supply: (the one from this should do fine) SATA-2352


Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Thanks,

I already have YDL 5 installed (the december version)

Sounds like a project for this weekend smile

one question, how do I stop X from booting up at the kboot prompt so I stay at the command line? I guess thats what you mean in the post above where you say "Not running X should give a little better memory utilization"

Zep--

Zep-- #26116 01/26/07 08:29 AM
Joined: Mar 2001
Posts: 17,258
Likes: 267
R
Very Senior Member
Very Senior Member
R Online: Content
Joined: Mar 2001
Posts: 17,258
Likes: 267
FWIW, there are *very* few games in MAME for which memory past 128 MB or so matters a bit. People happily run it on the Xbox with 64 megs all the time, for instance.

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
I'm a clueless newbie about memory constraints for instance- that is useful, thanks.

So text-mode yd boot? try "ydltext" at kboot prompt?..

Moreover, I believe that the otheros.bld (aka kboot, which we all installed on flash) checks if there is media in the drive. And if that media has an /etc/kboot.conf (use an iso9660 w/ rock-ridge extensions, such as "mkisofs -R -o ../foo.iso ."), it uses that media's kboot.conf OVER its own flashed version.

If my memory serves me well, that kboot is just a gzipped vmlinux w/ an embedded ramdisk, fwiw.

So you can make a bootable disk by specifying appropriate kernel argumentation in your own /etc/kboot.conf (on the cd/dvd/bd).

Ps3 reads cdrw (& bd-re > v 1.0!), btw, so you can avoid coasters.

I need to get chroot/switch_root working, will decrease iteration time...

I've got a ~50 meg uncompressed .iso that boots straight to mspacman -- but alsa is failing to start properly, fails to 'find card 0' (not literal quote, but thereabouts).

I've got every file mentioned in a (good) "strace ./loopwave" (SDL sound test) on that .iso.

I'm uncertain what the issue is, maybe my eyes are blurring out 8) , may be due to the read-only nature of the cd-rw with which I'm experimenting, maybe I should use a ramdisk, maybe lack of devfsd (I effectively mknod-ed all the entries in the cd's /dev directory). Well, a few avenues to explore.

I posted a ps3-bootable linux .iso (~17meg, w/ only "robby roto" - thank you jamie!) - alsa is still failing, but just so you have some pieces against which to regress. I'll look more tomorrow, but fwiw now:
http://rosemary.dyndns.org/software/ps3-mame-cdr-test.iso.gz


Last edited by Phil Hopely; 01/26/07 01:28 PM.
Joined: Jul 2006
Posts: 28
P
Member
Member
P Offline
Joined: Jul 2006
Posts: 28
Originally Posted by Phil Hopely
..

./mameppc -switchres -r 720x480 mspacman
./mameppc -switchres -r 720x576 mspacman

You have to match the -r values with the ps3videomode- didn't work for me until I explicitly specified these on command line.

While it doesn't maximally fill the screen, its waaaay better (at least for me w/ a ~200 inch screen via front projector).
I think you'll be a happy camper if you add the -nokeepaspect parameter.. smile

For those in the know: with this, where does the actual scaling take place: mame core, SDL-mame or the SDL layer?

prrole #26161 01/28/07 01:04 AM
Joined: Mar 2001
Posts: 17,258
Likes: 267
R
Very Senior Member
Very Senior Member
R Online: Content
Joined: Mar 2001
Posts: 17,258
Likes: 267
The scaling in this case is done in the MAME core. (Which is why hardware OpenGL is really the preferred scenario - unfortunately that's up to Sony and NVidia).

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Thanks for the tip- I'll give -nokeepaspect a whirl.

Sound was a matter of loading a few kernel modules, as per:
/sbin/modprobe snd_ps3pf
/sbin/modprobe snd-mixer-oss
/sbin/modprobe snd-pcm-oss

The latest bootable iso is 52 meg uncompressed (not optimized yet), about 18 meg .gz

I believe this iso will boot (straight into mameppc robby- see "/mame/runscript" in the iso for details) as long as your distribution uses a kboot loader.

Do other distributions (besides yellow dog) use kboot on ps3?

Old version is replaced by new "w/ sound" version here:
http://rosemary.dyndns.org/software/ps3-mame-cdr-test.iso.gz

Hope to flush out the sixaxis & front-end; more soon.

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Got the sixaxis controller working, to a degree. Replaced downloadable .iso.gz with the latest sixaxis version:
http://rosemary.dyndns.org/software/ps3-mame-cdr-test.iso.gz

Was necessary to load a few kernel modules (see the .iso '/mame/runscript' -- total image could be much optimized), but seems to be workable:

There may be better configurations - stuff in /mame/cfg/default.cfg should generally work, though only for a single controller, etc. I hope to make this more elaborate in days to come (more controllers, etc.). Not perfect, but closer.

Best I have figured for now:

Wait a while, while things load. It takes a bit, have patience. At the copyright 'ok' screen, press (& hold a few secs) the ps3 sixaxis 'ps' button. Then, twiggle the left analog control left & right. The left-hand digi controllers should work from that point on?..

On the 6axis, R1 == insert coin, L1 == P1 start.

Works for robby the roto & ms pac man, far as I've tried.

Front end hopefully soon - more, as its ready.

Joined: Mar 2001
Posts: 17,258
Likes: 267
R
Very Senior Member
Very Senior Member
R Online: Content
Joined: Mar 2001
Posts: 17,258
Likes: 267
Nice! Does YDL come with the sixaxis driver or did you have to add that?

Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Originally Posted by Phil Hopely
Got the sixaxis controller working, to a degree. Replaced downloadable .iso.gz with the latest sixaxis version:
http://rosemary.dyndns.org/software/ps3-mame-cdr-test.iso.gz

Do I have to wipe my current YDL install to use your ISO, or can I make it boot from my current kboot: prompt? If i can boot it from my current install, what do I type at the kboot prompt once I have your image burned to CD?

Thanks,
Zep--

Zep-- #26252 02/02/07 02:35 AM
Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Board was down a bit, sorry for the slow reply- lots of progress over past few days:

JOYSTICK: I believe these are the needed kernel modules:
/sbin/modprobe evdev
/sbin/modprobe joydev
I didn't write these; I presume the ps3 support came from yellow dog people. I read somewhere they intend to merge their changes publically into the 2.6.20 kernel. In any case, I got this kernel from their 'linux-addon-cd'.

I notice frequently @ mame start, control goes nuts. It clears up after a short period, about a minute. Maybe cause I used both -joy & -digital all on the command line?

Also, some buttons appear to be 'instigating multiple events'. Salamander missile button (2nd) causes both missile emission & coins to be inserted, for instance. I think the mame/cfg/default.cfg is correct, so I'm unclear what gives.

Looking at the parsed joystick output from the SDL testjoystick, there's reams of "Axis" events streaming in constantly, so perhaps something there (event buffer saturation)?


BOOT: Don't wipe your install. Don't type anything (just wait 10 secs), or, just hit return (if you've got a keyboard hooked up; should work keyboardlessly w/ new front-end).

I believe that Sony (YDL's?) kboot on-flash looks at the cdrom for /etc/kboot.conf & uses that first, if it finds it.

PS3 should boot & run straight from cd.

I posted a first-draft readme over here to explain things some:
http://rosemary.dyndns.org/software/ps3-sdlmame-readme

By sundown (Pacific), I should have posted a new version that includes the second revision of the "psmallphront" front-end (1st psmallphront version is available now @ 'the usual' link).

Second psmallphront version has key wrap (up @ top leads you to the end, & vice-versa), key repeat (if you hold a key down), & jump to next and previous alpha-numeric (to permit quick indexing through your gamelist by first letter).

I want to try a couple of things to mess w/ the joystick first, see if anything gives, before I push the next version.

Joined: Mar 2001
Posts: 17,258
Likes: 267
R
Very Senior Member
Very Senior Member
R Online: Content
Joined: Mar 2001
Posts: 17,258
Likes: 267
Nice work! I'm really impressed with how fast that CD's come together smile

Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Originally Posted by Phil Hopely
BOOT: Don't wipe your install. Don't type anything (just wait 10 secs), or, just hit return (if you've got a keyboard hooked up; should work keyboardlessly w/ new front-end).

I believe that Sony (YDL's?) kboot on-flash looks at the cdrom for /etc/kboot.conf & uses that first, if it finds it.

PS3 should boot & run straight from cd.

Nope it boots to my YDL Install, not to the CD. is there a command I can use at kboot to make it boot the cd?

Zep--

Zep-- #26313 02/03/07 06:43 AM
Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
I see, thanks for the feedback.

In fact, I did install my own kboot. I read something somewhere which made me believe that this was a standard feature of kboot; guess I was wrong, guess its standard if you build your own?

I believe that I have posted the one I built here now:
http://rosemary.dyndns.org/software/otheros.bld


I recommend installing such, but fwiw, I believe that you can type these two lines @ kboot prompt (don't hesitate for more than 10 seconds between keys):

ydlcdmame='/dev/cdrom:/vmlinux root=/dev/sr0 video=ps3fb:mode:130 rhgb init=/mame/runscript'
ydlcdmame

It defines a variable, then boots w/ that definition.

Fwiw, I'd be cautious about this flashing this kboot (otheros.bld) if you've got anything other than yellow dog; you may end up typing more to get to your regular kernel. I can add support for other distros; just post the distributions' kboot.conf (or whatever your bootloader args are?)? I'll make another otheros.bld & add these to kboot.conf w/ prefix 'fc' instead of 'ydl'.

Last edited by Phil Hopely; 02/03/07 09:18 AM.
Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
& just so you know, you have 'full command line capability' @ kboot prompt ('busybox', an embedded swiss army knife tool)- just can't let the keyboard sit idle for more than 10 seconds or it autoboots.

For instance @ kboot, type "cat /etc/kboot.conf"

Typing "ydlhd" @ kboot should drop you onto your hard drive install.

& fwiw, I updated the front-end, but the joystick is still erratic. I think its reporting gobs of axis events. Doesn't seem like SDL has a "mask" function? I could hack something in SDL to only report joystick axis 0 & 1. Maybe there is an ioctl to mask out unwanted axis. That failing, I could hack something into the kernel module while I poke around for ioctl. I'd rather do it @ SDL though.

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
I cheated around the "square & R1" key ambiguity by setting button 2 to circle, instead of square. Button 4 now has the problem, but salamander is playable without constant cha-ching of new coinage smile

And indeed, the 'crazy-stick' problem appears to have been the related to the reams of axis events.

Effectively a 2-line kludge (see below, pretty obvious) into SDL-1.2.11/src/joystick/SDL_joystick.c SDL_PrivateJoystickAxis was the trick for the crazy-stick. I guess one could change the "axis < 2" to "axis < 4" if you want the right analog stick operational too.

A bitfield mask register might be nice in SDL, imo.

New .iso is posted up @ http://rosemary.dyndns.org/software/ps3-mame-cdr-test.iso.gz

Looks a little big; I bet I left a stray debug file around. I'll fix it when I drop the next .iso, hope to add second-sixaxis support tomorrow or so.

Happy friday!

[phil@localhost joystick]$ diff SDL_joystick.c SDL_joystick-new.c
430,438c430,440
< SDL_Event event;
< event.type = SDL_JOYAXISMOTION;
< event.jaxis.which = joystick->index;
< event.jaxis.axis = axis;
< event.jaxis.value = value;
< if ( (SDL_EventOK == NULL) || (*SDL_EventOK)(&event) ) {
< posted = 1;
< SDL_PushEvent(&event);
< }
---
> if ( axis < 2 ) { // PS3 kludge
> SDL_Event event;
> event.type = SDL_JOYAXISMOTION;
> event.jaxis.which = joystick->index;
> event.jaxis.axis = axis;
> event.jaxis.value = value;
> if ( (SDL_EventOK == NULL) || (*SDL_EventOK)(&event) ) {> posted = 1;
> SDL_PushEvent(&event);
> }
> } // PS3 kludge

Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Originally Posted by Phil Hopely
ydlcdmame='/dev/cdrom:/vmlinux root=/dev/sr0 video=ps3fb:mode:130 rhgb init=/mame/runscript'

Well, I added the above line to my kboot.conf.

It boots to the CD and after a while, comes to a screen with a GIANT YELLOW FONT, but due to the video mode (full screen -f) the overscan stops me from knowing exactly what to do.

So, I press the PS button for 5 secs, wait a bit, hit "X", i then see a lot of text scroll about axises and such, after a time i see a white box that says "Loading [....80%...]" etc, when it reaches 100% the ps3 reboots and I am back at the kboot prompt.

Zep--

Last edited by Zep--; 02/03/07 10:05 PM.
Zep-- #26359 02/04/07 09:41 AM
Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
i get less far with your new iso..boots to cd, usual init text scroll...then something like "Warning: can't start initial console", sometimes it will just hang there and I have to power off. Sometimes after a minute it will scroll some more init text then reboot back to kboot

Zep--

Zep-- #26386 02/05/07 01:34 AM
Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Well...finally got it all working. I think my cd-writer is on the fritz! That's what's been causing my problems all along. Sorry! used a different burner, followed your instructions to the letter (except for installing your kboot, i just added a boot to CD like you suggested earlier into my own kboot.conf as i described a few posts ago)

The only thing I would suggest is you let us pick the video mode at startup, as the 130 modes are overscanned on my TV. (i lose text on the left,right,top and bottom of my screen)

And a question...how do I get back to the frontend to select another game?

Everything seems to work fine, sound is good not choppy and distorted like snex9x.

Do any games work with the Analog stick? Everything I tried operates off the d-pad.

Good job on this.

Thanks,
Zep--

Zep-- #26408 02/05/07 01:05 PM
Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Cool runnings; glad to hear its working for you, & thank you for the feedback.

Hardware issues are a headache- bummer.

The otheros.bld works for me, but I'll double-test my proposed otheros.bld on another ps3 in a day or two. Firmware 1.10 in-use here; the one I'll test is 1.02 - just to test on a 'virgin' box.

(Worse comes to worst, hold down the power button for 5 secs & you get 'reset to factory default' - which shouldn't kill your hard drive contents, but may (should?) reset flash.)

I don't know how your kboot is built, but its' kernel should contain/access an 'embedded ramdisk' off of the flashed kernel image, the otheros.bld. So if you change your /etc/kboot.conf, you might lose that change on reboot? Which is why I rebuilt & installed this 'new' otheros.bld, if my memory serves me well.

kboot docs that I read more recently were either unclear or wrong about ps3 kboot behaviour.

I now recall (was before I kept notes here) that I explicitly added several ydlcd* entries to the kboot-10 source disk-image's /etc/kboot.conf, rebuilt kboot-10, then installed the generated otheros.bld on my flash.

Whatever - you got it working, so good enough for starters.


Sure, I'll add code to customize the video mode (to psmallphront, etc.). Need some 'environmental' controls, outside the command-line argumentation - like selective omission of the SDL_NOMOUSE for mouse/trackball games, etc.

'psmallphront' source is on that latest .iso too, by the by- scarey hack as it is.

Stuff boots to 720x480 ("480p")- so big letters, yes. Maybe ydl's use of margins isn't a bad thing. Does your 'display device' permit 'size' adjustments?


Games w/ the Analog stick? I haven't tried yet; name something you're interested in trying. Only axis 0 & 1 (left analog, not right) are currently enabled, no problem to tweak if you need both.


FRONT-END REBOOT: I stuck in an /sbin/reboot at the end of the script. I'll mess w/ the script to loop around, see if that works. I had a problem w/ the front-end & SDL_TIMER_INIT during development. Might not be a problem w/ the latest version (doesn't use SDL timers for key repeat anymore, just uses sdl_getclicks).


SNES9x: might try the "export SDL_AUDIODRIVER=alsa" before start? Maybe try snes9x using the libs from this disk image? This disk image should have generally-usable device drivers, etc., for anything SDL-based (quake 3 & co.? or might they need GL?).


Fwiw, hope to look @ sdl mess in the near future. Got 2nd sixaxis working, but there's something funky about device enumeration ('2nd' stick appears as '1st' stick). More soon.


& thanks for the kind words!

Bliss on; have a real-fine week,
Phil

Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
ycd='/dev/cdrom:/vmlinux root=/dev/sr0 video=ps3fb:mode:130 rhgb init=/mame/runscript'

I just added that line to my kboot.conf at the bottom of the file, it does still work even after a poweroff, restart ,reboot etc..., so it doesnt get erased or rebuilt from scratch every boot I can confirm.

Zep--

Zep-- #26428 02/06/07 07:50 AM
Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Sweet, thanks! Yes, editing /etc/kboot.conf (the one in your main root filesystem) indeed does work w/ the stock yellow dog otheros.bld / kboot image.

Much less intrusive than installing a new otheros.bld, so cool.

Fwiw, that otheros.bld could be of use for somebody who doesn't want or need to fully install linux, but wants to use mame - or whatever else pops out using a similar disc image wink . Of course, they'll need a disc built, so having linux installed will help there.

I'll fix the readme, then start hacking the alternate video modes into the front-end.

In the next release, I will move 'runscript' up to the cd root (init=/runscript), such that things have greater generalization for other apps too.

Last edited by Phil Hopely; 02/06/07 08:54 AM.
Joined: Feb 2007
Posts: 3
-
Member
Member
- Offline
Joined: Feb 2007
Posts: 3
Hi Phil -

Sounds like you're making some great progress on getting MAME to run on the PS3.

I have been running MAME under Windows for years and am very excited about getting it to run on my PS3. However, I am brand new to the PlayStation world and to Linux, so let me apologize for the overly basic questions up front.

1) Do I have to install Linux on my PS3 to run MAME or is it possible that this can all be on some sort of bootable disc?

2) Assuming I want to install Linux, I'm getting the impression that it matters which one I install (Yellow Dog, Fedora, Gentoo), is that correct or will the Mame you're working on run on any Linux system?

Thanks in advance for your advice...

-Will- #26432 02/06/07 10:03 AM
Joined: Feb 2007
Posts: 3
-
Member
Member
- Offline
Joined: Feb 2007
Posts: 3
Oh... One more question...

The first Mame running on PS3 I read about was referring to AdvanceMame... How is that different from the SDLMame you're working with?

-Will- #26453 02/07/07 07:42 AM
Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Will,

I believe if you use Phil's otheros.bld you don't need to install linux as his runs like a LiveCD.

follow the instructions here, start at the PS3 Preparation step.

http://www.terrasoftsolutions.com/support/installation/ydl5.0_ps3_guide.pdf

but when you get to the part where it says to install YDL's otheros.bld, use phil's)from his site) and you should be able to boot right to his cd image without installing any linux at all.

backup your system with the backup utility before you start (you will have to format the ps3 even if you arnt going to install full blown linux). I was able to backup, format then restore my backup without losing any data, but I have heard some not being able to do that. I am at 1.51 firmware.

Zep--

Last edited by Zep--; 02/07/07 08:38 AM.
Zep-- #26454 02/07/07 07:50 AM
Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Oh..if you want to add your own games following phil's instructions...your going to have to install YDL or other linux, or you'll have hours of fun only playing Robby the Robot as thats the only game on his prebuilt CD Image.

Zep--

Last edited by Zep--; 02/07/07 08:39 AM.
Zep-- #26455 02/07/07 08:04 AM
Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Phil,

a thought..would it be possible to automate the ./gengamelist thing on the CD so it's part of init?

that way all someone would have to do is populate/replace the rom folder and burn the image. Since that's the only step you can't do in windows since it's a Linux script.

Zep--
PS.
(don't forget to include the BIOS roms you'll need..coz i did, more then once. :))

Last edited by Zep--; 02/07/07 08:44 AM.
Zep-- #26472 02/07/07 07:39 PM
Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Er..duh,,i guess that wont work since it's a CD smile

Sleep is a wonderful thing.

Zep--

Joined: Feb 2007
Posts: 6
B
Member
Member
B Offline
Joined: Feb 2007
Posts: 6
Phil,

Thanks a lot for all your work here. Seems the 'net is rather fractured with lots of tidbits related to PS3, Linux, and MAME, and I found your posts here to be the most cohesive so far.

I was able to build and run xmame 1.06 as well as sdlmame 1.112 (no doubt in part thanks to your work ... it now has a "CELL" define in the Makefile to uncomment and produces a "mamecbe" binary) on my PS3 running YDL 5 (which, as I understand it is Fedora core <some_unknown_number> + some PS3 mods). I also built advancemame, but it is not happy with PS3 framebuffer features so will not run (I found it insane that someone else built advancemame for PS3 and posted it on the 'net without ever verifying it even works).

I haven't yet tried your sdl boot CD, as I tend to want to have a full OS booted because I always want to tweak something somewhere, but I like the concept, as I have friends with PS3s that would not want to do a full Linux install themselves but could probably handle the otheros setup and a boot CD like yours.

I've been using Linux since 1991, and using/building arcade emulators a couple of years before MAME came around. I'd like to help move PS3/Linux emulation forward and see loads of potential (like using CELL BE SDK to use those six idle 6 SPEs for 3D calculations, sound, ... to leave the PPC less burdened, accessing extra 256MB RAM on PS3, possibly getting at some 3D graphics hardware potential,...). Before spending too much time on these areas, it seems lots of small things need some tweaking. Seems you've done a good job of getting PS3 controller functionality going, getting some basic resolution setting options, as well as starting work on a front end (I take it you looked at AdvanceMenu and others and weren't impressed?). One of my problems is that YDL 5 doesn't seem to allow dynamic resolution switching (ps3videomode reports properly but will not switch). I can change res via kboot.conf and kboot prompt, but I like to run my desktop in mode 131 (full 1280x720 without the borders) for general Linux functionality and MAME bogs down big time scaling games to that resolution without graphics hardware support.

I'll stop babbling for now...Thanks for your work in kicking things off here, and let me know if you see any places where I might be able to help you move things forward in this space. (Also if you know anything about YDL 5 and dynamic resolution switching or /dev/fb to work with AdvanceMAME, I'd appreciate any pointers).

Cheers,

Bruce

Bruce C #26485 02/08/07 01:31 AM
Joined: Mar 2001
Posts: 17,258
Likes: 267
R
Very Senior Member
Very Senior Member
R Online: Content
Joined: Mar 2001
Posts: 17,258
Likes: 267
You need to be root for ps3videomode to actually change things.

IMO the best immediate use for the SPEs would be to do the output scaling - you could kick off 4 of them each doing 1/4 of the screen and it'd work quite well. I live in hope that Nvidia or Sony will give us some sort of OpenGL, but thus far that looks gloomy.

Joined: Feb 2007
Posts: 3
-
Member
Member
- Offline
Joined: Feb 2007
Posts: 3
Phil / Zep -

I'm mustering up the courage to install this thing to run from the burned CD (ie not installing Linux?)

I just want to clarify a few things... I am going to follow the instructions in the "ydl5.0_ps3_guide.pdf" Zep referred me to up until page 5 of that .pdf where the "INSTALLATION" section begins, with the only difference being that I use Phil's otheros.bld file, correct?

Then what, if the CD is in, SDLMame will boot otherwise, the GameOS will boot?

Also, what version of the MAME Roms should I be using? I am currently running MAME32 version .111 (for windows) are these the correct ROMS?

-Will- #26503 02/08/07 05:57 AM
Joined: Feb 2007
Posts: 6
B
Member
Member
B Offline
Joined: Feb 2007
Posts: 6
Will,

Do you plan on repartitioning to give otherOS 10GB of space and then just wasting that space? (I don't think you can install otheros.bld without repartitioning, which unfortunately means you'll lose demo/movie downloads and will need to backup any game saves to some memory card or USB storage). Also note that my USB memory stick did not work for otheros.self/otheros.bld. I followed directions to a T but PS3 wouldn't find them. I put the same directory on a compactflash card and that worked right off.

If no one has yet figured out a trick to fall back to game OS boot, you may need to type "boot-game-os" <return> at the kboot prompt after the CD load fails (or if you are quick enough before then). If the CD load attempt just hangs and doesn't go back to kboot prompt you may need to power cycle and then "boot-game-os" before kboot times out to default (10 seconds in my kboot.conf).

Good luck!

...Bruce

-Will- #26504 02/08/07 06:01 AM
Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Yes, install phil's otheros.bld

To boot back to the game OS you'll have to type

boot-game-os

at the "kboot:" prompt and hit emter
if you want to go back to the Sony XMB

Once back in the Sony XMB if you want to run the CD again, you'll have to switch the "Default OS" setting back to Other OS instead of PS3.

Zep--

Zep-- #26506 02/08/07 06:05 AM
Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
I used a usb harddrive with my otheros.bld and self.

It is just wasting space tho if running from a cd.

but like I said in a previous post, I was able to use the sony backup utility to my USB harddrive, format the partitions, install linux, then went back to the game-os and restored the backup without losing any of my files on the game-os side.

Zep--

Zep-- #26507 02/08/07 07:41 AM
Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Busy days, lots to say & reply.

Posted a new .iso in the usual place w/ latest front-end changes - fixes key-repeat, less obnoxious font, set mame/ps3video.cfg to start the front-end in a different ps3videomode, ...

Haven't tested it much yet, works alright thusfar. Note that you want to change the kboot.conf to use "init=/runscript" instead of "init=/mame/runscript". I left a symlink for compatibility down in /mame, but someday soon I bet another emulator or something will appear in this bootable disc-based form.


WILL: good luck, let me know how it goes. I haven't messed w/ this 'semi-installed' linux too much yet, but I believe that it should work. I hope to test it more extensively in the near future.

Zep-- steered you right; same doc, different otheros.bld. Back up your hard drive save games, etc.

If you somehow get screwed, shut down the ps3, then press & hold the power button for 5 seconds (it'll beep) to reset to 'factory default'.

There may be an issue w/ 'SDL not finding a keyboard'. If so, I can add in the needed cruft (probably an SDL environment variable needs to be set right). Haven't tried it so I dunno yet; just a heads-up.

Fwiw, I used this alternate otheros.bld for a while. Its a little faster to boot than the stock yellow dog. It doesn't do all the network crap (dhcp, etc.) -- which seems pointless unless you want to 'tftp or nfs boot' the ps3.

As for which linux to use? I don't have a preference; I used yellow dog rather by default after reading the hype on the net. Yellow dog seems to have best driver support (sixaxis) at this time? But it seems other linux distros have better 'package coverage'? I haven't been following the available linux distros so closely these days, so I'm likely not the best person to advise.


ZEP--: yeah, the gamelist is a kludgey optimization. The goal in 'precomputing' was to not have to read the roms/ directory from the media (which is intended to be a fixated, unchanging media, etc.). But, your o.s. point is valid. I may hack together a small windows goober that does the same thing (do a directory listing of roms/, strip off the '.zip').

Let me know if that video-setting stuff works alright for you, seems alright here.

Let me know if you want other functionality hacked in too. Definitely a work-in-progress, thanks for the feedback.


BRUCE C: welcome to the new-fun! Hope somehow this thread has saved you a little headache, figured I'd document steps here as I stumble along. Motivation is to make things easy for my girlfriend to use, happy girlfriends rock.

This ps3 is pretty cool - blu-ray player with brains that runs linux. Cheap for such a thing imo. Seems like there's a lot of SDL-based stuff out there that could be thrown onto a disc image like this?

I think the bootable disc model reflects 'more naturally' the way the ps3 works- at least from my girlfriends' perspective- she can stick in a disc and push power, and she's off to the races. Most she has to learn is how to toggle the o.s., but that's not so tough.

The front-end should be easily hacked to work w/ other emulators; its a no-frills gross frankenstein-kludge & should eventually be re-written - but it works well enough for now. Its gross, no doubt.


Finally to all: I'm away & unplugged for 2 long weekends in a row, starting on this Friday -- so I'll be out of touch for a bit. Thanks for your time & hope you have fun!

Joined: Feb 2007
Posts: 6
B
Member
Member
B Offline
Joined: Feb 2007
Posts: 6
Originally Posted by R. Belmont
You need to be root for ps3videomode to actually change things.

IMO the best immediate use for the SPEs would be to do the output scaling - you could kick off 4 of them each doing 1/4 of the screen and it'd work quite well. I live in hope that Nvidia or Sony will give us some sort of OpenGL, but thus far that looks gloomy.

We can keep hoping... meanwhile you may be correct and certainly the 6 SPEs could make an easy task of doing all sorts of scaling effects; however the fact that each has only 256K RAM for code and data gives us a total of 1.5MB for all and a 1280x720x32bit screen takes more than 3.5MB. If we used 8 bit graphics we're under 1 MB so that might work, or we could use a lower res mode (at least for raster games; for vector we should be doing 1080i/p).

I did some poking around on memory latencies, bandwidth, parallelism of the dual threaded PPE, and even built/timed a couple of tiny SPE programs this evening.

Good news is the PPC unit performs pretty well despite the small 512K L2 cache. Better news is it scales decently for lots of memory access tests, inside or outside the L1/L2 cache boundaries. It certainly doesn't scale linearly like a dual core chip, but it scales much better than some other examples of multiple hardware threaded chips like hyperthreaded pentiums. Specifically, I saw memory read access scale 33% dealing with 10k data sets, 64% dealing with 100k data sets, and almost 100% dealing with 1m data sets (as expected where the extra thread acts like a hardware prefetch).

More good news is that, for some mixed integer/float calculation loops a single SPE seems about twice as fast as the PPE.

Bad news is even a noop call/wait to an SPE thread takes close to 1/10th of a second from initial calculations, and we need it to be more than 10 times faster than that if we are to actually do anything in the SPE call and have the data it generates blasted to a frame buffer 60 times/second. I'll revisit this later as I am hoping there is something wrong with my timing code and it is getting late.


Bruce C #26543 02/09/07 09:13 AM
Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
BRUCE C: Cool to see benchmark results!

I know nothing about ps3 bus; its been a while since I've been involved in metrics.

Naively, how does the ppc fetch work? Does the ppc fetch do a parallel strobe of different cache levels, or is it some kind of fail-safe sequential fallthrough? What is the nature of the fetch, hit on a fail by cache level for read &/| write?

Pipelines get screwed by big NOPs; but not usually that screwed? Are you sure there isn't some kind of break to the os, somehow? strace, perhaps? smile

I've not examined the SPE stuff. Mmmmm... mmmmetrics smile


So what's a good benchmark suite to run?



R. BELMONT: yeah, they're keeping PSGL from us so they can reward the people who paid for their devkits.

They're shooting themselves in the foot.

Microsoft has already put out their XNA game-developer's framework for free. Talk about a head-start!

I'm certain that at least one business-head of the Sony-Nvidia hydra thinks they've got the technological lead. I recall the days of "betamax".

They are proliferating the HD world with blu-ray propoganda, but I wonder if that will be enough.

The political-heirarchical structure of the social concept of 'money' will dictate their actions. Its an opaque view for most of us.


Joined: Mar 2001
Posts: 17,258
Likes: 267
R
Very Senior Member
Very Senior Member
R Online: Content
Joined: Mar 2001
Posts: 17,258
Likes: 267
I love the Sony bashing. Sony's made the most open console in history and people are running to wrap their tongue around Bill Gates, because nothing Microsoft's ever done has been a proprietary trap. XNA is managed (emulated virtual-machine) code only. You do NOT want to try and run MAME like that. And not only is Blu-ray better technology with better PC burners out already, but ever since Christmas the software's been outselling HD-DVD by over 3:1.

Bottom line: Sony lets me offer SDLMAME/MESS/HazeMD, M1, and Audio Overload very easily on their console without any licenses and using the same compiler the pros use. MS and Nintendo do not. Further off-topicness will make me cranky, and please note the color of my nick before you do that smile

Last edited by R. Belmont; 02/09/07 11:58 AM.
Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
Hah- the mental image of 'running to wrap my tongue around Bill Gates' is revoltingly funny on a great many levels. In fact, I am pleased w/ the ps3. I wouldn't be hacking on this as I have been, were that not so... Whatever- back to topic:


I updated the readme to reflect recent changes, flushed out some more usage details, added text describing the "ps3video.cfg" file (for setting use of a particular ps3videomode), ...:
http://rosemary.dyndns.org/software/ps3-sdlmame-readme

With today's posted iso (usual place), a 2nd sixaxis should be usable (fixed up /mame/cfg/default.cfg, etc.).

I also posted a windows-goober that performs the equivalent of the gen-gamelist script, should that be of interest to folks out there.

So I'm offline until next week; hope to spend time on the alternate otheros.bld & continue to work up the front-end- get trackball operational, etc. Til then, hope ya'all have fun!

Joined: Feb 2007
Posts: 6
B
Member
Member
B Offline
Joined: Feb 2007
Posts: 6
Phil,

Have a great break!

The architecture of PS3 PPU (powerPC core) is nothing revolutionary - standard 32K L1 I/D cache, 512K L2 cache-type stuff with typical go-to-next-level-and-grab-what-I-need behavior. However, clearly there have been some tweaks in that deeply pipelined chips (needed for high clock rate efficiency) have high costs for stalling the pipeline, but my initial scalability tests suggest this dual-HW-thread PPU core (and by dual HW thread I believe they just have copies of registers and a tiny bit of other state/logic to allow efficient switching rather than an extra core) has some big improvements over first generation dual-threaded chips like Intel's hyperthreaded lot.

The architecture of the *rest* of the CELL BE is far more interesting, what with the ultrafast interconnect and these SPEs.

As far as my initial high latency tests of running a NOP on an SPE, I realized that the test included overhead of creating a thread for the SPE to run on, so cost would be much lower for subsequent uses. That said, I now see I should download the version 2.0 of the CELL BE SDK before going much further as they have now changed fundamentally how they want us to communicate with the SPEs, at least at an API level.

To the XNA MS stuff ... competition is great - if this means Sony will have to provide us with OpenGL to be competitive in the developer space! One of the things that bugs me about SDLMAME is that it's primary raison d'etre (at least in the readme I found in the docs) is that it assumes all platforms have D3D or OpenGL ... without that, AdvanceMAME would be a much better platform for the PS3 (could also use 2nd hardware thread to some extent as AdvanceMAME is supposed to be multi-cpu aware). Of course AdvanceMAME seems a bit out of date, so perhaps we just need to make bring a little more of it's resolution switching, do-not-need X-server running, multi-CPU aware features into SDLMAME...

FYI : here are the LMBench 3.0 CPU/memory/OS performance comparisons of a 1.8 Ghz Opteron and the 3.2 Ghz PS3 (just PPU):

L M B E N C H 3 . 0 S U M M A R Y
------------------------------------
(Alpha software, do not distribute)

Basic system parameters
------------------------------------------------------------------------------
Host OS Description Mhz tlb cache mem scal
pages line par load
bytes
--------- ------------- ----------------------- ---- ----- ----- ------ ----
dhcp-ubur Linux 2.6.9-1 i686-pc-linux-gnu 1769 32 64 2.7500 1
SonyPS3 Linux 2.6.16- PPC-linux-gnu-PS3 3185 32 128 1.1400 1

Processor, Processes - times in microseconds - smaller is better
------------------------------------------------------------------------------
Host OS Mhz null null open slct sig sig fork exec sh
call I/O stat clos TCP inst hndl proc proc proc
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
dhcp-ubur Linux 2.6.9-1 1769 0.20 0.47 4.69 5.79 14.7 0.54 1.80 159. 629. 1974
SonyPS3 Linux 2.6.16- 3185 0.27 0.72 7.13 10.1 31.3 0.96 4.28 548. 1803 6077

Basic integer operations - times in nanoseconds - smaller is better
-------------------------------------------------------------------
Host OS intgr intgr intgr intgr intgr
bit add mul div mod
--------- ------------- ------ ------ ------ ------ ------
dhcp-ubur Linux 2.6.9-1 0.5700 0.5700 1.7100 23.3 23.9
SonyPS3 Linux 2.6.16- 0.6300 3.3600 9.0900 10.6

Basic uint64 operations - times in nanoseconds - smaller is better
------------------------------------------------------------------
Host OS int64 int64 int64 int64 int64
bit add mul div mod
--------- ------------- ------ ------ ------ ------ ------
dhcp-ubur Linux 2.6.9-1
SonyPS3 Linux 2.6.16-

Basic float operations - times in nanoseconds - smaller is better
-----------------------------------------------------------------
Host OS float float float float
add mul div bogo
--------- ------------- ------ ------ ------ ------
dhcp-ubur Linux 2.6.9-1 2.2800 2.2700 13.7 12.6
SonyPS3 Linux 2.6.16- 2.9900 3.0600 23.2 30.8

Basic double operations - times in nanoseconds - smaller is better
------------------------------------------------------------------
Host OS double double double double
add mul div bogo
--------- ------------- ------ ------ ------ ------
dhcp-ubur Linux 2.6.9-1 2.2700 2.2700 13.7 12.6
SonyPS3 Linux 2.6.16- 2.9900 3.0600 23.2 31.9

Context switching - times in microseconds - smaller is better
-------------------------------------------------------------------------
Host OS 2p/0K 2p/16K 2p/64K 8p/16K 8p/64K 16p/16K 16p/64K
ctxsw ctxsw ctxsw ctxsw ctxsw ctxsw ctxsw
--------- ------------- ------ ------ ------ ------ ------ ------- -------
dhcp-ubur Linux 2.6.9-1 0.5400 0.7800 4.6200 2.4300 5.4400 2.65000 18.8
SonyPS3 Linux 2.6.16- 5.6200 3.5100 9.9800 6.9000 54.6 12.3 70.5

*Local* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host OS 2p/0K Pipe AF UDP RPC/ TCP RPC/ TCP
ctxsw UNIX UDP TCP conn
--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
dhcp-ubur Linux 2.6.9-1 0.540 5.099 7.27 14.6 22.1 19.2 27.9 59.
SonyPS3 Linux 2.6.16- 5.620 27.8 28.8 49.9 67.4 60.4 79.5 122.

*Remote* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host OS UDP RPC/ TCP RPC/ TCP
UDP TCP conn
--------- ------------- ----- ----- ----- ----- ----
dhcp-ubur Linux 2.6.9-1
SonyPS3 Linux 2.6.16-

File & VM system latencies in microseconds - smaller is better
-------------------------------------------------------------------------------
Host OS 0K File 10K File Mmap Prot Page 100fd
Create Delete Create Delete Latency Fault Fault selct
--------- ------------- ------ ------ ------ ------ ------- ----- ------- -----
dhcp-ubur Linux 2.6.9-1 1951.0 0.305 1.25210 7.202
SonyPS3 Linux 2.6.16- 2851.0 0.636 7.30090 25.0

*Local* Communication bandwidths in MB/s - bigger is better
-----------------------------------------------------------------------------
Host OS Pipe AF TCP File Mmap Bcopy Bcopy Mem Mem
UNIX reread reread (libc) (hand) read write
--------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
dhcp-ubur Linux 2.6.9-1 771. 1228 580. 1023.5 2263.1 681.6 695.2 2267 1350.
SonyPS3 Linux 2.6.16- 648. 1171 334. 780.7 754.9 697.9 643.4 795. 3518.

Memory latencies in nanoseconds - smaller is better
(WARNING - may not be correct, check graphs)
------------------------------------------------------------------------------
Host OS Mhz L1 $ L2 $ Main mem Rand mem Guesses
--------- ------------- --- ---- ---- -------- -------- -------
dhcp-ubur Linux 2.6.9-1 1769 1.7040 6.8520 65.1 111.8
SonyPS3 Linux 2.6.16- 3185 1.7980 17.8 138.6 250.7


Originally Posted by Phil Hopely
BRUCE C: Cool to see benchmark results!

I know nothing about ps3 bus; its been a while since I've been involved in metrics.

Naively, how does the ppc fetch work? Does the ppc fetch do a parallel strobe of different cache levels, or is it some kind of fail-safe sequential fallthrough? What is the nature of the fetch, hit on a fail by cache level for read &/| write?

Pipelines get screwed by big NOPs; but not usually that screwed? Are you sure there isn't some kind of break to the os, somehow? strace, perhaps? smile

I've not examined the SPE stuff. Mmmmm... mmmmetrics smile


So what's a good benchmark suite to run?



R. BELMONT: yeah, they're keeping PSGL from us so they can reward the people who paid for their devkits.

They're shooting themselves in the foot.

Microsoft has already put out their XNA game-developer's framework for free. Talk about a head-start!

I'm certain that at least one business-head of the Sony-Nvidia hydra thinks they've got the technological lead. I recall the days of "betamax".

They are proliferating the HD world with blu-ray propoganda, but I wonder if that will be enough.

The political-heirarchical structure of the social concept of 'money' will dictate their actions. Its an opaque view for most of us.

Bruce C #26617 02/11/07 11:04 AM
Joined: Jan 2007
Posts: 15
Z
Member
Member
Z Offline
Joined: Jan 2007
Posts: 15
Phil,

I just cannot for the life of me figure out what the video switches do.

Say a game like XEVIOUS, it's either in a tiny box in the center of my screen or with no aspect on it's streched out of proportion.

How do I get it to go from the top to the bottom of the screen and scale correctly in the width?

I prefer ps3videomode 3.

And before I talked about wanting to use the analog stick on a game, XEVIOUS would be a game where I would like that to work to control the ship.

Also, much easier testing since i bought an External USB DVD+-RW to dedicate to the linux side.

Also, is the SIXAXIS supposed to work wirelessly with your CD? All i can ever get to work is when its plugged into the PS3 with the USB cable.

Zep--

Zep-- #26620 02/11/07 11:11 AM
Joined: Mar 2001
Posts: 17,258
Likes: 267
R
Very Senior Member
Very Senior Member
R Online: Content
Joined: Mar 2001
Posts: 17,258
Likes: 267
Xevious did not have analog control in the arcade so MAME cannot give it to it.

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
ZEP--: No, I have not figured out wireless sixaxis yet, haven't explored much. So you should use a USB cable(s) for now. Wireless-sixaxis may use a bluetooth-style serial-port interface, but I've not messed with that much.


A default video mode can be set for the front-end (& subsequently sdl mame) by changing the file $ROOT/mame/ps3video.cfg (where $ROOT is the base of your copied cd-image directory- set the file content before you do the mkisofs step).

I supplied a default value of 2, but setting to 3 should work fine? I'll give 3 a try during the next burn iteration, just to ensure veracity.


With respect to command line options: -nokeepaspect vs. -aspect_ratio 16x9... I am uncertain as to how to scale in software- is there a good command-line option already in existence? I'll drop it in the front-end if so. A varient of the '-nokeepaspect' logic could do the trick?.. I've not perused that code yet. Kicking to a lower resolution works acceptably for me, but I recognize such could be more optimal.


(Fwiw, ps3's ridge racer 7 contains a 'xevious' mini-game during bootstrap - very cool! Ridge racer 7 makes buying a force-feedback driving wheel controller worth it. I'm not a 'new-gamer' by nature, but the ps3 driving games are amazing. I hope to get driving wheel (pole position, spy hunter), trackball (centipede, milli), and x-arcade stick controllers working- if I can figure the issues.)


I'll be shifting back into 'development mode' over the next few days, so I'll be more active in the short-run.


BRUCE C: nice, thanks for sharing results. I'll parse them more thoroughly soon, my head is filled w/ other crud right now.

I'm not familiar w/ the cell SPE capabilities; got a good white-paper link/reference to read? Probably can find it if I look- but if you might spare me some search time, that'd be nice.

My past experience w/ 'exotic' processor benchmarking ('toaster 3', intel castine, etc.) is that (at the time) the benchmarks had to be tailored to physical processor constraints. It was necessary to go down to the assembly/risc/microcode-language level to pump out all the performance, and there were lots of 'weird' rules that had to be observed. These were pipelined architectures which could choke badly if instruction scheduling was not perfect. Due to NDAs that I signed, I likely should shut my mouth now, but fwiw smile


Happy Friday!
Phil


Joined: Feb 2007
Posts: 6
B
Member
Member
B Offline
Joined: Feb 2007
Posts: 6
FWIW, since you mentioned X-Arcade, I've got their "TankStick" (2 joysticks, buttons, large trackball) in my PC MAME cabinet, and hooked it up to the PS3 USB ports (1 for sticks, 1 for trackball as a mouse) ... copied X-Arcade.cfg into $SDLMAMEHOME/cfg, edited the .ini file to use X-Arcade, and it works perfectly.

A little silly looking, this big monster arcade controller hooked to the tiny PS3, and certainly MAME32 or MAMEFX on a decent Athlon + 3D graphics card run circles around SDLMAME on the PS3 frown , but I have hopes that the PS3 will improve a lot in this Linux space...

And, yes, benchmarks only show you so much. At the present, the PS3 looks only so-so for Linux because we are only using the traditional PPC core ... while I'd like to believe there are some magic compiler switches which will make it scream, I'm afraid what we really need is specialized programming of the SPEs and hopefully accelerated GL graphics. Of course if SDLMAME could inherit AdvanceMAME's multiprocessor capability, we might see some decent gains using the two PPC HW threads (perhaps core MAME will use > 1 thread in the near future since most PCs now are dual core)...


Joined: Mar 2007
Posts: 5
J
Member
Member
J Offline
Joined: Mar 2007
Posts: 5
Hi Guys

I have a few question in regards to using SDLMAME on the ps3.

What is the best linux to use for mame as far as memory usage goes?

Can someone test if the more CPU intensive games like Mortol Kombat 2 and NBA JAM work good?

How much ram does that federa give you once OS is loaded?

Cheers

Josh

Joined: Mar 2001
Posts: 17,258
Likes: 267
R
Very Senior Member
Very Senior Member
R Online: Content
Joined: Mar 2001
Posts: 17,258
Likes: 267
IMO it's a bit of a wash on memory usage - YDL is skimpiest out of the box because it's using a lightweight window manager, but you can configure everyone else that way too.

I haven't specifically tried MK2/NBA Jam, but I would assume they'd run OK.

Joined: Mar 2007
Posts: 5
J
Member
Member
J Offline
Joined: Mar 2007
Posts: 5
Thanks R. Belmont smile

Do you reackon I'd be better off using YDL for now for mame?

Does the sound work ok under YDL?

Also can I full screen a game in mame with YDL or does it have to be windowed?

Thanks for replying

Josh

Joined: Mar 2007
Posts: 5
J
Member
Member
J Offline
Joined: Mar 2007
Posts: 5
I'm very much looking forward to running mame on the ps3.

Bruce C I love it if Linux had full access to the RSX, big increase with mame and other apps. You sound like your very up with linux. Is there somes guides on how to use Yellow Dog properly?

I've mainly been using Windows for 12 or so years now, MAME for about 7 years.

Cheers

Josh

Last edited by Joshwaan2k7; 03/28/07 02:38 PM.
Joined: Mar 2007
Posts: 5
J
Member
Member
J Offline
Joined: Mar 2007
Posts: 5
Hi R. Belmont

Sorry for posting so much, just very excited to run mame on the ps3.

I'm very much a newbie with Linux, I got Fedora 5 installed on my PAL ps3.

I was wondering what's the best binary of mame to use with this?

Also could you explain how to compile that version so it boots my copy of Mortal Kombat 2?

Cheers Mate

Last edited by Joshwaan2k7; 03/30/07 08:54 AM.
Joined: Feb 2007
Posts: 6
B
Member
Member
B Offline
Joined: Feb 2007
Posts: 6
Joshwaan2k7, Running mame0112 on PS3 in -window mode, I get near perfect frame rates for NBA Jam, but frameskip of 5-8 with MK2, so it isn't playable. -switchres doesn't work for me (even ps3videomode to change resolutions just corrupts the screen whether I'm running X or not, so I switch resolutions at boot time), and I default to 1280x720 mode so running NBA Jam fullscreen has a bad frameskip of about 7.

To get sdlmame on your box, just grab the latest sdlmame source tree from here http://rbelmont.mameworld.info/?page_id=163 (click on latest version or stable version hyperlink to download), then go to wherever it was saved in a [gnome-|x]term[inal], unzip it (for me "unzip Desktop/sdlmame0113u4.zip"), cd to the extracted directory (for me "cd sdlmame0113u4"), emacs/vi makefile, uncomment the "CELL = 1" line by removing "# " from the beginning, and comment out what was uncommented in that section before by prefixing with "#" (for 0113u4 it was "PM"). You can but don't have to uncomment "PTR64 = 1" line (it will generate a binary that uses 64 bit pointers but doesn't run any faster on PS3 unlike on AMD64/EMT64 chips and Linux x64. Then, type "make -j 2" (runs two compiles at once which balances compute and IO some as well as using the second thread on CELL a bit). This takes quite some time to build (some modules require a lot of memory to compile so it is a good idea not to have too much running on your desktop during a build). After it is done, if you haven't had to go grab updated libSDL like YDL requires, you have the binary, "mamecbe", built and can run "./mamecbe -window nbajam" if you've got the right version of nbajam rom zipfile or dirtree in the rom subdirectory.

Jury is still out, but it appears Sony will not be giving us RSX access anytime soon - as it is, PS3 is a decent Linux box, but if they made it so we could run OpenGL and get Blu-Ray DVD player running in Linux they might lose some sales of PS3 games. While I was excited about programming the CELL chip at first, I've kind of come to realize that even if I could use the SPUs to do video scaleup for libSDL (hence sdlmame, sdlsnes9x, sdlmess,...) the PS3 would not be half the emulation platform a dual core Opteron is, so I've taken a break from that for now...Kind of hoping someone else has some good ideas on improving some of the PS3 Linux issues and gets me motivated to move forward again...

Good luck!

...Bruce

Bruce C #28616 04/11/07 06:14 AM
Joined: Apr 2007
Posts: 1
R
Member
Member
R Offline
Joined: Apr 2007
Posts: 1
Just a bit to everyone so far, thanks for being seemingly sane, and helping out with getting this stuff running. I myself was never much one for linux until lately, and this is my first attempt at using it actually. more then I bargined for in one way, and in another it's making me go out and learn about this stuff.

so please keep up the great work. and pardon any stupid questions I might ask along the way ^_^

~b

Joined: Jan 2007
Posts: 23
P
Member
Member
P Offline
Joined: Jan 2007
Posts: 23
to add to bruce c's build suggestions:

currently if you are using sixaxis, you must use usb cable --- (I heard sixaxis wireless is bt 2.0 -- maybe in new YDL release?)

and also, if using sixaxis, & if you are 'rolling your own' for libSDL, you should take (or improve!) the "axis constraint" libSDL diff earlier in this thread -- unless you have a very steady pair of hands smile


bruce c: about the video garble - ps3 video modes 'are not real'. (see up in this thread). The kernel's frame buffer driver uses 'bordered' geometry. Add 128 to get the 'real hd mode'. Elsewise, the modes to pass to SDL are ~ as this:

printf("2 = 576x384, 3 = 1124x644, 7 = 576x460@50\n");
printf("130 = 720x480 * , 131 = 1280x720, 135 = 720x576@50 *\n");

... where LHS is ps3videomode, RHS is SDL application (mame) requested resolution.


phil h

Joined: Nov 2006
Posts: 27
A
Member
Member
A Offline
Joined: Nov 2006
Posts: 27
I tinkered around with this iso and for the love of god, neither on my Mac OS X 10.5.3 or on my Windows XP with Magic ISO maker or Power ISO, that I can not get my updated ps3-mame-cdr-test.iso that has more roms and an updated gamelist to bootup properly on my PS3! Any ideas or help please? Its been almost a year, and no new progress on this Mame for PS3?

Joined: Nov 2006
Posts: 27
A
Member
Member
A Offline
Joined: Nov 2006
Posts: 27
I've made some progress, UltraISO with Crossover on the Mac allows me to edit the iso and burn it with Macs Disc utility and it boots up on my PS3!

Page 1 of 7 1 2 3 4 5 6 7

Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
4 members (Cpt. Pugwash, Darkstar, AJR, 1 invisible), 127 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,355
Posts122,423
Members5,082
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Powered by UBB.threads™ PHP Forum Software 8.0.0