Many, maybe most, large (over 5000 HP) two and four stroke Marine Diesels use what's called direct reversing. The engine is started and runs backwards rather than have a reversing gearbox. I spent a couple of fun years running two 3000HP "Mirlees" direct reversing engines on a ship.
There are several ways of doing this but all involve changing the inspiration, exhaust, and fuel timing. The Mirlees had two sets of cams on the same shaft ,side by side, with followers that could slide back and forth to respond to one cam or it's differently positioned mate and transmit motion to the push rod. The same applied for all cams intake, exhaust, and fuel. Some makes of engines have a shaft with two complete sets of cams rigidly mounted in diferent positions and to prepare the engine for reverse one slides the whole cam bodily until the new cams are in position to do their job. These engines are very robust and generally run on heavy fuels which used to be called Bunker A,B,and C. Bunker C's viscosity was comparitive to very heavy molasses. They're made by companies like MAN/B&W, Sulzer and Mitsubishi It couldn't be handled, pumped or transfered tank to tank unless heated to about 100F. To be prepared for injection temps are brought up to in excess of 200F. Largest engines produced, I believe, approach 100,000 HP and run at 95 to 100 RPM. with 12 cylinders in line.
Notably, for the oil change freaks, they never change lubricating oil.
If it still exists, I started a thread about "large engines" it might have been called. There was a picture and a little demo file there I think I found the thread it was "A Marine or Stationary Engine" not sure if I can get it as an attachment for you but a search will find it
David