RE: Even the offical mame code is like that in machine\neogeo.c
No it not. I check on Mame Plus NeoGeo source and the Mame NeoGeo source.
Only in the Mame Plus does that the way. The way you and Robert does it.
Download the offical Mame source. You will see the differents between the Mame Plus NeoGeo source and the Mame NeoGeo source.
Mame Plus over writes the Mame NeoGeo source. A little different coding Mame Plus uses. Beside it got hacks coding which the Mame NeoGeo source doesn't have which are not on the same page.
Anyway I don't make Mame Plus and don't uses the Mame Plus source.
Why do you think that I have so many problems? Because I don't use the Mame Plus and source.