Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Benchmarking script

    Community projects
    benchmarking script
    5
    31
    7067
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Substring
      Substring @Gaetan last edited by

      @gaetan oh yeah
      Md5 is a the hash of a file. It's unique for any file

      Regarding KI, could you get it to launch on mame2010 ?

      Former dev - Please reply with @substring so that i am notified when you answer me
      Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

      Gaetan 1 Reply Last reply Reply Quote 0
      • Gaetan
        Gaetan Theme moderator @Substring last edited by

        @substring No, KI 1&2 doesn't launch with mame2010

        Here is my gamelist :
        text alternatif

        I don't know how get rid of the "killer instinct (v1.50) and killer instinct 2 (v1.4) in the gamelist

        Boards : Now: Nuc i7 7567u // Past: Rpi3 B, Rpi3 B+, Odroid xu4
        Controllers : Ps3 dualshock, 8bitdo SFC30 pro, Snes wired controller

        voljega 1 Reply Last reply Reply Quote 0
        • Dragu
          Dragu Banned last edited by

          @Substring
          Hi, it was here : https://forum.recalbox.com/topic/13588/strange-error-in-dosbox/58

          Substring 1 Reply Last reply Reply Quote 0
          • voljega
            voljega Banned @Gaetan last edited by

            @gaetan said in Benchmarking script:

            @substring No, KI 1&2 doesn't launch with mame2010
            I don't know how get rid of the "killer instinct (v1.50) and killer instinct 2 (v1.4) in the gamelist

            This is done by editing your gamelist.xml or configuring your scraper....
            Can you also give me the exact rom names for KI & KI2 ?

            Gaetan 1 Reply Last reply Reply Quote 0
            • Gaetan
              Gaetan Theme moderator @voljega last edited by Gaetan

              @voljega Here are the names of the roms :

              • kinst.zip
              • kinst2.zip

              Oh yes ? it's something that I can find in the forum ? I couldn't find it.

              Boards : Now: Nuc i7 7567u // Past: Rpi3 B, Rpi3 B+, Odroid xu4
              Controllers : Ps3 dualshock, 8bitdo SFC30 pro, Snes wired controller

              1 Reply Last reply Reply Quote 0
              • Substring
                Substring @Dragu last edited by

                @dragu now i remember. So a few facts :

                • it's dos only
                • i'm not even sure it has some text output i could read.

                As for now, i prefer focusing on retroarch only because i can test most of systems with the same code

                Former dev - Please reply with @substring so that i am notified when you answer me
                Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                1 Reply Last reply Reply Quote 0
                • Substring
                  Substring last edited by

                  So, here is a first shot :

                  #!/bin/bash
                  
                  # read parameters
                  # $1 is the core
                  RA_CORE="-L /usr/lib/libretro/$1_libretro.so"
                  
                  # $2 is the rom
                  RA_ROM="$2"
                  
                  # Consider the game should run at 60Hz
                  FPS=60
                  
                  # Start the emu
                  NB_FRAMES=600
                  RA_OPTS="--verbose --max-frames=${NB_FRAMES}"
                  RA_CONFIG="--config /recalbox/share/system/configs/retroarch/retroarchcustom.cfg"
                  RA_OUTPUT_LOG=/tmp/ra.log
                  rm $RA_OUTPUT_LOG
                  
                  /usr/bin/time -v /usr/bin/retroarch $RA_OPTS $RA_CORE $RA_CONFIG "$RA_ROM" > $RA_OUTPUT_LOG 2>&1
                  
                  # Get the emulator output
                  FRAMES_EXPECTED=`grep "[INFO] Threaded video stats" "$RA_OUTPUT_LOG" | sed "s+.*Frames pushed: \([0-9]*\).*+\1+"`
                  FRAMES_DROPPED=`grep "[INFO] Threaded video stats" "$RA_OUTPUT_LOG" | sed "s+.*Frames dropped: \([0-9]*\).*+\1+"`
                  FRAMES_RENDERED=$(($FRAMES_EXPECTED - $FRAMES_DROPPED))
                  TIME_RUN=`grep "Elapsed (wall clock) time (h:mm:ss or m:ss):" "$RA_OUTPUT_LOG" | sed "s/.*: \([0-9]*\)m \([0-9]*\)\.\([0-9]*\)s/\1 \2\ \3/"`
                  NB_MINS=`echo $TIME_RUN | cut -d ' ' -f 1`
                  NB_SECS=`echo $TIME_RUN | cut -d ' ' -f 2`
                  NB_CENS=`echo $TIME_RUN | cut -d ' ' -f 3`
                  CPU_LOAD=`grep "Percent of CPU this job got:" "$RA_OUTPUT_LOG" | sed "s/.*: \([0-9]*\)%.*/\1/"`
                  
                  # Do what we need
                  # The game should have run for NB_FRAMES / FPS seconds, how long did it really take ?
                  EXPECTED_TIME=$(($NB_FRAMES / $FPS))
                  REAL_TIME=$(($NB_MINS * 60 + $NB_SECS))
                  OVERHEAD=$(($REAL_TIME - $EXPECTED_TIME))
                  
                  # Looks like RA start emulation at [INFO] Initializing rewind buffer with size: 10 MB
                  # or [INFO] Loading history file: [/recalbox/share/system/configs/retroarch/content_image_history.lpl].
                  # And it ends at [INFO] Saved core options file to "/recalbox/share/system/configs/retroarch/cores/retroarch-core-options.cfg"
                  
                  echo "$FRAMES_EXPECTED - $FRAMES_DROPPED = $FRAMES_RENDERED ($EXPECTED_TIME + $OVERHEAD / $CPU_LOAD)"
                  echo -n "1st score (100 max):"
                  python -c "print round(100*$FRAMES_RENDERED/$NB_FRAMES*$NB_FRAMES/$FPS/${REAL_TIME}.${NB_CENS}, 2)"
                  

                  The final result is a mark out of 100. Shouldn't be above 100. 100 would mean instant load of retroarch + start of the game, which is nearly impossible.

                  The basic idea : retroarch is run for 600 frames (assume the game is 60Hz). Then compute a few details :

                  • frames rendered
                  • frames dropped
                  • total time elapsed
                  • CPU %

                  Made a few tests with killing blade (the PGM logo is already stuttering on a non overclocked pi3)

                  Pi3 output example:

                  # bash recalbox-bench.sh fba ../roms/fba_libretro/killbldp.zip    
                  600 - 0 = 600 (10 + 4 / 88)
                  1st score (100 max):67.98
                  

                  C2 output example:

                  # bash recalbox-bench.sh fba ../roms/fba_libretro/killbld.zip    
                  600 - 0 = 600 (10 + 2 / 69)
                  1st score (100 max):81.23
                  

                  Small explanation on the first result line
                  600 : number of frames expected
                  0 : number of frames dropped
                  10 : expected run time (600 frames at 60 Hz)
                  2 : run time overhead (means the full length of retroarch took 12s, despite i'm not showing the rest of the value but do have it in the script)
                  69 : CPU percentage

                  So from here you can notice:

                  • the pi3 took something like 14 to 15s for the overall launch of RA + ROM execution + quit RA whereas it took 12 to 13s on the C2
                  • the PGM logo was consuming 88% on pi3 vs 69% on the C2. And I tell you : the sound doesn't stutter on the C2

                  Overall, this bench doesn't look that bad for now 🙂

                  Former dev - Please reply with @substring so that i am notified when you answer me
                  Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                  1 Reply Last reply Reply Quote 1
                  • voljega
                    voljega Banned @Gaetan last edited by

                    @gaetan

                    @voljega if I can help ?

                    bon pour le Golden Axe j'ai réussi, le jeu mets des plombes à se lancer
                    pour Killer Instinct j'ai aussi réussi sur mame2003, par contre ça ne fonctionne pas sur mame2010 même avec le CHD dans la bonne version

                    Un peu bizarre les CHD d'ailleurs celui de Killer Instinct fait genre dans les 90mo mais j'ai constaté qu'il y en a un pour le premier Gauntlet (???) qui fait 1Go (????) taille mémoire qui ne devait même pas être atteignable à l'époque.... (1985) c'est quoi le délire ?

                    1 Reply Last reply Reply Quote 0
                    • carlajiji
                      carlajiji last edited by

                      That's a good idea!

                      1 Reply Last reply Reply Quote 0
                      • Gaetan
                        Gaetan Theme moderator last edited by

                        Hi @Substring !
                        I would like to try the benchmark script.
                        I really feel like the beta of pi3b+( 1.4ghz) is slower than my pi3b oc at 1.3ghz.
                        With this test I could be sure if this is just a feeling or something isn't right.
                        You said it's only for retroarch games but of course, the games I would like to try are not, they are DC and PSP. Could you managed to make the script for those emulators ?
                        If not, I can try some PSX games, but with PSX i don't feel that the framerate is skipping.

                        Tell me, how to use the script ?

                        Boards : Now: Nuc i7 7567u // Past: Rpi3 B, Rpi3 B+, Odroid xu4
                        Controllers : Ps3 dualshock, 8bitdo SFC30 pro, Snes wired controller

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Want to support us ?

                        75
                        Online

                        99.6k
                        Users

                        28.1k
                        Topics

                        187.1k
                        Posts

                        Copyright © 2021 recalbox.com