comparison sms.h @ 1149:6b0da6021544

Don't lock up CPU if performing a read with writes configured when in PBC mode. Allow access to VDP debug commands from Z80 debugger in PBC mode. Handle Mode 4 in VDP debug print functions
author Michael Pavone <pavone@retrodev.com>
date Wed, 04 Jan 2017 20:43:22 -0800
parents 7e199bebde2f
children aee2177a1630
comparison
equal deleted inserted replaced
1148:80ef49539550 1149:6b0da6021544
6 #include "psg.h" 6 #include "psg.h"
7 #include "z80_to_x86.h" 7 #include "z80_to_x86.h"
8 #include "io.h" 8 #include "io.h"
9 9
10 #define SMS_RAM_SIZE (8*1024) 10 #define SMS_RAM_SIZE (8*1024)
11 #define SMS_CART_RAM_SIZE (32*1024)
11 12
12 typedef struct { 13 typedef struct {
13 system_header header; 14 system_header header;
14 z80_context *z80; 15 z80_context *z80;
15 vdp_context *vdp; 16 vdp_context *vdp;
19 uint32_t rom_size; 20 uint32_t rom_size;
20 uint32_t master_clock; 21 uint32_t master_clock;
21 uint32_t normal_clock; 22 uint32_t normal_clock;
22 uint8_t should_return; 23 uint8_t should_return;
23 uint8_t ram[SMS_RAM_SIZE]; 24 uint8_t ram[SMS_RAM_SIZE];
25 uint8_t bank_regs[4];
26 uint8_t cart_ram[SMS_CART_RAM_SIZE];
24 } sms_context; 27 } sms_context;
25 28
26 sms_context *alloc_configure_sms(void *rom, uint32_t rom_size, void *extra_rom, uint32_t extra_rom_size, uint32_t opts, uint8_t force_region, rom_info *info_out); 29 sms_context *alloc_configure_sms(void *rom, uint32_t rom_size, void *extra_rom, uint32_t extra_rom_size, uint32_t opts, uint8_t force_region, rom_info *info_out);
27 30
28 #endif //SMS_H_ 31 #endif //SMS_H_