Most likely caused by masking to 8 bits rather than the bit-width of the SRAM:
|
String toHex(int val) { |
|
String h = Integer.toHexString(val & 0xFF).toUpperCase(); |
|
return h.length() < 2 ? "0" + h : h; |
|
} |
Reproduction steps:
Create 16-bit wide SRAM
initialize some memory cell to 65535
edit and enable hex mode
observe how the value is truncated to 0xFF
Most likely caused by masking to 8 bits rather than the bit-width of the SRAM:
circuitjs1/src/com/lushprojects/circuitjs1/client/SRAMElm.java
Lines 170 to 173 in 43315f8
Reproduction steps:
Create 16-bit wide SRAM
initialize some memory cell to 65535
edit and enable hex mode
observe how the value is truncated to 0xFF