Skip to content

Adding Opera (3DO) as emulation core in Bizhawk #4264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 82 commits into
base: master
Choose a base branch
from

Conversation

SergioMartin86
Copy link
Contributor

@SergioMartin86 SergioMartin86 commented Mar 8, 2025

  • Add temporary .3do-bin based CD-ROM loading
  • Add proper CD reading callbacks
  • Add video buffer getting
  • Add sound
  • Add gamepads
  • Add mouse
  • Add settings
  • Add input mnemonics
  • Add drive access light callbacks
  • Add mem domains
  • Add SaveRAM
  • Add IRegionable
  • Add FlightStick
  • Add Lightgun
  • Add Arcade Lightgun
  • Add Trackball
  • Add Flight Stick
  • Load Font ROMS
  • Add input poll reading (red lag frames vs input read frames)
  • Allow any bios loading (currently limited to what the core recognizes)
  • Use proper mouse deltas
  • Add default inputs for mouse (‎Assets/defctrl.json)
  • Add multi-disc support

Check if completed:

Comment on lines 389 to 402
ECL_EXPORT bool sram_changed() { return _nvramChanged; }
ECL_EXPORT int get_sram_size() { return NVRAM_SIZE; }
ECL_EXPORT uint8_t* get_sram_buffer() { return (uint8_t*) NVRAM; }
ECL_EXPORT void get_sram(uint8_t* sramBuffer)
{
if (NVRAM == NULL) return;
memcpy(sramBuffer, get_sram_buffer(), get_sram_size());
}

ECL_EXPORT void set_sram(uint8_t* sramBuffer)
{
if (NVRAM == NULL) opera_nvram_init(NVRAM,NVRAM_SIZE);
memcpy(get_sram_buffer(), sramBuffer, get_sram_size());
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason retro_get_memory_data does not seem to expose this NVRAM (via RETRO_MEMORY_SAVE_RAM for example) but perhaps that would be the better place to expose this to instead of writing an own function for it.

You could then also expose this NVRAM as memory domain with the MEMORYAREA_FLAGS_SAVERAMMABLE flag and I believe the frontend will then automatically handle saveram for you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

-DINLINE=inline \
-DTHREADED_DSP

CXXFLAGS := $(CCFLAGS) -std=c++20
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just for the bizhawk.cpp? Might be easier to just make it a normal .c file and get rid of all the cpp handling.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do use std::string in bizhawk.cpp. It is much cleaner than C-style string manip. But I removed the c++20 and cleaned things up


void RETRO_CALLCONV retro_input_poll_callback()
{
_isLagFrame = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retro_input_poll is completely useless in figuring out lag information. It is simply a callback that tells the frontend that the core wants input updated, which in practice is something that happens every single retro_run call regardless, making it fairly redundant in the libretro API. It is not a callback that tells the frontend that the game is acquiring input (i.e. actual non-lag indication). You cannot rely on libretro handling lag information for you, BizHawk code must have its own implementation for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@YoshiRulz YoshiRulz dismissed their stale review March 19, 2025 21:44

resolved


private readonly List<IDiscAsset> _discAssets;

private string GetFullName(IRomAsset rom) => rom.Game.Name + rom.Extension;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto of #4217 (comment)

@MoskovchenkoD
Copy link

MoskovchenkoD commented Apr 5, 2025

As someone who got the up-to-date build for testing, I may bring some more points:

  1. Both controller and TAStudio layout have wrong namings for some buttons:
    Left column is a 3DO button. Right - button mapping in Bizhawk as of now.
    A - Y
    C - A
    X (Stop) - s ("Select")
    P (Play/Pause) - S ("Start"), X

I think, this might be a good candidate to put in "3DO Controller Configuration" window: https://www.deviantart.com/adrianoramosofht/art/Panasonic-3DO-Controller-2-845186266

  1. (optional) There is no option to plug in Player 2-8
  2. .chd/.ccd/.cue game images can only be launched as a XML Multi-Disk Bundler

@SergioMartin86
Copy link
Contributor Author

As someone who got the up-to-date build for testing, I may bring some more points:

  1. Both controller and TAStudio layout have wrong namings for some buttons:
    Left column is a 3DO button. Right - button mapping in Bizhawk as of now.
    A - Y
    B - X
    C - A
    X (Stop) - s ("Select")
    P (Play/Pause) - S ("Start"), X

Thanks so much for the info, I'll get the controller fixed.

I think, this might be a good candidate to put in "3DO Controller Configuration" window: https://www.deviantart.com/adrianoramosofht/art/Panasonic-3DO-Controller-2-845186266

The controller pic is nice, though I have no idea how to add it to the Bizhawk GUI.

  1. (optional) There is no option to plug in Player 2-8
    Player 2 should be functional, but I haven't tested it. I'll give it a lok
  1. .chd/.ccd/.cue game images can only be launched as a XML Multi-Disk Bundler

Afaik .cue images ought to work, but the other devs here should be able to give you a better answer

@vadosnaprimer
Copy link
Contributor

For controller images we use actual photos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core Port Req.] 3DO from 4DO or Opera
6 participants