Post subject: Running FCEUX "Headless" (by Disabling PPU Output?)
eithunm
He/Him
Joined: 11/2/2016
Posts: 2
Hi Everyone, I'm working on a machine learning project in FCEUX using Lua. I'm running the emulator on the maximum speed allowed (3200x), but I'd like to run faster trials. First, I'd like to run the game without showing any graphics on the screen. I looked through the code, but I can't find exactly where I might prevent it from rendering graphics. (In some main game loop?) Then I'd like to run the emulator as fast as possible. So rather than running it at a "frame rate," I'd like it to run as fast as memory can be updated. If there is someway to do this please point me to the relevant code to hack off or to some other existing feature. I'm on Ubuntu. Thanks!
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11477
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Try places where it writes to Xbuf. And obviously where it blits things too (vidblit.cpp).
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Joined: 7/2/2007
Posts: 3960
Is 3200x the maximum allowed due to an artificial constraint in the code, or is it the max you're achieving with your hardware? Naturally if it's the former then you should try increasing that number. :) What's your project about? Machine learning's always a fun topic.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
eithunm
He/Him
Joined: 11/2/2016
Posts: 2
Thanks for your replies. I'm testing out a new neuroevolution algorithm (similar to NEAT) on an NES game. I believe that 3200x is a constraint imposed by the software, but I'm not sure where I can kick that up. I'm also wondering if that would still render the information for each frame, given the clock tied to the emulated CPU. Also, is there any easy way to kill FCEUX from a Lua script? Thanks!
Player (172)
Joined: 7/1/2016
Posts: 263
How you get 3200x speed? You modified fceux somehow? My Core i7 4770k CPU outputs only 650-670 fps at max. So it's only ~10x speed.
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11477
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Yeah, speed modifiers won't matter after you hit the CPU cap. So when attempting to speed the emu up, you should be referring to the FPS display.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.