I have a 97 honda civic dx with a d16y8 swap and I was literally driving down the road and my car shut off and the battery light came on, although it not my battery, alternator, or starter. What else could it possibly be?
Unless you have a solid reason to believe there's a compression issue, start with the other items in this order:
1. CEL codes (click codes link in my signature)
2. Fuel (listen for whether fuel pump primes when key is turned to ON[II])
3. Spark (click spark link in my signature)
4. Mechanical timing (detailed later after you post results from 3 above)