mirror of
https://github.com/trebonian/visual6502.git
synced 2025-04-09 07:39:18 +00:00
Patch allNodes() to generate list of numbers for node indexes instead of numeric strings, fix JMP indirect mnemonic
Patches for the general chipsim code and the 6502 emulation. For the general chipsim code, allNodes() was constructing a list of numeric strings for the node indexes instead of a list of numbers for them. During the first iteration inside recalcNodeList(), the numeric string node indexes would end up being the first elements of their respective node group lists. This in turn would allow instances of a duplicate node index to be added to the node group list. The duplicate in each case would be the numeric equivalent of the initial numeric string index: indexOf() would not recognize the string element as being the equivalent of the numeric node index, so the numeric version would be added also. For an example (from real log data), a node group list of: [ "49", 483 ] has a node index of 49 tested against it. indexOf() says "49" is not an occurrence of 49, so it allows 49 to be
This commit is contained in:
parent
f3cffeeed6
commit
51d6bb216b
10
chipsim.js
10
chipsim.js
@ -143,7 +143,15 @@ function saveString(name, str){
|
||||
|
||||
function allNodes(){
|
||||
var res = new Array();
|
||||
for(var i in nodes) if((i!=npwr)&&(i!=ngnd)) res.push(i);
|
||||
var ii = 0;
|
||||
for(var i in nodes) {
|
||||
// Don't feed numeric strings to recalcNodeList(). Numeric
|
||||
// strings can cause a (data dependent) duplicate node number
|
||||
// hiccup when accumulating a node group's list, ie:
|
||||
// group => [ "49", 483, 49 ]
|
||||
ii = Number( i );
|
||||
if((ii!=npwr)&&(ii!=ngnd)) res.push(ii);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -13569,7 +13569,15 @@ function saveString(name, str){
|
||||
|
||||
function allNodes(){
|
||||
var res = new Array();
|
||||
for(var i in nodes) if((i!=npwr)&&(i!=ngnd)) res.push(i);
|
||||
var ii = 0;
|
||||
for(var i in nodes) {
|
||||
// Don't feed numeric strings to recalcNodeList(). Numeric
|
||||
// strings can cause a (data dependent) duplicate node number
|
||||
// hiccup when accumulating a node group's list, ie:
|
||||
// group => [ "49", 483, 49 ]
|
||||
ii = Number( i );
|
||||
if((ii!=npwr)&&(ii!=ngnd)) res.push(ii);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -14407,7 +14415,7 @@ var dis6502={
|
||||
0x68:"PLA",
|
||||
0x69:"ADC #",
|
||||
0x6A:"ROR ",
|
||||
0x6C:"JMP zp",
|
||||
0x6C:"JMP (Abs)",
|
||||
0x6D:"ADC Abs",
|
||||
0x6E:"ROR Abs",
|
||||
0x70:"BVS ",
|
||||
@ -14855,4 +14863,4 @@ jQuery.cookie = function(name, value, options) {
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
})(jQuery);
|
||||
|
Loading…
x
Reference in New Issue
Block a user