DeSmuME - Emulator base class¶
- class desmume.emulator.DeSmuME(dl_name: str = None)[source]¶
Bases:
objectDeSmuME, the Nintendo DS emulator.
- close()[source]¶
Close a previously opened ROM, freeing up memory. You don’t need to call this before opening a new ROM (it is done automatically).
- create_sdl_window(auto_pause=False, use_opengl_if_possible=True) DeSmuME_SDL_Window[source]¶
Create an SDL window for drawing the emulator in and processing inputs.
- Parameters:
auto_pause – Whether or not “tabbing out” of the window pauses the game.
use_opengl_if_possible – Whether or not to use OpenGL for rendering, if available.
- cycle(with_joystick=True)[source]¶
Cycle one game cycle / frame. Set
with_joysticktoFalse, if joystick processing was not initialized.
- destroy()[source]¶
Destroy the emulator and free memory. Calling any method after this WILL result in a crash.
- display_buffer()[source]¶
Return the display buffer in the internal format. You probably want to use display_buffer_as_rgbx instead.
- display_buffer_as_rgbx(reuse_buffer=True) memoryview[source]¶
Return the display buffer as RGBX color values, see the screen size constants for how many pixels make up lines.
- gpu_get_layer_main_enable_state(layer_index: int)[source]¶
Get the current display status of the specified layer on the main GPU.
- gpu_get_layer_sub_enable_state(layer_index: int)[source]¶
Get the current display status of the specified layer on the sub GPU.
- gpu_set_layer_main_enable_state(layer_index: int, state: bool)[source]¶
Set the current display status of the specified layer on the main GPU.
- gpu_set_layer_sub_enable_state(layer_index: int, state: bool)[source]¶
Set the current display status of the specified layer on the sub GPU.
- property input¶
Keyboard and joystick configuration.
- Type:
- is_running() bool[source]¶
Returns
True, if a game is loaded and the emulator is running (not paused).
- property memory¶
Accessing and manipulating the memory.
- Type:
- property movie¶
Recording and playing back movies.
- Type:
- open(file_name: str, auto_resume=True)[source]¶
Open a ROM by file name.
If
auto_resumeis True, the emulator will automatically begin emulating the game. Otherwise the emulator is paused and you may callresumeto unpause it.
- resume(keep_keypad=False)[source]¶
Resume / unpause the emulator. This will reset the keypad (release all keys), except if
keep_keypadis provided.
- property savestate¶
Loading and saving savestates.
- Type: