i am interessting if anything like that has been tried before, search came up with no results

Is there any know method to read the game state out of ZSNES?
Per Example we want the AI to play Tetris. How can we get the position of each block?
Best option would be to directly read it out of the memory, but where?
Sending input to ZSNES is not that hard.