If the oil that comes out looks really skanky then throw some diesel in there and then run the engine at low idle for a few minutes without using any hydraulic functions. Keep draining and flushing with diesel until what you drain runs clear. At that point leave the box to drain for at least 30 minutes while you have a coffee, lunch, cigarette, or whatever. Then come back and fill to level with the correct oil.
This may not work for your machine but we replaced the EP80W-90 oil in our Hitachi pump drive boxes with an SAE50 TO-4 oil and saw an immediate drastic improvement in oil condition as measured by oil analysis. Also our wear rates dropped way down. Despite the fact the oils appear to be very different the viscosity is as near as damnit the same. We ended up replacing the EP 80W-90 with TO-4 SAE50 in pump drives, swing boxes, and final drives.