NVidia Shield

OK - now I get it - you misspelled it in your README.txt -

(NB: for 64 bits build export PRT64=1 , as autodectec failed a least for me )

thanks for reporting ! i fix it in readme. haa the dyslexia is terrible for the coder :slight_smile:

Can you include a mame.ini file in your repo? Also - the hardcoded path for that is really, really bad - that will definitely have to go ASAP.

EDIT: Found this.

http://www.netswarm.net/misc/mame-0.139.ini.in

Where am I supposed to put this now? You say here -

rompath , inipath and others must be set in mame.ini and the initial inipath is hardcoded.

for PC to ./

I don’t understand - do you mean the current path from which I launch up RetroArch, or do you mean the root of the filesystem? Placing a file in the root of the filesystem would definitely be a very bad practice so I hope it’s just in the same directory.

Anyway, am I supposed to set up rompath for the directory I am about to use in the mame.ini file too or something? Right now when I point it to any MAME 0.139 ROM it just complains it can’t find the necessary files. Man, I can’t wait until we switch off from this MAME INI clusterfuck.

All I get is something like this when I try to open a ROM:

Args: /home/squarepusher/bin/retroarch /home/squarepusher/Downloads/roms/spf2t.zip -c /home/squarepusher/.retroarch.cfg -v gamePath=/home/squarepusher/Downloads/roms gameName=spf2t spf2t “Super Puzzle Fighter II Turbo (USA 960620)” rot=0 creating frontend… game=spf2t executing frontend… params:14 mamemini -joystick -autoframeskip -samplerate 48000 -sound -contrast 1.0 -brightness 0.95 -gamma 0.85 -mouse spf2t ------------init called sp=0x7fffa9bf8d7c machine screen orientation: HORIZONTAL ROTPREPinit done first update! skip_redraw=0 game screen w=384 h=224 rowPixels=384 ******************************* 384 224 0 ROTPREPview=0 orient=0 layercfg=23 osd_exit called x5 : frontend finished result=2 x6 : texture buffer freed x7 : returning from executeGame 0 x 0

and (stderr)

pzfu.03a NOT FOUND pzf.04 NOT FOUND pzf.14m NOT FOUND pzf.16m NOT FOUND pzf.18m NOT FOUND pzf.20m NOT FOUND pzf.01 NOT FOUND pzf.02 NOT FOUND pzf.11m NOT FOUND pzf.12m NOT FOUND ERROR: required files are missing, the game cannot be run.

Sorry for delay , i was off

Yes , i 'll include a mame.ini if that can help , but any mame.ini file created by “mame -cc” can be used you have just to adjust the directory for your need.

it’s the normal behavior, in mame ( official) the initial initpath is hardcoded in emupots.c for pc to directory . or ini . the only change i made here is for android to add to the default inipath ‘/mnt/sdcard/’ .

as stated , for pc inipath is by default the current directory: ./ or ./ini/

So if you have a mame.ini (which in you set the rompath to /somewhere/myroms , and of course also set inipath ) in the current path from which you launch up RetroArch . and you want to load Super Puzzle Fighter II Turbo (which reside in /somewhere/myroms/ )

You only have to do : retroarch -c ./retroarch.cfg -L ./libretro-mame.so spf2t (note you can also pass the full path name to spf2t )

The only important things is to have a mame.ini and set in correctly rompath and initpath.

For android , you only have to put an mame.ini in /mnt/sdcard/ .

Anyone has he already tried virtualjaguar-libretro on the shield?

on my old android phone ( with MSM8255 Snapdragon 1ghz) i have 17 fps with sound enable , so i think on shield it must run @ fullspeed ?

I’ll test it out soon.

BTW - I also did a test of bsnes/higan performance core on a Samsung Galaxy S4 (European model- Snapdragon S400) and I got 51/50fps with Donkey Kong Country 2 (NTSC/U).

Sweet! Is it going to be included in the next build?

Here some changes i 've done in virtualjaguar to gain speed (but less accuracy) after these most of games run fine on my PC .

most important for speed : in blitter.cpp change the BLITTER core to original


#define USE_ORIGINAL_BLITTER
//#define USE_MIDSUMMER_BLITTER
//#define USE_MIDSUMMER_BLITTER_MKII

minor : in m68kinterface.c change compatible to fast for the 68000 emulation


    const struct cputbl * tbl = op_smalltbl_4_ff;
//    const struct cputbl * tbl = op_smalltbl_5_ff;

change in tom.cpp to change RGBA to ARGB so no need to loop in retro_run for do this. ex:


        //uint32 pixel = 0x000000FF | (r << 24) | (g << 16) | (b << 8);
    uint32_t pixel = 0xFF000000 | (r << 16) | (g << 8) | (b << 0);

Downgrade sound to 24000.


void Retro_sound_update(){
    static int i,fois=0;    
    if(fois<2){fois++;return;} //else failed

    for(i=0;i<400;i++){
        double timeToNextEvent2 = GetTimeToNextEvent(EVENT_JERRY);
        DSPExec(2*554);
        if(SND!=1)audio_cb(ltxd,rtxd);
        HandleNextEvent(EVENT_JERRY);        
    }
}


Note , you have to execute DSP (DSPExec ) else many games just dont work .

@jaycee900

Sorry ,I m not the person who can answer , the initial port was done by clobber.

I am sorry 7rtype but I can’t even get this thing to work -

put the mame.ini (which I generated with MAME 0.139 Win32) into the current dir and I just get this - it fails to load any game -

http://pastie.org/8288584

Ye, I already modified the rompath there to the correct dir.

http://pastie.org/8288597

It just keeps returning something like this -

Args: /home/squarepusher/bin/retroarch /home/squarepusher/roms/mame139/sfa3.zip -c /home/squarepusher/.retroarch.cfg -v gamePath=/home/squarepusher/roms/mame139 gameName=sfa3 sfa3 “Street Fighter Alpha 3 (Euro 980904)” rot=0 creating frontend… game=sfa3 executing frontend… params:14 mamemini -joystick -autoframeskip -samplerate 48000 -sound -contrast 1.0 -brightness 0.95 -gamma 0.85 -mouse sfa3 ------------init called sp=0x7fff09e5d26c machine screen orientation: HORIZONTAL ROTPREPinit done first update! skip_redraw=0 game screen w=384 h=224 rowPixels=384 ******************************* 384 224 0 ROTPREPview=0 orient=0 layercfg=23 x5 : frontend finished result=0 x6 : texture buffer freed x7 : returning from executeGame 0 x 0 Reloading config: /home/squarepusher/.retroarch.cfg ROM filter: Game ROM (.zip,.zip)

hum strange ,

here is the mame.ini i use : http://pastie.org/8288798

i 've just set in my rompath ( for me in /mnt/chroot/home/not6/DEV/roms ) and ensure that inipath have current path “.”

now , i launch retroarch from the directory where reside my mame.ini :


/mnt/chroot/home/not6/test$ ls
hatari1.7-dev  libretro-mame139  mame.ini  O2EM  randrun.sh  RetroArch
 ./RetroArch/retroarch -c ./RetroArch/retroarch.cfg -v -L ./libretro-mame139/mame-libretro.so sfa3

http://pastie.org/8288831

or launch with full pathname :


 ./RetroArch/retroarch -c ./RetroArch/retroarch.cfg -v -L ./libretro-mame139/mame-libretro.so /mnt/chroot/home/not6/DEV/roms/sfa3.zip

http://pastie.org/8288844

Doesn’t work either.

http://pastie.org/8288962

Did a backtrace in gdb -

http://pastie.org/8288968

I have no idea really what is up here.

Maister - any clues?

There is something very, very wrong with this entire core.

If I start it up from the commandline (KMS) - I can hear sound but I get no video.

If I try to start it up from X11 it just segfaults at startup right there.

I don’t really know what all these crashes and spurious behavior are about really and why things act differently depending on window context drivers.

Yes i know there is somethings wrong with this core , it’s why i say from the beginning we should better redone it as soon as we can .

btw i don’t use libco in this port , maybe i sould but i thinks the pb must be in the osd init part . the main difference in your log is :

for me:


ROTPREPinit done
first update! skip_redraw=0
RetroArch: Environ SET_PIXEL_FORMAT: RGB565.
game screen w=384 h=224  rowPixels=384
******************************* 384 224 0
RetroArch: Environ SET_ROTATION: 0
ROTPREPview=0 orient=0  layercfg=23
x5 : frontend finished result=0
x6 : texture buffer freed 
x7 : returning from executeGame
640 x 480 

for you :


ROTPREPinit done
first update! skip_redraw=0
RetroArch: Environ SET_PIXEL_FORMAT: RGB565.
game screen w=384 h=224  rowPixels=384
******************************* 384 224 0
RetroArch: Environ SET_ROTATION: 0
ROTPREPview=0 orient=0  layercfg=23
x5 : frontend finished result=0
x6 : texture buffer freed 
x7 : returning from executeGame
0 x 0 

notice the 0X0 return by retro_get_system_av_info

Yeah I noticed that as well.

I will look at , and redone the osd init in a more proper way. and we ll see if it fix it.

@Squarepusher

I’m currently reviewing the code (there is a lot of work to clean ) but I realized that I had forgotten to initialize and g_av_info.geometry.base_width g_av_info.geometry.base_height for non android compilation!

not sure if it’s the problem but maybe it’s why it doesn’t work for you and work for me (on 2 different laptop) ,an indeterminate behavior.

i commit a little fix on github

https://github.com/r-type/libretro-mame139/commit/c8e0cbe14081d3888d85182b46466e1f773d8d1c


//============================================================
 //  RETRO
 //============================================================
@@ -204,6 +203,8 @@ void retro_set_g_av_info()
 
       
 #ifndef ANDTIME 
+        g_av_info.geometry.base_width = 640;
+      g_av_info.geometry.base_height =480;
       g_av_info.geometry.max_width = 1024;
       g_av_info.geometry.max_height = 768;
 #else       

if you could try this and give me some feedback .

OK I am going to try it out.

Yay, it finally works now.