comparison sms.h @ 2521:8cf7cadc17ee

Initial SC-3000 support
author Michael Pavone <pavone@retrodev.com>
date Fri, 11 Oct 2024 00:46:53 -0700
parents 40290a923886
children 90a40be940f7
comparison
equal deleted inserted replaced
2520:0e9d7ef03983 2521:8cf7cadc17ee
8 #include "z80.h" 8 #include "z80.h"
9 #else 9 #else
10 #include "z80_to_x86.h" 10 #include "z80_to_x86.h"
11 #endif 11 #endif
12 #include "io.h" 12 #include "io.h"
13 #include "i8255.h"
13 14
14 #define SMS_RAM_SIZE (8*1024) 15 #define SMS_RAM_SIZE (8*1024)
15 #define SMS_CART_RAM_SIZE (32*1024) 16 #define SMS_CART_RAM_SIZE (32*1024)
16 17
17 typedef struct { 18 typedef struct {
18 system_header header; 19 system_header header;
19 z80_context *z80; 20 z80_context *z80;
20 vdp_context *vdp; 21 vdp_context *vdp;
21 psg_context *psg; 22 psg_context *psg;
22 sega_io io; 23 sega_io io;
24 i8255 *i8255;
25 uint16_t *keystate;
23 uint8_t *rom; 26 uint8_t *rom;
24 uint32_t rom_size; 27 uint32_t rom_size;
25 uint32_t master_clock; 28 uint32_t master_clock;
26 uint32_t normal_clock; 29 uint32_t normal_clock;
27 uint32_t last_frame; 30 uint32_t last_frame;
28 uint8_t should_return; 31 uint8_t should_return;
29 uint8_t start_button_region; 32 uint8_t start_button_region;
30 uint8_t ram[SMS_RAM_SIZE]; 33 uint8_t ram[SMS_RAM_SIZE];
31 uint8_t bank_regs[4]; 34 uint8_t bank_regs[4];
32 uint8_t cart_ram[SMS_CART_RAM_SIZE]; 35 uint8_t cart_ram[SMS_CART_RAM_SIZE];
36 uint8_t kb_mux;
33 } sms_context; 37 } sms_context;
34 38
35 sms_context *alloc_configure_sms(system_media *media, uint32_t opts, uint8_t force_region); 39 sms_context *alloc_configure_sms(system_media *media, uint32_t opts, uint8_t force_region);
36 40
37 #endif //SMS_H_ 41 #endif //SMS_H_