shmupmametgm on Linux

Thread in 'Research & Development' started by DrPete, 25 Mar 2011.

  1. If you can tell exactly what the full path of SDL.h is, it should be easy to solve. Maybe the framework is structured differently (i.e. there is no SDL folder with the headers inside).
     
  2. I just wanted to say thank you sooooo much for providing this. TAP feels so amazingly awesome now.
     
  3. Okay, that problem's solved. Located the file directly, added its containing folder's path and changed the include directives from SDL/SDL.h to just SDL.h and they were finally found.

    However now I'm getting strange errors in the form of "error: unknown register name '%cc' in asm".
    No clue what's happening, and I've really no time to debug it further... If no one knows what's up with this then I just hope someone picks up the glove from this point on OS X.

    I also want TAP to feel amazingly awesome.. ):
    Got really hooked on T.A Death recently even though I usually top out around level 100...
     
  4. That clobber is unnecessary on asm statements with gcc. Try replacing these files.
     

    Attached Files:

  5. Alright, making progress. Your patch eliminated those errors.

    I also uncommented a special line in the makefile and SDL started working without adding the include path I added before to the makefile.

    I had a few more new problems that I was able to overcome, but I reached another impasse: errors thrown from osd_opengl.h expected ')' and from redefined class members, e.g:
    error: class member cannot be redeclared
    OSD_GL(void,glDisableClientState,(GLenum array))
     
  6. Which one? I think the best course of action here is to make a symlink to the Headers folder, like this:
    ln -s /Library/Frameworks/SDL.framework/Headers /Library/Frameworks/SDL.framework/Headers/SDL
    And restore every include to the proper #include<SDL/SDL.h> and similar, because maybe we are fiddling too much with the includes and that stuff is sensitive. And that will make sure SDL will work on any future project you want to compile.
     
  7. Good call. The line I was talking about has 'MACOSX_USE_LIBSDL = 1' (the line number probably wouldn't be the same for both of us).
    I commented it back and fiddled with the includes until it was working (apparently it doesn't like SDL2, but works with SDL for some reason. My guess is because of some macro doodad somewhere it's getting redirected differently)

    Alright, so far I've added these to the include paths:

    -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1 \
    -I/Library/Frameworks/SDL.framework/Versions/A/Headers -framework SDL \
    -I/opt/local/include/ \

    Now no more SDL and OpenGL errors. First one takes care of a tr1 include that wasn't working, second for SDL, and 3rd for something that uses X11.

    now I got this error:
    src/osd/sdl/debugosx.m:1796:25: error: cannot initialize a variable of type
    'MAMEDisassemblyViewer *' with an rvalue of type 'MAMEErrorLogViewer *'


    But it looks like it's from a debug file and I don't know if we actually need it. Thoughts?

    Just wanted to say thanks again so much for helping me through this. It would be cool to get TAP working well on OSX. :)
     
  8. You definitely don't need that, I don't even know why does it want to do that by default. You can add NO_DEBUGGER = 1 after USE_DISPATCH_GL = 1 in sdl.mak inside that folder.
     
  9. Alright, worked. Next up I had some errors about pointer to unsigned int conversion, looked up a solution for it. Apparently pointer types to 32 bit type conversions throw errors, so I casted to size_t and then to unsigned int.

    Then at the end there the linker whined about SDL not being found again. I uncommented the line I mentioned before and it worked (Honestly I can't tell at this point what's happening with it but whatever)

    Aaaand.... It finally compiled fully. :)

    But... now that I'm running TAP it's all weird and slow, and the sound is seriously messed up. What the hell?
    Talk about an anti climax.. Any idea what could be causing it?

    Warning after executing from command line:
    mametgm64[73172:780355] 21:29:32.532 WARNING: 140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.

    Average speed: 79.78% (7 seconds)
     
    Last edited: 10 Oct 2015
  10. Well it may be that shmupmametgm needs more CPU than the other one, but that probably isn't it, there are a lot of things that may be causing it.
    For now I can suggest looking up tweaks to improve performance in MAME, I don't know if this would fix the sound though. http://wiki.mamedev.org/index.php/FAQ:Performance
    Or you can try to tweak the compilation process a little and see if you manage to get a different result.
     
  11. The os x links for shmupmame seem to be dead. Does anyone have a mirror or back up?
     
  12. Never mind, I can just play it on windows, it just means that I can't play tgm at work...

    The bigger issue is the weird keyboard short circuit, If I'm holding down then left, my piece will stop moving down then go left. However, the opposite is not true. While holding left, pressing down does nothing, as if the key were not pressed.
     
  13. I'm looking for this too, if anyone has it handy.
     
  14. UPDATE: compiling with gcc-5 and -O0 appears to avert this. If this checks out I'll submit a pull request to the git repo.

    Every build of shmupmametgm I've found segfaults in apparently the same place after loading any ROM. Running gdb forces me to SIGKILL it, but this is what it spits out. Can anyone reproduce?

    Code:
    ╭─sasha@keemun  ~/src/repos/shmupmametgm  ‹master*›
    ╰─$ gdb ./mametgm64                                                                                                                                                    137 ↵
    GNU gdb (GDB) 8.0.1
    Copyright (C) 2017 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-pc-linux-gnu".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from ./mametgm64...(no debugging symbols found)...done.
    (gdb) r
    Starting program: /home/sasha/src/repos/shmupmametgm/mametgm64
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    Warning: unknown option in INI: writeconfig
    Warning: unknown option in INI: homepath
    Warning: unknown option in INI: hashpath
    Warning: unknown option in INI: pluginspath
    Warning: unknown option in INI: languagepath
    Warning: unknown option in INI: swpath
    Warning: unknown option in INI: record_timecode
    Warning: unknown option in INI: exit_after_playback
    Warning: unknown option in INI: snapbilinear
    Warning: unknown option in INI: statename
    Warning: unknown option in INI: unevenstretchx
    Warning: unknown option in INI: unevenstretchy
    Warning: unknown option in INI: autostretchxy
    Warning: unknown option in INI: intoverscan
    Warning: unknown option in INI: intscalex
    Warning: unknown option in INI: intscaley
    Warning: unknown option in INI: use_cpanels
    Warning: unknown option in INI: use_marquees
    Warning: unknown option in INI: beam_width_min
    Warning: unknown option in INI: beam_width_max
    Warning: unknown option in INI: beam_intensity_weight
    Warning: unknown option in INI: ui_active
    Warning: unknown option in INI: joystick_contradictory
    Warning: unknown option in INI: coin_impulse
    Warning: unknown option in INI: comm_localhost
    Warning: unknown option in INI: comm_localport
    Warning: unknown option in INI: comm_remotehost
    Warning: unknown option in INI: comm_remoteport
    Warning: unknown option in INI: drc
    Warning: unknown option in INI: drc_use_c
    Warning: unknown option in INI: drc_log_uml
    Warning: unknown option in INI: drc_log_native
    Warning: unknown option in INI: uifont
    Warning: unknown option in INI: ui
    Warning: unknown option in INI: ramsize
    Warning: unknown option in INI: confirm_quit
    Warning: unknown option in INI: ui_mouse
    Warning: unknown option in INI: autoboot_command
    Warning: unknown option in INI: autoboot_delay
    Warning: unknown option in INI: autoboot_script
    Warning: unknown option in INI: console
    Warning: unknown option in INI: plugins
    Warning: unknown option in INI: plugin
    Warning: unknown option in INI: noplugin
    Warning: unknown option in INI: language
    Warning: unknown option in INI: http
    Warning: unknown option in INI: http_port
    Warning: unknown option in INI: http_root
    Warning: unknown option in INI: uifontprovider
    Warning: unknown option in INI: output
    Warning: unknown option in INI: keyboardprovider
    Warning: unknown option in INI: mouseprovider
    Warning: unknown option in INI: lightgunprovider
    Warning: unknown option in INI: joystickprovider
    Warning: unknown option in INI: debugger
    Warning: unknown option in INI: debugger_font
    Warning: unknown option in INI: debugger_font_size
    Warning: unknown option in INI: watchdog
    Warning: unknown option in INI: bench
    Warning: unknown option in INI: syncrefresh
    Warning: unknown option in INI: monitorprovider
    Warning: unknown option in INI: pa_api
    Warning: unknown option in INI: pa_device
    Warning: unknown option in INI: pa_latency
    Warning: unknown option in INI: bgfx_path
    Warning: unknown option in INI: bgfx_backend
    Warning: unknown option in INI: bgfx_debug
    Warning: unknown option in INI: bgfx_screen_chains
    Warning: unknown option in INI: bgfx_shadow_mask
    Warning: unknown option in INI: bgfx_avi_name
    Warning: unknown option in INI: mouse_index1
    Warning: unknown option in INI: mouse_index2
    Warning: unknown option in INI: mouse_index3
    Warning: unknown option in INI: mouse_index4
    Warning: unknown option in INI: mouse_index5
    Warning: unknown option in INI: mouse_index6
    Warning: unknown option in INI: mouse_index7
    Warning: unknown option in INI: mouse_index8
    Warning: unknown option in INI: keyb_idx1
    Warning: unknown option in INI: keyb_idx2
    Warning: unknown option in INI: keyb_idx3
    Warning: unknown option in INI: keyb_idx4
    Warning: unknown option in INI: keyb_idx5
    Warning: unknown option in INI: keyb_idx6
    Warning: unknown option in INI: keyb_idx7
    Warning: unknown option in INI: keyb_idx8
    Warning: unknown option in INI: renderdriver
    [New Thread 0x7fffeedb7700 (LWP 27141)]
    [New Thread 0x7fffe8ea7700 (LWP 27142)]
    [Thread 0x7fffe8ea7700 (LWP 27142) exited]
    [New Thread 0x7fffe8ea7700 (LWP 27168)]
    Illegal boolean value for sound; reverting to 0
    [Thread 0x7fffe8ea7700 (LWP 27168) exited]
    [Thread 0x7fffeedb7700 (LWP 27141) exited]
    [New Thread 0x7fffeedb7700 (LWP 27528)]
    [New Thread 0x7fffe8ea7700 (LWP 27618)]
    [Thread 0x7fffe8ea7700 (LWP 27618) exited]
    [New Thread 0x7fffe8ea7700 (LWP 27780)]
    [Thread 0x7fffe8ea7700 (LWP 27780) exited]
    [New Thread 0x7fffe8ea7700 (LWP 27781)]
    
    Thread 1 "mametgm64" received signal SIGSEGV, Segmentation fault.
    0x00005555555defd8 in ?? ()
     
    Last edited: 27 Dec 2017
  15. Would it be hard to write a script that installs this shmupmametgm emulator on RetroPie? Maybe a joint effort could take us there? :)

    E.g.:
    1. Get shmupmametgm sources.
    2. Get mame sources (required?).
    3. Apply mentioned joystick patch.
    4. Compile with optimization settings for RPi. E.g. gcc -mcpu=native -march=native
    5. Copy necessary files to some destination folder.
    6. Configure the system so that the new emulator becomes available among the other lr-mame clones.
     

Share This Page