Git Product home page Git Product logo

clownmdemu-frontend's Introduction

Logo

Try It Yourself

You can try clownmdemu in your web browser at clownmdemu.clownacy.com.

Overview

This is clownmdemu, a Sega Mega Drive (a.k.a. Sega Genesis) emulator.

It is currently in the very early stages of development: it can run some games, but many standard features of the Mega Drive are unemulated (see clownmdemu-frontend-common/clownmdemu/TODO.md for more information).

Minimal Debug

The repository contains clownmdemu's standalone frontend; it is written in C++11 and leverages the SDL2, Dear ImGui, FreeType, and inih libraries. On Unix platforms, there is also an optional dependency on the Zenity and kdialog projects.

Controls

The default control scheme is as follows:

Keyboard

  • Up = Up
  • Down = Down
  • Left = Left
  • Right = Right
  • Z = A
  • X = B
  • C = C
  • Enter = Start

Controller

Hotkeys

  • Pause = Pause
  • Space = Fast-forward (unpaused), frame-advance (paused)
  • R = Rewind
  • Tab = Soft reset
  • F1 = Toggle which Control Pad the keyboard controls
  • F5 = Create save state
  • F9 = Load save state
  • F11 = Toggle fullscreen

Licence

clownmdemu is free software, licensed under the AGPLv3 (or any later version). See LICENCE.txt for more information.

clownmdemu-frontend's People

Contributors

clownacy avatar devon-artmeier 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clownmdemu-frontend's Issues

Minimising window causes emulation to slow to a crawl

This could be an 'optimisation' that SDL2 makes to reduce energy consumption. Or perhaps it is related to V-sync. All I know for sure is that it is, and always has been, extremely annoying. Yes, you can't see the emulation when the window is minimised, but you sure can hear it.

Working directories are spammed with configuration files

Clownmdemu-frontend currently stores and loads configuration files in the current working directory instead of a sane shared path (e.g. %AppData%\Clownmdemu on Windows or ~/.config/Clownmdemu on Linux or just the directory it was compiled in).

If you add clownmdemu-frontend to PATH on either OS and invoke it from CLI like so ...

clownmdemu-frontend rom.bin

... it leads to a few side effects:

  1. clownmdemu-frontend spams every working directory with 2 .ini files:
    • clownmdemu-frontend.ini
    • clownmdemu-frontend-imgui.ini
  2. Configuration files are re-created every time, which means they aren't persistent and don't have a single source of truth.

It took me a few invocations of Clownmdemu from various directories to get my entire work tree spammed like so:

Screenshot_20240217_175718

This is the reason most of the programs store configuration files in a shared directory instead of the current working one.

First frame going backwards is forwards

It seems that the first frame in which you hold (or let go of) the reverse button still goes forward, and the first frame in which you let go of the reverse button still goes backwards. This is best observed with the frame-advance function, though I think it happens regardless of whether you pause emulation or not.

Build Errors against v0.6 tag

Hi, I've been following the progress of this project for the past few months now and I've only just attempted to carry out a build! The following following errors were encountered.

CDReader

[ 48%] Building CXX object CMakeFiles/clownmdemu-frontend.dir/cd-reader.cpp.o
In file included from /home/manderc3/stuff/code/clownmdemu-frontend/cd-reader.cpp:1:
/home/manderc3/stuff/code/clownmdemu-frontend/cd-reader.h:23:14: error: extra qualification ‘CDReader::’ on member ‘Close’ [-fpermissive]
   23 |         void CDReader::Close() { stream = nullptr; }
      |              ^~~~~~~~
/home/manderc3/stuff/code/clownmdemu-frontend/cd-reader.h:24:14: error: extra qualification ‘CDReader::’ on member ‘IsOpen’ [-fpermissive]
   24 |         bool CDReader::IsOpen() const { return stream.get() != nullptr; }
      |              ^~~~~~~~
/home/manderc3/stuff/code/clownmdemu-frontend/cd-reader.h:25:14: error: extra qualification ‘CDReader::’ on member ‘SeekToSector’ [-fpermissive]
   25 |         void CDReader::SeekToSector(cc_u32f sector_index);
      |              ^~~~~~~~
/home/manderc3/stuff/code/clownmdemu-frontend/cd-reader.h:26:16: error: extra qualification ‘CDReader::’ on member ‘ReadSector’ [-fpermissive]
   26 |         Sector CDReader::ReadSector();
      |                ^~~~~~~~
make[2]: *** [CMakeFiles/clownmdemu-frontend.dir/build.make:118: CMakeFiles/clownmdemu-frontend.dir/cd-reader.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: CMakeFiles/clownmdemu-frontend.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Removing CDReader:: from the declaration of the affected member functions gets me past the errors.

SDL_HINT_WINDOWS_DPI_SCALING

[ 68%] Building CXX object CMakeFiles/clownmdemu-frontend.dir/frontend.cpp.o
/home/manderc3/stuff/code/clownmdemu-frontend/frontend.cpp: In function ‘bool Frontend::Initialise(int, char**, const FrameRateCallback&)’:
/home/manderc3/stuff/code/clownmdemu-frontend/frontend.cpp:998:21: error: ‘SDL_HINT_WINDOWS_DPI_SCALING’ was not declared in this scope
  998 |         SDL_SetHint(SDL_HINT_WINDOWS_DPI_SCALING, "1");
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/clownmdemu-frontend.dir/build.make:286: CMakeFiles/clownmdemu-frontend.dir/frontend.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: CMakeFiles/clownmdemu-frontend.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

SDL_HINT_WINDOWS_DPI_SCALING is a Windows specific hint, any reference to it should be wrapped within a suitable preprocessor guard.

Happy to submit a pull request to address the above issues. :)

Environment Details

  • Commit: b45d72c (tag v0.6)
  • OS: Ubuntu 22.04
  • Arch: x86-64
  • CMake Version: 3.26
  • Compiler: gcc/g++ 11.4.0

Build steps

Checkout Reposistory

git clone https://github.com/Clownacy/clownmdemu-frontend

Recursive Init of Submodules

git submodule update --init --recursive

Build

mkdir build
cd build
cmake ..
make

VDP debuggers are one frame ahead of the actual game

An example, from Sonic Classic Heroes (note that this was taken from the demo mode, as the game crashes upon reaching the main menu):
image
Note that the shield graphics in the sprite viewers do not match what's on-screen. Also, the timer is a frame ahead.

While I first noticed this with the sprite debuggers, the VRAM, CRAM, Plane A, Plane B, and Window Plane debuggers have this problem too. I have no idea if non-VDP debuggers are affected.

Incorrect plane viewer tile index values

Something seems to be wrong with the plane viewer in that tile indexes do not present the correct values:

image

The "A" I highlighted should be described as tile 1681/0x691, palette line 2, but is described as tile 0/0x0, palette line 0. It's not just that they're blank; I've also noticed instances elsewhere in which the X-flip, Y-flip, and priority bits are also misreported.

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.