mirror of https://github.com/rusefi/RomRaider.git
extended rom support
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@794 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
074309a016
commit
db23f50703
|
@ -38,8 +38,8 @@
|
|||
<description>Turbo Boost Error Correction</description>
|
||||
</table>
|
||||
|
||||
<table type="2D" name="Air Temperature Compensation" category="Fuel" flipy="true" storagetype="uint8"
|
||||
endian="big" sizey="8" userlevel="3">
|
||||
<table type="2D" name="Air Temperature Compensation" category="Fuel" storagetype="uint8" endian="big" sizey="8"
|
||||
flipy="true" userlevel="3">
|
||||
<scaling units="units" expression="x" to_byte="x" format="0.00" fineincrement="1" coarseincrement="5"/>
|
||||
<table type="Y Axis" name="Temp" storagetype="uint16" endian="big">
|
||||
<scaling units="C" expression="x-40" to_byte="x+40" format="0.00" fineincrement="1"
|
||||
|
|
|
@ -144,8 +144,12 @@ public class Table3D extends Table {
|
|||
int jMax = swapXY ? yAxis.getDataSize() : xAxis.getDataSize();
|
||||
for (int i = 0; i < iMax; i++) {
|
||||
for (int j = 0; j < jMax; j++) {
|
||||
data[i][j] = new DataCell(scales.get(scaleIndex), settings.getCellSize());
|
||||
data[i][j].setTable(this);
|
||||
|
||||
int x = flipX ? iMax - i - 1 : i;
|
||||
int y = flipY ? jMax - j - 1 : j;
|
||||
|
||||
data[x][y] = new DataCell(scales.get(scaleIndex), settings.getCellSize());
|
||||
data[x][y].setTable(this);
|
||||
|
||||
// populate data cells
|
||||
if (storageType == STORAGE_TYPE_FLOAT) { //float storage type
|
||||
|
@ -154,10 +158,10 @@ public class Table3D extends Table {
|
|||
byteValue[1] = input[storageAddress + offset * 4 - ramOffset + 1];
|
||||
byteValue[2] = input[storageAddress + offset * 4 - ramOffset + 2];
|
||||
byteValue[3] = input[storageAddress + offset * 4 - ramOffset + 3];
|
||||
data[i][j].setBinValue(RomAttributeParser.byteToFloat(byteValue, endian));
|
||||
data[x][y].setBinValue(RomAttributeParser.byteToFloat(byteValue, endian));
|
||||
|
||||
} else { // integer storage type
|
||||
data[i][j].setBinValue(
|
||||
data[x][y].setBinValue(
|
||||
RomAttributeParser.parseByteValue(input,
|
||||
endian,
|
||||
storageAddress + offset * storageType - ramOffset,
|
||||
|
@ -166,12 +170,12 @@ public class Table3D extends Table {
|
|||
|
||||
// show locked cell
|
||||
if (tempLock) {
|
||||
data[i][j].setForeground(Color.GRAY);
|
||||
data[x][y].setForeground(Color.GRAY);
|
||||
}
|
||||
|
||||
data[i][j].setXCoord(i);
|
||||
data[i][j].setYCoord(j);
|
||||
data[i][j].setOriginalValue(data[i][j].getBinValue());
|
||||
data[x][y].setXCoord(x);
|
||||
data[x][y].setYCoord(y);
|
||||
data[x][y].setOriginalValue(data[x][y].getBinValue());
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
|
@ -491,15 +495,18 @@ public class Table3D extends Table {
|
|||
for (int i = 0; i < iMax; i++) {
|
||||
for (int j = 0; j < jMax; j++) {
|
||||
|
||||
int x = flipX ? iMax - i - 1 : i;
|
||||
int y = flipY ? jMax - j - 1 : j;
|
||||
|
||||
// determine output byte values
|
||||
byte[] output;
|
||||
if (storageType != STORAGE_TYPE_FLOAT) {
|
||||
output = RomAttributeParser.parseIntegerValue((int) data[i][j].getBinValue(), endian, storageType);
|
||||
output = RomAttributeParser.parseIntegerValue((int) data[x][y].getBinValue(), endian, storageType);
|
||||
for (int z = 0; z < storageType; z++) {
|
||||
binData[offset * storageType + z + storageAddress - ramOffset] = output[z];
|
||||
}
|
||||
} else { // float
|
||||
output = RomAttributeParser.floatToByte((float) data[i][j].getBinValue(), endian);
|
||||
output = RomAttributeParser.floatToByte((float) data[x][y].getBinValue(), endian);
|
||||
for (int z = 0; z < 4; z++) {
|
||||
binData[offset * 4 + z + storageAddress - ramOffset] = output[z];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue