RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Fri Dec 26, 2025 10:02 pm

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Verifying Functionality/Use of Maps
PostPosted: Sun Aug 30, 2020 11:53 am 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
Hello all!

Is there anyway to know for certain whether a map does something or is completely useless? For example, my ROM has 2D throttle maps that are setup for 4 modes. But the guides I’ve read said they go unused in vehicles that don’t actually have the drive modes. Then mMTFD and the four maps associated with that includes D mode (drive) and Ds mode (drive sport) but the Z only has drive and manualmatic mode. Would there be any way to verify which maps it uses and which ones are just leftover? (Apart from changing the values and flashing to your ECU)

Another reason for this is the fact that some maps just don’t even appear in IDA pro at all. Neither for the A2L nor for my ROM. This could just be an ida related issue but it’s something interesting nonetheless.

On top of this, is there anyway to understand what exactly a map is doing without going through the SH70XX coding and seeing exactly what it’s doing? Or are you pretty much forced to learn SH7058 coding in order to figure out the functionality of an unknown map? (Without just changing the values and seeing what happens haha)

Edit;

Off topic but does anyone care to explain what exactly the SH7058 datasheet means by "sign extension" and "zero extension"? Does sign extension just mean extending Dword_1234 to 0x00001234?

_________________
NissanDefinitions Repository


Last edited by Pytrex on Sun Aug 30, 2020 5:33 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Verifying Functionality/Use of Maps
PostPosted: Sun Aug 30, 2020 2:04 pm 
Offline
Experienced
User avatar

Joined: Wed Jan 08, 2014 11:07 pm
Posts: 652
Pytrex wrote:
Is there anyway to know for certain whether a map does something or is completely useless?

it's hard to know with 100% certainty but there are some clues. If the map has multiple code xrefs, then it's likely used, but it's possible that some xrefs come from "dead code" that either never executes or branches around a certain map access. Or a function's result may be ignored depending on certain option bits not being set.
If a map has no code xrefs, can't totally rule it out either as it's possible you're not looking hard enough - there is sometimes some known trickery involved like accessing via a near map plus an offset, etc.

Quote:
On top of this, is there anyway to understand what exactly a map is doing without going through the SH70XX coding

Meh, perhaps sometimes. If you find (with confidence) the corresponding map in the A2L, then you're done. But often to ascertain that you'll need to read disasm anyway. Can't really avoid it. On the plus side, SH assembly is mostly intuitive and easier to get used to than say, ARM.

_________________
If you like nisprog + npkern, you can support me via https://liberapay.com/fenugrec/
For sending me encrypted/secure messages, use PGP key 0xBAC61AEB3A3E6531 available from pool.sks-keyservers.net


Top
 Profile  
 
 Post subject: Re: Verifying Functionality/Use of Maps
PostPosted: Sun Aug 30, 2020 3:28 pm 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
Fenugrec wrote:
If a map has no code xrefs, can't totally rule it out either as it's possible you're not looking hard enough - there is sometimes some known trickery involved like accessing via a near map plus an offset, etc.

That's some good info! So if it has xrefs, it's more likely than not to be in use. I'll definitely have to look into what's going on with the throttle maps and see if they do show up in functions and such.

As for disassembly, that's what I figured. I'm slowly learning how to understand what's going on in the functions haha It probably doesn't help that this is my first endeavor with coding. But the datasheets are extremely useful.

_________________
NissanDefinitions Repository


Top
 Profile  
 
 Post subject: Re: Verifying Functionality/Use of Maps
PostPosted: Tue Jan 12, 2021 11:43 pm 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
For anyone wondering, it appears that Nissan resorts to flags to control the logic. From what I’ve personally seen, most, if not all, of the code is utilized. But the flags alter the actual functionality. So you can alter the functionality just with the flags alone. So far I’ve enabled gear by gear throttle control on my automatic Z and I’m looking at messing with the traction control fuel cut maps as well. Technically we could enable drive force logic, but I doubt it would make any sense to do that. Mainly because it’s seemingly CVT exclusive, so there’s probably a reason Nissan has it setup that way ;)

But CHECK THE FLAGS! For any automatic owners or people whose ROMs have a constant value of 100% for the TTEPTD map, definitely check the TTEPTD flag. There’s a very good chance that it’s not enabled.

_________________
NissanDefinitions Repository


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl