Git Product home page Git Product logo

Comments (16)

leiradel avatar leiradel commented on May 24, 2024

The core has complete control over its RAM, we shouldn't write anything to it.

Are you having issues like cheevos being awarded right when the game is loaded? I had to fix a similar issue in RetroArch, but I changed the cheevos code, not the cores. A similar fix to RALibretro would involve changes to RA_Integration.

from ralibretro.

JuliaSalsa avatar JuliaSalsa commented on May 24, 2024

Yeah, that's the exact reason. I will talk with GD about this issue.

from ralibretro.

JuliaSalsa avatar JuliaSalsa commented on May 24, 2024

He told regardless of anything it won't fix this issues in RetroArch. Not sure what to do with this issue now.

from ralibretro.

leiradel avatar leiradel commented on May 24, 2024

Sorry, RetroArch? I've fixed this issue there ages ago.

I don't think I can fix this in RALibretro, since all the cheevos checking is done in RA_Integration.

from ralibretro.

meleu avatar meleu commented on May 24, 2024

@JuliaWolska can you provide examples and how to reproduce them?

from ralibretro.

JuliaSalsa avatar JuliaSalsa commented on May 24, 2024

Having one game loaded and loading another is the same session, epecially between systems.

from ralibretro.

meleu avatar meleu commented on May 24, 2024

@JuliaWolska can you provide a single and very specific example so I can try to reproduce exactly what happened to you?

from ralibretro.

GameDragon2k avatar GameDragon2k commented on May 24, 2024

Is this specific to RALibretro or all emulators?

from ralibretro.

JuliaSalsa avatar JuliaSalsa commented on May 24, 2024

http://retroachievements.org/ticketmanager.php?i=12160 - this ticket could be a good example, it already contained protection for not opening if the game wasn't active, needed to add another for flashing memory, specifically becasue of this issue.

from ralibretro.

leiradel avatar leiradel commented on May 24, 2024

http://retroachievements.org/ticketmanager.php?i=12160 - this ticket could be a good example

@JuliaWolska the fix was in the achievement or in the emulator?

In RetroArch I put a guard to only award an achievement when it triggers from false to true. If the achievement is true from the beginning, nothing is awarded. Maybe RA_Integration needs such a guard?

from ralibretro.

meleu avatar meleu commented on May 24, 2024

Maybe we should move this issue to RAIntegration's issue tracker?

Or maybe tagging some RAIntegration's hackers can be enough: @GameDragon2k (oh, he's already here 😅) and @Jamiras

from ralibretro.

Jamiras avatar Jamiras commented on May 24, 2024

Each system/emulator provides uninitialized memory in different ways. RANes alternates 32-bits of 0x00000000 and 0xFFFFFFFF, RASnes9x initializes everything to 0x55. RAVBA initializes everything to 0. This pre-ROM memory is the leading cause for "triggered at startup" tickets.

Loading a new core should load new memory banks. I have difficulty understanding why changing cores wouldn't provide freshly uninitialized memory (unless the core isn't actually initializing the memory before loading the ROM).

Loading a new ROM within a core might be problematic as the existing memory banks could remain registered. But again, it seems like the core should flush the memory before loading the ROM.

We probably should do something generic in the toolkit - maybe provide a buffer of N frames after a ROM is loaded before achievements start processing?

from ralibretro.

leiradel avatar leiradel commented on May 24, 2024

Just like the other emulators, on RALibretro what happens to memory when a game is loaded depends on the core. I call RA_DoAchievementsFrame right after _core.step(), so the core has the chance to do something to its memory, but again what happens in this first emulated frame depends on the particular core.

I can skip the N first calls to RA_DoAchievementsFrame in RALibretro, but if this is also a concern for the other emulators then maybe the fix should be in RA_Integration.

My only concern is that we should not skip frames after a state is loaded, only when the ROM starts being emulated, because if the state was saved right before a cheevo then skipping frames on state load could prevent it from being awarded.

from ralibretro.

GameDragon2k avatar GameDragon2k commented on May 24, 2024

My only concern is that we should not skip frames after a state is loaded, only when the ROM starts being emulated, because if the state was saved right before a cheevo then skipping frames on state load could prevent it from being awarded.

This is a good point. I'll implement the required protection for this.

from ralibretro.

JuliaSalsa avatar JuliaSalsa commented on May 24, 2024

@leiradel the fix is in achievement.

from ralibretro.

leiradel avatar leiradel commented on May 24, 2024

I believe @GameDragon2k will fix this in RA_integration, so I'm closing this. Feel free to reopen if that's not the case.

from ralibretro.

Related Issues (20)

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.