Here's what I use in Dying Eyes and FFX4:
shakeloop:
ld a,42h
out (10h),a
CALL_(DELAY2)
ld a,40h
out (10h),a
CALL_(DELAY2)
RET
It's for OS-82, but all you should need to change are the
CALL's. The delay can be whatever, but without the screen shakes a
little too fast. Btw, that's hardware scroll.
~Kurai