|
Joined: Jan 2007
Posts: 23
Member
|
Member
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-readmeBy 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
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,258 Likes: 267 |
Nice work! I'm really impressed with how fast that CD's come together 
|
|
|
|
Joined: Jan 2007
Posts: 15
Member
|
Member
Joined: Jan 2007
Posts: 15 |
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--
|
|
|
|
Joined: Jan 2007
Posts: 23
Member
|
Member
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.bldI 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
Member
|
Member
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
Member
|
Member
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  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.gzLooks 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
Member
|
Member
Joined: Jan 2007
Posts: 15 |
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.
|
|
|
|
Joined: Jan 2007
Posts: 15
Member
|
Member
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--
|
|
|
|
Joined: Jan 2007
Posts: 15
Member
|
Member
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--
|
|
|
|
Joined: Jan 2007
Posts: 23
Member
|
Member
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
|
|
|
Forums9
Topics9,355
Posts122,423
Members5,082
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|