nesdev.com
http://forums.nesdev.com/

Accesing frames from a NES emulator
http://forums.nesdev.com/viewtopic.php?f=10&t=15955
Page 1 of 1

Author:  jiwidi [ Wed May 17, 2017 2:31 pm ]
Post subject:  Accesing frames from a NES emulator

Hi guys, i have a project in mind related with some artificial inteligence playing NES, my biggest problem is the way to get the frame output (not building the IA haha) so i then process it in my ia, i need to get a refresh rate of at least 24frames per second, i read something about accesing ram to check values and then building the image? i seriusly have no idea of how to get the image from a emulator perspective rather than just screenshoting (not optimal), any of you guys know some NES emulator that could help me with this?

Thanks in advance

Author:  tokumaru [ Wed May 17, 2017 3:19 pm ]
Post subject:  Re: Accesing frames from a NES emulator

FCEUX has Lua scripting capabilities, which allow you to easily analyze the state of the game every frame by peeking at the RAM. You'll certainly need to research the specific game(s) you'll be working with in order to know where to find all the relevant information about the player, the enemies, the levels, and so on.

EDIT: Here's an example of a small Lua script I wrote to display information about the hardware sprites. What you need to do is a little different from this, because you're interested in the game state, which is formatted differently in each game, but the script can still show you how to set things up, read from memory, draw to the screen, and other things you might need.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/