[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: winbin



A long time ago, I wrote a thing called tuna, which used a text based
format for defining tables.  An example would be like this:

image
  image_size=0x1000
  file_offset=0
  checksum_addr=0
  checksum_size=2
  checksum_start=2
  checksum_end=0xfff
endimage

table
  type=0
  address=0x50d
  name=Malfunction Flags 12-24
  flag1=12
  flag2=13
  flag3=14
  flag4=15
  flag5=21
  flag6=22
  flag7=23
  flag8=24
  one_state=enable
  zero_state=disable
endtable    

table
  type=1
  address=0x02
  name=Prom ID
  data_width=2
endtable

table
  type=2
  address=0x15e
  name=WOT Spark Advance
  scale=0.352
  num_columns=8
  h_unit=degrees
endtable

table
  type=3
  address=0x37f
  num_columns=8
  num_rows=9
  scale=.3906
  name=VE% vs RPM and MAP
  h_unit=MAP (kPa)
  h_start=30
  h_end=100
  v_unit=RPM
  v_start=400
  v_end=3600
endtable

The "image" entry defines the image you are looking at, like it's size,
where the checksum is, what areas are checksummed, etc.

It's followed by multiple "table" entries that define tables.  type is
the dimension of the table:
0=bitmapped field (ie malfunction flags)
1=single data value (ie prom id)
2=row of data (advance vs temp)
3=rows of data (VE vs RPM and MAP)

Each table type defines the number of columns and rows as appropriate,
plus scaling factors, name and range of row and column values, etc.

The tuna program itself just reads the definition file (I called it a
.ecm file) and a bin, and dumps out tables in text, according to the
definition.  I wrote it in an afternoon, so it's very very basic.  I
wrote it hoping that someone would incorporate the table reading/parsing
code into a real bin editing program.  It's sitting in the incoming
directory, called tuna.zip I think.  There's a Solaris executable and a
PC executable in the file, along with the C source code.

It doesn't handle the 1/x case that's being discussed, and it may need
some other tweaks but it's a starting point.  And, as Eric suggested,
it's extendible without breaking previous versions.

something to consider...

--steve


Eric Aos wrote:
> 
> I have no problem with adding the functionality... it would be nice to keep
> a standard though.
> 
> Have we learned enough that it's time for a newer standard ???
> 
> One limitation I've noticed is some furriners use a comma instead of the
> period to denote a decimal point... and the ECU file is nothing more than a
> comma delaminated file, so it throws everything off a step.
> 
> Would also be nice to remove the number of character limitations for some
> headings.
> 
> My vote is to go to a windows INI format, that would allow for adding new
> fields in the future, without breaking previous versions.
> 
> Eric
> 
> > I was thinkin, not to beat a dead dog again,
> > Back to the inj mass flow rate.  I edited the ecu so it would
> > show hr/lb.
> > Could it be posible (directed to eric) to edit winbin so as
> > it would read an
> > ecu file to take the inverse of a constant..ie
> > Under mult or div or bit, add another option for inverse..
> > inverse would
> > divide the constant by the dec value..
> > Something like div or (1 in ecu file) it divides the dec value by the
> > constant....
> >
> > This could be used in other sections... it would be nice if
> > the maker of
> > promedit would do the same thing...
> > Mike Rolica
> > Plant A,
> > Magnesium Products Division
> > Strathroy
> >
> > (519)-245-4040  Ext. 265
> >
> ----------------------------------------------------------------------------
> To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
> in the body of a message (not the subject) to majordomo@lists.diy-efi.org

-- 
Steve Ravet
steve.ravet@arm.com
ARM,Inc.
www.arm.com
----------------------------------------------------------------------------
To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
in the body of a message (not the subject) to majordomo@lists.diy-efi.org