GithubHelp home page GithubHelp logo

Comments (9)

zeromus avatar zeromus commented on September 26, 2024

lua's memory_writebyte should not work through the cheat API. That's stupid. I don't even want to trace through all that crap. It should go straight to the <0x10000 check and BWrite.
It seems all our packed-in scripts use it for accessing memory only so they wouldn't even notice we made the change.
@vadosnaprimer can you confirm you agree that this logic in fceux predates any sense of best practices and needs to be revised to work as memorydomain systembus would rather than this weird broken mess?
We would need to update the docs too

from fceux.

vadosnaprimer avatar vadosnaprimer commented on September 26, 2024

I don't remember anything about memory writing other than it's implemented in a super complicated manner. I can't have an opinion without diving into it again, for which I just don't have time right now :(

from fceux.

zeromus avatar zeromus commented on September 26, 2024

Mainly I meant, if it works any way other than as systembus, do you think it's a good idea to change it or are you willing to say "meh, whatever it did before, who cares.. it should work like systembus"

from fceux.

vadosnaprimer avatar vadosnaprimer commented on September 26, 2024

The problem is I haven't seriously used either approach so in addition to no opinion I also have no experience here. Having an option would be the best but we don't include memory domain as an argument to lua mem access IIRC.

from fceux.

zeromus avatar zeromus commented on September 26, 2024

OK, let's change the memory functions to work like systembus (that is go through BWrite and ARead directly) and then add legacymemory functions which work the same as the current memory functions; and update the docs. @Andypro1 if you can do that, then I'll work with you on merging it.

from fceux.

Andypro1 avatar Andypro1 commented on September 26, 2024

Sure. Does this look like it will work?

ffcc6c0

The memory read functions did not use the cheat engine, so only the write function needed a legacy implementation.

I have tested memory_writebyte() and memory.legacywritebyte() in the lua console and they both seem to behave as expected.

If this looks okay to you, I can submit it as a pull request.

from fceux.

zeromus avatar zeromus commented on September 26, 2024

looks okay to me

from fceux.

Andypro1 avatar Andypro1 commented on September 26, 2024

Pull request #67 sent.

from fceux.

bbbradsmith avatar bbbradsmith commented on September 26, 2024

Pull request merged.

from fceux.

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.