Giter Site home page Giter Site logo

ocornut / meka Goto Github PK

View Code? Open in Web Editor NEW
290.0 290.0 47.0 59.57 MB

MEKA - Sega 8-bit emulator with debugging/hacking tools

Home Page: http://www.smspower.org/meka

C++ 76.33% C 16.34% Max 0.59% Makefile 0.90% Assembly 5.50% Batchfile 0.04% Shell 0.09% Objective-C++ 0.20%

meka's People

Contributors

amoibos avatar barbeque avatar blind avatar bsittler avatar dehaas-j avatar lucianoloder avatar markvantilburg avatar maxim-zhao avatar miniupnp avatar mjunix avatar mrsvcd avatar ocornut avatar sverx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meka's Issues

SG-1000 RAM: 4 KB vs 1 KB.

When loading a .sg file, Meka emulates 4 KB of RAM, mapped twice (at 0xc000 and 0xd000). However, AFAIK, the SG-1000 has just 1 KB of RAM mapped eight times (at 0xc000, 0xc400, 0xc800, etc), similar to the ColecoVision.

Philipp

Mapper type 11, memory requirements

The games with mapper 11 ( described as : no mapper, ROM up to 48KB (typically 32KB) ), for instance Magical Kid Wiz, appear to be requiring 8Kb of ram. The games are however listed with type SG1. SG1000 has 1Kb ram, SC3000 has 2Kb ram, so they do not work unless the system is emulated with an incorrect amount of ram.
Either the description for mapper 11 may be changed or the system of the games may be changed to SMS .

show the overscan area

It would be nice to be able to toggle the visibility of the overscan area in the window.

(this is a feature request)

Squares in filenames

I use meka 0.80-alpha 0e59470 on Debian GNU/Linux.
In the "Load ROM dialog", non-ASCII characters in filenames appear as squares.

Philipp

Stereo sound

Meka mixes Game Gear stereo down to mono. I think it needs to treat all audio as stereo, extending up to stereo for YM2413.

I had a go at doing it myself but fell down at the Allegro/audio buffering parts, where we need to multiply or divide some numbers by 2 to get the right result.

Paste & Copy

Would it be possible to implement something like paste & copy?

My aim is to preserve listings from magazines by typing them in.

Another oddity:
As an example, I typed a little "Hello world" within Level III Basic and saved it.
All seemed to work good, because it prompted something like "Starting to save -- and then save ended" or so but the program was nowhere to find. Did I do something wrong?

Memory dump debugger command output corrupted by % characters

If I have some text in ROM like %1 then this messes up the debugger MEM dump:

0520-0527 | 21 54 68 65 20 73 74 72 | !The str
0528-052F | 69 6E 67 20 69 6E 20 56 | ing in V
0530-0537 | 52 41 4D 20 73 61 79 73 | RAM says
0538-053F | 3A 20 25 73 6D 62 00 10 | : p񙭢..
0540-0547 | 0A 00 21 21 05 CD F7 06 | ..!!....
0548-054F | 18 1F 54 68 65 20 66 69 | ..The fi
0550-0557 | 66 74 68 20 63 68 61 72 | fth char
0558-055F | 61 63 74 65 72 20 69 73 | acter is
0560-0567 | 20 25 61 6D 62 D7 06 0A |  0x1.9f7940019f788p-1022mb...
0568-056F | 00 21 4A 05 CD F7 06 18 | .!J.....
0570-0577 | 02 0A 00 21 71 05 CD F7 | ...!q...
0578-057F | 06 18 0E 44 61 74 61 20 | ...Data 
0580-0587 | 73 6F 75 72 63 65 73 0A | sources.
0588-058F | 00 21 7B 05 CD F7 06 21 | .!{....!
0590-0597 | AA 55 22 01 C0 3E 00 D3 | .U"..>..
0598-059F | BF 3E 40 D3 BF 3E 76 D3 | .>@..>v.

The % is at $53a. Presumably this is being passed to printf in an unsafe way..?

file cant be found.

I was trying out the Mekaw .80 and when I clicked on the .exe file it would tell me that it could not find the meka.msg file.
I had also tried earlier version of Mekaw such as .73 and that one said it could not find the audiow32.dll. Ironically the files seem to be there. I do not know if I am not installing it properly. I had used earlier version a few years ago and it worked quite well.

Mac binary?

Where can I find the latest binary?

Or (easily) buildable Mac source?

Segmentation fault

I didn't use meka for quite some time. This was likely the first time I tried it under Fedora 33/x86_64.

Most of the times I start meka-20210726 I get a segmentation fault.

Backtrace:

Thread 1 "meka" received signal SIGSEGV, Segmentation fault.
0x00007ffff7a13ab5 in __memcpy_ssse3 () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff7a13ab5 in __memcpy_ssse3 () from /lib64/libc.so.6
#1  0x00007fffe460d16e in st_TexSubImage () from /usr/lib64/dri/nouveau_dri.so
#2  0x00007fffe479fbd7 in texture_sub_image ()
   from /usr/lib64/dri/nouveau_dri.so
#3  0x00007fffe47a2e9c in texsubimage_err () from /usr/lib64/dri/nouveau_dri.so
#4  0x00007fffe47a8ac9 in _mesa_TexSubImage2D ()
   from /usr/lib64/dri/nouveau_dri.so
#5  0x00007ffff7f07742 in _al_ogl_unlock_region_new ()
   from /lib64/liballegro.so.5.2
#6  0x00007ffff7e87f73 in al_unlock_bitmap () from /lib64/liballegro.so.5.2
#7  0x0000000000440054 in TileViewer_Update (app=<optimized out>)
    at app_tileview.cpp:226
#8  gui_update_applets () at g_update.cpp:49
#9  0x0000000000415a4d in Video_RefreshScreen () at video.cpp:436
#10 0x000000000041c6fd in Main_Loop_No_Emulation () at mainloop.cpp:108
#11 Main_Loop () at mainloop.cpp:68
#12 0x0000000000408465 in main (argc=<optimized out>, argv=<optimized out>)
    at meka.cpp:434

I also downgraded to meka-20191213 and I have the same behaviour.

Inputs: allow to use gamepad along with SK-1100 enabled

Currently enabling keyboard emulation disable joystick emulations.
Those could work together on the same time if the other has gamepad plugged in.
Would facilitate the use of SC-3000 software which often alternate between the two.

Translation to Russian

Snap_001_MEKA - In Pixels We Trust-
Need support utf-8 or Windows-1251? Translated a couple of lines into Russian and this is the problem.

Thanks

Thanks for Meka... I hadn't used it in over a decade, found the website with a recent-ish update, then came here and only just realised you are the ImGUI guy :)

Building on Raspberry Pi 3 Errors

I tried following the instructions here for building Allegro and MEKA from source:
https://github.com/ocornut/meka/wiki/Building-on-ubuntu-linux

I build liballegro from git, sudo cmake, sudo make, sudo make install, and sudo ldconfig
Looks like that all runs fine.

When I try to compile Meka it has lots of undefined references to al_draw_bitmap, al_flip_display, etc (all the allegro functions, there are pages and pages of them). So it's not picking up the allegro library, which is all sitting in /usr/local/lib.

I can try sudo apt-get install liballegro5-dev, it works and will compile, but silently crashes with no error on loading the msg file, running from the same directory with it. So I removed it and just rebuilt allegro from source again, Meka won't compile though, looks like it can't find the allegro libs for some reason.

Am I missing anything?

UPDATE: I managed to get Meka to compile by copying the files in the pkg-config dir under /usr/local/lib from 5 to 5.0 (i.e. liballegro-5.pc to liballegro-5.0.pc). Still getting GL errors (0x501) but that may be related to RetroPie's driver implementation.

Default resolution if meka.cfg included in the release

In this build: meka-2015-05-06-win32-proto.zip (1002.45 KB) the .cfg file is included.

If the cfg is meant to be bundled then i would suggest to use a lower resolution for the included .cfg file as 1280x960 is not a real common resolution, maybe default to 1024x768 instead.

OSX port / maintainer

Following discussion on
http://www.smspower.org/forums/15120-MEKANeedsAMacOSXDeveloperMaintainer
cc: @blind

blind's fork is
https://github.com/blind/meka/tree/feature-macosx

Sorry I didn't have time to look at it. I'd really like to move that forward.
The reason I included binaries for Windows is that it is such a nightmare to compile anything under Windows. However my intuition was that OSX had good-enough packaging system that you could grab Allegro from somewhere? Just curious.

Incorrect TMS9918 color table mask

In mode 2, Meka uses the mask derived from the lower bits of the pattern table register both for the pattern table and the color table. But AFAIK for the TMS99* the color table uses a separate mask derived from the lower bits of the color table register.
I guess this could be fixed by having a separate mask for the color table in Display_Background_2 in https://github.com/ocornut/meka/blob/master/meka/srcs/video_m2.c
I do not know how the SMS1 VDP behaves in that respect.

Philipp

Sega Genesis controller for master system

Sega Genesis controllers can be used on a master system. I'd like to see both the 3-button and 6-button version in the "Input Configuration" dialog.
Many, but not all SMS games just work with the Genesis controllers. Correctly emulating them would also allow game authors to check that their games work ok with Genesis controllers, or even allow authors to test games that use the extra buttons for gameplay.

Philipp

SC-3000 RAM: 32 KB vs 2 KB.

When loading a .sc file, Meka emulates 32 KB of RAM, mapped once (at 0x8000). However, AFAIK, the SC-3000 has just 2 KB of RAM mapped four times (at 0xc000, 0xc800, 0xd000, etc), similar to the ColecoVision.

Philipp

Documentation: Which machine is emulated?

I cannot find any documentation on how to make Meka emulate a certain machine. From trying, it seems, .rom files are considered ColecoVision binaries and .sms files are considered Sega Master System files, but I'm not sure if that is true, or maybe Meka detected the ColecoVision header in my .rom file instead. On smspower.org someone suggested .sc when I asked for SG-1000 and SC-3000 emulation. But I have no idea if that is true (and from the lack of memory address aliasing, it probably is not).
Meka documentation should clearly state how to make Meka emulate a particular machine.

Philipp

Window should be resizable

I’ve been experimenting with Allegro’s resizable window support and got something working with some bugs. PR to come when they are fixed.

Fix linking with allegro5 > 5.0

If you have installed a version of allegro5 > 5.0 (for example, in Fedora 24 there is allegro5-5.2.0), the linking will fail.

You can fix this with the following command:
sed -i 's/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/pkg-config --cflags --libs allegro-5 allegro_image-5 allegro_audio-5 allegro_font-5 allegro_primitives-5 allegro_ttf-5/' srcs/Makefile

gnu/linux port

if someone can help porting to gnu/linux, and perhaps packing as .deb for Debian/Ubuntu/PPA repositories, please do! :)

Graphical interface corruption under FreeBSD

It's nice that compiling for FreeBSD has been fixed, but there's something very wrong with the tiles viewer, tilemap viewer and even the background on some of the themes. The following screenshot is using the ninja gaiden theme. The themes with the grid background are rendered correctly, but there's no way to get the tiles viewer and tilemap viewer to work.

Screenshot_2022-08-17_21-54-18

I can test patches or send any debugging info needed.

TV type for ColecoVision

It seems the TV type setting does not work for the ColecoVision. In the ColecoVision BIOS, the byte at 0x69 contains the frequency of the vertical retrace interrupt. Reading this byte always gives 60 in Meka, even though it should be 50 when the emulation is set to PAL/SECAM.

Philipp

"Ninja Princess SG-1000" crashing problem

For a long time now I've dreaded playing Ninja Princess on this emulator, that is because every single time I load it into the emulator, the program will either crash or even worse, give me computer a blue screen.

I've heard that it might have something to do with the rom file size, which is 32kb. It seems to be the correct file size according to Sega Retro.

I should also say that every other emulator I've ran it with runs it perfectly fine, so I definitely know it's the emulator's issue.

VDP Register 1 bootup issue

The unmodified Sonic's Edusoft rom will fail to run under pretty much all of the emulators safe for the ones that require a BIOS and do not manually set the VDP bits.
According to Bork here http://www.smspower.org/forums/9109-UnreleasedTiertexGameSonicEdusoft, setting VDP Register 1 to 0xA0 will allow the game to boot and i can confirm that it does fix it.
(It also fixes it on other unrelated emulators like SMS Plus)

He did comment and say that someone should check the value all the BIOSes out there set that bit to.
Since i was working on my fork of SMS Plus GX to fix that issue, naturally i did.

Also somewhat unrelated but MEKA sets the VDP registers back to default values, regardless of the BIOS you are using.

VDP Register 1 with the following BIOSes (Tested under SMS Plus GX, as i couldn't get most of the BIOSes below to boot a game on MEKA, bar the one that comes with it...):


Prototype BIOS v1.0 (1986)
626b3453613e43d5a47908a8944ba583  SMS Prototype (v1.0) [Proto] [BIOS].sms
0x80, 0xc0 then 0xe0

US/European BIOS v1.3 (1986)
840481177270d5642a14ca71ee72844c  bios13fx.sms
0xa0 then 0xe0

US/European BIOS v2.4 with Hang On and Safari Hunt (1988)
02cbb2e348945c9ac41e37502a58ca76 HSHBIOS.sms
0xa0 then 0xe0

US/European BIOS with Alex Kidd in Miracle World (1990)
e8b26871629b938887757a64798df6dc  akbios.sms
0xa0 then 0xe0

European BIOS with Sonic The Hedgehog (1991)
4187d96beaf36385e681a3cf3bd1663d  SONBIOS.sms
0x80 then 0xc0 
(It fails to boot Sonic's Edusoft but it can boot other games. It's stuck on the Sega logo. Checksum failure ?)

Korean Samsung Gam*Boy/Aladdin Boy II BIOS with Alex Kidd in Miracle World
e49e63328c78fe3d24ae32bf903583e0  Alex Kidd in Miracle World [BIOS] (KR).sms
0x0 for a while, 0xa0, then 0xe0

Seems to be consistently 0xE0 and i can confirm setting VDP Register 1 to 0xE0 does allow the game to boot.

Why was it set to 0x80 ? SG-1000 stuff ? Megadrive perhaps ?
The only time i see it is during early bootup on most BIOS revisions
but even then, not all of them do that.
Looking at the documentation related to the VDP left me empty handed.

SDL Port?

Have there been any discussions to a potential SDL port? I am not quite familiar with all the inner workings of MEKA yet (although I was an avid user back in the early 00s when I was in "the scene"), so I don't know what MEKA relies on in terms of the Allegro libs.

Whilst I like Allegro - it was my lib of choice for years, SDL is much more widely supported on many platforms, the most exciting of which being html/javascript, so we could see MEKA running in a browser, and I think that would be pretty awesome. I've got quite a bit of experience in that, so that's something I could assist with.

I'll take a look at the code whilst waiting for a reply

Incorrect display of letters with accents in the setup and more

As you can see in the pic below the words "Português", "Français" and "Español" arent correctly displayed at startup. From what i saw in the emu window itself the translation is applied correctly.

Sem título

This also can be seen in the console, pic below:

characters

The text doesnt fit in the buttons in the left bottom of the Load Rom screen.

meka-01

I also found that the options window is too small and the translation doesnt fit, see the line before the last one:

options

It would be good if all windows in the GUI auto-resized themselves to fit the translations since words/phrases in other languages than english sometimes have bigger lenghts.

the Palette tool keeps on growing

If I keep the Palette tool open, its vertical size will increase (probably one pixel?) each time I close and open the emulator.
I'm running on Linux, not sure if this is Linux related anyway.

update Android version

Meka.apk 20191218
My Phone Android 12
It was updated by infinitesimalau on 20200402
and paulc-fugro on 20200424
#53
It should support 64-bit hardware
But I can only get a 32-bit old version build
Screenshot_20230104-193826_Trebuchet
Screenshot_20230104-193915_Trebuchet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.