Tag Archives: Mono

ScoobyRom v0.8.2 Released

What’s new in v0.8.2:
  • Export as TunerPro XDF format.
  • Support for ROM type SH72531 (1.25 MiB = 1280 KiB size)
  • Display Reflash Count if known/available (Properties-window).

Project homepage: ScoobyRom Software


Already implemented in previous version is the ability to parse and display ROM Date (year-month-day), diesel as well as petrol type encodings. May not work for all ROM types (yet), though. AFAIK, ScoobyRom is the only software parsing this Denso specific date.

ScoobyRom 0.8.2 - Properties window, CID JZ4A211B

ScoobyRom 0.8.2 – Properties window, CID JZ4A211B

TunerPro (XDF)

Due to my intense work on BMW ECUs in recent years, I got familiar with TunerPro which is a generic ROM editor. It is quite popular in the BMW community, it can handle lots of data format options. Its definition format “XDF” is XML-based as usual. As an exercise to verify XDF knowledge I implemented XDF output in ScoobyRom.

Compared to RomRaider, reading an XDF containing hundreds of tables is very fast, almost instant. TunerPro is Windows-only and closed-source however.

TunerPro 5.00.8853 screenshot, Windows 10 x64, XDF generated by ScoobyRom

TunerPro 5.00.8853 screenshot, Windows 10 x64, XDF generated by ScoobyRom

ScoobyRom v0.8.0 Released

New in v0.8.0:
  • Navigation bar visualisation.
  • Additional columns (conversion: Multiplier & Offset or NaN if not used; Axes locations: XPos, YPos)
  • Select all/none
  • RomRaider definitions export: choose whether to export all/selected/annotated tables.
  • Roughly 3 times faster when scanning whole ROM.
  • Lots of misc improvements in code at least…

Go to homepage: ScoobyRom Software
Post software specific feedback there, please!
Also, if you find this software useful consider to “like” above page as minimum feedback and motivation for future work!

ScoobyRom v0.7.1 Released

New in v0.7.1:
  • Dynamically adjust icon size (Ctrl-+, Ctrl--, Ctrl-0)
  • Edit -> Copy Table: Can paste values into existing RomRaider table, spreadsheet (LibreOffice Calc, Microsoft Excel), text editor etc.
  • Miscellaneous improvements as always.
  • Also tested on Windows 10, no changes were necessary.

Go to page: ScoobyRom Software
Enjoy and provide software specific feedback there, please!

ScoobyRom v0.7.0 Released

Go to page: ScoobyRom Software

Enjoy and provide software specific feedback there, please!

Pre-compiling to native code with Mono

For advanced users and developer audience, using Mono runtime on Linux!

Although .NET runtimes in general are pretty fast, one can pre-compile a .NET assembly (.exe, .dll) to native code.
Here I am using ScoobyRom 0.6.0 R1 build (125 KiB) as demo assembly.

mono --aot=full --optimize=all ScoobyRom.exe
Created “ScoobyRom.exe.so” (685 KiB)

Since I run Linux x64, Linux file command tells it contains 64 bit native code:
file ScoobyRom.exe.so

ScoobyRom.exe.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped

Generate native disassembly into text file:
objdump -d ScoobyRom.exe.so --disassembler-options=intel --no-show-raw-insn > ScoobyRom.exe.asm

ScoobyRom.exe.asm contains >49,000 lines so use a good editor (or less) to view it.
Snippet from the file showing a single method (from MainWindow.cs source):

0000000000002bf0 <MainWindow_OnVisualizationAction_object_System_EventArgs>:
    2bf0:	sub    rsp,0x28
    2bf4:	mov    QWORD PTR [rsp],r14
    2bf8:	mov    QWORD PTR [rsp+0x8],r15
    2bfd:	mov    r15,rdi
    2c00:	mov    rax,QWORD PTR [r15+0x58]
    2c04:	mov    rcx,rax
    2c07:	cmp    DWORD PTR [rcx],0x0
    2c0a:	movzx  eax,BYTE PTR [rax+0x50]
    2c0e:	test   eax,eax
    2c10:	je     2c7e <MainWindow_OnVisualizationAction_object_System_EventArgs+0x8e>
    2c16:	mov    rdi,r15
    2c19:	call   2460 <MainWindow_get_CurrentUI>
    2c1e:	mov    r14,rax
    2c21:	dec    r14d
    2c24:	cmp    r14d,0x2
    2c28:	jae    2c7e <MainWindow_OnVisualizationAction_object_System_EventArgs+0x8e>
    2c2e:	mov    rax,r14
    2c31:	shl    eax,0x3
    2c34:	mov    ecx,eax
    2c36:	mov    rax,QWORD PTR [rip+0x449db]        # 47618 <__bss_start+0x160>
    2c3d:	add    rax,rcx
    2c40:	mov    rax,QWORD PTR [rax]
    2c43:	jmp    rax
    2c45:	mov    rax,QWORD PTR [r15+0x78]
    2c49:	mov    rdi,rax
    2c4c:	cmp    DWORD PTR [rax],0x0
    2c4f:	call   2ee44 <plt_ScoobyRom_DataView2DGtk_get_Selected>
    2c54:	mov    rsi,rax
    2c57:	mov    rdi,r15
    2c5a:	call   2b10 <MainWindow_Show2D_Subaru_Tables_Table2D>
    2c5f:	jmp    2c7e <MainWindow_OnVisualizationAction_object_System_EventArgs+0x8e>
    2c64:	mov    rax,QWORD PTR [r15+0x68]
    2c68:	mov    rdi,rax
    2c6b:	cmp    DWORD PTR [rax],0x0
    2c6e:	call   2ee4e <plt_ScoobyRom_DataView3DGtk_get_Selected>
    2c73:	mov    rsi,rax
    2c76:	mov    rdi,r15
    2c79:	call   2ee58 <plt_MainWindow_Show3D_Subaru_Tables_Table3D>
    2c7e:	mov    r14,QWORD PTR [rsp]
    2c82:	mov    r15,QWORD PTR [rsp+0x8]
    2c87:	add    rsp,0x28
    2c8b:	ret

Lines containing r…-registers definitely are x64-only Intel/AMD-CPU instructions.
Seems like Mono on Linux x64 machine ignores the .NET assembly 32 bit flag. That’s ok for me, even though I’ve got gtk (x64) and gtk-32bit packages installed on my box.
Mono picks up pre-compiled files automatically. I don’t notice big performance improvements running ScoobyRom though, many things depend on UI libs and their native performance anyway.
Of course you can pre-compile and inspect other .NET assemblies the same way (LibScoobyRom.dll, NPlot.dll).
gnuplot is fully separated, I certainly won’t bother trying to optimize its large codebase.