> I tried this link to get dx9 but still the same error. Is Win 7 x64 a good OS choice > as that comes with dx11. Could XP be better?
Windows 10 x64 is recommended
Windows 7 x64 is fine for now.
Windows XP is considered unsupported and will likely just give you a blue screen when you run MAME on your hardware.
You still need to have DirectX 9 and proper GFX card drivers installed. For the card you say you have you should only be getting the error you report if you don't have them installed.
Also an up to date version of MAME helps as the version you're using is from a long time ago and could have other bugs or incompatibilities causing the issue you're seeing. Saying the new version breaks some of your roms is a poor excuse, you just need to find the updated roms.