JavaScript (Node.js), 175172 bytes
([aa,b]b,x,y)=>eval('for(c=d=t=0;c-a||ba|b-d;[c,d]=x(p,q))y(p=++t>>8,q=t&255)')
S=(k,t)=>[128+k/2+k%2/2+64*(k>62),(k%2?63+(t>63):158)+t]
J=(k,t)=>[32+k,32+t]
E=(k,t)=>[160+k,160+t]
Invoke as f([227227, 129]129, S, E)
where S=Shift_JIS, E=EUC, J=JIS
.