The purpose of the RAM test is less to check the RAM and more to check the
connections to the RAM. Testing in another machine won't help here.

The purpose of a game test is just to rule out as many variables as possible (bad floppies etc.) - if a simple 512KB A500 game (Which is tested as normally working on an 040) fails, it'll give us a bit more idea. Still sounds like a bus error to me.
That thing about only 8MB RAM detected.... I presume you're fitting 4 4MB SIMMs? If it's supposed to be 16MB but only 8MB is detected, then something's squiffy with the RAM bus or connector, probably.