Author Topic: [TEST RELEASE] RetroArch for GCW0  (Read 22204 times)

zhongtiao1

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #15 on: February 18, 2016, 01:05:10 am »
Here is Atari Jaguar :)

It runs extremely slow (at least on Atari Karts, which is the only one I tested). It seems B is select and A is accelerate (for Atari Karts). I have no idea if there is a way to optimise it or not, but the core would really benefit from some optimisations.

Zhongtiao1

libretro so file for GCW-Zero: https://www.dropbox.com/s/cfq7ao5roq1ui81/virtualjaguar_libretro.so?dl=0


UPDATE: I can't get pcsx rearmed to run when it is built for retroarch, and the mednafen based cores just don't build.
« Last Edit: February 18, 2016, 02:39:08 am by zhongtiao1 »

David Knight

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #16 on: February 18, 2016, 11:37:16 am »
Here is Atari Jaguar :)

It runs extremely slow (at least on Atari Karts, which is the only one I tested). It seems B is select and A is accelerate (for Atari Karts). I have no idea if there is a way to optimise it or not, but the core would really benefit from some optimisations.

Zhongtiao1

libretro so file for GCW-Zero: https://www.dropbox.com/s/cfq7ao5roq1ui81/virtualjaguar_libretro.so?dl=0


UPDATE: I can't get pcsx rearmed to run when it is built for retroarch, and the mednafen based cores just don't build.

What's the approximate framerate? I would expect a Jaguar emulator to require frameskip at least.

zhongtiao1

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #17 on: February 18, 2016, 03:52:55 pm »
Here is Atari Jaguar :)

It runs extremely slow (at least on Atari Karts, which is the only one I tested). It seems B is select and A is accelerate (for Atari Karts). I have no idea if there is a way to optimise it or not, but the core would really benefit from some optimisations.

Zhongtiao1

libretro so file for GCW-Zero: https://www.dropbox.com/s/cfq7ao5roq1ui81/virtualjaguar_libretro.so?dl=0


UPDATE: I can't get pcsx rearmed to run when it is built for retroarch, and the mednafen based cores just don't build.

What's the approximate framerate? I would expect a Jaguar emulator to require frameskip at least.

The framerate is about 1 to 3 fps. So, yeah :) it needs frameskipping. Atari Karts is one of the least CPU intensive games for the Jaguar too. I imagine Tempest 2000 will run close to 0.5 to 1 fps :P :)
« Last Edit: February 18, 2016, 04:10:39 pm by zhongtiao1 »

the_gama (OP)

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #18 on: February 18, 2016, 04:58:04 pm »
Here is Atari Jaguar :)

It runs extremely slow (at least on Atari Karts, which is the only one I tested). It seems B is select and A is accelerate (for Atari Karts). I have no idea if there is a way to optimise it or not, but the core would really benefit from some optimisations.

Zhongtiao1

libretro so file for GCW-Zero: https://www.dropbox.com/s/cfq7ao5roq1ui81/virtualjaguar_libretro.so?dl=0


UPDATE: I can't get pcsx rearmed to run when it is built for retroarch, and the mednafen based cores just don't build.

Great, it's good to see interest from other people :).   Can you post the patch/changes to the Makefile?

Can you post the error when building mednafen cores?

There are two options in retroarch gui that can help improve the overall performance in all cores: 

- Settings->Driver->Audio Driver = alsathread.
- Settings->Driver->Audio Resampler Driver = nearest.

RetroArch frontend does not support frameskip, so there will be many cores that won't run well on the zero.  But Frameskip may be implemented inside the core, I am not sure.  I think there is already a core with frameskip option implemented.

zhongtiao1

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #19 on: February 18, 2016, 05:30:24 pm »
Here is Atari Jaguar :)

It runs extremely slow (at least on Atari Karts, which is the only one I tested). It seems B is select and A is accelerate (for Atari Karts). I have no idea if there is a way to optimise it or not, but the core would really benefit from some optimisations.

Zhongtiao1

libretro so file for GCW-Zero: https://www.dropbox.com/s/cfq7ao5roq1ui81/virtualjaguar_libretro.so?dl=0


UPDATE: I can't get pcsx rearmed to run when it is built for retroarch, and the mednafen based cores just don't build.

Great, it's good to see interest from other people :).   Can you post the patch/changes to the Makefile?

Can you post the error when building mednafen cores?

There are two options in retroarch gui that can help improve the overall performance in all cores: 

- Settings->Driver->Audio Driver = alsathread.
- Settings->Driver->Audio Resampler Driver = nearest.

RetroArch frontend does not support frameskip, so there will be many cores that won't run well on the zero.  But Frameskip may be implemented inside the core, I am not sure.  I think there is already a core with frameskip option implemented.


The modifications I made were just adding the GCW-Zero parts of the picodrive patch (anything below the #gcw0 part).
 
Here is the Makefile (it's in txt form because otherwise dropbox keeps timing out on upload): https://www.dropbox.com/s/4x9p5eumv4u95hj/Makefile.txt?dl=0

I tried the same thing with pcsx rearmed, which compiled but crashed RetroArch on running games. pcsx rearmed crashing may just have something to do with the game I tried though. I also tried the beetle-vb core, which screamed errors at me every time I tried to compile. I'm not at home at the moment, but when I get there in a couple hours, I'll post them.

I'll try the audio driver edits and get back on that later today :)
« Last Edit: February 18, 2016, 05:32:50 pm by zhongtiao1 »

zhongtiao1

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #20 on: February 18, 2016, 10:51:36 pm »
Update on Jaguar core: Audio Driver edits add maybe 1 fps. Not worth it at this point :(

Here is the error whenever you compile a mednafen-based core (at least the virtual boy core that is):

Code: [Select]
/usr/bin/ld: mednafen/hw_cpu/v810/fpu-new/softfloat.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: mednafen/hw_cpu/v810/fpu-new/softfloat.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: mednafen/hw_cpu/v810/fpu-new/softfloat.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: mednafen/hw_cpu/v810/fpu-new/softfloat.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: mednafen/hw_cpu/v810/fpu-new/softfloat.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: mednafen/hw_cpu/v810/fpu-new/softfloat.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: mednafen/hw_cpu/v810/fpu-new/softfloat.o: Relocations in generic ELF (EM: 8)
mednafen/hw_cpu/v810/fpu-new/softfloat.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:300: recipe for target 'mednafen_vb_libretro_libretro.so' failed
make: *** [mednafen_vb_libretro_libretro.so] Error 1

Also, Here is o2em: https://www.dropbox.com/s/eae4zv5qrp4eczo/o2em_libretro.so?dl=0 I don't know if it works or not as I don't know where to put the BIOS rom :) It should work though.
« Last Edit: February 18, 2016, 10:58:23 pm by zhongtiao1 »

zhongtiao1

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #21 on: February 19, 2016, 12:14:23 am »
I figured out how to get cores that require a BIOS to work :) To get those cores to work, just change the system_directory in the retroarch.cfg to where you want your bios files to be placed. You can just use the one I edited too ;) Just make sure to delete any files in the top folder before adding the new cfg file. Also, make sure to add a folder called BIOS in the same folder that holds your retroarch.cfg

Here is the edited retroarch.cfg: https://www.dropbox.com/s/yqy9ozbi9u1ozxl/retroarch.cfg?dl=0

The so file I attached above works fine


I'm working on getting the 4do core working. Should be up soon.
« Last Edit: February 19, 2016, 12:17:46 am by zhongtiao1 »

the_gama (OP)

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #22 on: February 19, 2016, 01:13:39 am »
@zhongtiao1 Can you post the makefile you are using to build the mednafen core?  Some makefiles need different variables to be set.  I usually use the Linux or Linux-portable platforms as basis.

Using oprofile will tell you a lot of information about what functions are causing bad performance of some cores.

Here is a little guide by pcercuei:  http://boards.dingoonity.org/gcw-development/(question)-how-to-profile-application/

For example, this is the result I get from catsfc_libretro.so:

Code: [Select]
opendingux:/media/DUAL/retroarch # opreport -l ./retroarch
Using /var/lib/oprofile/samples/ for samples directory.
warning: /no-vmlinux could not be found.
CPU: CPU with timer interrupt, speed 1188 MHz (estimated)
Profiling through timer interrupt
samples  %        image name               symbol name
8653     28.8299  egl_gallium.so           /usr/lib/egl/egl_gallium.so
4722     15.7327  libuClibc-0.9.33.2.so    /lib/libuClibc-0.9.33.2.so
3586     11.9478  catsfc_libretro.so       WRITE_4PIXELS16
1350      4.4979  catsfc_libretro.so       S9xMainLoop_NoSA1_NoSFX
1262      4.2047  catsfc_libretro.so       S9xUpdateScreen
1220      4.0648  catsfc_libretro.so       DrawTile16
533       1.7758  no-vmlinux               /no-vmlinux
480       1.5993  catsfc_libretro.so       DrawBackground
373       1.2428  catsfc_libretro.so       WRITE_4PIXELS16_FLIPPED
359       1.1961  catsfc_libretro.so       S9xGetByte
342       1.1395  catsfc_libretro.so       CPUShutdown
328       1.0928  catsfc_libretro.so       S9xMixSamples
272       0.9062  catsfc_libretro.so       S9xGetWord
263       0.8763  catsfc_libretro.so       MixStereo
239       0.7963  catsfc_libretro.so       S9xDoHBlankProcessing_NoSFX
196       0.6530  catsfc_libretro.so       S9xSetByte
186       0.6197  catsfc_libretro.so       DrawOBJS
136       0.4531  catsfc_libretro.so       WRITE_4PIXELS16_SUB
133       0.4431  catsfc_libretro.so       S9xSetupOBJ
132       0.4398  catsfc_libretro.so       S9xSetWord
127       0.4231  catsfc_libretro.so       OpF0
117       0.3898  catsfc_libretro.so       ApuF0
117       0.3898  retroarch                audio_convert_float_to_s16_C
114       0.3798  catsfc_libretro.so       Direct
112       0.3732  catsfc_libretro.so       RenderLine
109       0.3632  catsfc_libretro.so       S9xAPUGetByte
98        0.3265  catsfc_libretro.so       LDA8
93        0.3099  retroarch                runloop_ctl
87        0.2899  catsfc_libretro.so       Absolute
81        0.2699  catsfc_libretro.so       S9xReschedule
73        0.2432  catsfc_libretro.so       Apu84
73        0.2432  catsfc_libretro.so       OpADM1
73        0.2432  catsfc_libretro.so       REGISTER_2104
73        0.2432  catsfc_libretro.so       Relative.isra.2.constprop.8
71        0.2366  catsfc_libretro.so       ApuE5
71        0.2366  catsfc_libretro.so       SetZN8
71        0.2366  retroarch                audio_convert_s16_to_float_C
66        0.2199  libEGL.so.1.0.0          /usr/lib/libEGL.so.1.0.0
65        0.2166  catsfc_libretro.so       SetZN16
62        0.2066  catsfc_libretro.so       DecodeBlock
62        0.2066  catsfc_libretro.so       DrawClippedTile16
62        0.2066  catsfc_libretro.so       WRITE_4PIXELS16_ADD1_2
58        0.1932  catsfc_libretro.so       DirectIndirectIndexedLong
56        0.1866  retroarch                udev_joypad_button
54        0.1799  catsfc_libretro.so       OpD0
53        0.1766  catsfc_libretro.so       OpE2
50        0.1666  libpthread-0.9.33.2.so   pthread_mutex_lock
49        0.1633  catsfc_libretro.so       ADC16
49        0.1633  catsfc_libretro.so       OpC2
49        0.1633  retroarch                resampler_nearest_process
48        0.1599  retroarch                input_joypad_pressed
46        0.1533  catsfc_libretro.so       S9xFixColourBrightness
45        0.1499  catsfc_libretro.so       S9xSetPCBase
44        0.1466  catsfc_libretro.so       S9xSetPPU
43        0.1433  catsfc_libretro.so       OpAddressPassthrough
41        0.1366  catsfc_libretro.so       Apu3F
39        0.1299  catsfc_libretro.so       ApuD0
39        0.1299  catsfc_libretro.so       S9xAPUGetByteZ
38        0.1266  catsfc_libretro.so       Apu65
36        0.1199  retroarch                input_keymaps_translate_rk_to_keysym
35        0.1166  retroarch                config_get_ptr
33        0.1099  catsfc_libretro.so       Apu6F
30        0.1000  catsfc_libretro.so       ApuC4
30        0.1000  catsfc_libretro.so       OpA5M1
29        0.0966  catsfc_libretro.so       S9xDoHDMA
29        0.0966  catsfc_libretro.so       S9xFixCycles
29        0.0966  retroarch                udev_input_is_pressed
28        0.0933  catsfc_libretro.so       S9xAPUSetByteZ
27        0.0900  catsfc_libretro.so       Op20
26        0.0866  catsfc_libretro.so       DrawTile16Sub
26        0.0866  catsfc_libretro.so       Op85M1
26        0.0866  catsfc_libretro.so       S9xDoDMA
26        0.0866  retroarch                video_driver_ctl
25        0.0833  catsfc_libretro.so       Apu60
25        0.0833  catsfc_libretro.so       OpB0
24        0.0800  catsfc_libretro.so       REGISTER_2118_linear
23        0.0766  catsfc_libretro.so       LDA16
23        0.0766  catsfc_libretro.so       Op60
23        0.0766  retroarch                input_state
22        0.0733  catsfc_libretro.so       OpC9M0
21        0.0700  libGLESv2.so.2.0.0       /usr/lib/libGLESv2.so.2.0.0
20        0.0666  catsfc_libretro.so       ADC8
20        0.0666  catsfc_libretro.so       REGISTER_2119_linear
20        0.0666  retroarch                gl_frame
20        0.0666  retroarch                state_manager_check_rewind
19        0.0633  catsfc_libretro.so       DirectIndexedX
18        0.0600  catsfc_libretro.so       Op90
18        0.0600  catsfc_libretro.so       OpC8X0
18        0.0600  catsfc_libretro.so       S9xProcessSound
18        0.0600  catsfc_libretro.so       S9xSetAPUDSP
18        0.0600  retroarch                egl_get_video_size
18        0.0600  retroarch                udev_joypad_axis
17        0.0566  catsfc_libretro.so       Op18
17        0.0566  catsfc_libretro.so       Op85M0
17        0.0566  retroarch                input_driver_ctl
17        0.0566  retroarch                menu_driver_ctl
16        0.0533  catsfc_libretro.so       AbsoluteIndexedX
16        0.0533  catsfc_libretro.so       Op29M0
16        0.0533  catsfc_libretro.so       S9xGetPPU
16        0.0533  retroarch                check_pause
16        0.0533  retroarch                gfx_ctx_opendingux_check_window
15        0.0500  catsfc_libretro.so       STA16
15        0.0500  retroarch                input_push_analog_dpad
15        0.0500  retroarch                rarch_environment_cb
14        0.0466  catsfc_libretro.so       LDY16
14        0.0466  catsfc_libretro.so       Op10
14        0.0466  catsfc_libretro.so       S9xGetCPU
14        0.0466  catsfc_libretro.so       S9xMainLoop
13        0.0433  catsfc_libretro.so       INC8
13        0.0433  catsfc_libretro.so       Op06M1
13        0.0433  catsfc_libretro.so       Op38
13        0.0433  catsfc_libretro.so       Op80
13        0.0433  catsfc_libretro.so       RenderScreen
13        0.0433  libpthread-0.9.33.2.so   __pthread_mutex_unlock_usercnt
13        0.0433  retroarch                config_get_entry.isra.2.constprop.4
13        0.0433  retroarch                gfx_ctx_check_window
12        0.0400  catsfc_libretro.so       A_ASL8
12        0.0400  catsfc_libretro.so       Op65M0
12        0.0400  catsfc_libretro.so       Op6B
12        0.0400  catsfc_libretro.so       OpA9M1
12        0.0400  catsfc_libretro.so       STA8
12        0.0400  retroarch                bsv_movie_ctl
12        0.0400  retroarch                check_stateslots
11        0.0366  catsfc_libretro.so       Apu10
11        0.0366  catsfc_libretro.so       Op22
11        0.0366  catsfc_libretro.so       Op54X0
11        0.0366  catsfc_libretro.so       Op89M0
11        0.0366  catsfc_libretro.so       OpAB
11        0.0366  retroarch                gfx_ctx_focus
10        0.0333  catsfc_libretro.so       ApuFD

It seems most of the cpu time is spent in egl_gallium driver.  And, maybe, optimizing WRITE_4PIXELS16 can improve performance.


« Last Edit: February 19, 2016, 01:15:40 am by the_gama »

zhongtiao1

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #23 on: February 19, 2016, 01:53:02 am »
Here is the 4DO Core: https://www.dropbox.com/s/483ldwx2p21ey0z/4do_libretro.so?dl=0

Animations are actually pretty smooth, I would say they are about 10-15 fps. When you actually play the games though, lots of screen tearing occurs. Lots of lag also happens at user movement on screen. Game play is at about 1 to 3 fps :)


Here is the pcsx1 core: https://www.dropbox.com/s/oqnoud2hlujpm5v/pcsx1_libretro.so?dl=0
It's has the same problems as the 4DO core, so I believe they both have the same problem. No screen tearing in this core though. :)
« Last Edit: February 19, 2016, 02:33:42 am by zhongtiao1 »

zhongtiao1

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #24 on: February 19, 2016, 02:28:40 am »
@zhongtiao1 Can you post the makefile you are using to build the mednafen core?  Some makefiles need different variables to be set.  I usually use the Linux or Linux-portable platforms as basis.

Using oprofile will tell you a lot of information about what functions are causing bad performance of some cores.

Here is a little guide by pcercuei:  http://boards.dingoonity.org/gcw-development/(question)-how-to-profile-application/

For example, this is the result I get from catsfc_libretro.so:

Code: [Select]
opendingux:/media/DUAL/retroarch # opreport -l ./retroarch
Using /var/lib/oprofile/samples/ for samples directory.
warning: /no-vmlinux could not be found.
CPU: CPU with timer interrupt, speed 1188 MHz (estimated)
Profiling through timer interrupt
samples  %        image name               symbol name
8653     28.8299  egl_gallium.so           /usr/lib/egl/egl_gallium.so
4722     15.7327  libuClibc-0.9.33.2.so    /lib/libuClibc-0.9.33.2.so
3586     11.9478  catsfc_libretro.so       WRITE_4PIXELS16
1350      4.4979  catsfc_libretro.so       S9xMainLoop_NoSA1_NoSFX
1262      4.2047  catsfc_libretro.so       S9xUpdateScreen
1220      4.0648  catsfc_libretro.so       DrawTile16
533       1.7758  no-vmlinux               /no-vmlinux
480       1.5993  catsfc_libretro.so       DrawBackground
373       1.2428  catsfc_libretro.so       WRITE_4PIXELS16_FLIPPED
359       1.1961  catsfc_libretro.so       S9xGetByte
342       1.1395  catsfc_libretro.so       CPUShutdown
328       1.0928  catsfc_libretro.so       S9xMixSamples
272       0.9062  catsfc_libretro.so       S9xGetWord
263       0.8763  catsfc_libretro.so       MixStereo
239       0.7963  catsfc_libretro.so       S9xDoHBlankProcessing_NoSFX
196       0.6530  catsfc_libretro.so       S9xSetByte
186       0.6197  catsfc_libretro.so       DrawOBJS
136       0.4531  catsfc_libretro.so       WRITE_4PIXELS16_SUB
133       0.4431  catsfc_libretro.so       S9xSetupOBJ
132       0.4398  catsfc_libretro.so       S9xSetWord
127       0.4231  catsfc_libretro.so       OpF0
117       0.3898  catsfc_libretro.so       ApuF0
117       0.3898  retroarch                audio_convert_float_to_s16_C
114       0.3798  catsfc_libretro.so       Direct
112       0.3732  catsfc_libretro.so       RenderLine
109       0.3632  catsfc_libretro.so       S9xAPUGetByte
98        0.3265  catsfc_libretro.so       LDA8
93        0.3099  retroarch                runloop_ctl
87        0.2899  catsfc_libretro.so       Absolute
81        0.2699  catsfc_libretro.so       S9xReschedule
73        0.2432  catsfc_libretro.so       Apu84
73        0.2432  catsfc_libretro.so       OpADM1
73        0.2432  catsfc_libretro.so       REGISTER_2104
73        0.2432  catsfc_libretro.so       Relative.isra.2.constprop.8
71        0.2366  catsfc_libretro.so       ApuE5
71        0.2366  catsfc_libretro.so       SetZN8
71        0.2366  retroarch                audio_convert_s16_to_float_C
66        0.2199  libEGL.so.1.0.0          /usr/lib/libEGL.so.1.0.0
65        0.2166  catsfc_libretro.so       SetZN16
62        0.2066  catsfc_libretro.so       DecodeBlock
62        0.2066  catsfc_libretro.so       DrawClippedTile16
62        0.2066  catsfc_libretro.so       WRITE_4PIXELS16_ADD1_2
58        0.1932  catsfc_libretro.so       DirectIndirectIndexedLong
56        0.1866  retroarch                udev_joypad_button
54        0.1799  catsfc_libretro.so       OpD0
53        0.1766  catsfc_libretro.so       OpE2
50        0.1666  libpthread-0.9.33.2.so   pthread_mutex_lock
49        0.1633  catsfc_libretro.so       ADC16
49        0.1633  catsfc_libretro.so       OpC2
49        0.1633  retroarch                resampler_nearest_process
48        0.1599  retroarch                input_joypad_pressed
46        0.1533  catsfc_libretro.so       S9xFixColourBrightness
45        0.1499  catsfc_libretro.so       S9xSetPCBase
44        0.1466  catsfc_libretro.so       S9xSetPPU
43        0.1433  catsfc_libretro.so       OpAddressPassthrough
41        0.1366  catsfc_libretro.so       Apu3F
39        0.1299  catsfc_libretro.so       ApuD0
39        0.1299  catsfc_libretro.so       S9xAPUGetByteZ
38        0.1266  catsfc_libretro.so       Apu65
36        0.1199  retroarch                input_keymaps_translate_rk_to_keysym
35        0.1166  retroarch                config_get_ptr
33        0.1099  catsfc_libretro.so       Apu6F
30        0.1000  catsfc_libretro.so       ApuC4
30        0.1000  catsfc_libretro.so       OpA5M1
29        0.0966  catsfc_libretro.so       S9xDoHDMA
29        0.0966  catsfc_libretro.so       S9xFixCycles
29        0.0966  retroarch                udev_input_is_pressed
28        0.0933  catsfc_libretro.so       S9xAPUSetByteZ
27        0.0900  catsfc_libretro.so       Op20
26        0.0866  catsfc_libretro.so       DrawTile16Sub
26        0.0866  catsfc_libretro.so       Op85M1
26        0.0866  catsfc_libretro.so       S9xDoDMA
26        0.0866  retroarch                video_driver_ctl
25        0.0833  catsfc_libretro.so       Apu60
25        0.0833  catsfc_libretro.so       OpB0
24        0.0800  catsfc_libretro.so       REGISTER_2118_linear
23        0.0766  catsfc_libretro.so       LDA16
23        0.0766  catsfc_libretro.so       Op60
23        0.0766  retroarch                input_state
22        0.0733  catsfc_libretro.so       OpC9M0
21        0.0700  libGLESv2.so.2.0.0       /usr/lib/libGLESv2.so.2.0.0
20        0.0666  catsfc_libretro.so       ADC8
20        0.0666  catsfc_libretro.so       REGISTER_2119_linear
20        0.0666  retroarch                gl_frame
20        0.0666  retroarch                state_manager_check_rewind
19        0.0633  catsfc_libretro.so       DirectIndexedX
18        0.0600  catsfc_libretro.so       Op90
18        0.0600  catsfc_libretro.so       OpC8X0
18        0.0600  catsfc_libretro.so       S9xProcessSound
18        0.0600  catsfc_libretro.so       S9xSetAPUDSP
18        0.0600  retroarch                egl_get_video_size
18        0.0600  retroarch                udev_joypad_axis
17        0.0566  catsfc_libretro.so       Op18
17        0.0566  catsfc_libretro.so       Op85M0
17        0.0566  retroarch                input_driver_ctl
17        0.0566  retroarch                menu_driver_ctl
16        0.0533  catsfc_libretro.so       AbsoluteIndexedX
16        0.0533  catsfc_libretro.so       Op29M0
16        0.0533  catsfc_libretro.so       S9xGetPPU
16        0.0533  retroarch                check_pause
16        0.0533  retroarch                gfx_ctx_opendingux_check_window
15        0.0500  catsfc_libretro.so       STA16
15        0.0500  retroarch                input_push_analog_dpad
15        0.0500  retroarch                rarch_environment_cb
14        0.0466  catsfc_libretro.so       LDY16
14        0.0466  catsfc_libretro.so       Op10
14        0.0466  catsfc_libretro.so       S9xGetCPU
14        0.0466  catsfc_libretro.so       S9xMainLoop
13        0.0433  catsfc_libretro.so       INC8
13        0.0433  catsfc_libretro.so       Op06M1
13        0.0433  catsfc_libretro.so       Op38
13        0.0433  catsfc_libretro.so       Op80
13        0.0433  catsfc_libretro.so       RenderScreen
13        0.0433  libpthread-0.9.33.2.so   __pthread_mutex_unlock_usercnt
13        0.0433  retroarch                config_get_entry.isra.2.constprop.4
13        0.0433  retroarch                gfx_ctx_check_window
12        0.0400  catsfc_libretro.so       A_ASL8
12        0.0400  catsfc_libretro.so       Op65M0
12        0.0400  catsfc_libretro.so       Op6B
12        0.0400  catsfc_libretro.so       OpA9M1
12        0.0400  catsfc_libretro.so       STA8
12        0.0400  retroarch                bsv_movie_ctl
12        0.0400  retroarch                check_stateslots
11        0.0366  catsfc_libretro.so       Apu10
11        0.0366  catsfc_libretro.so       Op22
11        0.0366  catsfc_libretro.so       Op54X0
11        0.0366  catsfc_libretro.so       Op89M0
11        0.0366  catsfc_libretro.so       OpAB
11        0.0366  retroarch                gfx_ctx_focus
10        0.0333  catsfc_libretro.so       ApuFD

It seems most of the cpu time is spent in egl_gallium driver.  And, maybe, optimizing WRITE_4PIXELS16 can improve performance.


@the_gama How do I do the opcontrol over telnet correctly? I've started profiling, but whenever I try to run the retroarch executable I made on my computer, it won't read any Atari jaguar rom I through at it. I am using the virtualjaguar_libretro.so. What am I doing wrong?

Makefile from mednafen-based cores: https://www.dropbox.com/s/trct6f2pe6295q7/Makefile?dl=0

the_gama (OP)

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #25 on: February 19, 2016, 03:33:26 am »
Ok, here is what I do:

1) Build the core library with DEBUG flags enabled, you can try:

Code: [Select]
make DEBUG=1 platform=gcw0

Or put those CFLAGS manually in the Makefile.

2) Create a folder called 'retroarch' inside the SD Card, using an ftp client or the OPK Manager.

3) Copy the retroarch executable (not the OPK), and the libretro core there.

4) Connect through telnet to the gcw0

Code: [Select]
telnet 10.1.1.2

5) Browse to the retroarch folder and init the profiler with the following commands:

Code: [Select]
opcontrol --deinit
opcontrol --no-vmlinux
opcontrol --separate=kernel
opcontrol --init
opcontrol --reset
opcontrol --start

6) Then, also from telnet, start retroarch:

Code: [Select]
./retroarch -L catsfc_libretro.so "roms/Mega Man X (Version 1.0).sfc"

I like to load a rom directly to skip the rgui menu.

7) Then let the game run for a couple of minutes, and then exit retroarch by pressing Select.

8 ) Finally stop the profiler and check the results:

Code: [Select]
opcontrol --stop
opreport -l ./retroarch
opcontrol --deinit


About the Makefile, I think you are missing the CXX compiler.

Code: [Select]
else ifeq ($(platform), gcw0)
   TARGET := $(TARGET_NAME)_libretro.so
   CC = /opt/gcw0-toolchain/usr/bin/mipsel-linux-gcc
   CXX = /opt/gcw0-toolchain/usr/bin/mipsel-linux-g++
   AR = /opt/gcw0-toolchain/usr/bin/mipsel-linux-ar
   fpic := -fPIC
   SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
   LDFLAGS += $(PTHREAD_FLAGS) -lrt
   FLAGS += $(PTHREAD_FLAGS) -DHAVE_MKDIR
   FLAGS += -march=mips32 -mtune=mips32r2 -mhard-float

It will be interesting to see the profiler report from the pcsx1 and the jaguar cores.
« Last Edit: February 19, 2016, 03:45:52 am by the_gama »

zhongtiao1

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #26 on: February 19, 2016, 04:21:16 am »
Okay, here is pcsx1:

Code: [Select]
CPU: CPU with timer interrupt, speed 1188 MHz (estimated)
Profiling through timer interrupt
samples  %        image name               symbol name
2557     24.9683  pcsx_rearmed_libretro.so execI
1053     10.2822  pcsx_rearmed_libretro.so doBranch
976       9.5303  pcsx_rearmed_libretro.so psxBranchTest
596       5.8197  pcsx_rearmed_libretro.so psxBranchNoDelay
543       5.3022  egl_gallium.so           /usr/lib/egl/egl_gallium.so
509       4.9702  pcsx_rearmed_libretro.so intExecute
467       4.5601  pcsx_rearmed_libretro.so psxSPECIAL
384       3.7496  pcsx_rearmed_libretro.so psxMemRead32
366       3.5739  pcsx_rearmed_libretro.so psxLW
304       2.9685  pcsx_rearmed_libretro.so psxSLL
199       1.9432  libuClibc-0.9.33.2.so    /lib/libuClibc-0.9.33.2.so
195       1.9041  no-vmlinux               /no-vmlinux
147       1.4354  pcsx_rearmed_libretro.so psxADDIU
135       1.3182  pcsx_rearmed_libretro.so psxBNE
130       1.2694  pcsx_rearmed_libretro.so psxMemWrite32
107       1.0448  pcsx_rearmed_libretro.so do_samples_simple
106       1.0351  pcsx_rearmed_libretro.so psxADDU
81        0.7909  pcsx_rearmed_libretro.so psxLUI
81        0.7909  pcsx_rearmed_libretro.so psxSW
70        0.6835  pcsx_rearmed_libretro.so psxJR
68        0.6640  pcsx_rearmed_libretro.so psxBEQ
65        0.6347  pcsx_rearmed_libretro.so do_samples
63        0.6152  pcsx_rearmed_libretro.so psxJAL
61        0.5956  pcsx_rearmed_libretro.so InterpolateUp
54        0.5273  pcsx_rearmed_libretro.so intExecuteBlock
49        0.4785  pcsx_rearmed_libretro.so bgr555_to_rgb565
42        0.4101  pcsx_rearmed_libretro.so psxSLT
41        0.4004  pcsx_rearmed_libretro.so psxJumpTest
39        0.3808  pcsx_rearmed_libretro.so GetTextureTransColG32_S.part.6
37        0.3613  pcsx_rearmed_libretro.so yuv2rgb24
35        0.3418  pcsx_rearmed_libretro.so psxSLTU
32        0.3125  retroarch                config_get_array
32        0.3125  retroarch                config_get_string
31        0.3027  ld-uClibc-0.9.33.2.so    /lib/ld-uClibc-0.9.33.2.so
30        0.2929  pcsx_rearmed_libretro.so bgr888_to_rgb565
28        0.2734  pcsx_rearmed_libretro.so psxAND
27        0.2636  pcsx_rearmed_libretro.so MixREVERB.constprop.10
26        0.2539  pcsx_rearmed_libretro.so DrawSoftwareSprite
25        0.2441  pcsx_rearmed_libretro.so psxMemRead16
23        0.2246  pcsx_rearmed_libretro.so psxLHU
23        0.2246  pcsx_rearmed_libretro.so psxMemRead8
18        0.1758  pcsx_rearmed_libretro.so psxLBU
13        0.1269  pcsx_rearmed_libretro.so psxANDI
12        0.1172  libpthread-0.9.33.2.so   pthread_mutex_lock
12        0.1172  pcsx_rearmed_libretro.so psxDelayTest
12        0.1172  pcsx_rearmed_libretro.so psxREGIMM
11        0.1074  libpthread-0.9.33.2.so   __pthread_mutex_unlock_usercnt
11        0.1074  pcsx_rearmed_libretro.so psxMemWrite16
11        0.1074  pcsx_rearmed_libretro.so psxOR
11        0.1074  pcsx_rearmed_libretro.so psxSLLV
11        0.1074  retroarch                audio_convert_float_to_s16_C
10        0.0976  pcsx_rearmed_libretro.so cdrReadInterrupt
10        0.0976  pcsx_rearmed_libretro.so psxBGEZ
10        0.0976  pcsx_rearmed_libretro.so psxBiosException
10        0.0976  retroarch                input_keys_pressed
9         0.0879  retroarch                config_set_string
8         0.0781  pcsx_rearmed_libretro.so psxSUBU
8         0.0781  pcsx_rearmed_libretro.so psxTestLoadDelay
8         0.0781  pcsx_rearmed_libretro.so rl2blk
8         0.0781  retroarch                resampler_nearest_process
7         0.0684  pcsx_rearmed_libretro.so GetTextureTransColG32_SPR.part.7
7         0.0684  pcsx_rearmed_libretro.so do_samples_finish
7         0.0684  pcsx_rearmed_libretro.so psxBLTZ
7         0.0684  retroarch                gl_raster_font_render_line
6         0.0586  libpthread-0.9.33.2.so   __pthread_cleanup_pop_restore
6         0.0586  pcsx_rearmed_libretro.so psxHwRead32
5         0.0488  pcsx_rearmed_libretro.so psxSH
5         0.0488  retroarch                audio_convert_s16_to_float_C
4         0.0391  libEGL.so.1.0.0          /usr/lib/libEGL.so.1.0.0
4         0.0391  pcsx_rearmed_libretro.so psxSRLV
4         0.0391  retroarch                udev_input_is_pressed
4         0.0391  retroarch                udev_joypad_button
3         0.0293  libfreetype.so.6.11.2    /usr/lib/libfreetype.so.6.11.2
3         0.0293  libpthread-0.9.33.2.so   __pthread_cleanup_push_defer
3         0.0293  pcsx_rearmed_libretro.so GetShadeTransCol
3         0.0293  pcsx_rearmed_libretro.so calcCrc
3         0.0293  pcsx_rearmed_libretro.so gteMTC2
3         0.0293  pcsx_rearmed_libretro.so psxCOP2
3         0.0293  pcsx_rearmed_libretro.so psxHwRead16
3         0.0293  pcsx_rearmed_libretro.so psxHwRead8
3         0.0293  pcsx_rearmed_libretro.so psxHwWrite16
3         0.0293  pcsx_rearmed_libretro.so psxLH
3         0.0293  pcsx_rearmed_libretro.so psxSLTI
3         0.0293  pcsx_rearmed_libretro.so sioWrite8
3         0.0293  retroarch                config_file_new_internal
3         0.0293  retroarch                gl_frame
3         0.0293  retroarch                input_joypad_pressed
3         0.0293  retroarch                input_keymaps_translate_rk_to_keysym
3         0.0293  retroarch                runloop_ctl
3         0.0293  retroarch                udev_joypad_axis
3         0.0293  retroarch                video_driver_ctl
2         0.0195  libGLESv2.so.2.0.0       /usr/lib/libGLESv2.so.2.0.0
2         0.0195  libasound.so.2.0.0       /usr/lib/libasound.so.2.0.0
2         0.0195  pcsx_rearmed_libretro.so FillSoftwareAreaTrans.part.12
2         0.0195  pcsx_rearmed_libretro.so SPUplayADPCMchannel
2         0.0195  pcsx_rearmed_libretro.so do_cmd_buffer
2         0.0195  pcsx_rearmed_libretro.so do_vram_io
2         0.0195  pcsx_rearmed_libretro.so psxBios_ReturnFromException
2         0.0195  pcsx_rearmed_libretro.so psxJ
2         0.0195  pcsx_rearmed_libretro.so psxORI
2         0.0195  pcsx_rearmed_libretro.so psxRcntUpdate
2         0.0195  pcsx_rearmed_libretro.so psxSRA
2         0.0195  pcsx_rearmed_libretro.so psxSRL
2         0.0195  retroarch                bsv_movie_ctl
2         0.0195  retroarch                config_get_ptr
2         0.0195  retroarch                input_driver_ctl
2         0.0195  retroarch                rarch_ctl
2         0.0195  retroarch                udev_poll_pad.isra.2
1         0.0098  libdl-0.9.33.2.so        /lib/libdl-0.9.33.2.so
1         0.0098  libpthread-0.9.33.2.so   __pthread_disable_asynccancel
1         0.0098  libudev.so.1.3.0         /lib/libudev.so.1.3.0
1         0.0098  pcsx_rearmed_libretro.so ApplyCheats
1         0.0098  pcsx_rearmed_libretro.so CheckPPFCache
1         0.0098  pcsx_rearmed_libretro.so GPUwriteStatus
1         0.0098  pcsx_rearmed_libretro.so ISOreadTrack
1         0.0098  pcsx_rearmed_libretro.so MixADSR
1         0.0098  pcsx_rearmed_libretro.so ReadTrack
1         0.0098  pcsx_rearmed_libretro.so SPUasync
1         0.0098  pcsx_rearmed_libretro.so _PADstartPoll
1         0.0098  pcsx_rearmed_libretro.so biosInterrupt
1         0.0098  pcsx_rearmed_libretro.so cdrRead3
1         0.0098  pcsx_rearmed_libretro.so do_cmd_list
1         0.0098  pcsx_rearmed_libretro.so gteMFC2
1         0.0098  pcsx_rearmed_libretro.so primMoveImage
1         0.0098  pcsx_rearmed_libretro.so psxBASIC
1         0.0098  pcsx_rearmed_libretro.so psxBGTZ
1         0.0098  pcsx_rearmed_libretro.so psxHwWrite32
1         0.0098  pcsx_rearmed_libretro.so psxLB
1         0.0098  pcsx_rearmed_libretro.so psxMFLO
1         0.0098  pcsx_rearmed_libretro.so psxNOR
1         0.0098  pcsx_rearmed_libretro.so psxSLTIU
1         0.0098  pcsx_rearmed_libretro.so psxSWR
1         0.0098  pcsx_rearmed_libretro.so psxXORI
1         0.0098  pcsx_rearmed_libretro.so renderer_flush_queues
1         0.0098  pcsx_rearmed_libretro.so retro_run
1         0.0098  pcsx_rearmed_libretro.so sioInterrupt
1         0.0098  pcsx_rearmed_libretro.so xa_decode_data
1         0.0098  retroarch                CONFIG_STRING_OPTIONS
1         0.0098  retroarch                cheevos_ctl
1         0.0098  retroarch                config_get_path
1         0.0098  retroarch                djb2_calculate
1         0.0098  retroarch                gfx_ctx_ctl
1         0.0098  retroarch                gl_alive
1         0.0098  retroarch                gl_glsl_set_mvp
1         0.0098  retroarch                input_poll
1         0.0098  retroarch                input_state
1         0.0098  retroarch                input_state_poll
1         0.0098  retroarch                msg_queue_pull
1         0.0098  retroarch                runloop_iterate
1         0.0098  retroarch                video_driver_frame
1         0.0098  retroarch                video_monitor_get_fps
1         0.0098  retroarch                video_shader_driver_ctl

egl_gallium is up there. but it looks like we need to ExecI down too.

zhongtiao1

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #27 on: February 19, 2016, 05:20:06 am »
I can't get Jaguar Roms to work over telnet for some reason, sorry.

the_gama (OP)

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #28 on: February 19, 2016, 02:08:45 pm »
I think pcsx1 core (pscx_rearmed) would need a MIPS Recompiler to work decently.  If I am not wrong, I remember they used Ari's mupen64plus recompiler with some modifications.  It may be posible to do something similar with Nebuleon's dynarec but this is a huge task.

By the way, it seems a Frameskip option was implemented to pcsx_rearmed core some time ago.  Maybe that option can be implemented in other cores too.
« Last Edit: February 19, 2016, 02:23:35 pm by the_gama »

zhongtiao1

Re: [TEST RELEASE] RetroArch for GCW0
« Reply #29 on: February 19, 2016, 03:23:56 pm »
I think pcsx1 core (pscx_rearmed) would need a MIPS Recompiler to work decently.  If I am not wrong, I remember they used Ari's mupen64plus recompiler with some modifications.  It may be posible to do something similar with Nebuleon's dynarec but this is a huge task.

By the way, it seems a Frameskip option was implemented to pcsx_rearmed core some time ago.  Maybe that option can be implemented in other cores too.

Would you be willing to test the jaguar core @the_gama ? Also, I believe the 4DO core has the same problem as pcsx1 does. It stutters in the same places.

 

Post a new topic
Post a new topic