Code Monkey home page Code Monkey logo

taslabz / dolphin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from felk/dolphin

5.0 5.0 4.0 424.81 MB

Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.

Home Page: https://dolphin-emu.org/

License: Other

Shell 0.09% JavaScript 0.02% C++ 88.06% Python 0.42% Perl 0.02% C 2.55% Objective-C 0.03% Java 0.88% Assembly 0.04% Objective-C++ 1.02% Makefile 0.04% Smarty 0.01% NSIS 0.05% CMake 1.23% GLSL 0.42% Roff 0.02% Kotlin 5.11%

dolphin's People

Contributors

admiralcurtiss avatar comex avatar crossvr avatar degasus avatar delroth avatar glennricster avatar helios747 avatar hrydgard avatar jmc47 avatar john-peterson avatar jordan-woyak avatar josjuice avatar leoetlino avatar ligfx avatar lioncash avatar lpfaint99 avatar magumagu avatar nakee avatar neobrain avatar parlane avatar phire avatar pokechu22 avatar shuffle2 avatar skidau avatar sonicadvance1 avatar sorenjorvang avatar spycrab avatar stenzek avatar tbennun avatar tilka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dolphin's Issues

Allow scripts to register listeners via decorator with enumerated argument

Currently, scripts can register listeners with their respective decorators. Example:

@event.on_frameadvance
def on_frame_advance():
    pass
    
@event.on_savestateload
def on_savestate_load(is_slot, slot):
    pass

Instead, it would be preferable if we could wrap these individual decorators with a generic one. Example:

@event.register(event.Evt.frame_advance)
def on_frame_advance():
    pass

@event.register(event.Evt.state_load)
def on_savestate_load(is_slot, slot):
    pass

No quick way to access Scripts widget

If you close the script widget after startup, it is not clear how to navigate back. I believe currently you have to click "Show Log", then right click the top of the log widget, and then click Script. Instead, we should have a button under View or Tools to show the Scripts list... Not sure which, argue away :)

Implement a system to download TAS-focused Gecko Codes

The functionality is already there in Dolphin, but how would we create a way to download the recommended gecko codes for TASing through the button?

People have suggested a repository to hold all of the config files, and Dolphin would download and overwrite the current .ini file with the new TASing one, but a discussion may be helpful before moving forward.

Add GameCube Controller Profile Hotkeys

[Applies to upstream too]

For some reason, the following hotkeys only exist for Wii Remote profiles, rather than GameCube Controller profiles:

  • Next Profile
  • Previous Profile
  • Next Game Profile
  • Previous Game Profile

Scripts pane is too wide due to buttons

The ScriptingWidget pane is too wide, honestly because of the three buttons at the top. We ought to change these buttons to just a +, -, and refresh icon I think.

TAS Input responsiveness during frame advance is reliant on game framerate

Steps to reproduce:

  1. Set game speed limit to 50%
  2. Open TAS Input
  3. With TAS Input as window-of-focus, hold down frame advance hotkey
  4. With hotkey held down, hold down left-click and circle around the Main Stick
  5. Notice latency and delay in both TAS Input window AND the input display
  6. Let go of frame advance hotkey
  7. Notice TAS Input Window snaps back to full responsiveness.

This is a problem even in upstream Dolphin 5.0-19159. This may be a very tough issue to fix. According to @Gaberboo frame advance is also problematic at speeds exceeding 100%.

Compiler errors at Source/Core/Core/Config/MainSettings.h

I cloned the repo (with --recurse-submodules), made a build folder, went to it, ran cmake .., then make -j24.

Errors:

/home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:248:14: error: ‘Info’ does not name a type 248 | extern const Info<ShowCursor> MAIN_SHOW_CURSOR; (repeated lots)
and
In file included from /usr/include/X11/Xlib.h:44, from /usr/include/X11/extensions/Xrender.h:28, from /usr/include/X11/extensions/Xrandr.h:33, from /home/saltq/dev/pycore-dolphin/Source/Core/UICommon/X11Utils.h:10, from /home/saltq/dev/pycore-dolphin/Source/Core/UICommon/X11Utils.cpp:4: /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:235:3: error: expected identifier before numeric constant 235 | None, | ^~~~ /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:235:3: error: expected ‘}’ before numeric constant In file included from /home/saltq/dev/pycore-dolphin/Source/Core/UICommon/X11Utils.cpp:19: /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:234:1: note: to match this ‘{’ 234 | { | ^ In file included from /usr/include/X11/Xlib.h:44, from /usr/include/X11/extensions/Xrender.h:28, from /usr/include/X11/extensions/Xrandr.h:33, from /home/saltq/dev/pycore-dolphin/Source/Core/UICommon/X11Utils.h:10, from /home/saltq/dev/pycore-dolphin/Source/Core/UICommon/X11Utils.cpp:4: /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:235:3: error: expected unqualified-id before numeric constant 235 | None, | ^~~~ In file included from /home/saltq/dev/pycore-dolphin/Source/Core/UICommon/X11Utils.cpp:19: /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:240:19: error: ‘OutlineRes’ was not declared in this scope; did you mean ‘Config::OutlineRes’? 240 | extern const Info<OutlineRes> MAIN_IMGUI_OUTLINE_RES; | ^~~~~~~~~~ | Config::OutlineRes /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:233:12: note: ‘Config::OutlineRes’ declared here 233 | enum class OutlineRes | ^~~~~~~~~~ /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:240:19: error: ‘OutlineRes’ was not declared in this scope; did you mean ‘Config::OutlineRes’? 240 | extern const Info<OutlineRes> MAIN_IMGUI_OUTLINE_RES; | ^~~~~~~~~~ | Config::OutlineRes /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:233:12: note: ‘Config::OutlineRes’ declared here 233 | enum class OutlineRes | ^~~~~~~~~~ /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:240:19: error: ‘OutlineRes’ was not declared in this scope; did you mean ‘Config::OutlineRes’? 240 | extern const Info<OutlineRes> MAIN_IMGUI_OUTLINE_RES; | ^~~~~~~~~~ | Config::OutlineRes /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:233:12: note: ‘Config::OutlineRes’ declared here 233 | enum class OutlineRes | ^~~~~~~~~~ /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:240:19: error: ‘OutlineRes’ was not declared in this scope; did you mean ‘Config::OutlineRes’? 240 | extern const Info<OutlineRes> MAIN_IMGUI_OUTLINE_RES; | ^~~~~~~~~~ | Config::OutlineRes /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:233:12: note: ‘Config::OutlineRes’ declared here 233 | enum class OutlineRes | ^~~~~~~~~~ /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:240:19: error: ‘OutlineRes’ was not declared in this scope; did you mean ‘Config::OutlineRes’? 240 | extern const Info<OutlineRes> MAIN_IMGUI_OUTLINE_RES; | ^~~~~~~~~~ | Config::OutlineRes /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:233:12: note: ‘Config::OutlineRes’ declared here 233 | enum class OutlineRes | ^~~~~~~~~~ /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:240:19: error: ‘OutlineRes’ was not declared in this scope; did you mean ‘Config::OutlineRes’? 240 | extern const Info<OutlineRes> MAIN_IMGUI_OUTLINE_RES; | ^~~~~~~~~~ | Config::OutlineRes /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:233:12: note: ‘Config::OutlineRes’ declared here 233 | enum class OutlineRes | ^~~~~~~~~~ /home/saltq/dev/pycore-dolphin/Source/Core/Core/Config/MainSettings.h:240:14: error: ‘Info’ does not name a type 240 | extern const Info<OutlineRes> MAIN_IMGUI_OUTLINE_RES; |

Also warning while running cmake:

CMake Warning at CMakeLists.txt:684 (find_package):
By not providing "Findfmt.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "fmt", but
CMake did not find one.

Could not find a package configuration file provided by "fmt" (requested
version 8) with any of the following names:

fmtConfig.cmake
fmt-config.cmake

Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR"
to a directory containing one of the above files. If "fmt" provides a
separate development package or SDK, be sure it has been installed.

Upgrade Python Version to 3.12

Currently, the Python version the scripting engine uses is 3.8.5. On 3.10, the most notable changes would be the addition of match case statements, along with supporting the use of | for type unions natively. Mac and Linux(?) versions use whatever Python version is installed on the user's computer, but on Windows, it forces the use of 3.8.5. With the deprecation of Py_SetPath in 3.11, I believe 3.10 is our best option at the moment.

Add memory Python function to retrieve arbitrary number of bytes

When reading large data structures, it's a bit annoying to have to create a for loop to iterate on memory.read_u8 calls to read a certain number of bytes. It would be better (and less resource intensive) to have a new ABI function which returns bytes in some form (possibly a char array).

Successive memory reads/writes lead to "Unable to resolve" warnings

The if-statement here is to prevent writes from occurring twice in a frame. If the same writes happen twice in a frame, there is a chance that the addresses will not get translated in MMU::WriteToHardware because m_ppc_state.msr.DR == 0. This can also happen for some reads. Not immediately sure how to handle this.

Evaluate which features we want to keep or remove

Already, we are starting to introduce features that invalidate features outside of the scope of this project (e.g. #26). Netplay is certainly an uncontroversial removal for a TAS-focused emulator, and it may be worthwhile to eliminate other features from this fork. This could lead to reduced build times with the removal of entire files (assuming compilation errors that would arise are fixed), simplify the UI, etc.

There are a few questions here:

  1. Is this a good precedent to set forward?
  2. What is the full scope of Dolphin's feature set?
  3. Do we remove these files from the project entirely or simply remove the option for them to be selected?

Add `chase_pointer` to the memory module

Related to TASLabz/mkw-scripts#12.

The current MKW implementation looks like this:

from dolphin import memory


def chase_pointer(base_address: int, offsets: List, data_type: str):
    current_address = memory.read_u32(base_address)
    for offset in offsets:
        value_address = current_address + offset
        current_address = memory.read_u32(current_address + offset)
    data_types = {
        'u8': memory.read_u8,
        'u16': memory.read_u16,
        'u32': memory.read_u32,
        'u64': memory.read_u64,
        's8': memory.read_s8,
        's16': memory.read_s16,
        's32': memory.read_s32,
        's64': memory.read_s64,
        'f32': memory.read_f32,
        'f64': memory.read_f64,
        'vec3': vec3.read,
        'mat34': mat34.read,
        'quatf': quatf.read,
    }
    return data_types[data_type](value_address)

While vec3, mat34, and quatf are part of the EGG and nw4r libraries, the data_types dict should be extendable dynamically for game-specific implementations. The ideal usecase of this dict is for reading a datatype regularly created on the stack.

We should have a global data_types dict that scripts can append to.

Allow for the outline color to be changeable

The current behavior is to invert the current on screen text color. If the color is set to 0xFF00FFFF, the outline color is 0xFFFF0000. This means the outline is red and the text is blue, which looks horrible.

Memory Breakpoint API issues

  • MBPs can be set with an empty dictionary (MBP will be set at 0x00000000)
    • This is fixed on my feature branch malleoz/mbp_fixes (also prints error to log in this scenario)
  • on_memorybreakpoint and on_codebreakpoint do not work
    • The event was never emitted

Create debug module

This module should allow for the creation (and modification?) of instruction/memory breakpoints.

ScriptingWidget hotkeys still recognized when focused on game widget

The arrow keys control both the selected script in the ScriptingWidget and also my Gamecube controller in the game widget. Navigating through MKWii main menu causes me to change what script is selected. We need to investigate if it is possible to prevent this behavior.

Implement GameID script folders

When running Mario Kart Wii, it is pointless to see TTYD or other game scripts. We propose the following:

  • With no game running, show every script in the Scripts folder and its children directories
  • When booting up a game, change the ScriptsWidget view to only show scripts for that particular game
  • Implement this by retrieving the current game ID without the region (RMC for MKWii, G8M for TTYD, etc.) and navigate to /Scripts/[GameID] directory, if present, otherwise show nothing
  • For mkw-scripts repository, we'll have to move MKW scripts to the new /Scripts/RMC folder.

In-game frame counts don't update correctly

Currently, Python scripts have the possibility of desyncing/freezing for a frame, which is especially noticeable with scripts that require frame perfect inputs. Games played without these scripts are able to sync with other Dolphin versions, so it is believed to be an issue to the way Python and Dolphin communicate. The reason behind these desyncs appears to be related to the frame count stopping at random intervals for a frame and resuming updates the frame after, or something related to how set_gc_buttons processes inputs.

Remove 1 Frame Delay On Text Drawn

This wasn't apparent in the preview build given to us by @gitrinitas at the start of the PyCore development process, but somehow found it's way into the build that we based it off of. No one has any clue how this happened to "reappear".

Fix Native File Dialog project not compiling automatically

While most users will avoid this issue entirely, the Native File Dialog .vcxproj file does not build correctly when building the entire project. Rather, the NFD library has to be built individually before returning to the main project to compile fully.

Add Script Path Setting in Game Config

Multiple ideas have been presented, but the general idea is to create a setting to select the path the scripts should be retrieved from in Game Config in Properties, and then autoload the contents of the folder chosen on the boot of that game.

Add Shake/Swing/etc. Functions for Wii Remotes

As these require multiple movements to perform, it may be tricky for scripters to create functions that replicate this. It also would remove the need of potential "hacks" to create these motions.

I assume you could use something to replicate how shake/swing hotkeys output these results, but I am unsure if that's possible.

Changing the Wii controller extension does not refresh the TAS Input window

Repro steps:

  1. Create a new emulated Wii remote. Assign the controller extension to either Nunchuk or Classic Controller.
  2. Open the TAS Input window - this should work fine.
  3. Go back into the controller window and assign the controller extension to the opposite one.
  4. Open the TAS Input window - the controller does not refresh.

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.