Flt2vhs: A BMS Replay Converter
-
Obviously yes:
Intel Xeon CPU E3-1220 V2 @ 3.10GHz 3.10 GHz
Cheers
-
-
Obviously yes: Intel Xeon CPU E3-1220 V2 @ 3.10GHz 3.10 GHz
I made a dumb mistake: previous releases targeted my laptop’s CPU (an Intel Skylake), so the binaries contained AVX2 instructions that aren’t supported by older machines. I believe this is the source of the crash, not file permissions.
This should be fixed in version 0.4: https://github.com/mrkline/flt2vhs/releases/tag/v0.4
Obi1, I believe this should fix your issue as well.
-
Will test it on the server but seems to be working so far!
Cheers
-
Thanks! Will test this also. processor: E8600 C2D
Cheers Obi1
-
I must add to the hotlist
-
Startup error is fixed. Thanks!
Cheers Obi1
-
Tired of running acmi-compiler or flt-mover in the background to keep BMS from (slowly) converting FLT files to VHS? Wouldn’t it be nice if BMS just… didn’t do that?
I’m happy to announce the latest version of, flt2vhs 0.7, with a major improvement! Instead of running something in the background, flt2vhs ships with a tool (patch-bms-novhs) that disables BMS’s (slow) replay conversion. Just:
- Run the shiny new patch-bms-novhs.exe once, and behold! BMS will proceed directly from 3D to the debrief screen. No background programs required!
- Convert FLT files to VHS at your convenience with convert-all-flts.exe or by dragging and dropping them onto flt2vhs.exe
Grab it here: https://github.com/mrkline/flt2vhs/releases/tag/v0.7
-
Tired of running acmi-compiler or flt-mover in the background to keep BMS from (slowly) converting FLT files to VHS? Wouldn’t it be nice if BMS just… didn’t do that?
I’m happy to announce the latest version of, flt2vhs 0.7, with a major improvement! Instead of running something in the background, flt2vhs ships with a tool (patch-bms-novhs) that disables BMS’s (slow) replay conversion. Just:
- Run the shiny new patch-bms-novhs.exe once, and behold! BMS will proceed directly from 3D to the debrief screen. No background programs required!
- Convert FLT files to VHS at your convenience with convert-all-flts.exe or by dragging and dropping them onto flt2vhs.exe
Grab it here: https://github.com/mrkline/flt2vhs/releases/tag/v0.7
Does it change BMS original files, and if so, what back up is there to be made?
-
Does it change BMS original files, and if so, what back up is there to be made?
It modifies Falcon BMS.exe by replacing the two calls to ACMI_ImportFile(), the FLT -> VHS conversion function, with an instruction that does nothing.
You can revert the changes any time you would like with
patch-bms-novhs –restore
, but backups are never a bad idea. -
It modifies Falcon BMS.exe by replacing the two calls to …
If you accomplished that without source code … just debug symbols and disassembly? (incl. cleaning up the stack properly, zeroing return register, etc and verifying there’s no other side-effects within scope of that conversion function or downstream from the call site) … hmm, I can’t find an emoji for the nod of deep respect that I want to convey.
Nice work!
-
If you accomplished that without source code … just debug symbols and disassembly? (incl. cleaning up the stack properly, zeroing return register, etc and verifying there’s no other side-effects within scope of that conversion function or downstream from the call site) … hmm, I can’t find an emoji for the nod of deep respect that I want to convey.
Nice work!
It’s easier than it sounds (though this doesn’t diminish mrkline’s accomplishments :D). According to the Win x64 ABI, it’s the callee’s job to restore the stack and non-parameter registers. I think the only thing you’d need to worry about is if the caller expects the function to return something or relies on some side effect of the function call. Luckily in this case neither of those apply. So all you need to do is replace the relevant
call
instructions withnop
instructions. -
Wait a minute, so this patching does actually change the exe itself?
Would it work with older versions of BMS? Or could this have unwanted results?Cheers Obi1
-
The change is specific to 4.35U1 and will not work with older versions, which is why the patching tool checks that it’s looking at the right version before doing anything.
-
thanks for this excellent tool, mrkline!! Will it also work in those cases when flt files are left over in the acmi dir if BMS crashes during exit from 3d or during a mission?
All the best,
Uwe
-
Win x64 ABI
Sounds basically like what used to be ‘__fastcall’ calling convention in 32-bit code.
So nice to see how x64 simplified and clarified things, in that regard. I had the displeasure of debugging IA64 code back ca. early 2000s and I still feel mildly traumatized from the experience…
The two of you have given me courage to run BMS under WinDbg, going forward…
[consider] doing a ‘XOR rax,rax’ among the NOPs, just to be safe.
-
version 0.7 crashes again on startup. latest working was 0.5. Probably again CPU related?
Cheers Obi1
-
The two of you have given me courage to run BMS under WinDbg, going forward…
Do it! Abelian and I have had good luck using it to debug crashes that don’t generate dumps. (Most of them seem to be heap corruption related.)
[consider] doing a ‘XOR rax,rax’ among the NOPs, just to be safe.
x64 has no-ops for every occasion!
+---------+---------------------------------------------+------------------------------+ | LENGTH | ASSEMBLY | BYTE SEQUENCE | +---------+---------------------------------------------+------------------------------+ | | | | | 2 bytes | 66 NOP | 66 90H | | | | | | 3 bytes | NOP DWORD ptr [EAX] | 0F 1F 00H | | | | | | 4 bytes | NOP DWORD ptr [EAX + 00H] | 0F 1F 40 00H | | | | | | 5 bytes | NOP DWORD ptr [EAX + EAX*1 + 00H] | 0F 1F 44 00 00H | | | | | | 6 bytes | 66 NOP DWORD ptr [EAX + EAX*1 + 00H] | 66 0F 1F 44 00 00H | | | | | | 7 bytes | NOP DWORD ptr [EAX + 00000000H] | 0F 1F 80 00 00 00 00H | | | | | | 8 bytes | NOP DWORD ptr [EAX + EAX*1 + 00000000H] | 0F 1F 84 00 00 00 00 00H | | | | | | 9 bytes | 66 NOP DWORD ptr [EAX + EAX*1 + 00000000H] | 66 0F 1F 84 00 00 00 00 00H | +---------+---------------------------------------------+------------------------------+
version 0.7 crashes again on startup. latest working was 0.5. Probably again CPU related?
Crap! It’s the same issue as before - I had fixed the bad build config on one machine but not the other. Apologies - I’ll fix the build later today.
-
https://github.com/mrkline/flt2vhs/releases/tag/v0.7 should now contain binaries without those pesky AVX instructions. Apologies again!
-
These are working again, thanks!