main
sms.h
1#ifndef SMS_H_
2#define SMS_H_
3
4#include "system.h"
5#include "vdp.h"
6#include "psg.h"
7#include "z80_to_x86.h"
8#include "io.h"
9
10#define SMS_RAM_SIZE (8*1024)
11#define SMS_CART_RAM_SIZE (32*1024)
12
13typedef struct {
14 system_header header;
15 z80_context *z80;
16 vdp_context *vdp;
17 psg_context *psg;
18 sega_io io;
19 uint8_t *rom;
20 uint32_t rom_size;
21 uint32_t master_clock;
22 uint32_t normal_clock;
23 uint8_t should_return;
24 uint8_t ram[SMS_RAM_SIZE];
25 uint8_t bank_regs[4];
26 uint8_t cart_ram[SMS_CART_RAM_SIZE];
27} sms_context;
28
29sms_context *alloc_configure_sms(system_media *media, uint32_t opts, uint8_t force_region);
30
31#endif //SMS_H_