Repository: ocornut/meka Branch: master Commit: 4455e1683fbf Files: 352 Total size: 3.2 MB Directory structure: gitextract_alfk4aa8/ ├── .editorconfig ├── .gitignore ├── README.md ├── appveyor.yml └── meka/ ├── Data/ │ ├── cursor_lightphaser.tga │ ├── cursor_main.tga │ ├── cursor_sportspad.tga │ ├── cursor_tvoekaki.tga │ ├── cursor_wait.tga │ ├── flag_au.tga │ ├── flag_br.tga │ ├── flag_ca.tga │ ├── flag_ch.tga │ ├── flag_de.tga │ ├── flag_eu.tga │ ├── flag_fr.tga │ ├── flag_hk.tga │ ├── flag_it.tga │ ├── flag_jp.tga │ ├── flag_kr.tga │ ├── flag_nz.tga │ ├── flag_pt.tga │ ├── flag_sp.tga │ ├── flag_sw.tga │ ├── flag_tw.tga │ ├── flag_uk.tga │ ├── flag_unknown.tga │ ├── flag_us.tga │ ├── font_0.tga │ ├── font_1.tga │ ├── font_2.tga │ ├── gfx_dragon.tga │ ├── gfx_glasses.tga │ ├── gfx_graphicboardv2.tga │ ├── gfx_heart1.tga │ ├── gfx_heart2.tga │ ├── gfx_inputs.tga │ ├── gfx_joypad.tga │ ├── gfx_keyboard.tga │ ├── gfx_lightphaser.tga │ ├── gfx_paddlecontrol.tga │ ├── gfx_sportspad.tga │ ├── gfx_superheropad.tga │ ├── gfx_tvoekaki.tga │ ├── icon_bad.tga │ ├── icon_bios.tga │ ├── icon_hack.tga │ ├── icon_homebrew.tga │ ├── icon_proto.tga │ ├── icon_trans_jp.tga │ ├── icon_trans_jp_us.tga │ ├── machine_coleco.tga │ ├── machine_sms.tga │ ├── machine_sms_cartridge.tga │ ├── machine_sms_light.tga │ ├── rom_coleco.rom │ ├── rom_sf7000.rom │ ├── rom_sms.rom │ └── rom_smsj.rom ├── TODO.txt ├── Themes/ │ └── README.txt ├── changes.txt ├── compat.txt ├── debugger.txt ├── history.txt ├── meka.blt ├── meka.inp ├── meka.msg ├── meka.nam ├── meka.pat ├── meka.thm ├── meka.txt ├── multi.txt ├── setup.bat ├── sources.txt ├── srcs/ │ ├── Makefile │ ├── allegro4to5.cpp │ ├── allegro4to5.h │ ├── app_about.cpp │ ├── app_about.h │ ├── app_cheatfinder.cpp │ ├── app_cheatfinder.h │ ├── app_filebrowser.cpp │ ├── app_filebrowser.h │ ├── app_game.cpp │ ├── app_game.h │ ├── app_mapview.cpp │ ├── app_mapview.h │ ├── app_memview.cpp │ ├── app_memview.h │ ├── app_options.cpp │ ├── app_options.h │ ├── app_palview.cpp │ ├── app_palview.h │ ├── app_techinfo.cpp │ ├── app_techinfo.h │ ├── app_textview.cpp │ ├── app_textview.h │ ├── app_tileview.cpp │ ├── app_tileview.h │ ├── areplay.cpp │ ├── areplay.h │ ├── beam.cpp │ ├── beam.h │ ├── bios.cpp │ ├── bios.h │ ├── blit.cpp │ ├── blit.h │ ├── blit_c.cpp │ ├── blit_c.h │ ├── blitintf.cpp │ ├── blitintf.h │ ├── bmemory.cpp │ ├── bmemory.h │ ├── build.cpp │ ├── build.h │ ├── capture.cpp │ ├── capture.h │ ├── checksum.cpp │ ├── checksum.h │ ├── coleco.cpp │ ├── coleco.h │ ├── commport.cpp │ ├── commport.h │ ├── config.cpp │ ├── config.h │ ├── country.cpp │ ├── country.h │ ├── cpu.cpp │ ├── cpu.h │ ├── data.cpp │ ├── data.h │ ├── datadump.cpp │ ├── datadump.h │ ├── datasrc/ │ │ ├── README.txt │ │ ├── fonts/ │ │ │ ├── README.txt │ │ │ ├── mekafont-0-modified.tga │ │ │ ├── mekafont-0.tga │ │ │ ├── mekafont-1 (xen6).tga │ │ │ ├── mekafont-2.tga │ │ │ └── mekafont-maiandra-11.pcx │ │ ├── keyboard/ │ │ │ ├── README.txt │ │ │ └── c1.pal │ │ ├── machines/ │ │ │ ├── coleco-04.tga │ │ │ └── sms-07.tga │ │ ├── meka-gfx-all-v12.tga │ │ └── wb3.ans │ ├── db.cpp │ ├── db.h │ ├── debugger.cpp │ ├── debugger.h │ ├── desktop.cpp │ ├── desktop.h │ ├── drivers.cpp │ ├── drivers.h │ ├── eagle.asm │ ├── eagle.h │ ├── eeprom.cpp │ ├── eeprom.h │ ├── effects.cpp │ ├── effects.h │ ├── errors.cpp │ ├── errors.h │ ├── fdc765.cpp │ ├── fdc765.h │ ├── file.cpp │ ├── file.h │ ├── fonts.cpp │ ├── fonts.h │ ├── fskipper.cpp │ ├── fskipper.h │ ├── g_action.cpp │ ├── g_action.h │ ├── g_box.cpp │ ├── g_box.h │ ├── g_init.cpp │ ├── g_init.h │ ├── g_menu.cpp │ ├── g_menu.h │ ├── g_menu_i.cpp │ ├── g_menu_i.h │ ├── g_menu_t.cpp │ ├── g_menu_t.h │ ├── g_mouse.cpp │ ├── g_mouse.h │ ├── g_tools.cpp │ ├── g_tools.h │ ├── g_update.cpp │ ├── g_update.h │ ├── g_widget.cpp │ ├── g_widget.h │ ├── glasses.cpp │ ├── glasses.h │ ├── gui.cpp │ ├── gui.h │ ├── hq2x.cpp │ ├── hq2x.h │ ├── hq2x16.asm │ ├── hq2x32.asm │ ├── inputs.cpp │ ├── inputs.h │ ├── inputs_c.cpp │ ├── inputs_c.h │ ├── inputs_f.cpp │ ├── inputs_f.h │ ├── inputs_i.cpp │ ├── inputs_i.h │ ├── inputs_t.cpp │ ├── inputs_t.h │ ├── inputs_u.cpp │ ├── inputs_u.h │ ├── ioports.cpp │ ├── ioports.h │ ├── keyinfo.cpp │ ├── keyinfo.h │ ├── libmisc.cpp │ ├── libmisc.h │ ├── libparse.cpp │ ├── libparse.h │ ├── lightgun.cpp │ ├── lightgun.h │ ├── machine.cpp │ ├── machine.h │ ├── mainloop.cpp │ ├── mainloop.h │ ├── mappers.cpp │ ├── mappers.h │ ├── meka.cpp │ ├── meka.h │ ├── message.cpp │ ├── message.h │ ├── misc.cpp │ ├── misc.h │ ├── palette.cpp │ ├── palette.h │ ├── patch.cpp │ ├── patch.h │ ├── periph.cpp │ ├── periph.h │ ├── platform/ │ │ └── macosx/ │ │ ├── osxhelpers.h │ │ └── osxhelpers.mm │ ├── projects/ │ │ ├── msvc/ │ │ │ ├── Meka.opt │ │ │ ├── Meka.plg │ │ │ ├── Meka.rc │ │ │ ├── Meka.sln │ │ │ ├── Meka.vcxproj │ │ │ ├── Meka.vcxproj.filters │ │ │ ├── meka.RES │ │ │ ├── meka.manifest │ │ │ ├── packages.config │ │ │ └── resource.h │ │ └── xcode/ │ │ └── meka/ │ │ └── meka.xcodeproj/ │ │ ├── project.pbxproj │ │ └── project.xcworkspace/ │ │ └── contents.xcworkspacedata │ ├── rapidfir.cpp │ ├── rapidfir.h │ ├── saves.cpp │ ├── saves.h │ ├── sdsc.cpp │ ├── sdsc.h │ ├── setup.cpp │ ├── setup.h │ ├── sf7000.cpp │ ├── sf7000.h │ ├── sg1ksc3k.cpp │ ├── sg1ksc3k.h │ ├── shared.cpp │ ├── shared.h │ ├── sk1100.cpp │ ├── sk1100.h │ ├── skin.cpp │ ├── skin.h │ ├── skin_bg.cpp │ ├── skin_bg.h │ ├── skin_fx.cpp │ ├── skin_fx.h │ ├── smsid/ │ │ ├── packages.config │ │ ├── smsid.cpp │ │ ├── smsid.vcxproj │ │ ├── smsid.vcxproj.filters │ │ └── smsid_stubs.cpp │ ├── sound/ │ │ ├── emu2413/ │ │ │ ├── 2413tone.h │ │ │ ├── emu2413.cpp │ │ │ ├── emu2413.h │ │ │ ├── emutypes.h │ │ │ ├── mekaintf.cpp │ │ │ ├── mekaintf.h │ │ │ └── sample.cpp │ │ ├── fmeditor.cpp │ │ ├── fmeditor.h │ │ ├── fmunit.cpp │ │ ├── fmunit.h │ │ ├── psg.cpp │ │ ├── psg.h │ │ ├── s_misc.cpp │ │ ├── s_misc.h │ │ ├── sound.cpp │ │ ├── sound.h │ │ ├── sound_logging.cpp │ │ ├── sound_logging.h │ │ ├── vgm.cpp │ │ ├── vgm.h │ │ ├── wav.cpp │ │ └── wav.h │ ├── sportpad.cpp │ ├── sportpad.h │ ├── system.h │ ├── textbox.cpp │ ├── textbox.h │ ├── tools.cpp │ ├── tools.h │ ├── tvoekaki.cpp │ ├── tvoekaki.h │ ├── tvtype.cpp │ ├── tvtype.h │ ├── unzip.cpp │ ├── unzip.h │ ├── vdp.cpp │ ├── vdp.h │ ├── video.cpp │ ├── video.h │ ├── video_c.cpp │ ├── video_c.h │ ├── video_m2.cpp │ ├── video_m2.h │ ├── video_m5.cpp │ ├── video_m5.h │ ├── video_sp.cpp │ ├── video_t.cpp │ ├── vlfn.cpp │ ├── vlfn.h │ ├── vmachine.cpp │ ├── vmachine.h │ └── z80marat/ │ ├── Codes.h │ ├── CodesCB.h │ ├── CodesED.h │ ├── CodesXCB.h │ ├── CodesXX.h │ ├── Debug.cpp │ ├── Tables.h │ ├── UNDOC.TXT │ ├── Z80.cpp │ ├── Z80.h │ ├── Z80Call.cpp │ ├── Z80DebugHelpers.cpp │ ├── Z80DebugHelpers.h │ ├── Z80OpcodeEnums.h │ ├── dasm.cpp │ └── todo ├── tech.txt └── tools/ ├── dist_bin_osx.sh ├── dist_bin_win32.bat └── dist_osx/ └── Meka.app_template/ └── Contents/ └── Info.plist ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ # editorconfig.org # top-most EditorConfig file root = true # Default settings: # Use 4 spaces as indentation [*] indent_style = space indent_size = 4 [Makefile] indent_style = tab indent_size = 4 ================================================ FILE: .gitignore ================================================ # User data meka/Debug meka/Music meka/Saves meka/Screenshots # Builds meka/Dist # Developer data meka/objs meka/meka meka/meka.cfg meka/meka.dsk meka/meka.fdb meka/meka meka/mekaw.cfg meka/mekaw.exe meka/mekaw.ilk meka/smsid.exe meka/smsid.ilk meka/srcs/obj meka/srcs/projects/msvc/Meka.ncb meka/srcs/projects/msvc/.vs meka/srcs/projects/msvc/packages/ meka/libs/allegro meka/libs/allegro_deps allegro.log imgui.ini *.opensdf *.sdf *.suo *.ipch .vs/ *.vc.db *.user .*.swp *~ .*~ ================================================ FILE: README.md ================================================ MEKA ==== - Homepage: http://www.smspower.org/meka - Forum: http://www.smspower.org/forums/f7-MEKA Latest Beta Windows binaries: - https://github.com/ocornut/meka/releases - Also may want to follow this thread: http://www.smspower.org/forums/13019 MEKA is a multi-machine emulator. The following machines are supported by MEKA: - Sega Game 1000 (SG-1000) - Sega Computer 3000 (SC-3000) - Sega Super Control Station (SF-7000) - Sega Mark III (+ FM Unit) - Sega Master System (SMS) - Sega Game Gear (GG) - ColecoVision (COLECO) - Othello Multivision (OMV) Along with a wide range of peripherals and exotic games support. MEKA should compile for MS-Windows, GNU/Linux and OSX (older versions support MS-DOS). MEKA was started in 1998 and first released on April 3rd 1999. It was my first major C project, so the codebase is old, ugly and messy! It is still being updated sometimes. In spite of its old age and very clunky technology, MEKA is among the most exhaustive Sega 8-bit emulator in term of coverage of obscure games, peripherals. And also provide competent debugging and reverse engineering tools. It is still maintained for those purpose but doesn't has much use for the average player. Credits ------- (old pre-github credits from meka.txt) ``` Omar Cornut (Bock): Main development, coordination Marat Fayzullin (RST38H): Zilog Z80 CPU emulation core. Implemented with modifications in MEKA. Mitsutaka Okazaki: Software Yamaha 2413 emulator (EMU2413). Maxim: Software PSG emulator. Hiromitsu Shioya (Hiro-shi): Original sound engine (now obsolete). Ulrich Cordes: FDC765 emulator for SF-7000. Implemented with modifications by Marc Le Douarain. Valerie Tching (Kittie): Initial version of the Memory Editor. Johan Euphrosine (Proppy): GNU/Linux+OSX tweaks. DJRobX: Blitters and video improvements, HQ2X interface. Maxim Stephin (MaxSt): HQ2X graphics filter. Dirk Stevens: Eagle graphics filter. ``` Clone ----- ``` git clone --recursive https://github.com/ocornut/meka.git meka ``` Build ----- - Windows: Using Visual Studio 2022 (free community edition is ok), open `meka/srcs/projects/msvc/Meka.sln` and build. The project is setup to grab dependencies (Allegro, Nasm) using Nuget. - Linux: `cd meka/srcs ; make` - OSX: `cd meka/srcs ; make` or open `meka/srcs/projects/xcode` with xcode (may be not up to date) This project is looking for Linux and OSX maintainers. Gallery ------- ![Debugger Screenshot](http://www.smspower.org/forums/files/meka_080_wip_debugger_823.png) ![Debugger Screenshot](http://www.smspower.org/meka/gallery/meka072-wip-sagaia.png) ================================================ FILE: appveyor.yml ================================================ version: 0.8.{build} image: Visual Studio 2022 configuration: Release before_build: - cmd: nuget restore meka/srcs/projects/msvc/meka.sln build: project: meka/srcs/projects/msvc/meka.sln verbosity: minimal after_build: - cmd: pushd meka\tools - cmd: echo | dist_bin_win32.bat artifacts: - path: 'meka/Dist/*.zip' ================================================ FILE: meka/TODO.txt ================================================ feature request: add game name to the front of the window title text because the video capture uses that for the capture filename dasm 81e1 in wb3 is broken If you are going to work on it, maybe you can take the opportunity to also add full support for graphics modes 1 & 2 in the Tiles Viewer and Tilemap Viewer? Right now the Tiles Viewer only shows up to 512 tiles but graphics 2 supports up to 768. Also Tiles Viewer doesn't seem to use the color table (even though the game screen view seems to use it properly) Memory Leak Border Color emulation Debugger: STEP OVER broken on line with breakpoint MemoryViewew: input register/expr in ADDR field <48 KB rom should heuristically detect possible use of sega mapper by counting of LD (FFFx),A and discarding those who have also have load in E000.FFF0 range. Trackback: optimistically assume that disassembled lines (after >PC) can be included in trackback Trackback: replace by ROM sized bitfield? Easy save slot select in menu? - it crashes when I lock the workstation (WinXP) - single key shortcuts (with F6 and F7 keys for example) for run over (continue to next) and run into (enter) calls so that I can debug with two fingers on the keyboard and two eyes on the screen :) I just noticed this thread and after fixing this, it appeared that the Korean version of "Circus Charlie" also needs 2KB of RAM at $c000-$ffff breakpoint crashes fm registrers viewer http://www.smspower.org/forums/viewtopic.php?p=76979#76979 Menu note: - CTRL+F12 in SK-1100 mode - FPS counter toggle - F1,F2,F3,F4 -- Hey there, I was so happy to see my favourite SMS emulator was having another update! I downloaded the most recent beta in this thread, and discovered that it doesn't like being installed over 0.73, throwing up sound buffer errors. Doing a clean install removes this. I've not had time to do much further testing, however one small UI issue that's always been there, and I'd like to see fixed if possible please, is the inability to set controllers outside of the order that Windows sees them in. To explain: You can't change 3/6 Joypad 1 to Player 2, nor can you click it's controls and input any other controller except the one listed first by Windows. In my case, I have currently an MS Sidewinder Pro Flightstick and a Logic3 Arcade Stick both in USB ports, and Joypad 1 will only take input from the Sidewinder. 4/6 Joypad 2 takes the Arcade stick input, but not the Flightstick in turn. Suggested Solution: Drop down box to map specific controller to Player X, or allowing Player 1 to be swapped with Player 2 with a click on that line in the box, thus swapping what controller it maps too. -- My build is the 2012/12/31. markvt: The 'delete' key does not work in the cheat finder for me, only the 'backspace' key does allow to remove a value in the search box. Is there any emulator/setting that handles the Sports Pad input in a way that makes the games playable? Meka allows to use the mouse for it, but it always stops where the mouse pointer would reach the border of the screen. I've tried some other emulators, but none of them seemed to support it at all... [B] Debugger: Variables window with live filter. [B] Debugger: Preview memory regions on hovering register/instruction. Add a super-fast mode (faster than 1/9 for CLOCK-ing things like zexall) Debugger seems generally weird at 1/9 frameskip, stepping instructions when not expected?) > As for the 1/9 bug: I think it is to do with the keyboard repeat code. Entering "j 0" gets me to 0 + however many instructions the debugger thinks I have held down Enter for. In frameskip mode I guess it is interpreting repeats after a very short pause. It ought to be realtime-based instead of emulated-frame-based? E-SWAT http://smspower.org/forums/viewtopic.php?t=8069 Mapper_Get_RAM_Infos: Support for multiple RAM regions (eg: Taiwanese 8 KB RAM adapter mapper) Debugger: option to auto-start on ROM load (one can always do a RESET) Debugger: Add "Did you mean $XX" when parsing register name that matches two digit hex number (eg: DE) SF-7000 emulation: write always access to RAM (even when ROM is mapped) - via honestbob Z80 PC history command (great to figure out caller) Z80 branch history command callee address loop 1 loop 2 .. loop 3 .. ret Meka 0.80 check list [A]- fix sound: latency, 50 hz, other modes? - obsolete/hide blitter interface - debug version leaves allegro.log is current directory - start window is in background when running from explorer - solve vsync and refresh rate issues, at least be able to enable vsync? - have a pass at checking all features //- tilemap viewer: mode 2: print more infos. add more addr settings. - new feature: sprite viewer? - new feature: audio channel disable? (psg & fm) - reorganize inputs configuration panel? - pro action replay - end-user timing (message time, double click) shouldn't be measured in emulated frames - incorrect rom on command-line leaves a zombie thread? (sometimes?) //- gui: show shortcuts - GUI HOVERING SCROLL BAR BROKEN In Hang-On (Safari Hunt) -> glitch even in PAL mode I've noticed that part of the track shows in the background where it shouldn't (shown in screen shot with a highlighted red square box), also in regards to the track itself when it turns left or right, the track kind of looks like it judders. Other than that not noticed any other problems and nice work on the sound :), works fine with my Creative X-Fi Xtreme Gamer, also forgot to mention I'm using the latest 0.80 build. - bug reports: - "When pausing with the F12 button, the screen becomes out of align by showing a bottom border and a right border. " - "Sometimes the mouse freezes for a couple of seconds. (I got this 3 times in about a 20 minute play). " - "I plugged in a USB-PSX converter before starting again and it did not crash then but any input instantly went Stick 0 Axis 0 -" ---------- Super Boy II (KR).sms is 48 KB with duplicated 16 KB 5 GG dumps http://smspower.org/forums/viewtopic.php?p=64723#64723 I would like Meka v0.74 to contain a Extra Debug mode called ''Sprite/OAM Viewer'' as seen by some modern emulators such as BGB/No$GMB/NO$C64/Etc. Not only that, SG1000/SC3000/Ect. and compatible Sprite and Name Table viewer. Can be used as a reference to gain more programmers for older SEGA systems But the only SEGA console emulators with Sprite viewer capability is a few 16bit Genesis/Mega Drive, Which I could not find a modern one yet besides NES/GB(Color) stuff. So I think it will be more helpful to debuggers for doing Sprites, if there is one for MEKA, It will become superior to the other Z80+VDP emulators. Beating MSX(2/+) Somehow - Speed above 1/9 (for zexall) Debugger: Count point. or full memmap count points. (Actually, some way to enter a super-turbo-fast-forward mode (more than 1/9 frameskip) might be nice, especially if it can still hit a breakpoint directly. Debugger seems generally weird at 1/9 frameskip, stepping instructions when not expected?) Fix default .sc mapper (eigo sakubun) Namely if ROM is bigger than 32 KB don't stupidely ignore the rest of the data!! Debugger: Many interesting mails from Maxim! Debugger: Add support for F register in SET command (or individual flag, ZF, CF, etc.) Command line file not found = Win32 console crash /------------------\ /-| MEKA TODO LIST |-------------------------------------------------\ | \------------------/ | | Todo: | | - Clean this list, add a bug-priority system. | | Maybe switch to an internet bug tracking software? | |----------------------------------------------------------------------| | Note: | | - MEKA IS FULL OF INCORRECT EMULATION BEHAVIOURS. | | MEKA IS NOT THE BEST REFERENCE OF HOW THINGS ARE OR WORKS. | | CONSULT TECHNICAL DOCUMENTATION INSTEAD (eg: SMS Power! dev wiki). | | IF YOU HAVE ANY DOUBT, FEEL FREE TO ASK. | |----------------------------------------------------------------------| | Packager Note: Always make plenty of verifications before packaging. | | - Check MEKA.INP | | - Check MEKA.MSG content, WIP, merge updates | | - Package a default generated .CFG file | |----------------------------------------------------------------------| | Main axises of work: | | - fix sound engine (timing problem, ask me, I can explain why) | | - improved video (blitters, stretching, sync, triple buffering) | | - inputs system improvement (analog sources, map all features, etc) | | - full featured debugger/hacking tools | | - fill new database entries (redump/sort) | | - tape emulation | | - better SF-7000 disk support (write & save) | | - new savestate format + better manager (icons, etc) | \----------------------------------------------------------------------/ ----------------------------------------------------------------------------- THE YET UNSORTED MESS (this is my notepad basically) ----------------------------------------------------------------------------- Define a string in the config file, eg: debug_breakpoint_label_prefix = "break_" Then, when loading .sym files, automatically add breakpoints on matching labels. This saves me typing "b