Forum Replies Created

Viewing 35 posts - 1 through 35 (of 37 total)
  • Author
    Posts
  • in reply to: configuring controllers in Reicast #100805
    free5ty1e
    Participant

    Thanks everyone! This is good info; not sure how quickly I’d be able to help with the axis + and – mapping to buttons logic but that is certainly something I think is possible with the code I’ve gone through thus far.

    Anything that currently works with axis mapping to buttons is purely coincidental, that situation is not handled specifically in the logic :)

    in reply to: configuring controllers in Reicast #100557
    free5ty1e
    Participant

    Also, holy awesome, I want a GameBoy RetroPie like that!! :o

    Solid project!!!

    in reply to: configuring controllers in Reicast #100556
    free5ty1e
    Participant

    Thanks everyone :D Haven’t had much time lately but I’m hoping to get back at it this weekend!

    in reply to: configuring controllers in Reicast #99935
    free5ty1e
    Participant

    [quote=99924]Shenmue Disk1 runs, it’s “playable” but not perfect, very reasonable. I think with a few more tweaks and it’ll play very smoothly. Free5tyle, i just want to say, i love you and the progress you’ve made on this.
    For some reason game saving takes an unusually long time, but that could just be shenmue, i’ve not played it on my actual dreamcast recently, but i don’t remember game saves taking that long. (My pi2 is inside an original gameboy, so a portable dreamcast is amazing!)

    I do have a couple requests. Because mine is a portable gameboy, and saving takes a while, i wonder if Save States are possible. I use savestates for everything that i can. 1 button to save, 1 button to load.

    Also is there a way i can reverse the axis on reicast? other emulators i can select which axis direction is what. Because my joystick(PS-Vita thumbstick) is technically upside down, left is right, and up is down. In other emulators like mupen64plus i can configure these, same with all the libretro emulators. I’d also need to change the sensitivity, my joystick only needs a very tiny deadzone, and has a rather limited maximum range, of the 32k range that mupen64 uses. i can only use about 15-16k ranges, so normally full forward would cause a character to walk or even tip-toe(mario), but by changing the sensitivity from 32k to 14.5k(ish), and the deadzone to (256, much lower than default) i can use my joystick normally.

    [/quote]

    Hi Djinny!

    Game saves to VMU are the only operation currently that directly writes to the SD card during gameplay, so it’s bound to be a bit sluggish during saves (and they will take a little longer than you’re used to on the real Dreamcast, but not by much; my Rush 2049 saves only take a second or two; then again, it only takes a couple of blocks).

    Awesome to hear that Shenmue is at least partially playable! I have to find my copy and make disc images so i can get back into that game :D

    I would love to learn how to implement save states!! Definitely on my list but no idea how to start just yet. (free5ty1e = n00b @ emulation coding)

    However, I *DO* have an idea on how to start implementing some emu.cfg settings for the following, and plan to start soon:

    * Sound playback frequency (audio.playback.frequency=44100)
    * Sound playback channels (audio.playback.stereo=1)
    * Frameskip (video.frameskip=0)
    * Controller axis deadzone (for each defined controller in emu.cfg, such as axis.deadzone=128)
    * Controller axis max value (for each defined controller, such as axis.maxvalue=16384, assumed to be the same number positive and negative)
    * Controller axis reversal (for each defined controller axis, such as axis.0.reversal=1)

    Thanks for the suggestions!! :D

    in reply to: configuring controllers in Reicast #99907
    free5ty1e
    Participant

    I’ve recreated the Reicast pull request from a separate branch from the one used for RetroPie builds, so I am free to merge in others’ pull requests for experimentation and improvement purposes while the Reicast repo takes its time getting pull requests merged upstream. (I want to move faster than upstream, lol)

    https://github.com/reicast/reicast-emulator/pull/670

    (This merely enables me to do as I said in the above post, and merge in others’ improvements for RetroPie to build without contaminating my Reicast upstream pull request)

    Let me know if anyone encounters new issues with the latest experiment in the above post, I’ll get it merged into RetroPie for mass testing later this week if nothing major comes up.

    Thanks!!

    in reply to: configuring controllers in Reicast #99882
    free5ty1e
    Participant

    I believe I’ve made some good progress towards stability and sorting out the audio issues, although the audio is still choppy…

    There are two pull requests that have been sitting in the Reicast repo for a bit now, and they have some nice compiler warning fixes and an audio system rework and reorganization.

    No idea how long it will be until they are merged in and such upstream, but I took it upon myself to merge these fixes into my latest experimental branch free5ty1e/rpi2/sound-fixes if anyone wants to check it out. I’ve been testing it out like this most of the day yesterday and found it nice and stable, much longer before a crash.

    The audio backends are much more organized now too, so hopefully this will enable some sound choppiness fixes to be developed in the near future. I will probably go ahead and merge this into the main RetroPie branch this week at some point unless someone tests and finds a new issue that this might have caused.

    in reply to: configuring controllers in Reicast #99726
    free5ty1e
    Participant

    Wierd. Agreed, good fix – at least 1 of the 8 generated VMUs should work, at which point just duplicate and rename the working one.

    At some point I’ll probably notice why this happens in the first place and do something about it.

    in reply to: configuring controllers in Reicast #99721
    free5ty1e
    Participant

    [quote=99718]Just a heads up, that when I formatted the VMUs, the first 3 didn’t format correctly. I ended up copying the 4th one and renamed it to overwrite the first 3.

    [/quote]

    Wonder what’s going on there? Was it perhaps after having played the Dreamcast for a bit without rebooting? I’ve noticed some strange behavior after exiting the emulator that was solved by rebooting … still unsure where the Reicast memory leak is but it’s doin something the OS doesn’t like sometimes!

    I did reboot before formatting my VMUs to fix that problem the first time I ran into it, so this is good to be aware of.

    in reply to: configuring controllers in Reicast #99719
    free5ty1e
    Participant

    Ooh, Rival Schools runs well?? I’m gonna find my copy nao!!

    in reply to: configuring controllers in Reicast #99715
    free5ty1e
    Participant

    [quote=99712]Okay, first off – thank you! It is incredible being able to play Dreamcast games in Retropie.

    I am having a problem though … I’ve followed the instructions, and I believe I have the newest version of everything. I have Marvel vs Capcom 2 running successfully (yay!) and I was able to edit the controls to my liking with emu.cfg.

    However, I’m having an issue with the VMU. The first time I run the emulator, it makes all the virtual VMU files (I can see them in then /.reicast directory), but when I launch the game again, it says that no VMU is inserted/not enough blocks available. If I delete the VMU files, the game “finds” the VMU and is able to save again, but when I close and re-open the game, the same problem happens (no VMU/not enough blocks).

    **EDIT** After playing around with this some more, it seems that the games can “see” the VMUs, as I can access them from the games’ VMU options, but after I’ve saved to one of the virtual VMUs once, the next time I load the game, they are now “full” but nothing can be loaded from them either.

    It’s probably also worth noting that I had to manually change the permission for the /.reicast directory to “pi:pi” in order to be able to put the bios files into the “data” directory.

    Any idea what could be happening here or how I could fix it? Thanks again for all the hard work to help make playing this stuff possible at all!

    [/quote]

    No problem! This is an issue I’ve run into before as well — sometimes, the VMU files don’t get formatted correctly upon creation. Fortunately, just requires the Dreamcast OS to reformat the VMU and you’re good to go!

    You just got me thinking how to make this easy for everyone, and I’ve come up with a solution! Need to launch the Dreamcast as if there were no CD inserted. Here’s a trick to do that from EmulationStation’s Dreamcast menu…

    Go to a terminal on the Pi (or remotely, whatever) and type in:

    
    ln -sv fileThatDoesNotExist ~/RetroPie/roms/dreamcast/systemManager.cdi
    

    Then restart EmulationStation. You should notice a SYSTEMMANAGER entry in the Dreamcast menu now, select it and you will get to the menu you need. Select File and you can manage your VMUs here… “Erase All” will reformat a VMU. This should sort your issue… and I’ve put in a pull request to RetroPie to get this added to the installation procedure.

    in reply to: configuring controllers in Reicast #99711
    free5ty1e
    Participant

    I updated the wiki too in case that helps anyone:

    https://github.com/retropie/RetroPie-Setup/wiki/Dreamcast

    in reply to: configuring controllers in Reicast #99708
    free5ty1e
    Participant

    If you haven’t already moved your Dreamcast BIOS files into ~/.reicast/data/ then that would do it. The new version is now using the home folder.

    There was also a brief period with a launch bug after the change was merged to RetroPie, but that is now fixed. If you haven’t tried already, update your RetroPie Setup to the latest and try rebuilding the emulator.

    I can’t think of anything else that would cause your games to not boot, hopefully this helps!!

    in reply to: configuring controllers in Reicast #99663
    free5ty1e
    Participant

    (of course don’t forget to update your RetroPie-Setup script from the same menu!)

    in reply to: configuring controllers in Reicast #99661
    free5ty1e
    Participant

    Got this merged into RetroPie just now, so all you have to do now to enjoy the latest Dreamcast fixes is to run the RetroPie menu’s Experimental installer for Reicast, which now points to my free5ty1e/rpi2/retropie-reicast-updated branch!

    I’ll still post here when I make progress :D

    in reply to: configuring controllers in Reicast #99644
    free5ty1e
    Participant

    Pull request submitted to RetroPie for review :D

    in reply to: configuring controllers in Reicast #99549
    free5ty1e
    Participant

    New branch free5ty1e/rpi2/retropie-reicast-updated created and pull request for upstream / original Reicast created.

    I’ll update the RetroPie module later when I get a chance :D

    in reply to: configuring controllers in Reicast #99545
    free5ty1e
    Participant

    No problem! Dreamcast epicness must live on in the Pi!

    I’m about to the point where I think its time to update the official experimental RetroPie Reicast module, and create a branch to always keep updated for RetroPie to use (something maybe like free5ty1e/rpi2/retropie-reicast-updated). It’s stable and improved enough that this would be worth it, then future updates will be easy enough to roll out…

    in reply to: configuring controllers in Reicast #99514
    free5ty1e
    Participant

    Frameskip: No, I have poked around the code for frameskip and it appears to be somewhat implemented but disabled completely. Not sure if what is in place actually works, but it definitely should be brought out to an emu.cfg setting. I’ll look into doing this.

    Powerstone: Haven’t tried it. Let me know if you do!

    ———————————

    Reicast new beta branch: free5ty1e/rpi2/vmus-in-home-dir

    Moar progress on Reicast. Better stability, VMUs and emu.cfg and BIOS files now reside in /home/pi/.reicast
    NOTE: YOU WILL NEED TO PLACE YOUR BIOS FILES OR LINKS TO THEM IN A NEW LOCATION: /home/pi/.reicast/data/

    I’ve been able to have a Dreamcast game going on for several additional hours before some memory leak decides to confuse the Pi into crashing; instead of just 1 or 2 hours, I now am able to get a good 4-6 hours in before a crash!

    Additionally, since the VMUs are no longer in memory while the Dreamcast is running, any saved games are written immediately and correctly to the SD card (instead of potentially being lost if the Pi crashes before the exit script can update your VMU files from the tmpfs). No need to have VMU files in the /opt/retropie/emulators/reicast/ folder, smaller memory footprint and all that.

    For completeness, here’s my mapping section for my genuine PS3 controller connected via my CSR 4.0 bluetooth adapter, added to emu.cfg:

    UPDATED

    
    [PLAYSTATION(R)3 Controller]
    button.0=Btn_Z
    button.1=Btn_C
    button.2=Btn_D
    button.3=Btn_Start
    button.4=DPad_Up
    button.5=DPad_Right
    button.6=DPad_Down
    button.7=DPad_Left
    button.8=Axis_LT
    button.9=Axis_RT
    button.10=DPad2_Left
    button.11=DPad2_Right
    button.12=Btn_Y
    button.13=Btn_B
    button.14=Btn_A
    button.15=Btn_X
    button.16=Quit
    axis.0=Axis_X
    axis.1=Axis_Y
    

    You can add as many of these sections to the emu.cfg as you’d like, and if you have a matching controller name connected during Reicast startup, your custom button maps will be applied (overlaid, actually) to the default map.

    Post your configs! :D

    Here’s the updated script I’m using to build and install Reicast from my github repo (still piggybacking on the RetroPie script awesomeness)

    UPDATED

    
    #!/bin/bash
    echo "Temporarily modifying RetroPie module..."
    sed -i '/gitPullOrClone/c\gitPullOrClone "$md_build" https://github.com/free5ty1e/reicast-emulator.git free5ty1e/rpi2/vmus-in-home-dir' ~/RetroPie-Setup/scriptmodules/emulators/reicast.sh
    
    echo "Requesting a build through official RetroPie calls..."
    sudo ~/RetroPie-Setup/retropie_packages.sh reicast
    
    echo "Restoring original RetroPie-Setup state..."
    pushd ~/RetroPie-Setup
    git reset --hard
    popd
    

    Here is the launch script — let’s call it /home/pi/dreamcast.sh — that I am using to run Reicast smoothly with no visual stuttering / pausing (uses tmpfs to run in memory and not allocate virtual memory on the SD card. Audio is still not that smooth. I am also thinking the tmpfs size can be dropped down further, was 512MB is now 450MB, I’ve only ever seen ~60MB used… let me know if someone plays with this number with good results):

    UPDATED

    
    #!/bin/bash
    pushd /opt/retropie/emulators/reicast
    echo Reading the entire Reicast emulator into memory to execute from there...
    sudo mkdir tmpfs
    sudo mount -o size=450M -t tmpfs none tmpfs/
    sudo cp -v * tmpfs/
    cd tmpfs
    sudo aoss ./reicast.elf -config config:homedir=/home/pi -config config:image="$1"
    cd ..
    echo Ensuring any freshly-created VMUs are owned by pi and not root...
    sudo chown -R pi:pi .reicast
    echo Freeing up memory...
    sudo umount /opt/retropie/emulators/reicast/tmpfs
    sudo rm -rf tmpfs
    popd
    

    …and here is the entry for your es_systems.cfg to launch via this script in EmulationStation, for completeness:

    UNCHANGED

    
        <system>
            <fullname>Sega Dreamcast - Reicast</fullname>
            <name>dreamcast</name>
            <path>~/RetroPie/roms/dreamcast</path>
            <extension>.cdi .CDI</extension>
            <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 "/home/pi/dreamcast.sh %ROM%" "dreamcast"</command>
            <platform>dreamcast</platform>
            <theme>dreamcast</theme>
        </system>
    

    Enjoy!

    in reply to: configuring controllers in Reicast #99259
    free5ty1e
    Participant

    Ooh try MVC1, smoothest 2 player fighting experience I’ve seen so far :D

    in reply to: configuring controllers in Reicast #99256
    free5ty1e
    Participant

    I’m running with the standard “Pi 2” overclock selected from the sudo raspi-config command’s advanced menu. So just 1GHz. I’m running a 96MB GPU memory split (96MB for GPU, rest for CPU), and have ran fine with 64MB GPU as well.

    MVC2 runs playable for me but not full speed for sure.

    in reply to: configuring controllers in Reicast #99249
    free5ty1e
    Participant

    [quote=99220]no luck here :(

    tried to compile using your newest script but it doesn’t compile saying that reicast.elf is missing.

    [/quote]

    So, you might want to give it a go manually, without the help of the RetroPie-Setup scripts. Or actually, you might just need to update your RetroPie-Setup repo! Try sudo ~/RetroPie-Setup/retropie_setup.sh and select the U Update RetroPie-Setup script option and then restart the Pi, and try building the Dreamcast emulator again.

    If that doesn’t do it for ya, here are some commands to build and install the latest Reicast .elf files over top of your existing installation:

    `
    cd ~
    git clone https://github.com/free5ty1e/reicast-emulator.git
    cd reicast-emulator
    git checkout free5ty1e/rpi2/multiplayer
    cd shell/rapi2
    make
    sudo cp -v *.elf /opt/retropie/emulators/reicast/
    `

    If you didn’t see any errors there, and you saw the two .elf files copy over, your Reicast should be up to date.

    If this is the only method that works for building Reicast for you, then here are commands to update and build the latest changes (this will also be faster as it will only recompile the changed files, so you will get updates in a matter of seconds instead of 5-10 minutes for a full build.)

    `
    cd ~/reicast-emulator
    git pull
    cd shell/rapi2
    make
    sudo cp -v *.elf /opt/retropie/emulators/reicast/
    `

    If you WANT to perform a full / clean build, add a make clean command before the make command.

    Hope this helps enable more Dreamcast!!

    in reply to: configuring controllers in Reicast #99248
    free5ty1e
    Participant

    [quote=99230]wicked, so if I repull now using the multiplayer branch, I will have the best of everything?
    [/quote]

    Yep!

    I haven’t tested with Shenmue yet, but I’ll bet it works now. Lots of DC games required the D-pad to navigate menus and didn’t bother enabling the analog stick for menus :D

    [quote=99239]There are buttons that I left out, are those the buttons on the memory card?
    [/quote]

    That’s a good question, and possibly! Since the PS3 had so many controls mappable, I went ahead and set everything available in the Dreamcast controls list to something on the PS3 controller. I haven’t found a need / way to test the C, D, Z, or DPad2 buttons, but I mapped them so I could “find” controls when I test new games :D

    If anyone manages to make use of the C, D, Z, or DPad2 buttons successfully, I’d like to hear about it.

    I left my Rush 2049 on a Single Race on the Civic track all night (there’s a nice hill there the autoresets can’t get past, and == free miles and unlocking stuff), and when I woke up this morning I confirmed there is indeed a memory leak somewhere in the Reicast code (possibly several). My Pi had ran out of memory completely and just crashed.

    I’d already noticed earlier that things in general start to act funny after a couple hours, probably due to these same leaks… so heads up, reboot your Pi after a couple hours of Dreamcast play to keep things running maaaaaad. I’m sure someone intelligent will find and eliminate these memory leaks at some point.

    in reply to: configuring controllers in Reicast #99229
    free5ty1e
    Participant

    Awesome! I’ve just updated my free5ty1e/rpi2/multiplayer branch to reflect this fix, thanks for testing!

    Not sure why it wouldn’t be compiling for you, dishins… works like a charm for me every time. My friend and I have been playing Dreamcast games all day on this emu. It does tend to crash every once in a while after playing for a couple hours, and might necessitate a reboot of the RPi2, but I’m very pleased with how far it’s come recently.

    If only I had the slightest clue how to fix the stuttery audio and the 3d split screen drawing bounds issue….

    in reply to: configuring controllers in Reicast #99198
    free5ty1e
    Participant

    I think I have it sorted, although I can’t test it here. I have pushed up a new branch free5ty1e/rpi2/testing that should take care of this issue for your situation, where the controller ends up with trailing whitespace in the Name field.

    Could you try building this branch (replace the branch name in the script I posted above) and seeing if your controller mapping woes are still present?

    If this fixes the thing, I’ll add it to my multiplayer pull request / branch for all to use.

    (You should only need the entry for your controller without spaces at the end, now… there was some trimming going on during the config section name parsing code, so it threw itself for a loop just as you described. I enforced trimming whitespace from all Names so that they should always match up in the logic.)

    Hope this helps!! :D

    in reply to: configuring controllers in Reicast #99183
    free5ty1e
    Participant

    Oh hey I am digging deeper into the code and I see where this might be happening… will let you know when I figure it out, and also update my branch and pull request :D

    Thanks for testing!!

    in reply to: configuring controllers in Reicast #99182
    free5ty1e
    Participant

    That’s strange, you’re saying Reicast is creating these blank fields for you in the emu.cfg? I didn’t write any logic to save any mappings to the emu.cfg, just to read from it. Not sure what’s going on at the moment but I’ll think on it and post back if I can make sense of that :o

    Even after rebuilding and reinstalling Reicast, the emu.cfg I’ve edited hasn’t been touched. I’ve only defined the buttons and axis I posted.

    Not sure if it helps, but I put the controller mapping section just before the [reios] section. Position should not matter, unless you break up one of the sections by accident in the emu.cfg.

    Hope someone other than me is able to have some fun with this soon… I’m going to be experimenting with all my old Dreamcast games tomorrow with a friend and we’re gonna see just how well multiplayer works all around.

    At some point, I’m also going to have to enable Typing of the Dead and emulation for the Dreamcast Keyboard. Because I also have that game. xD

    Gonna work this into a RetroPie pull request tomorrow as well, so everyone who builds the experimental Reicast emulator from RetroPie setup will also get a better Dreamcast experience. DREAMCAST FOR ALL! (you get a Dreamcast, and YOU get a Dreamcast, and YOU get a Dreamcast…)

    in reply to: configuring controllers in Reicast #99172
    free5ty1e
    Participant

    Holy crap… I finally got multiplayer to start working! Can map each individual controller (they can be different, will match upon startup to your emu.cfg entries).

    No idea why split screen stuff appears to be screwy (Rush 2049 multiplayer views are not playable), but same-screen stuff works great so far! (Marvel vs Capcom 2 multiplayer is FUN!!)

    Just switch to my new branch free5ty1e/rpi2/multiplayer and run all the same stuffs as above…. enjoy!! :D

    -edited above post to include multiplayer update

    in reply to: configuring controllers in Reicast #99169
    free5ty1e
    Participant

    Good news fulfilled!!! xD

    Edited to include multiplayer too!

    So, here’s my mapping section for my genuine PS3 controller connected via my CSR 4.0 bluetooth adapter, added to emu.cfg:

    
    [PLAYSTATION(R)3 Controller]
    button.0=Btn_Z
    button.1=Btn_C
    button.2=Btn_D
    button.3=Btn_Start
    button.4=DPad_Up
    button.5=DPad_Right
    button.6=DPad_Down
    button.7=DPad_Left
    button.8=Axis_LT
    button.9=Axis_RT
    button.10=DPad2_Left
    button.11=DPad2_Right
    button.12=Btn_Y
    button.13=Btn_B
    button.14=Btn_A
    button.15=Btn_X
    button.16=Quit
    axis.0=Axis_X
    axis.1=Axis_Y
    axis.2=DPad2_Up
    axis.3=DPad2_Down
    axis.4=DPad2_Left
    axis.5=DPad2_Right
    

    You can add as many of these sections to the emu.cfg as you’d like, and if you have a matching controller name connected during Reicast startup, your custom button maps will be applied (overlaid, actually) to the default map.

    Post your configs! :D

    Oh! Here’s the updated script I’m using to build and install Reicast from my github repo (still piggybacking on the RetroPie script awesomeness), pointing to the new branch free5ty1e/rpi2/multiplayer (it’s been rebased on the upstream master and I have submitted a pull request to get raspberry pi 2 included in the official Reicast repo):

    
    #!/bin/bash
    echo "Temporarily modifying RetroPie module..."
    sed -i '/gitPullOrClone/c\gitPullOrClone "$md_build" https://github.com/free5ty1e/reicast-emulator.git free5ty1e/rpi2/multiplayer' ~/RetroPie-Setup/scriptmodules/emulators/reicast.sh
    
    echo "Requesting a build through official RetroPie calls..."
    sudo ~/RetroPie-Setup/retropie_packages.sh reicast
    
    echo "Restoring original RetroPie-Setup state..."
    pushd ~/RetroPie-Setup
    git reset --hard
    popd
    

    And here is the script — let’s call it /home/pi/dreamcast.sh — that I am using to run Reicast smoothly with no visual stuttering / pausing (uses tmpfs to run in memory and not allocate virtual memory on the SD card. Audio is still not that smooth):

    
    #!/bin/bash
    
    pushd /opt/retropie/emulators/reicast
    
    echo Reading the entire Reicast emulator into memory to execute from there...
    sudo mkdir tmpfs
    sudo mount -t tmpfs none tmpfs/
    sudo cp -a * tmpfs/
    
    echo Reading your user VMUs into memory...
    sudo cp /home/pi/.dcvmu/*.bin .
    
    cd tmpfs
    sudo aoss ./reicast.elf -config config:image="$1"
    cd ..
    echo Updating VMU units from memory...
    sudo cp tmpfs/*.bin .
    
    mkdir /home/pi/.dcvmu
    cp *.bin /home/pi/.dcvmu/
    
    echo Freeing up memory...
    sudo umount /opt/retropie/emulators/reicast/tmpfs
    sudo rm -rf tmpfs
    
    popd
    

    …and here is even the entry for your es_systems.cfg to launch via this script in EmulationStation, for completeness:

    
        <system>
            <fullname>Sega Dreamcast - Reicast</fullname>
            <name>dreamcast</name>
            <path>~/RetroPie/roms/dreamcast</path>
            <extension>.cdi .CDI</extension>
            <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 "/home/pi/dreamcast.sh %ROM%" "dreamcast"</command>
            <platform>dreamcast</platform>
            <theme>dreamcast</theme>
        </system>
    
    in reply to: configuring controllers in Reicast #99155
    free5ty1e
    Participant

    Good news, everyone!

    I’ve managed to get mappable information into the controller logic from the emu.cfg… I’m working out the logic to wire it all up, but it should allow for maximum flexibility in mapping any controller once I’m done :D

    The config will look something like this, so we can define a bunch of controllers to match against (individually for each controller once I get multiplayer figured out):

    
    [PLAYSTATION(R)3 Controller]
    button.0=Btn_Z
    axis.0=Axis_X
    quit=16
    

    Any missing mapped buttons or axes will utilize the default mapped buttons and axes. I will also provide a “nothing” map to disable a certain button, and the “quit” item is special since it is handled differently; this means button index 16 will act as the Quit Emulator button.

    Will update the branch I shared above with this once I get it all working. Should be sometime this weekend, methinks :D

    in reply to: configuring controllers in Reicast #99120
    free5ty1e
    Participant

    Yeah, external controller configuration via a user file — that’s definitely a goal for me, just not sure how far off it might be. Still have to figure that bit out, and with the resources in front of me I’m not certain how to start that feature yet.

    Short term though, I should be able to map a different controller ID for autodetection relatively easily the way things are currently set up, and have a new build that supports your alternate controller driver too.

    This is the mapping info currently in the source for the XBOX driver. This is also the info I’d eventually bring out to a .CFG file or something. So how would your changes look to these lines, how should your buttons and axes map to the Dreamcast controller?

    
    Name = "Microsoft X-Box 360 pad"
    MapButton = Btn_A,Btn_B,Btn_X,Btn_Y,0,0,0,Btn_Start,0,0
    MapAxis = Axis_X,Axis_Y,Axis_LT,0,0,Axis_RT,DPad_Left,DPad_Up,0,0
    

    The Btn_A,Btn_B, etc… are Dreamcast controller controls. Their position in the list indicates what mapping index to use (button 0 on xbox controller = Btn_A on Dreamcast, button 1 on xbox controller = Btn_B on Dreamcast, etc…)

    (BTW it looks like the 360 controller doesnt have the d-pad completely mapped as things are, I have no way of testing this but sure looks incomplete to me)

    in reply to: configuring controllers in Reicast #99104
    free5ty1e
    Participant

    I actually dont have an xbox 360 wired controller or a microsoft wireless adapter to try with, but from what I can see in the code it should attempt to detect and map your controller. What does your controller name show up as in your es_input.cfg? (see a couple posts up for how to check)

    Also, since Reicast on the RPi2 is falling back on file allocation on the SD card for memory operations, it stutters horribly sometimes. I’ve been running via the following script to avoid this altogether; Rush 2049 runs consistently smooth now :D

    I saved this script as dreamcast.sh and I run it like dreamcast.sh Rush2049.cdi

    Running just dreamcast.sh without a game will act just like the real Dreamcast would without a CD in it; you will get to the Dreamcast management menu, where you can format your VMUs so you can actually save games :D

    (Note my script also backs up the VMU files to the home folder, you don’t need to do this part but you do need to let it copy the VMU files out of the memory tmpfs and back into the Reicast folder):

    #!/bin/bash
    
    pushd /opt/retropie/emulators/reicast
    
    echo Reading the entire Reicast emulator into memory to execute from there...
    sudo mkdir tmpfs
    sudo mount -t tmpfs none tmpfs/
    sudo cp -a * tmpfs/
    
    echo Reading your user VMUs into memory...
    sudo cp /home/pi/.dcvmu/*.bin .
    
    cd tmpfs
    sudo aoss ./reicast.elf -config config:image="$1"
    cd ..
    echo Updating VMU units from memory...
    sudo cp tmpfs/*.bin .
    
    mkdir /home/pi/.dcvmu
    cp *.bin /home/pi/.dcvmu/
    
    echo Freeing up memory...
    sudo umount tmpfs
    sudo rm -rf tmpfs
    
    popd
    

    Hope this helps!

    in reply to: configuring controllers in Reicast #99049
    free5ty1e
    Participant

    Strange, mine shows up the exact same way. Does Reicast say “Using PS3 map” during startup? (If you launch it from command line and then exit right away, you’ll still have the launch log on screen and should see that. SHIFT+PGUP will scroll back up through your terminal buffer a short way too!)

    I will have some time to tinker more with it this weekend and will see what I can figure out.

    Are your 4 main Dreamcast buttons the START, SELECT, L3 and R3 buttons? If so, it’s using the default map and not detecting your controller for some reason.

    in reply to: configuring controllers in Reicast #98970
    free5ty1e
    Participant

    [quote=98931]i’m using the PS3 controller over bluetooth too, however the key mapping didn’t worked fine for me[/quote]

    Hmm… I’ve tried a handful of various bluetooth adapters, and some show the PS3 controller differently than others.

    What does your PS3 controller’s name show up as in the OS? You can check by looking at how it shows up in EmulationStation’s config, type this and look for the NAME:

    nano ~/.emulationstation/es_input.cfg

    I’ll see if I can figure out how to get detection and mapping working for yours too :D

    in reply to: configuring controllers in Reicast #98916
    free5ty1e
    Participant

    Hi karloss!

    No worries; I added sensible controller-name-based detection that will only apply the PS3 mapping and Quit buttons if a PS3 (or Sony) controller is detected. Otherwise, the default USB gamepad map and the XBOX 360 controller maps will work as before.

    Also, that’s a bash script – you can just copy / paste that into an SSH terminal window to the Pi and have it work (minus the #!/bin/bash line), or just paste the entire thing into a new file and call it installReicastExperimental.sh or something like that. Then just run that script to build the latest Reicast.

    I’m currently rebasing these changes so they are palatable for a pull request to the master branch, as I plan to have this all fully compatible with non-Pi Reicast builds too. I want this to be easy to keep up to date with the latest enhancements from the upstream repo…

    And then yes I am going to figure out how to bring the controller mappings out to an .INI or .CFG file so they are no longer hard-coded into the damn source. :D

    in reply to: configuring controllers in Reicast #98884
    free5ty1e
    Participant

    Hmm, I should mention I am using a genuine PS3 controller over bluetooth. Haven’t tried over USB yet, it might show up a bit differently there. I’ll have to figure out how to bring the control mappings out to an ini file.

Viewing 35 posts - 1 through 35 (of 37 total)