3 static unsigned char z80_sms_in(unsigned short p)
5 elprintf(EL_ANOMALY, "Z80 port %04x read", p);
9 static void z80_sms_out(unsigned short p, unsigned char d)
11 elprintf(EL_ANOMALY, "Z80 port %04x write %02x", p, d);
14 static unsigned char MEMH_FUNC xread(unsigned short a)
16 elprintf(EL_ANOMALY, "Z80 read [%04x]", a);
20 static void MEMH_FUNC xwrite(unsigned int a, unsigned char data)
22 elprintf(EL_ANOMALY, "Z80 write [%04x] %02x", a, data);
25 void PicoPowerMS(void)
29 void PicoMemSetupMS(void)
31 z80_map_set(z80_read_map, 0x0000, 0xbfff, Pico.rom, 0);
32 z80_map_set(z80_read_map, 0xc000, 0xdfff, Pico.zram, 0);
33 z80_map_set(z80_read_map, 0xe000, 0xffff, xread, 1);
35 z80_map_set(z80_write_map, 0x0000, 0xbfff, Pico.rom, 0);
36 z80_map_set(z80_write_map, 0xc000, 0xdfff, Pico.zram, 0);
37 z80_map_set(z80_write_map, 0xe000, 0xffff, xwrite, 1);
40 drZ80.z80_in = z80_sms_in;
41 drZ80.z80_out = z80_sms_out;
44 Cz80_Set_Fetch(&CZ80, 0x0000, 0xbfff, (UINT32)Pico.rom);
45 Cz80_Set_Fetch(&CZ80, 0xc000, 0xdfff, (UINT32)Pico.zram);
46 Cz80_Set_INPort(&CZ80, z80_sms_in);
47 Cz80_Set_OUTPort(&CZ80, z80_sms_out);
51 void PicoFrameMS(void)
53 z80_run(OSC_NTSC / 13 / 60);