cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

emu.h (3298B)


      1/*
      2 * Gearboy - Nintendo Game Boy Emulator
      3 * Copyright (C) 2012  Ignacio Sanchez
      4
      5 * This program is free software: you can redistribute it and/or modify
      6 * it under the terms of the GNU General Public License as published by
      7 * the Free Software Foundation, either version 3 of the License, or
      8 * any later version.
      9
     10 * This program is distributed in the hope that it will be useful,
     11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     13 * GNU General Public License for more details.
     14
     15 * You should have received a copy of the GNU General Public License
     16 * along with this program.  If not, see http://www.gnu.org/licenses/
     17 *
     18 */
     19
     20#ifndef EMU_H
     21#define	EMU_H
     22
     23#include "../../src/gearboy.h"
     24
     25#ifdef EMU_IMPORT
     26    #define EXTERN
     27#else
     28    #define EXTERN extern
     29#endif
     30
     31EXTERN GB_Color* emu_frame_buffer;
     32EXTERN GB_Color* emu_debug_background_buffer;
     33EXTERN GB_Color* emu_debug_tile_buffers[2];
     34EXTERN GB_Color* emu_debug_oam_buffers[40];
     35
     36EXTERN bool emu_audio_sync;
     37EXTERN bool emu_debug_disable_breakpoints_cpu;
     38EXTERN bool emu_debug_disable_breakpoints_mem;
     39EXTERN int emu_debug_background_tile_address;
     40EXTERN int emu_debug_background_map_address;
     41EXTERN int emu_debug_tile_dmg_palette;
     42EXTERN int emu_debug_tile_color_palette;
     43EXTERN bool emu_savefiles_dir_option;
     44EXTERN bool emu_savestates_dir_option;
     45EXTERN char emu_savefiles_path[4096];
     46EXTERN char emu_savestates_path[4096];
     47
     48EXTERN void emu_init(void);
     49EXTERN void emu_destroy(void);
     50EXTERN void emu_update(void);
     51EXTERN void emu_load_rom(const char* file_path, bool force_dmg, Cartridge::CartridgeTypes mbc, bool force_gba);
     52EXTERN void emu_key_pressed(Gameboy_Keys key);
     53EXTERN void emu_key_released(Gameboy_Keys key);
     54EXTERN void emu_pause(void);
     55EXTERN void emu_resume(void);
     56EXTERN bool emu_is_paused(void);
     57EXTERN bool emu_is_empty(void);
     58EXTERN void emu_reset(bool force_dmg, Cartridge::CartridgeTypes mbc, bool force_gba);
     59EXTERN void emu_memory_dump(void);
     60EXTERN void emu_dissasemble_rom(void);
     61EXTERN void emu_audio_volume(float volume);
     62EXTERN void emu_audio_reset(void);
     63EXTERN bool emu_is_audio_enabled(void);
     64EXTERN void emu_dmg_palette(GB_Color& color1, GB_Color& color2, GB_Color& color3, GB_Color& color4);
     65EXTERN void emu_dmg_predefined_palette(int palette);
     66EXTERN bool emu_is_cgb(void);
     67EXTERN void emu_save_ram(const char* file_path);
     68EXTERN void emu_load_ram(const char* file_path, bool force_dmg, Cartridge::CartridgeTypes mbc, bool force_gba);
     69EXTERN void emu_save_state_slot(int index);
     70EXTERN void emu_load_state_slot(int index);
     71EXTERN void emu_save_state_file(const char* file_path);
     72EXTERN void emu_load_state_file(const char* file_path);
     73EXTERN void emu_add_cheat(const char* cheat);
     74EXTERN void emu_clear_cheats(void);
     75EXTERN void emu_get_info(char* info);
     76EXTERN GearboyCore* emu_get_core(void);
     77EXTERN void emu_color_correction(bool correction);
     78EXTERN void emu_debug_step(void);
     79EXTERN void emu_debug_continue(void);
     80EXTERN void emu_debug_next_frame(void);
     81EXTERN void emu_load_bootrom_dmg(const char* file_path);
     82EXTERN void emu_load_bootrom_gbc(const char* file_path);
     83EXTERN void emu_enable_bootrom_dmg(bool enable);
     84EXTERN void emu_enable_bootrom_gbc(bool enable);
     85
     86#undef EMU_IMPORT
     87#undef EXTERN
     88#endif	/* EMU_H */