Giter VIP home page Giter VIP logo

Comments (4)

TheThirdOne avatar TheThirdOne commented on September 4, 2024 1

Thanks for the report.

from rars.

TheThirdOne avatar TheThirdOne commented on September 4, 2024

I'm not considering this a bug because the behavior is the same in MARS and the help isn't quite specific enough to say that lb is a valid way of setting memory for the tool.

The issue is that the pixels are updated by memory updates, but only expect them to be from word sized updates. The relevant code is

private void updateColorForAddress(MemoryAccessNotice notice) {
int address = notice.getAddress();
int value = notice.getValue();
int offset = (address - baseAddress) / Memory.WORD_LENGTH_BYTES;
try {
theGrid.setElement(offset / theGrid.getColumns(), offset % theGrid.getColumns(), value);
} catch (IndexOutOfBoundsException e) {
// If address is out of range for display, do nothing.
}
}

Getting this to work with lb and lh would just be a matter of updating that function to use the lower bits of the address to shift the value.

from rars.

TheThirdOne avatar TheThirdOne commented on September 4, 2024

I ended up implementing this in a slightly different way than I explained. The shifting based solution would zero out the non written areas which I don't think is what most users would expect. Masking out only the bytes would work, but used too much bit twiddling for my liking.

I decided to just access the relevant word from memory and send that to the display.

An updated build can be found at https://github.com/TheThirdOne/rars/releases/tag/continuous. Please confirm that it works as you would expect now.

from rars.

PedroAugustoRamalhoDuarte avatar PedroAugustoRamalhoDuarte commented on September 4, 2024

Works fine, thanks!! I have test with sh and sb and the result is correct!!

from rars.

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.