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, 9  Next
Author Message
  • Joined: 19 Nov 2015
  • Posts: 58
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: 530
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: 8643
  • 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: 58
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: 8643
  • 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: 58
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: 8643
  • 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: 58
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: 8643
  • 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: 26
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: 3732
  • Location: Stockholm, Sweden
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: 8643
  • 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: 3732
  • Location: Stockholm, Sweden
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: 607
  • 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: 3732
  • Location: Stockholm, Sweden
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: 607
  • 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: 5
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: 58
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: 8643
  • 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
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8643
  • Location: Paris, France
Reply with quote
New Build MEKA 2019-12-13
Post Posted: Fri Dec 13, 2019 12:24 pm
Attached a new build of Meka.
I hadn't realised that even thought some of those have been benefit from self-built version, I hadn't pushed a build in here for a while.
We are going to improve this.

MEKA 2019-12-13

- PSG: Added support for Game Gear stereo emulation! [Maxim]
- PSG: Emulate the PSG volumes "ideally" rather than matching some real systems' suboptimal output. [Maxim]
- Mappers: Added support for SC-3000 Survivors Multicart mapper. [Omar,Honestbob]
- Mappers: Fixed 32K "No Mapper" mapper from forwarding 3-D Glasses writes. Fixes '3D Gunner'. [Omar]
- Light Phaser: Adding per-game hacky light phaser function to reduce drift between perceived cursor and what the game will end up using, particularly useful for 'Missile Defense 3-D' and '3D Gunner'. [Omar]
- FileBrowser: search for known extension when opening ZIP file (instead of picking first). [Maxim]
- OSX: Use OS compliant directories for storing configuration files. [Dajero] (#12)
- Wav Logging: recording in Stereo. [Maxim]

Sources:
- (Win32) Updated project to using Visual Studio 2017. [Maxim]
- (Win32) Grabbing dependencies via nuget. [Maxim]


Thanks to work by Maxim it's now much easier to compile Meka with Visual Studio (should compile out of the box).

  View user's profile Send private message Visit poster's website
  • Joined: 05 Dec 2019
  • Posts: 56
  • Location: USA
Reply with quote
Post Posted: Sat Dec 14, 2019 6:31 am
Last edited by PinoBatch on Sat Dec 14, 2019 6:00 pm; edited 1 time in total
Looks like the 5.2 compatibility patch still wasn't applied to the Makefile. So in my personal build tooling, I've done this to get it to work on Ubuntu 18.04:

sed -e 's/-5[.]0/-5/g' Makefile > Makefile_
mv Makefile_ Makefile
make -j3


Now I have two issues:

1. Which files, in addition to the executable, do I need to copy out in order to install it under /opt/meka/?
2. My computer's 1366x768-pixel display cuts off the bottom of the window. Is there a way to make the main window slightly less than 768 pixels tall? For example, a 1024x672 pixel window would allow full-screen use while preserving the 8:7 pixel aspect ratio of all TMS9918 derivatives for NTSC TV system. Trying to grab the corner of the window to resize it just caused the window manager to move it instead. There doesn't appear to be anything related to window size in MAIN > Options or under VIDEO.
  View user's profile Send private message Visit poster's website
  • Joined: 04 Jul 2010
  • Posts: 539
  • Location: Angers, France
Reply with quote
Post Posted: Sat Dec 14, 2019 9:41 am
Build for OSx (on a 10.13.6 imac) and made a little icon.

PS. "1998-2015" copyright mentions have been updated to "1998-2019" after screen cap ;)

  View user's profile Send private message
  • Joined: 05 Dec 2019
  • Posts: 56
  • Location: USA
Reply with quote
Post Posted: Sat Dec 14, 2019 5:41 pm
Pseudocode of Filenames_Init() in file.cpp:


StartingDirectory = CWD
if argv[0] contains any path separators:
    EmulatorDirectory = argv[0] minus the last component
else:
    # We must have '.' in the PATH (such as on Windows)
    # and therefore 'meka' means '.\meka'
    EmulatorDirectory = StartingDirectory
if on *n?x:
    make g_env.Paths.EmulatorDirectory absolute using realpath()
data_dir = EmulatorDirectory

if on macOS:
    # Behave as an "installed app", writing preferences and the like
    # to predefined folders in the user profile.

    # Internal resources is the system "local settings"
    internal_resources_dir = NSApplicationSupportDirectory
    # External resources is the system "my documents"
    external_resources_dir = NSDocumentDirectory

    # Copy internal resources from defaults if they don't exist
    bundled files = {"meka.inp"}
    for filename in bundled files:
       if this file doesn't exist in internal_resources_dir:
           copy it from the app bundle
else:
    # On Windows and non-Mac *n?x, behave as a "portable app",
    # writing all to the program's folder.  There is no way yet
    # to make it behave as an "installed app" on these platforms.
    internal_resources_dir = external_resources_dir

files in data_dir = {
    "meka.dat", "meka.nam", "meka.thm", "meka.pat", "meka.blt", "meka.msg",
    "meka.txt", "compat.txt", "multi.txt", "changes.txt", "debugger.txt"
}
files in internal resources = {
    "meka.dsk", "meka.fdb", "meka.inp"
}
subdirectories in external resources = {
    "Screenshots", "Saves", "Music", "Debug"
}

if on Windows:
    config path = "mekaw.cfg" inside EmulatorDirectory
else:
    config path = "meka.cfg" inside internal_resources_dir


It looks like MEKA for macOS is trying to behave as an installed app, saving its preferences to OS-defined subdirectories of the user profile, whereas on other platforms it behaves as a portable app, saving its preferences to the application's directory. I don't know how to do "install for all users" for a portable-only app without modifying the source code, but I think I can figure out an "install for only me" procedure.
  View user's profile Send private message Visit poster's website
Revo
  • Guest
Reply with quote
Post Posted: Sun Dec 15, 2019 10:07 am
With the last version on Windows 10, I've a big gap with the cursor making navigation really hard.
 
Revo
  • Guest
Reply with quote
Post Posted: Mon Dec 16, 2019 3:48 pm
I found why, MEKA doesn't handle ''scale and layout'' in Windows 10 settings.
 
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14652
  • Location: London
Reply with quote
Post Posted: Mon Dec 16, 2019 10:36 pm
Can you give more details? I run at 200% scale and there are some issues, but I'm not sure it matches your experience.
  View user's profile Send private message Visit poster's website
  • Joined: 02 Jul 2018
  • Posts: 2
  • Location: Toronto, Canada
Reply with quote
Post Posted: Wed Dec 18, 2019 4:25 am
ichigobankai wrote
Build for OSx (on a 10.13.6 imac) and made a little icon.

PS. "1998-2015" copyright mentions have been updated to "1998-2019" after screen cap ;)


Thank you for compiling a Mac build! Unfortunately it is crashing on load for me. Seems to be a missing liballegro library in the app package? Error report is attached.
meka_2019-12-13_mac_error.txt (1.6 KB)
Error Report

  View user's profile Send private message
  • Joined: 13 Feb 2005
  • Posts: 24
  • Location: Australia
Reply with quote
Post Posted: Wed Jan 15, 2020 11:30 am
I'm trying to use the new 0.8 on Windows 10, but the screen appears blurry while in use. While using the screenshot tool it seems fine, but playing it is blurry. Any idea why? I like using MEKA to get direct capture footage at 1:1 pixel ratios, which this will cause issues with.
Sonic The Hedgehog - Triple Trouble (USA, Europe)-07a.png (125.45 KB)
And the one I see when using MEKA
Sonic The Hedgehog - Triple Trouble (USA, Europe)-07a.png

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8643
  • Location: Paris, France
Reply with quote
Post Posted: Wed Jan 15, 2020 12:36 pm
Rlan wrote
I'm trying to use the new 0.8 on Windows 10, but the screen appears blurry while in use. While using the screenshot tool it seems fine, but playing it is blurry. Any idea why? I like using MEKA to get direct capture footage at 1:1 pixel ratios, which this will cause issues with.

Something about DPI scaling or some oversampling driver setting? I'm not sure.
  View user's profile Send private message Visit poster's website
  • Joined: 31 Aug 2006
  • Posts: 36
  • Location: United Kingdom, Glasgow
Reply with quote
Post Posted: Tue Jan 28, 2020 7:37 pm
I don't know if it's just me, I gave the latest version a try and I experience slight stuttering in both Audio and Visual, during Gameplay.

In the Messages box it states "PushSamplesRequestBufs(): overflow"

Here is a screenshot, if you want to see.
SMS.jpg (171.77 KB)
Screenshot
SMS.jpg

  View user's profile Send private message
  • Joined: 17 Nov 2011
  • Posts: 5
Reply with quote
Post Posted: Fri Jan 31, 2020 2:43 pm
Bock wrote
thr: I committed your translation now. Please also provide a version with the accents as an incentive for me to fix it :) eventually will want to add languages such as Japanese so I imagine then it will support all funky accents alltogether.


my apologies for taking literally a decade on this. but you know how it is. ;D
so here's the translation with proper diacrites. also did some minor touch-ups and added a few missing strings, so it's fully up-to-date now, barring the strings that are missing from the default English template, mostly relating to the debugger, the windows setup dialog, and some other obscure stuff.

i see you've switched to truetype fonts in the meantime, so i guess this will expedite things on the translations front when dealing with all these strange letters.
the default fonts were missing the relevant Polish glyphs, so i've added these in FontForge to test this stuff. i've attached the fonts with added glyphs, in case you might need them. i'm not sure how viable is this tactics in the long run, because doing it this way would require all future translators in strange languages to add their missing letters manually. so perhaps you could consider switching to some similar fonts supporting a more complete charset range.

anyway, the new glyphs show up just fine in messages and options boxes, but all other text and menus throw up a ^ in place of relevant letters, so it looks they can't read the fonts correctly for some reason. maybe you're using distinct codepages for different text types in the UI, but i don't know.
the /setup window throws up rubbish in place of Polish letters as well, but that's probably a separate issue from the emulator texts, as it looks like it's using some Windows system font.
so anyway, you might want to hold on with committing this for now, 'cos it's ugly as is.

for reference, here are the added glyphs: 260 (U+0104), 261 (U+0105), 262 (U+0106), 263 (U+0107), 280 (U+0118), 281 (U+0119), 321 (U+0141), 322 (U+0142), 323 (U+0143), 324 (U+0144), 346 (U+015A), 347 (U+015B), 377 (U+0179), 378 (U+017a), 379 (U+017B), and 380 (U+017C).

on a side note, what's with redneck translation? it had to go? first floating hearts, and now this... sure it was kinda silly, but you know, it's the little things like that that set your emu apart from the rest and give it character. everything's just so plain, bland, serious and... unified nowadays. i know it's less hassle that way, but hey, it's supposed to be for fun anyway, so maybe there's no harm in being a bit silly from time to time eh.

while i'm at it, there's this thing that's been bugging me for ages. in fullscreen mode, there's this one-pixel-thin mouseclick deadzone at the very upper side of the emulator, right above the menus. in a normal usage scenario, you'd move the mouse cursor right up to the edge of the screen to interact with the menus. here, it requires an extra step to adjust the cursor position for this one-pixel-wide dead line.

also, is there a way to start MEKA with the booted system in fullscreen mode? setting start_in_gui = 0 in mekaw.cfg doesn't seem to do anything.

and one last thing, 2019-12-13 silently crashes on me when alt-tabbing to desktop from MEKA in fullscreen mode, apparently on switching back to desktop resolution. this is on Windows 10.
mekamsg.zip (53.51 KB)
fonts.zip (45.4 KB)

  View user's profile Send private message
  • Joined: 23 Mar 2013
  • Posts: 611
  • Location: Copenhagen, Denmark
Reply with quote
Trojan?
Post Posted: Sun Feb 16, 2020 12:18 pm
Bock wrote
Attached a new build of Meka.
I hadn't realised that even thought some of those have been benefit from self-built version, I hadn't pushed a build in here for a while.
We are going to improve this.

MEKA 2019-12-13

- PSG: Added support for Game Gear stereo emulation! [Maxim]
- PSG: Emulate the PSG volumes "ideally" rather than matching some real systems' suboptimal output. [Maxim]
- Mappers: Added support for SC-3000 Survivors Multicart mapper. [Omar,Honestbob]
- Mappers: Fixed 32K "No Mapper" mapper from forwarding 3-D Glasses writes. Fixes '3D Gunner'. [Omar]
- Light Phaser: Adding per-game hacky light phaser function to reduce drift between perceived cursor and what the game will end up using, particularly useful for 'Missile Defense 3-D' and '3D Gunner'. [Omar]
- FileBrowser: search for known extension when opening ZIP file (instead of picking first). [Maxim]
- OSX: Use OS compliant directories for storing configuration files. [Dajero] (#12)
- Wav Logging: recording in Stereo. [Maxim]

Sources:
- (Win32) Updated project to using Visual Studio 2017. [Maxim]
- (Win32) Grabbing dependencies via nuget. [Maxim]


Thanks to work by Maxim it's now much easier to compile Meka with Visual Studio (should compile out of the box).


I get a warning from Windows Defender: Mekaw contains a trojan?!
trojan.png (252.2 KB)
Screenshot of Windows Defender & mekaw
trojan.png

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14652
  • Location: London
Reply with quote
Post Posted: Sun Feb 16, 2020 4:15 pm
It’s a false positive.
  View user's profile Send private message Visit poster's website
  • Joined: 23 Mar 2013
  • Posts: 611
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Sun Feb 16, 2020 4:29 pm
Ah, OK. Thanks!
  View user's profile Send private message Visit poster's website
  • Joined: 04 Jul 2010
  • Posts: 539
  • Location: Angers, France
Reply with quote
Post Posted: Fri Mar 27, 2020 9:58 am
Fixed OSX version
mekaosx-2020-03-27.zip (1.73 MB)
Meka OSX

  View user's profile Send private message
  • Joined: 29 Mar 2020
  • Posts: 5
Reply with quote
Problem building OSX version
Post Posted: Wed Apr 22, 2020 9:50 pm
Hey just wondering if there are any additional pre-reqs beside before building ? It looks like I built fine, but can't execute.


futurepr0n@Marks-MBP meka % ./meka

MEKA 0.80-alpha (c) 1998-2019 Omar Cornut (Bock) and contributors
--
Resource path = /Users/futurepr0n/Development/Sega/SMS/Tools/meka/meka
2020-04-22 17:48:10.266 meka[15843:1545101] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL URLByAppendingPathComponent:]: component, components, or pathExtension cannot be nil.'
*** First throw call stack:
(
   0   CoreFoundation                      0x00007fff34201d07 __exceptionPreprocess + 250
   1   libobjc.A.dylib                     0x00007fff6cf255bf objc_exception_throw + 48
   2   Foundation                          0x00007fff367ebdf5 -[NSURL(NSURLPathUtilities) URLByAppendingPathComponent:isDirectory:] + 0
   3   meka                                0x0000000105b513d4 _ZL16CopyPathToBuffermP8NSStringPcm + 116
   4   meka                                0x0000000105b51344 _Z31GetWritableInternalResourcePathPci + 84
   5   meka                                0x0000000105b1ed69 _Z14Filenames_Initv + 169
)


Im not sure what's up, it looks like others have had similar errors but got them resolved, I am non so lucky.

I also tried loading up the Xcode project to build but that was unsuccessful. It would not open. Said something was wrong, but I did not capture it. I can though.

Should I be running the ./dist_bin_osx before building?

I used Brew to install allegro5 and other libraries which I thought may be related.

It would be helpful if the guy who successfully had it compiled could help me resolve the problem - I would look to document the process for us (I had a tough time googling in order to find it) - I would be wanting to put instructions on end to end building Meka on Mac/OSX today, from cloning the project from orcornut GitHub, and then successfully building it.

The guys files above worked perfect! But it isn't explained what was done in order to be successful so that would help me out Thanks in advance.
  View user's profile Send private message
  • Joined: 04 Jul 2010
  • Posts: 539
  • Location: Angers, France
Reply with quote
Post Posted: Sun Apr 26, 2020 7:07 am
Hi futurepr0n

To make the .app on OSX, you need to run the dist_bin_osx.sh in TOOLS

Prior to this, you can edit the Info.Plist (in dist_osx > Meka.app_template > Contents) to add icon

To make the icon itself, i've made a little bash script (makeicns).
First make a 512x512 png (with alpha)
syntax :
./makeicns your-icon.png

it will generate a icns file

Do not forget to match names between info.plist and your icns file.
PS. you can cut/paste things in .app (just open it)

After running the dist_bin_osx you must bind allegro lib into the .app.
you'll need dylibbunbler app and run this :

export DYLD_LIBRARY_PATH=/usr/local/lib/
./dylibbundler -x Meka.app/Contents/MacOS/meka -b -d Meka.app/Contents/MacOS -p @executable_path


At the end, the content of the .app should be like that :

Info.plist.zip (942 B)
infos.plist
makeicns.zip (994 B)
makeicns
dylibbundler.zip (32.46 KB)
dylibbundler

  View user's profile Send private message
  • Joined: 22 Jun 2020
  • Posts: 1
Reply with quote
Keyboard Mapping Issue in Debugger
Post Posted: Mon Jun 22, 2020 8:58 pm
Hello

First of all thank you for this fabulous app used for me for debugging colecovision games (sorry for SMS!!).

I updated from version 0.73 to 0.8 and now I have a problem with the # key in debugger on a french keyboard under the debugger.

To do this key on french kb you must press [ALT GR] + [3] but no effect only undercase key value "

no possibility to do the # key with the [ALT] + 0023 (charmap)

then no breakpoint on display line with the function B line #13 ...

Best regards
  View user's profile Send private message
  • Joined: 23 Jun 2020
  • Posts: 3
Reply with quote
Penguin Adventure (Korea) (Unl) (Pirate)
Post Posted: Thu Jun 25, 2020 12:33 am
I tested Penguin Adventure (Korea) (Unl) (Pirate) with meka 0.80 alpha.It work well but Its sound emulation is somewhat incorrect which compare with msx version and when I push pause button(space key) several times it reset automatically.is there any possibility to fix this bug in the next meka version?

And Meka 0.80 frequently display "Not Responding" and I must quit it with windows task manager..After excluding meka folder from Avast realtime scan,"Not Responding" Problem solved. But I doubt that Meka really doesn't contains any malware code.
  View user's profile Send private message
  • Joined: 14 Apr 2013
  • Posts: 623
Reply with quote
Post Posted: Thu Jun 25, 2020 10:20 am
bshi02 wrote
I tested Penguin Adventure (Korea) (Unl) (Pirate) with meka 0.80 alpha.It work well but Its sound emulation is somewhat incorrect which compare with msx version and when I push pause button(space key) several times it reset automatically.is there any possibility to fix this bug in the next meka version?

The Korean MSX to SMS conversions are rather quick hack jobs than proper conversions. One example is the "PUSH SPACE KEY" message you mentioned. Obviously there's no space key on the Master System. In their conversion both buttons (button 1 and button 2) are accepted as the space key. Also they did not care about the Master System's pause button. In their conversion, pressing the pause button on the Master System jumps somewhere into the middle of a procedure, executing code that is not meant to be executed that way. That explains the reset of the game you experienced. Note that the pause button does NOT correspond to the space key of the MSX.
And you mentioned that the game does sound different on the Master System than on the MSX. Yes, the Master System version of the game does in fact sound different from the MSX version. That's not much of a surprise considering that the systems have different sound chips (they are similar, both have square channels and are able to play noise but they aren't the same) and I would be surprised if they had spent any time on properly account for the differences of the chips.
  View user's profile Send private message Visit poster's website
  • Joined: 23 Jun 2020
  • Posts: 3
Reply with quote
Post Posted: Thu Jun 25, 2020 11:01 am
Calindro wrote

And you mentioned that the game does sound different on the Master System than on the MSX. Yes, the Master System version of the game does in fact sound different from the MSX version. That's not much of a surprise considering that the systems have different sound chips (they are similar, both have square channels and are able to play noise but they aren't the same) and I would be surprised if they had spent any time on properly account for the differences of the chips.

In fact,I played "Penguin Adventure (Korea) (My elder sister borrowed this cartridge from her friend at that time.) " with my SMS console(samsung gamboy which is korean version of sega mark3) almost 30 years ago.
Meka's emulation of sound is not the same as the sound which I still remembered.especially music of stage 2 is quite different than my memory.

I also played "cabbage_patch_kids" or "magical_tree" or "comic_bakery" with my samsung gamboy at that time.As far as I know these game was ported from MSX like "Penguin Adventure"
Now I play these game with meka 0.80 and Its sound is totally correspond with my memory of 30 years ago.I think sound emulation of Meka 0.80 is not correct in regard to "Penguin Adventure (Korea) (Unl) (Pirate)"

I just noticed that meka's sound emulation of "magical_kid_wiz" is very messy.I played it with my SMS console almost 30 years ago.It goes without saying that its sound is very different to my memory of 30 years ago. I think Meka need to be update in sound emulation.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14652
  • Location: London
Reply with quote
Post Posted: Thu Jun 25, 2020 12:23 pm
I think the ROMs you are using are not the same as what you played on real hardware.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Jul 2021
  • Posts: 2
  • Location: Ohio
Reply with quote
Crash after a while for anybody else?
Post Posted: Tue Jul 06, 2021 9:28 pm
Anybody else have the issue of MEKA crashing after a period of time?
After a period of time it starts issuing the OVERFLOW error that someone else mentioned, then later it crashes. Taking a guess that its in the sound engine, which would be nice for a option to turn off if you don't want sound. As the Volume options are always dimmed out for me and I have to manual turn each channel off one by one.

Also when I re-downloaded MEKA Malware Bytes started flagging it. I don't remember it getting flagged when I downloaded a few years back. Would it be possible to check the download and make sure some less than reputable individual didn't attach\inject something undesirable into the file?

hopefully it is just a false positive( or positives as MB ids 3 different things) might just be better safe than sorry. If its possible anyway.

Beyond that I really love the layout and options, makes cloning old games a lot easier. Seems to play nice and smooth, until the overflow creeps in, keeping the pixels square really helps when screen capturing images. As some emulators force an out of square screen so it fits in standard computer display aspect ratios. Can't wait for a more "finalized" update after so many years!
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14652
  • Location: London
Reply with quote
Post Posted: Wed Jul 07, 2021 8:08 am
Meka has used UPX packing for many years and lazy virus scanners often flag this. Malware bytes is just aggregating results from multiple virus scanners. The download hasn’t changed.

There is a sound engine changes pull request around, we should build a package from it and let people with sound issues test it.

Those emulators forcing non-square pixels are actually being more accurate. It’s the older emulators with 1:1 pixel mapping that are being lazy/inaccurate :)
  View user's profile Send private message Visit poster's website
  • Joined: 06 Jul 2021
  • Posts: 2
  • Location: Ohio
Reply with quote
Post Posted: Wed Jul 07, 2021 4:07 pm
Maxim wrote

Those emulators forcing non-square pixels are actually being more accurate. It’s the older emulators with 1:1 pixel mapping that are being lazy/inaccurate :)


Oh is that due to the way CRT TVs displayed the image, due to the 3 'rays' hitting side by side giving a slightly rectangular appearance to the pixels?

I have found this issue, not sure if it happens with all ROMs or just some, but every so often I get this little glitch in the graphics. Its a hit and miss thing as it doesn't always happen, I mean it WILL show up during game play but its not always there. So I don't believe its a problem with the ROM or I would expect it to happen every time at a specific place. And it just doesn't.

Not sure of MEKA's actual game compatibility, but it seems on the upper level of compatibility with games though. So again I don't believe its the ROM. Almost like some of tile map gets corrupted from time to time when swapping. It only seems to affect 1 tile at a time though, so depending on how many times that tile is used on the screen determines just how pronounced it is.
My search kung-fu is not strong, so I didn't pull up any other topics about this so don't know if it has been brought up before.
GraphicalGlitch.png (25.96 KB)
GraphicalGlitch.png

  View user's profile Send private message
  • Joined: 24 Mar 2021
  • Posts: 116
Reply with quote
Post Posted: Wed Jul 07, 2021 5:00 pm
Cobalt wrote
Maxim wrote

Those emulators forcing non-square pixels are actually being more accurate. It’s the older emulators with 1:1 pixel mapping that are being lazy/inaccurate :)


Oh is that due to the way CRT TVs displayed the image, due to the 3 'rays' hitting side by side giving a slightly rectangular appearance to the pixels?
No... it's because TVs assume pixel-equivalents are coming in at a specific rate, and the SMS draws ever-so-slightly slower than that.

Pinobatch wrote an article on the nesdev wiki about it:

https://wiki.nesdev.com/w/index.php/Overscan

(the NES uses the same pixel rate as the SMS)
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14652
  • Location: London
Reply with quote
Post Posted: Wed Jul 07, 2021 5:42 pm
The TV draws some number of lines (the details are a bit complicated, but let’s simplify to say there are 262 lines) on the screen to form a 4:3 rectangle. The SMS draws into the middle 192 lines, and it draws into the middle of those lines (so there’s some border colour around all sides), with 256 pixels drawn into the line (the left 8 pixels might be changed to the border colour while scrolling). The end result is that the 256x192 pixels are drawn into a rectangle that is not physically a 4:3 shape on the screen, it’s a bit squashed vertically. The exact squashing amount depends on the TV itself, and is much worse on PAL TVs.

I have seen that tile corruption bug in Meka sometimes, it is an emulation bug but is hard to reproduce. Other emulators emulate accurate data corruption for buggy games, Meka does not so any corruption is a bug in Meka…
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8643
  • Location: Paris, France
Reply with quote
Meka 2021-07-26
Post Posted: Mon Jul 26, 2021 12:36 pm
Nearly same as previous build but without UPX compression (which triggered too many anti-viruses)
https://github.com/ocornut/meka/releases/tag/meka-20210726
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14652
  • Location: London
Reply with quote
Post Posted: Sat Sep 18, 2021 7:59 pm
This topic seems to attract spammers so I’ve locked it for now. Bock can still post when Meka 0.80 comes out of beta :)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8643
  • Location: Paris, France
Reply with quote
Meka 2022-03-27
Post Posted: Sun Mar 27, 2022 7:26 pm
Adding support for new Korean mappers.
Available here:
https://github.com/ocornut/meka/releases/tag/meka-20220327
  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, 9  Next



Back to the top of this page

Back to SMS Power!