The battery is on the MPU5, however, if its been acting up for that long, I do not suspect the battery now. Lets hope it's something simple like a loose connection, but almost sounds like a power supply problem.
The green LED on the left bottom of the MPU5, this is the status light, flashing is normal, to the right of that there are 4 LED's that all should be lit up steady green, if you don't have 4 on you need to check the top box power supply, it is behind the main game reels, you may need to remove it to test it properly. I have the voltages if we get to that point.
The code 18 on the top box is normal on startup. It also tells us you do have communication (between machine and topbox) as the code 18 would just stay on and the top game will not try to start if you don’t. (And just FYI - If the communication between the main game and the top box is working, the small black box above the hopper should have the red and green LED's flashing.)