Just got the replacement RAM from ali - https://he.aliexpress.com/item/1005008068111259.html, and going to make thr RAM tester with ESP32, 

ESP32 to TMS4164 Pin Mapping

Configure your pins in the Arduino IDE according to this map or modify the definitions in the code below.

TMS4164 PinFunctionESP32 GPIO
Pin 8VCC (+5V)External 5V Supply
Pin 16VSS (GND)GND (Commoned with ESP32)
Pin 4RAS (Row Address Strobe)GPIO 23
Pin 15CAS (Column Address Strobe)GPIO 22
Pin 3W (Write Enable)GPIO 21
Pin 2D (Data In)GPIO 19
Pin 14Q (Data Out)GPIO 18 (Use Voltage Divider)
Pins 5,6,7,12,11,10,13,9A0 – A7 (Address Bus)GPIOs 13, 12, 14, 27, 26, 25, 33, 3