Git Product home page Git Product logo

Comments (8)

rzumer avatar rzumer commented on May 24, 2024

The Memory Inspector defaults to displaying the first address in a Note. I assume that most Notes are based on offset memory (based on VBA?). Clear the value being watched or compensate for the 0x00c000? offset to view the correct ones.

In any case, that's a UI issue for RAIntegration.

from ralibretro.

Altomar79 avatar Altomar79 commented on May 24, 2024

Seems like this happen when the displaying note is trying to locate an address outside of the 0x7FFF.
Though GB/GBC have a range up to 0xFFFF

from ralibretro.

Jamiras avatar Jamiras commented on May 24, 2024

I'm guessing this is a duplicate of #19, which was supposedly fixed in 1.0.5. What version shows up when you click "About"?

from ralibretro.

Jamiras avatar Jamiras commented on May 24, 2024

nm, you said 1.0.7 in your first post.

from ralibretro.

Altomar79 avatar Altomar79 commented on May 24, 2024

Also RALibretro commit hash is 7584575 in case this help.
Its the latest build we have in our download page.

from ralibretro.

Jamiras avatar Jamiras commented on May 24, 2024

I took a look at this, and while I understand what's happening, I'm not sure how to fix it. Someone more familiar with the libretro cores will have to address this.

The basic problem is that the GB/GBC cores only map the System RAM to the integration DLL as $0000-$7FFF.

This is wrong. RAVBA-M actually registers the full address space for GB/GBC, so the System RAM should be mapped from $C000-$DFFF and echoed at $E000-$FDFF. I'm not sure why _core.GetMemorySize(RETRO_MEMORY_SYSTEM_RAM) is returning 32K, I think it should only be 8K.

Additionally, the Save RAM is completely ignored by RALibRetro and needs to be mapped to $A000-$BFFF. And I have no idea what needs to be mapped from $0000-$9FFF.

The solution to this seems to be to replace the mapping with a raw read for GB/GBC:

      RA_InstallMemoryBank(0, (void*)::memoryReadRaw, (void*)::memoryWriteRaw, 0x10000);
unsigned char Application::memoryReadRaw(unsigned addr)
{
  const struct retro_memory_map* mmap = _core.getMemoryMap();
  const retro_memory_descriptor *desc = mmap->descriptors;
  const retro_memory_descriptor *end = desc + mmap->num_descriptors;
  while (desc < end)
  {
    if (desc->start <= addr && desc->start + desc->len > addr)
    {
      unsigned char* memory = (unsigned char*)desc->ptr + desc->offset;
      return memory[addr - desc->start];
    }

    ++desc;
  }

  return 0;
}

This seems to mostly work with the Gambatte core, but reads between $E000 and $FDFF fail because the echo ram isn't registered in the mmap.

The mGBA core doesn't provide a mmap, so fails miserably (does it only support GBA?).

from ralibretro.

meleu avatar meleu commented on May 24, 2024

The mGBA core doesn't provide a mmap, so fails miserably (does it only support GBA?).

Yes.

https://docs.libretro.com/guides/retroachievements/#game-boy-game-boy-color

from ralibretro.

meleu avatar meleu commented on May 24, 2024

solved in eee25ff

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.