view sms.h @ 1769:8fe162bdb038 mame_interp

Merge from default
author Michael Pavone <pavone@retrodev.com>
date Fri, 01 Mar 2019 14:17:29 -0800
parents b7ecd0d6a77b d6d4c006a7b3
children 0a26f3657295
line wrap: on
line source

#ifndef SMS_H_
#define SMS_H_

#include "system.h"
#include "vdp.h"
#include "psg.h"
#ifdef NEW_CORE
#include "z80.h"
#else
#ifdef USE_NATIVE
#include "z80_to_x86.h"
#else
#include "mame_z80/z80.h"
#endif
#endif
#include "io.h"

#define SMS_RAM_SIZE (8*1024)
#define SMS_CART_RAM_SIZE (32*1024)

typedef struct {
	system_header header;
	z80_context   *z80;
	vdp_context   *vdp;
	psg_context   *psg;
	sega_io       io;
	uint8_t       *rom;
	uint32_t      rom_size;
	uint32_t      master_clock;
	uint32_t      normal_clock;
	uint8_t       should_return;
	uint8_t       ram[SMS_RAM_SIZE];
	uint8_t       bank_regs[4];
	uint8_t       cart_ram[SMS_CART_RAM_SIZE];
} sms_context;

sms_context *alloc_configure_sms(system_media *media, uint32_t opts, uint8_t force_region);

#endif //SMS_H_