Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Meka 0.80 with new sound engine *TESTERS WANTED!*

Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8
Author Message
  • Joined: 19 Nov 2015
  • Posts: 38
Reply with quote
Post Posted: Thu Jun 14, 2018 10:03 pm
I don't think this really makes a difference because I've had every "applet" closed before and it still did this. Unless I'm not understanding what an applet is.
MEKA screenshot.PNG (240.31 KB)
MEKA screenshot.PNG

  View user's profile Send private message
  • Joined: 22 Apr 2018
  • Posts: 110
Reply with quote
Post Posted: Tue Jul 03, 2018 7:18 pm
Last edited by bsittler on Wed Jul 04, 2018 4:16 pm; edited 1 time in total
Tried out MEKA for the first time on Mac OS X — nice indeed! — and noticed a small patch was needed for working fullscreen:

diff --git a/meka/srcs/video.c b/meka/srcs/video.c
index 09773e4..efb7cda 100644
--- a/meka/srcs/video.c
+++ b/meka/srcs/video.c
@@ -142,7 +142,11 @@ static int Video_ChangeVideoMode(t_video_driver* driver, int w, int h, bool full
    // Create new display
    int display_flags = driver->flags;
    if (fullscreen)
+      #if ARCH_MACOSX
+      display_flags |= ALLEGRO_FULLSCREEN_WINDOW;
+      #else
       display_flags |= ALLEGRO_FULLSCREEN;
+      #endif
    else
       display_flags |= ALLEGRO_WINDOWED;
    al_set_new_display_flags(display_flags);


Also the location of the meka.cfg file was non-obvious to me, I needed to edit it to change video_gui_resolution to 1366x768 for this old MacBook Air. In case it helps others, the config file location is ~/Library/Application Support/org.smspower.meka/meka.cfg

I also noticed the .app has no icon by default, but I just used Data/machine_sms.tga expanded to square with magenta replaced by transparency and I think it looks OK.

Build steps I use, likely relying on installation of some other tools (a least pbmplus or netpbm, I think, and using allegro5 from MacPorts):
(
    (
         cd srcs/ &&
              make \
                  INC_OS='-Ilibs -I../include -I/usr/local/include -I/opt/local/include' \
                  LIB_OS='-L/opt/local/lib -l freetype -framework OpenGL -framework CoreFoundation -framework OpenAL -framework AudioToolbox -framework AppKit -framework IOKit -framework Foundation'
     ) &&
          tools/dist_bin_osx.sh  &&
          tgatoppm < Data/machine_sms.tga |
               pnmpad -width 512 -height 512 -white |
               ppmchange '#FFFFFF' '#FF00FF' |
               pnmtopng -transparent='#FF00FF' > icon.png &&
          png2icns icon.icns icon.png &&
          echo 'read '\''icns'\'' (-16455) "icon.icns";' > icon.r &&
          Rez -o Dist/Meka.app/$'Icon\r' icon.r &&
          SetFile -a C Dist/Meka.app &&
          rm -f icon.{png,icns,r}
)


edit: re-added spaces and newlines for readability
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8109
  • Location: Paris, France
Reply with quote
Post Posted: Tue Jul 03, 2018 9:14 pm
Thank you, I pushed the first fix to the repo for now.

I have an idea of how to evolve Meka so it could be back in a decent state (easier to compile and to work with) and will try to perform that cleanup in 2018..
  View user's profile Send private message Visit poster's website
  • Joined: 19 Nov 2015
  • Posts: 38
Reply with quote
Post Posted: Thu Aug 09, 2018 5:57 am


It has been several months since I posted this and I have made the post about my problem with MEKA, and no one seemed to respond or know what to do here so I'll post it again.

These applet things I have probably have nothing to do with "leaking memory"
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8109
  • Location: Paris, France
Reply with quote
Post Posted: Thu Aug 09, 2018 7:08 am
If you open the Task Manager and keep it open, does the Memory amount used by mekaw.exe grows over time?
  View user's profile Send private message Visit poster's website
  • Joined: 19 Nov 2015
  • Posts: 38
Reply with quote
Post Posted: Thu Aug 09, 2018 8:01 am
Bock wrote
If you open the Task Manager and keep it open, does the Memory amount used by mekaw.exe grows over time?


The memory usage increases mostly 8 kilobytes every second or so.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8109
  • Location: Paris, France
Reply with quote
Post Posted: Thu Aug 09, 2018 8:24 am
Thanks, will look it up when I can but Meka is a bit of a mess at the moment.
  View user's profile Send private message Visit poster's website
  • Joined: 19 Nov 2015
  • Posts: 38
Reply with quote
Post Posted: Thu Aug 09, 2018 8:26 am
Bock wrote
Thanks, will look it up when I can but Meka is a bit of a mess at the moment.


Is there anything I can do to stop this leaking? Like can I find out where the memory is being leaked to so I can monitor it?
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8109
  • Location: Paris, France
Reply with quote
Post Posted: Thu Aug 09, 2018 8:37 am
If you know C++ and can compile Meka you may use a tool for this purpose.
  View user's profile Send private message Visit poster's website
  • Joined: 01 Sep 2018
  • Posts: 10
Reply with quote
Linux (Ubuntu Mate 18.04) Compile
Post Posted: Sat Sep 01, 2018 12:28 am
Hi,
I managed to compile MAKE on Ubuntu Mate 18.04 64-bit, and it seems to run fine.
What I needed to do to compile it was remove the trailing ".0" from the allegro pkg-config line in the make file otherwise it did not find the libraries.
Original:
ifeq ($(SYSTEM), unix)
LIB_ALLEG = `pkg-config --cflags --libs allegro-5.0 allegro_image-5.0 allegro_audio-5.0 allegro_font-5.0 allegro_primitives-5.0 allegro_ttf-5.0`
endif

New:
ifeq ($(SYSTEM), unix)
LIB_ALLEG = `pkg-config --cflags --libs allegro-5 allegro_image-5 allegro_audio-5 allegro_font-5 allegro_primitives-5 allegro_ttf-5`
endif
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2522
Reply with quote
Compiling on Linux Mint 18.2 (based on Ubuntu 16.04)
Post Posted: Mon Jan 28, 2019 12:58 pm
It seems I can't compile this on my Linux Mint 18.2 (based on Ubuntu 16.04) - I surely can clone the repository, as explained
git clone --recursive https://github.com/ocornut/meka.git meka

but when I do
cd meka/srcs
make

all I get is this message:
Makefile:309: *** missing separator.  Stop.

Any hint?
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8109
  • Location: Paris, France
Reply with quote
Post Posted: Mon Jan 28, 2019 6:41 pm
sverx wrote
Any hint?


I recently made edit to the Makefile (as all files were renamed) but haven't tested it. I guess someone would need to dig into the Makefile and fix it and submit a PR for it?
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2522
Reply with quote
Post Posted: Tue Jan 29, 2019 9:42 am
I hope you're not looking at me, I almost never edited a Makefile in my life... :|
  View user's profile Send private message Visit poster's website
  • Joined: 25 Dec 2005
  • Posts: 565
  • Location: São Paulo - Brazil
Reply with quote
Post Posted: Tue Jan 29, 2019 2:56 pm
The problem is that the Makefile commands are prepended with spaces in the original file, when the string must be a single tab.

Nevertheless, although it compiled on my mac after this change, the executable exploded with an error.

Quote

2019-01-29 12:53:47.510 meka[27657:1987228] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL URLByAppendingPathComponent:]: component, components, or pathExtension cannot be nil.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2b57b59b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff528ae942 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2b60b935 +[NSException raise:format:] + 197
3 Foundation 0x00007fff2d6075d4 -[NSURL(NSURLPathUtilities) URLByAppendingPathComponent:] + 81
4 meka 0x00000001067c8dc8 _ZL16CopyPathToBuffermP8NSStringPcm + 120
5 meka 0x00000001067c8d33 _Z31GetWritableInternalResourcePathPci + 83
6 meka 0x0000000106796489 _Z14Filenames_Initv + 169
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6


Check if you can compile with the attached Makefile. (PLEASE remove the extension .txt before using the file...)
Makefile.txt (17.32 KB)

  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2522
Reply with quote
Post Posted: Tue Jan 29, 2019 3:36 pm
Thank you! That did the trick! :)
(ok, I had to install a few allegro packages but that was easy ;) )
  View user's profile Send private message Visit poster's website
  • Joined: 25 Dec 2005
  • Posts: 565
  • Location: São Paulo - Brazil
Reply with quote
Post Posted: Tue Jan 29, 2019 3:41 pm
Oh nice to read that.

Would be great to have a compiled Mac executable too hehe, but in the meantime Wine and old Meka do the job fine.
  View user's profile Send private message
  • Joined: 10 Oct 2019
  • Posts: 4
Reply with quote
Post Posted: Thu Oct 10, 2019 1:20 pm
[Edit: Never mind. Never mind, /forums/13019-Meka080WithNewSoundEngineTESTERSWANTED?start=350#103356 fixed it.]

Hi all.
Any suggestions?

$ sudo apt install liballegro5-dev liballegro-audio5-dev liballegro-ttf5-dev liballegro-image5-dev
$ git clone --recursive [Non-registered or recent members are not allowed to post links. Sorry, spammers force us to do this :)] meka
$ cd meka/meka/srcs/
$ make

[...]

g++ -Wall -O3 -ffast-math -fno-strength-reduce -funroll-all-loops -fomit-frame-pointer -x c++ -I. -Ilibs -I../include -I/usr/include/allegro5 -DARCH_UNIX -DASM_SYMBOLS_REQUIRE_UNDERSCORE -c hq2x.cpp -oobj/hq2x.o
g++ -o ../meka obj/meka.o obj/machine.o obj/cpu.o obj/debug.o obj/debugger.o obj/debughelper.o obj/datadump.o obj/z80marat.a obj/video.o obj/video_m2.o obj/video_m5.o obj/video_c.o obj/vdp.o obj/palette.o obj/effects.o obj/fskipper.o obj/mainloop.o obj/ioports.o obj/commport.o obj/vmachine.o obj/bios.o obj/country.o obj/bmemory.o obj/mappers.o obj/eeprom.o obj/beam.o obj/tvtype.o obj/inputs.o obj/inputs_c.o obj/inputs_f.o obj/inputs_i.o obj/inputs_t.o obj/inputs_u.o obj/lightgun.o obj/periph.o obj/rapidfir.o obj/tvoekaki.o obj/glasses.o obj/sk1100.o obj/checksum.o obj/db.o obj/vlfn.o obj/patch.o obj/saves.o obj/allegro4to5.o obj/misc.o obj/build.o obj/fonts.o obj/file.o obj/data.o obj/tools.o obj/keyinfo.o obj/drivers.o obj/message.o obj/capture.o obj/errors.o obj/sdsc.o obj/setup.o obj/libmisc.o obj/libparse.o obj/config.o obj/gui.o obj/g_action.o obj/g_box.o obj/g_menu.o obj/g_menu_i.o obj/g_menu_t.o obj/g_mouse.o obj/g_init.o obj/g_tools.o obj/g_widget.o obj/g_update.o obj/desktop.o obj/skin.o obj/skin_bg.o obj/skin_fx.o obj/app_cheatfinder.o obj/app_filebrowser.o obj/app_game.o obj/app_options.o obj/textbox.o obj/app_mapview.o obj/app_tileview.o obj/app_textview.o obj/app_techinfo.o obj/app_memview.o obj/app_palview.o obj/app_about.o obj/sound/sound.o obj/sound/s_misc.o obj/sound/sound_logging.o obj/sound/psg.o obj/sound/fmeditor.o obj/sound/wav.o obj/sound/vgm.o obj/sound/fmunit.o obj/sound/emu2413/emu2413.o obj/sound/emu2413/mekaintf.o obj/sg1ksc3k.o obj/sf7000.o obj/coleco.o obj/fdc765.o obj/unzip.o obj/blit.o obj/blitintf.o obj/hq2x.o `pkg-config --cflags --libs allegro-5.0 allegro_image-5.0 allegro_audio-5.0 allegro_font-5.0 allegro_primitives-5.0 allegro_ttf-5.0` -lpng -lz
Package allegro-5.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `allegro-5.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'allegro-5.0' found
Package allegro_image-5.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `allegro_image-5.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'allegro_image-5.0' found
Package allegro_audio-5.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `allegro_audio-5.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'allegro_audio-5.0' found
Package allegro_font-5.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `allegro_font-5.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'allegro_font-5.0' found
Package allegro_primitives-5.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `allegro_primitives-5.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'allegro_primitives-5.0' found
Package allegro_ttf-5.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `allegro_ttf-5.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'allegro_ttf-5.0' found
obj/debugger.o: In function `Debugger_Init_LogFile() [clone .part.6]':
debugger.cpp:(.text+0x753): undefined reference to `al_filename_exists'
debugger.cpp:(.text+0x7f8): undefined reference to `al_make_directory'
obj/debugger.o: In function `Debugger_Applet_RedrawState()':
debugger.cpp:(.text+0x109e): undefined reference to `al_set_target_bitmap'
debugger.cpp:(.text+0x10de): undefined reference to `al_draw_filled_rectangle'
debugger.cpp:(.text+0x12b1): undefined reference to `al_set_target_bitmap'
debugger.cpp:(.text+0x12f6): undefined reference to `al_draw_filled_rectangle'
obj/debugger.o: In function `Debugger_Applet_Layout(bool)':
debugger.cpp:(.text+0x9571): undefined reference to `al_set_target_bitmap'
debugger.cpp:(.text+0x9586): undefined reference to `al_clear_to_color'
debugger.cpp:(.text+0x95fb): undefined reference to `al_set_target_bitmap'
debugger.cpp:(.text+0x96a1): undefined reference to `al_set_target_bitmap'
obj/video.o: In function `Video_DestroyVideoBuffers()':
video.cpp:(.text+0x28): undefined reference to `al_unlock_bitmap'
video.cpp:(.text+0x4f): undefined reference to `al_destroy_bitmap'

[etc]

[Edit: Never mind. Never mind, /forums/13019-Meka080WithNewSoundEngineTESTERSWANTED?start=350#103356 fixed it.]
  View user's profile Send private message
  • Joined: 19 Nov 2015
  • Posts: 38
Reply with quote
Post Posted: Fri Oct 11, 2019 8:38 am
I really hope that whenever this update gets released, it will fix this bug I've seen with "Ninja Princess" for the SG-1000, it causes my emulator to crash on me. Sometimes my whole computer gets the blue screen of death, no joke!
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8109
  • Location: Paris, France
Reply with quote
Post Posted: Fri Oct 11, 2019 11:55 am
VenomRush1997 wrote
I really hope that whenever this update gets released, it will fix this bug I've seen with "Ninja Princess" for the SG-1000, it causes my emulator to crash on me. Sometimes my whole computer gets the blue screen of death, no joke!


Please report bugs in https://github.com/ocornut/meka/issues
Along with the CRC32 and size of your rom file because it doesn't clear here and never crash afaik.
  View user's profile Send private message Visit poster's website
Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8



Back to the top of this page

Back to SMS Power!