Giter Club home page Giter Club logo

haiyajan's Introduction

The Haiyajan Icon: Haiya Dragon

Haiyajan

Haiyajan (هیجان; /ˈhaɪəʤɑːn/ Haiya-jahn) is an entertainment interface that is designed to be small, fast, and simple to use. It uses plugins named "Libretro cores" to provide various emulation and multimedia features. It is written in C99 language and depends only on the SDL2 library and the Libretro cores you wish to use.

Haiyajan is a new project and is therefore not ready for regular use. The first stable version will be released as version "1.0".

Join the community on Reddit at /r/Haiyajan/.

Libretro

Haiyajan uses the Libretro API to provide various capabilities, such as game emulation and multimedia. RetroArch is the reference implementation of the Libretro API. The Libretro cores and their respective content must be downloaded separately. You may find many Libretro projects at the official Libretro repository list.

Download

The latest release is version 0.1.

See the Releases page for downloads.

License

Copyright (C) 2020 Mahyar Koshkouei, et al.

Haiyajan is free software released under the GNU Affero General Public License Version 3 (AGPL v3); see the LICENSE file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The Haiyajan icon was created by Cher at https://ko-fi.com/staticevent.

Development

Versioning

This project will use a MAJOR.MINOR revision system. The first release build will be version 1.0. Until then, all releases will be considered unstable. The MAJOR version will then be incremented only when a significant change is made to the program. This may include significant changes to the user interface, use of a new version of Libretro API, removal of support for a platform, etc. All other changes will only increment the MINOR version.

Compared to Semantic Versioning 2.0, the PATCH version is removed in this project for brevity.

Support

The platforms that this project will be regularly tested on for major releases are currently:

OS Kernel Architecture Test Platform C Library Additionally Tests Support For:
Alpine Linux Linux Longterm x86-64 Various musl libc Generic Modern Linux System with OpenGL 3.3+
Alpine Linux Linux Longterm ARM1176JZF-S Raspberry Pi 1A musl libc Any Low Power Embedded Linux System with OpenGLES 2
Arch Linux Linux Mainline ARM Cortex-A72 Raspberry Pi 4B GNU libc Any High Power Embedded Linux System with OpenGLES 3
ReactOS Windows NT 5.1 x86-32 VirtualBox MSVC 2019, v141_xp Wine, Windows XP/7/8.1/10
Windows 10 Windows NT 10.0 x86-64 Various MSVC 2019, v142 Generic Modern Windows System with OpenGL 3.3+
Switch Horizon ARM Cortex-A57 & A53 Yuzu GNU libc Nintendo Switch via libNX with OpenGL 3.3+

Haiyajan should work on any platform supported by SDL2 and has a C99 compiler. Haiyajan may therefore run on Linux, Unix, Windows XP/2003/Vista/7/8/10/RT, Mac OS X 10.5+/macOS, Haiku, iOS 5.1.1+, Android 2.3.3+, Emscripten, Nintendo Switch (libnx).

We welcome bug reports and contributions for all platforms.

Note:

  • Haiyajan executables built for Windows will be compiled with MSVC 2019, and may require the Visual C++ 2015 Redistributable.
  • Since the official SDL2 API for the Nintendo Switch is released under an NDA, it is not compatible with the AGPL license of Haiyajan. Consider using libnx.
  • Libretro cores may have different system requirements and licenses.

Building

The following dependencies are required for building Haiyajan. Other tools may be used, but are unsupported by this project.

  • SDL2 2.0.12
  • C99 Compiler (GCC, Clang, MSVC 2019)
  • GNU Make 4.3

When compiling for Windows NT, follow the instructions under the Windows NT header below. Otherwise, simply execute GNU make in the Haiyajan project folder to build with automatically detected options based on available libraries.

Execute make help in order to see various build options. Some options may be automatically selected or unsupported for your build platform.

Windows NT

When compiling for Windows NT platforms (such as ReactOS, Windows XP, Windows 10, etc.) please use the "Native Tools Command Prompt for VS 2019". Steps for compiling Haiyajan for Windows NT are basically:

  1. On a Windows 10 platform with Visual Studio 2019 installed, download and compile the latest GNU make by executing "build_w32.bat" within the Native Tools Command Prompt for VS 2019. Add the compiled gnumake.exe binary to PATH.
  2. Download SDL2 and compile it with cmake. Specify the toolset v141_xp when targeting x86 (32-bit) version of Windows.
  3. Within Native Tools Command Prompt for VS 2019, execute GNU make with the environment variables SDL_LIB and SDL_INC set to the location of the compiled SDL2 libraries and the location of the SDL2 headers respectively.

Execute make help for help with options.

Objectives

In no particular order.

  • Maximum depth of three in menu.
  • Support for software and OpenGL cores.
  • Automatic selection of libretro core given the input file.
  • Compensation for ASCII-only font by reading input file header.
  • Download libretro cores, program updates as required, with user control.
  • Automatic assignment of gamepad mappings.
  • Automatic detection of A/B placement for emulated system.
  • Small number of GUI configuration parameters.
    • Colours, placement of menu and hotkeys.
  • Automatic DPI scaling.
    • Font and UI size.

haiyajan's People

Contributors

deltabeard avatar petrutoader avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

haiyajan's Issues

UI: Combine font, menu objects into single ui object

The UI object should be the only thing that draws the user interface. Haiyajan.c will render the core display, and tell the UI object what menus and overlays to display. The ui library will then handle the drawing of the items.

GL: fix PPSSPP

Only background is being shown. Maybe re-adding the shaders will fix it.

media: replace webp screenshot format with qoi

QOI is an image format that has very fast encoding speed. This will have the least impact on CPU time when taking screenshots.
In addition, jpeg-xl could be supported as an alternative to provide screenshots in a smaller file size whilst also being fast to encode.

Create gl texture within gl module

Once the core has rendered to the gl texture, render it to the frontend framebuffer. Check if this fixes issues with N64 texture drawing.

Build: Automatic Profile Guided Optimisation (PGO)

A fully-free libretro core and content could be included within this project. Haiyajan and this core will be compiled and executed to create profile guided data. Haiyajan will then be recompiled with PGO turned on.

Depends on #14 to allow for the use of user interface features.

play: on-demand renderer change

Allow Haiyajan to change the renderer on demand. The renderer creation and deletion functions must be refactored into their own functions, and should be allowed to be called at any time.

Currently, an error is shown if the libretro core requires OpenGL but the currently used renderer is direct3d11, for example.

Improve documentation of MSVC builds

Specifically, show what libraries are required to build haiyajan.

cl   /W2 -DSDL_ASSERT_LEVEL=1   /nologo /GL /fp:fast -O2 -DGIT_VERSION=\"LOCAL\"
 -Iinc  -Iinclude /Drestrict= /Fehaiyajan src/font.obj src/gl.obj src/haiyajan.o
bj src/input.obj src/load.obj src/menu.obj src/play.obj src/rec.obj src/sig.obj
src/timer.obj src/tinflate.obj src/ui.obj src/util.obj /link /NODEFAULTLIB:MSVCR
T /SUBSYSTEM:CONSOLE SDL2.lib setupapi.lib winmm.lib imm32.lib version.lib gdi32
.lib user32.lib shell32.lib ole32.lib oleaut32.lib advapi32.lib SDL2main.lib

Make timer implementation return number of libretro core frames to play

  • The timer module is initialised with the libretro core (target) frame rate. The timer module calculates the target period (1/f).
  • The front end reports the time taken to execute retro_run() to the timer module. The timer module returns how many times retro_run() should be executed.
    • If the returned value is 0, then the front end must delay, possibly perform some other tasks in the meantime, then call the timer module again to check whether retro_run() should be executed or not.
    • If the returned value is larger than 1, then either the front-end is not running fast enough, or the refresh rate is less than the target.
  • The front may reset the internal timer if real-time playback is broken (eg. by pausing the game).

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.