diff options
author | Michael Pavone <pavone@retrodev.com> | 2016-12-09 09:48:48 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2016-12-09 09:48:48 -0800 |
commit | 818a3ef482b96c0a963bb515291944346586f106 (patch) | |
tree | a13839316062ed0986e1b0b8317c6df3e74d7610 /blastem.h | |
parent | aaca957565a13e9f2c6ab5ae085d7c8fb6c0fa85 (diff) |
WIP split of ROM loading/argument parsing from Genesis emulation code. Compiles and doesn't crash, but nothing works. Still a few too many globals as well.
Diffstat (limited to 'blastem.h')
-rw-r--r-- | blastem.h | 74 |
1 files changed, 6 insertions, 68 deletions
@@ -1,78 +1,16 @@ -/* - Copyright 2013 Michael Pavone - This file is part of BlastEm. - BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. -*/ #ifndef BLASTEM_H_ #define BLASTEM_H_ -#include <stdint.h> -#include "m68k_core.h" -#include "z80_to_x86.h" -#include "ym2612.h" -#include "vdp.h" -#include "psg.h" -#include "io.h" -#include "config.h" -#include "romdb.h" -#include "arena.h" +#include "tern.h" -typedef struct genesis_context genesis_context; - -struct genesis_context { - m68k_context *m68k; - z80_context *z80; - vdp_context *vdp; - ym2612_context *ym; - psg_context *psg; - genesis_context *next_context; - uint16_t *cart; - uint16_t *lock_on; - uint16_t *work_ram; - uint8_t *zram; - void *extra; - arena *arena; - char *next_rom; - char *save_dir; - uint8_t *save_storage; - eeprom_map *eeprom_map; - uint32_t num_eeprom; - uint32_t save_size; - uint32_t save_ram_mask; - uint32_t master_clock; //Current master clock value - uint32_t normal_clock; //Normal master clock (used to restore master clock after turbo mode) - uint32_t frame_end; - uint32_t max_cycles; - uint8_t bank_regs[8]; - uint16_t mapper_start_index; - uint8_t save_type; - io_port ports[3]; - uint8_t bus_busy; - uint8_t should_exit; - uint8_t save_state; - uint8_t mouse_mode; - uint8_t mouse_captured; - eeprom_state eeprom; -}; - -extern genesis_context * genesis; extern int headless; -extern int break_on_sync; +extern int exit_after; +extern int z80_enabled; +extern int frame_limit; + extern tern_node * config; -#define RAM_WORDS 32 * 1024 -#define Z80_RAM_BYTES 8 * 1024 +extern char *save_state_path; #define QUICK_SAVE_SLOT 10 -extern uint16_t *cart; -extern uint16_t *ram; -extern uint8_t z80_ram[Z80_RAM_BYTES]; - -uint16_t read_dma_value(uint32_t address); -uint16_t get_open_bus_value(); -m68k_context * sync_components(m68k_context *context, uint32_t address); -m68k_context * debugger(m68k_context * context, uint32_t address); -void set_speed_percent(genesis_context * context, uint32_t percent); - #endif //BLASTEM_H_ - |