In addition to Sachito's great answer, you might be wondering how this form differs in nuance from other forms translated to English as 'while'.
This one has the nuance of 'just as [I] was doing something' or 'just at the very moment that I was doing something' and implies some kind of interruption.
In answer to your question about what he's coming to play with, it's worth noting that Japanese 'asobu' and English 'play' are not exact translations of each other. 'asobu' can mean 'hang out with' so in this case, Yamamoto came to hang out, or as Sachito said more naturally, he came for a visit.
Disclaimer: I'm not a native speaker.