12x12 and 16x16 table memory overlap

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

Post Reply
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

12x12 and 16x16 table memory overlap

Post by LT401Vette »

When the selectable 12x12 or 16x16 tables first went into the MSII-extra code, there was a problem with the changes to 16x16 tables in MLV not showing up after MegaTune burned them to the unit. The reason for this was that MLV doesn't change any form of underlying memory model, just the values in the MSQ itself. So, when you update a 16x16 table in MLV it would save the changes to the msq fine, but when you loaded in in MegaTune and told it to burn, this would happen:
- The new 16x16 table is burned to the unit
- The old unedited 12x12 table is burned to the unit

Essentially step 2 undid step 1, and left it appearing that changes to only part of the table would stick. The part beyond the 144 offset of the 12x12 table.

I put in a fix for this some time back, where mlv does go through and alter the 12x12 table so it would stick.

However, in the more recent beta 2.0 versions the addressing of the tables has changed. It used to be that all the tables started in the same place whether it was in 12x12 or 16x16 mode, if in 12x12 mode bytes 145-256 were just unused. Now if you are in 12x12 mode, the next table starts immediately after the end of the last table.

Old:
veTable1: 0-255
veTable1doz: 0-143
veTable2: 256-512
veTable2doz: 256-399
...

New:
veTable1: 0-255
veTable1doz: 0-143
veTable2: 256-512
veTable2doz: 144-287
...

Now with the new memory layout, it is certainly more efficient use while in 12x12 mode, but now veTable2doz overwrites veTable1 when loading and msq. veTable2 is overwritten in part by veTable2doz and veTable3doz ...

I'm sure I can come up with a work around for this, but it will take a bit of work and before I did it, I wanted to know:
Questions
- Are you able to actually use any of that regained memory due to supporting the 16x16 mode?
- Was this simply a cleanup rearrange thing, that didn't really matter?
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
hassmaschine
Super MS/Extra'er
Posts: 1331
Joined: Mon May 21, 2007 8:36 am

Post by hassmaschine »

is this only a problem if you are running VE analysis, saving the MSQ and then burning the entire MSQ with your new VE table? because I always just export the VE table alone and burn that. no reason to burn the whole MSQ and risk corrupting other settings :)
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Post by LT401Vette »

It is only if you are doing the entire msq. Exporting the VEX and importing it works fine and is the work around.

Some people do prefer to do the vex all the time for various reasons.

I wouldn't worry about corrupting any other settings though, That would be very low risk, and there haven't been any reports of that happening.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
jsmcortina
Site Admin
Posts: 39614
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

I had to change the memory locations because 12x12 was actually broken.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Post Reply