Coder Social home page Coder Social logo

leecloudvictor / vba-next-switch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rsduck/vba-next-switch

0.0 1.0 0.0 22.16 MB

Libretro VBA-Next port for Switch

License: GNU General Public License v2.0

Makefile 0.75% C 28.25% C++ 68.16% Assembly 0.35% Objective-C 2.49%

vba-next-switch's Introduction

VBA Next/VBA-M for Switch

A VBA-M port for Nintendo Switch. It's based of the libretro port(the actual emulator) and 3DSGBA(the GUI, although heavily refactored).

After porting 3DSGBA(which often crashed probably because of a huge amount of memory leaks), I tried porting mGBA which ran not so well. That's why I decided to experiment with a lighter less accurate emulator, which lead to this port.

Needs libnx and devkitPro to build. Just run make.

Features

  • Quite high compability(haven't tried many games)
  • Save games and save states
  • Frameskip

Problems

  • In rare occasions the audio has problems
  • Video and Input not frame accurate(see Speed hack)

Speed hack

NOTE: some things don't apply anymore or were inaccurate observations

Before implementing this "speed hack" the emulator had regular slowdowns. Although I found out about these things by myself, these things might be common knowledge to emulator devs. These were the things which apparently slowed the emulator down:

  • The thread/core it's running on
  • The VSync

The first problem was solved by running the whole emulator in a second thread with a very high priority pinned to a core not used by the system.

Omitting the wait for vertical synchronisation lead naturally to artefacts. So I decided on only running the emulator inside the second thread, locked using sleep thread to 60 Hz. At the same time the main thread is locked by the vsync and only receives the framebuffer while sending the input. I left the audio in the emulator thread.

This leads of course to the problem that both threads, although locked to 60 Hz, may not run in sync, so the input or the graphics of a frame may be skipped or out of sync sometimes.

Credits

vba-next-switch's People

Contributors

inactive123 avatar nunatica avatar rsduck avatar dene- avatar cybershadow avatar jakibaki avatar alcaro avatar leiradel avatar toadking avatar cuttlefishjones865 avatar matthewbauer avatar heuripedes avatar worstperson avatar sergiobenrocha2 avatar aliaspider avatar yoshisuga avatar oggom avatar ov2 avatar monroe88 avatar lodanzark avatar joolswills avatar gregorr avatar garbear avatar catalystg avatar fr500 avatar webgeek1234 avatar

Watchers

leecloudvictor avatar

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.