mirror of
https://github.com/fadden/6502bench.git
synced 2024-08-19 20:29:36 +00:00
Default to source bank in Format Address Table
When formatting a table of 16-bit addresses in 65816 code, the bank byte was always being set to zero. However, for "JMP (addr,X)", the program bank is used. We now default to that behavior. The choice can be overridden as before (select 24-bit addresses with a constant value for the bank byte).
This commit is contained in:
parent
eecace8988
commit
ad02494f0f
@ -419,7 +419,17 @@ namespace SourceGen.WpfGui {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bankOff = -1; // use constant
|
bankOff = -1; // use constant
|
||||||
bankConst = 0; // always bank 0
|
|
||||||
|
// Set the constant bank value equal to whichever bank the table lives in.
|
||||||
|
// This is correct for "JMP (addr,X)". We use the offset of the first item
|
||||||
|
// in the range set, which is a little awkward to get to.
|
||||||
|
int offset = 0;
|
||||||
|
foreach (TypedRangeSet.Tuple tup in mSelection) {
|
||||||
|
offset = tup.Value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
int addr = mProject.AddrMap.OffsetToAddress(offset);
|
||||||
|
bankConst = (byte)(addr >> 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsSplitTable) {
|
if (IsSplitTable) {
|
||||||
|
Loading…
Reference in New Issue
Block a user