Connection of KS0108 display with arduino mega or ESP32

I recently brought this Ks0108 128x64 lcd display. I also installed the openGLCD library. BUT i couldnot find any pin connection diagram with arduino mega or esp32. Can anyone please give me proper guidance of how to hook it up with arduino and run graphics . And will the display work with esp32? If yes then what are the steps?

Thanks in advance

I found this for you: AVR-KS0108/Demonstration.png at master · efthymios-ks/AVR-KS0108 · GitHub

It's not for a Mega but should be easy to "translate".