GithubHelp home page GithubHelp logo

libretro / beetle-pce-libretro Goto Github PK

View Code? Open in Web Editor NEW
24.0 10.0 26.0 26.91 MB

Standalone hard fork of Mednafen PCE to libretro

License: GNU General Public License v2.0

Makefile 0.80% C 76.65% Objective-C 0.08% C++ 19.58% Perl 0.01% SourcePawn 0.25% Python 2.63%

beetle-pce-libretro's Introduction

Build Status

Beetle PC Engine libretro

Beetle PC Engine is a port/fork of Mednafen's PC Engine "pce" module to the libretro API. This core supports both CD-ROM2 and SuperGrafx emulation.

This PC Engine module is more accurate than the Fast module, which trades away typically unneeded accuracy in favor of speed. Unlike Beetle PCE Fast, Beetle PCE retains built-in SuperGrafx support. SuperGrafx support can alternatively be found in the Beetle SuperGrafx core.

Features:

  • Sub-instruction timing granularity (but greater than cycle granularity)
  • All sprite sizes supported.
  • 16-sprites per line limit emulated.
  • Accurate HuC6280 flags emulation.
  • Dot-clock emulation for more accurate aspect ratios.
  • Support for Street Fighter 2's HuCard hardware.
  • Support for Populous's backup RAM.
  • 6-button pad emulation.
  • Mouse emulation.
  • Working CD+G playback.

Building

This core can be built with make.

Documentation

TBD

Related Cores

Beetle PC Engine Fast: https://github.com/libretro/beetle-pce-fast-libretro

Beetle SuperGrafx: https://github.com/libretro/beetle-supergrafx-libretro

beetle-pce-libretro's People

Contributors

albertofustinoni avatar alcaro avatar aliaspider avatar andres-asm avatar bananarama203 avatar bslenul avatar claudiuslollarius avatar disastermo avatar ficoos avatar heuripedes avatar hizzlekizzle avatar hunterk avatar inactive123 avatar jdgleaver avatar libretroadmin avatar lioncash avatar mrjschulte avatar negativeexponent avatar oggom avatar pinumbernumber avatar rtissera avatar sergiobenrocha2 avatar sonninnos avatar tatsuya79 avatar themaister avatar toadking avatar vaguerant avatar vanfanel avatar webgeek1234 avatar westonlast 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beetle-pce-libretro's Issues

Broken Overclocking options

Starting a game with any value in overclock or frame limit section take no effects unless you enter in the option menu -while game is running- and activate/deactivate any feature or change a value.

screen completely distorded on shield tv android

Hi, I have just update the core on android shield tv and the screen is completely distorded.
like this:

57054234-880c2380-6c93-11e9-9c06-59022dc76143

I encounter this behaviour on snes9x 6 month ago and it was succefully patched.
hope you could restore this core on android thanks

[6-button] not working on PCE CD

Hi, first of all thanks for that core. Any games I've tried just work irrespective of the system: PCE/TGFX/SGFX or PCE CD. Amazing. This on a modest RPi4.

Issue

I've tested nearly 400 titles and there's one little issue: switching to 6-button controller doesn't work in some games. Namely:

  • Art of Fighting (Ryuuko no Ken / PCE CD)
  • Garou Densetsu 2 (Fatal Fury 2 / PCE CD)
  • Garou Densetsu Special (Fatal Fury Special / PCE CD)
  • Kabuki Ittouryoudan (PCE CD)

To be sure I tried Street Fighter 2 which is a PCE game: no issue to report there. I can't reproduce it either on the following title:

  • Kakutou Haou Densetsu Algunos (PCE CD, weirdly this one works with 6-button even without explicitly enabling it with L2)

To reproduce

Run a game mentioned above, then press the L2 trigger (at any time either on the 'bios screen' or while in game). You should see a notification telling you the 6-button controller is on. Then (first) controller will act weird or not at all. For instance no button will work or randomly. Switching back to 2-button get things back to normal.

Note: the issue can't be reproduced with beetle-pce-fast core. Everything works fine here.

Setup

  • Device: RPi4
  • OS: Retropie image (4.8.3), meaning 32-bit Buster
  • Controller: Xbox One (Bluetooth)
  • beetle-pce-libretro: latest (1.29.0)
  • libretro: 1.12.0

Thanks.

Emulation hack missing

Under core options

emulation hacks

force sgx required.

why?

games like darius plus and darius alpha ran on pce but take advantage of sgx and in emulation requre that switch to run in sgx mode.

switch can be seen in sgx fast mode core

Demon's Crush is not beatable at this time

Whenever you get to Bonus Stage 4 with a single pair of flippers the ball is put into play on a trajectory that you can't possibly hit.

Easiest way to replicate is to interact with the woman in the middle until she becomes a snake and then when you hit her with the ball you go into Bonus Stage 4 with the single pair of flippers.

[Performance Discussion] Libretro PCE is slower than Mednafen PCE

Original discussion was here: libretro/beetle-pce-fast-libretro#142

(THIS IS NOT A THIS CORE VS THAT CORE DISCUSSION. THE PURPOSE AT LEAST IS TO OPTIMIZE THE PORT FURTHER IF POSSIBLE)

the libretro_pce core is significantly slower compared to Mednafen PCE.

tested by running the cores in fast-forward mode. im aware this is not the best way to compare as i am bottlenecking my cpu at 100% when running this way but still its slower:

Common setups:

  • everything is on default settings both versions as much as possible
  • both seems to prefer audio enabled when fast-forwarding so lets leave that as is.
  • retroarch uses 16 bit for colors, so i assume the slowdown is not about the color-format
  • using linux-arch with xfce4's window manager disabled for best framerate
  • retroarch uses RGUI with blings disabled (at least the animation stuff)
  • Mednafen has a max fast-forward rate of 15x, but i think i am not at its max limit yet based on screenshot below

libretro PCE:
pce_libretro

Mednafen PCE with frameskip enabled:
pce_mednafen

Mednafen PCE with frameskip disabled:
pce_mednafen_no_frameskip

I cannot do the same comparison with pce_fast or supergrafx since Mednafen is always at max fps with those (about 900fps) and i haven't found yet if mednafen's fast-forward multiplier limit can be changed or set to infinite

Mednafen PCE_Fast with SuperGrafx enabled, frameskip enabled:
pce_fast_supergrafx_mednafen

is this core dead?

is this core dead? Currently using real mednafen due to this core lacking required updates.

Android - Malformed screen output on PowerVR w/ OpenGL

(Decided this was a core issue because this does not happen on virtually every other libretro core on said device)

As of current Beetle PCE and RetroArch 1.10.3, this is the output I'm finding on the device in question, running with gl video driver:
Screenshot_20220421-195600

In case you couldn't tell, that's supposed to be Bomberman.
However, it outputs properly on the same device using vulkan, as such:
Screenshot_20220421-200122
(Both of these screenshots are standard Android screenies, to be representative of what the user sees).

This does not effect Beetle SuperGrafx on the same device.
I've also been unable to reproduce this on a OnePlus 7 Pro--both GL/Vulkan display this core properly on that device.

The Device in question is a Retroid Pocket 2+ (Plus, not original - big difference), which uses a Unisoc T310 - essentially a cut-down 1+3-core SD845, but with a PowerVR-GE8300.

Update core to 1.29.0

Mednafen was recently updated with several corrections of this emulator and it would be nice to include them to improve those small errors. I don't know if some have already been applied, but since the core only reflects that it is in 0.9.48 (PCE), they supposedly were not added.

After 0.9.48 this is what they changed:

PCE: Allocate HuC6280 objects statically instead of dynamically, and removed a layer of indirection for the event handler pointer.
PCE: Moved HuC6280 CPU emulator back into the "pce" directory, since no other emulated systems use it and there are no plans for emulating any such systems(and if there were, new, cleaner HuC6280 emulation code should probably be written).
PCE, PC-FX: Added AVX support to the resampler.
PCE, PC-FX: Made resampler's coefficient memory layout more optimal.
PCE, PC-FX: Added ARM NEON support to the resampler(though it's only compiled in when the compiler is setup to use NEON, such as by passing -mfpu=neon).
PCE, PSX, PCE_FAST: Avoid UB by biasing uintptr_t values instead of pointers directly in the CPU core.
PCE, PCE_FAST: Added support for auto-enabling SuperGrafx emulation with CDs when a mode 1 data track has the 16-byte magic "4D 65 64 6E 61 66 65 6E 74 AB 90 19 42 62 7D E6" at offset 0x86A(assuming 2048 bytes per sector), for homebrew and translations.
PCE: Improved SuperGrafx window handling in 10MHz dot clock modes.
PCE, PCE_FAST: Added a missing sound emulation variable to save states.
PCE: Increased CD read startup delay per tip from dshadoff. Fixes ADPCM voice playback issues in "Downtown Nekketsu Monogatari" when text speed is set to fast.
PCE: Fixed an old bug(looks like from around a decade ago) in the HES playback code; it caused periodic high IRQ latency, which resulted in timer IRQ-driven DDA playback sounding rougher than it should have.
PCE: Changed the Super CD-ROM^2 memory identification signature to match a Duo instead of a PCE with a system card, to fix compatibility issues with some US Super CD-ROM^2 games when using a US system card image, per tip from elmer.

As always, thank you very much for the effort and this is only to remember that it is pending to update the core.

Some things do not belong directly to this core or are shared, but this is how they indicate it. Some of these things may not affect the core, but since I don't know, I am reporting it.

Thank you.

Support for analog controller

The XE-1AP analog controller is barely known that this Mega Drive compatible controller is also compatible to the PC Engine by the XHE-3 adapter that support a handful of titles between Sega classics as Outrun, After Burner II and a few more. The XE-1AP analog controller is already supported for Genesis Plus GX the only core that supports it as far as I know.

Accurate core considerations

This accurate core was to be the accurate core for pce and sgx.

The other sgx core is based on pce fast and not accurate at all.
The latest commit deletes the ability to have accurate sgx in retroarch

please reconsider

2 button default

Some games break with 6 button mode. Make 2 button the default

example darius plus, set 6 button controls fail. There are a few titles.
make 2 button mode the default since 100% of library can play on 2 button but a handful cant be played on 6 button.

not setting controller to 2 button instantly fixes.

just a suggestion if anyone wants a suggestion to make the core more friendly for new comers

Oder Of The Griffon unreadable text

Please update to 1.29 as upstream to fix this game

January 12, 2022:
PCE, PCE-Fast: Initialize VCE color table memory at power-on to roughly(without probabilistic bit randomness) match test results from a
PC Engine Duo instead of just zeroing it; fixes unreadable letters in the password entry screen of "Order of the Griffon".

Adding Palette support

Some people here have started to work on a custom palette for mednafen pce.
The aim is to simulate the composite tints as the RGB signal wasn't used during game development at the time and output too similar colors in some cases.

example with adventrue island:
Adventure Island (Japan)-200708-230106
Adventure Island (Japan)-0001
you can see additional tints better in the water with the custom palette on the later picture.

In mednafen stand-alone the palettes are into a "palettes" folder, named pce.pal in our case here.
https://mednafen.github.io/documentation/#Section_custom_palettes

Support is not implemented yet in the libretro core, we just have the path set to the system dir here.
Stand-alone has a LoadCustomPalette method in mednafen.cpp.
Also, this has been commented out for what I could see.

Here is the wip palette shared on the forum mentioned above for testing:
pce palette WIP.zip

Add support for the official 3-buttons controller (NEC Avenue Pad 3)

Referencing issue #48 that seem to have not been commented on, and taking from this forum post, 3-buttons controller like the NEC Avenue Pad 3 allows the player to map either the Select or Run button (with the toggle of a switch) to a third action button (button III in this case). It is very useful for games that mapped controls besides menus to the run or select button. These games stand to benefit greatly from the addition of the NEC Avenue Pad to the Beetle PCE core. Below is a list of them and how they map a thrid action to the Run/Select buttons:

  1. Forgotton Worlds - The only game that requires a 3-buttons controller: maps movement to the Select button
  2. After Burner II - Maps the afterburners to the Run button
  3. Air Zonk - The Select button fires up rear thrusters to damage enemies behind you
  4. Atlantean - Warps by pressing the Run button
  5. Akumajou Dracula X: Chi no Rondo - Maps item crush to the Select button
  6. Barunba - The Select button rotates your cannons
  7. Battle Royale - Select + D-pad unleash a special attack
  8. Blazing Lazers - The Select button cycles through your speed settings
  9. Bloody Wolf - The Run button throws grenades or flash bombs, uses flamethrower and dismounts motorcycles
  10. Cyber Core - The Select button cycles your speed settings
  11. Download - The Select button cycles your speed settings
  12. Kunio Soccer -
  13. Final Match Tennis - Maps the lop shot to the Run button
  14. Final Soldier - The Select button cycles through your speed settings
  15. Gate of Thunder - The Select button cycles through your speed settings
  16. Golden Axe - The Select button casts magic
  17. Gradius II - The Select button uses power ups
  18. John Madden Fooball - The Run button button passes
  19. Legendary Axe 2 - The Run button throws bombs
  20. Martial Champion - The Run button attacks high
  21. Metamor Jupiter - The Select button cycles through ship transformations
  22. Ninja Spirit - The Select button changes weapons
  23. Riot Zone - The Run button uses desperation move
  24. Silent Debuggers - The Run button fires secondary weapon
  25. Shinobi - The Select button uses ninja magic
  26. Soldier Blade - The Select button cycles through your speed settings
  27. Special Criminal Investigation - The Select button uses boost
  28. Spriggan mk 2 - The Select button toggles through weapons
  29. Street Fighter II' - The Run button is your third attack, the Select button cycles between punches and kicks
  30. Star Soldier - The Select button cycles through your speed settings
  31. Turrican - The Select button changes weapons
  32. Vallis III - The Run button changes characters
  33. World Heroes 2 - The Run button is your throw/taunt button

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.