moved sega pico out of megadriv.c and into segapico.c, it really has nothing in common with the MD aside the CPU+VDP and should be properly separated.

added skeleton 'Yamaha Mixt Book Player Copera' to the Sega Pico driver, it appears to be similar to the Pico but with extra sound hardware (a complete Sound Blaster clone) on the MB.  Added a preliminary Softlist.  Added board layouts for both [Team Europe]
This commit is contained in:
David Haywood 2013-08-11 18:35:33 +00:00
parent e9e3b55ce5
commit f7bd003b2b
8 changed files with 554 additions and 306 deletions

2
.gitattributes vendored
View File

@ -6503,6 +6503,7 @@ src/mess/drivers/scorpion.c svneol=native#text/plain
src/mess/drivers/scv.c svneol=native#text/plain
src/mess/drivers/sdk85.c svneol=native#text/plain
src/mess/drivers/sdk86.c svneol=native#text/plain
src/mess/drivers/segapico.c svneol=native#text/plain
src/mess/drivers/selz80.c svneol=native#text/plain
src/mess/drivers/sg1000.c svneol=native#text/plain
src/mess/drivers/sgi_ip2.c svneol=native#text/plain
@ -6734,6 +6735,7 @@ src/mess/includes/mbee.h svneol=native#text/plain
src/mess/includes/mboard.h svneol=native#text/plain
src/mess/includes/mc1000.h svneol=native#text/plain
src/mess/includes/mc80.h svneol=native#text/plain
src/mess/includes/md_cons.h svneol=native#text/plain
src/mess/includes/micronic.h svneol=native#text/plain
src/mess/includes/microtan.h svneol=native#text/plain
src/mess/includes/mikro80.h svneol=native#text/plain

View File

@ -15,55 +15,7 @@
#include "imagedev/cartslot.h"
#include "formats/imageutl.h"
class md_cons_state : public md_base_state
{
public:
md_cons_state(const machine_config &mconfig, device_type type, const char *tag)
: md_base_state(mconfig, type, tag),
m_slotcart(*this, "mdslot")
{ }
ioport_port *m_io_ctrlr;
ioport_port *m_io_pad3b[4];
ioport_port *m_io_pad6b[2][4];
optional_device<md_cart_slot_device> m_slotcart;
DECLARE_DRIVER_INIT(mess_md_common);
DECLARE_DRIVER_INIT(genesis);
DECLARE_DRIVER_INIT(md_eur);
DECLARE_DRIVER_INIT(md_jpn);
READ8_MEMBER(mess_md_io_read_data_port);
WRITE16_MEMBER(mess_md_io_write_data_port);
DECLARE_MACHINE_START( md_common ); // setup ioport_port
DECLARE_MACHINE_START( ms_megadriv ); // setup ioport_port + install cartslot handlers
DECLARE_MACHINE_RESET( ms_megadriv );
};
class pico_state : public md_cons_state
{
public:
pico_state(const machine_config &mconfig, device_type type, const char *tag)
: md_cons_state(mconfig, type, tag),
m_picocart(*this, "picoslot") { }
ioport_port *m_io_page;
ioport_port *m_io_pad;
ioport_port *m_io_penx;
ioport_port *m_io_peny;
optional_device<pico_cart_slot_device> m_picocart;
UINT8 m_page_register;
UINT16 pico_read_penpos(int pen);
DECLARE_READ16_MEMBER(pico_68k_io_read);
DECLARE_WRITE16_MEMBER(pico_68k_io_write);
DECLARE_MACHINE_START(pico);
};
#include "includes/md_cons.h"
/*************************************
*
@ -875,257 +827,6 @@ ROM_START( 32x_scd )
ROM_END
/****************************************** PICO emulation ****************************************/
/*
Pico Implementation By ElBarto (Emmanuel Vadot, elbarto@megadrive.org)
Still missing the PCM custom chip
Some game will not boot due to this
Pico Info from Notaz (http://notaz.gp2x.de/docs/picodoc.txt)
addr acc description
-------+-----+------------
800001 byte Version register.
?vv? ????, where v can be:
00 - hardware is for Japan
01 - European version
10 - USA version
11 - ?
800003 byte Buttons, 0 for pressed, 1 for released:
bit 0: UP (white)
bit 1: DOWN (orange)
bit 2: LEFT (blue)
bit 3: RIGHT (green)
bit 4: red button
bit 5: unused?
bit 6: unused?
bit 7: pen button
800005 byte Most significant byte of pen x coordinate.
800007 byte Least significant byte of pen x coordinate.
800009 byte Most significant byte of pen y coordinate.
80000b byte Least significant byte of pen y coordinate.
80000d byte Page register. One bit means one uncovered page sensor.
00 - storyware closed
01, 03, 07, 0f, 1f, 3f - pages 1-6
either page 5 or page 6 is often unused.
800010 word PCM data register.
r/w read returns free bytes left in PCM FIFO buffer
writes write data to buffer.
800012 word PCM control register.
r/w For writes, it has following possible meanings:
?p?? ???? ???? ?rrr
p - set to enable playback?
r - sample rate / PCM data type?
0: 8kHz 4bit ADPCM?
1-7: 16kHz variants?
For reads, if bit 15 is cleared, it means PCM is 'busy' or
something like that, as games sometimes wait for it to become 1.
800019 byte Games write 'S'
80001b byte Games write 'E'
80001d byte Games write 'G'
80001f byte Games write 'A'
*/
#define PICO_PENX 1
#define PICO_PENY 2
UINT16 pico_state::pico_read_penpos(int pen)
{
UINT16 penpos = 0;
switch (pen)
{
case PICO_PENX:
penpos = m_io_penx->read_safe(0);
penpos |= 0x6;
penpos = penpos * 320 / 255;
penpos += 0x3d;
break;
case PICO_PENY:
penpos = m_io_peny->read_safe(0);
penpos |= 0x6;
penpos = penpos * 251 / 255;
penpos += 0x1fc;
break;
}
return penpos;
}
READ16_MEMBER(pico_state::pico_68k_io_read )
{
UINT8 retdata = 0;
switch (offset)
{
case 0: /* Version register ?XX?????? where XX is 00 for japan, 01 for europe and 10 for USA*/
retdata = (m_export << 6) | (m_pal << 5);
break;
case 1:
retdata = m_io_pad->read_safe(0);
break;
/*
Still notes from notaz for the pen :
The pen can be used to 'draw' either on the drawing pad or on the storyware
itself. Both storyware and drawing pad are mapped on single virtual plane, where
coordinates range:
x: 0x03c - 0x17c
y: 0x1fc - 0x2f7 (drawing pad)
0x2f8 - 0x3f3 (storyware)
*/
case 2:
retdata = pico_read_penpos(PICO_PENX) >> 8;
break;
case 3:
retdata = pico_read_penpos(PICO_PENX) & 0x00ff;
break;
case 4:
retdata = pico_read_penpos(PICO_PENY) >> 8;
break;
case 5:
retdata = pico_read_penpos(PICO_PENY) & 0x00ff;
break;
case 6:
/* Page register :
00 - storyware closed
01, 03, 07, 0f, 1f, 3f - pages 1-6
either page 5 or page 6 is often unused.
*/
{
UINT8 tmp = m_io_page->read_safe(0);
if (tmp == 2 && m_page_register != 0x3f)
{
m_page_register <<= 1;
m_page_register |= 1;
}
if (tmp == 1 && m_page_register != 0x00)
m_page_register >>= 1;
retdata = m_page_register;
break;
}
case 7:
/* Returns free bytes left in the PCM FIFO buffer */
retdata = 0x00;
break;
case 8:
/*
For reads, if bit 15 is cleared, it means PCM is 'busy' or
something like that, as games sometimes wait for it to become 1.
*/
retdata = 0x00;
}
return retdata | retdata << 8;
}
WRITE16_MEMBER(pico_state::pico_68k_io_write )
{
switch (offset)
{
}
}
static ADDRESS_MAP_START( pico_mem, AS_PROGRAM, 16, pico_state )
AM_RANGE(0x000000, 0x3fffff) AM_ROM
AM_RANGE(0x800000, 0x80001f) AM_READWRITE(pico_68k_io_read, pico_68k_io_write)
AM_RANGE(0xc00000, 0xc0001f) AM_DEVREADWRITE("gen_vdp", sega_genesis_vdp_device, megadriv_vdp_r,megadriv_vdp_w)
AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000)
ADDRESS_MAP_END
static INPUT_PORTS_START( pico )
PORT_START("PAD")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("Red Button")
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("Pen Button")
PORT_START("PAGE")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("Increment Page")
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("Decrement Page")
PORT_START("PENX")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_NAME("PEN X")
PORT_START("PENY")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_MINMAX(0,255 ) PORT_PLAYER(1) PORT_NAME("PEN Y")
INPUT_PORTS_END
static SLOT_INTERFACE_START(pico_cart)
SLOT_INTERFACE_INTERNAL("rom", MD_STD_ROM)
SLOT_INTERFACE_INTERNAL("rom_sram", MD_ROM_SRAM) // not sure these are needed...
SLOT_INTERFACE_INTERNAL("rom_sramsafe", MD_ROM_SRAM) // not sure these are needed...
SLOT_INTERFACE_END
MACHINE_START_MEMBER(pico_state,pico)
{
m_io_page = ioport("PAGE");
m_io_pad = ioport("PAD");
m_io_penx = ioport("PENX");
m_io_peny = ioport("PENY");
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(FUNC(base_md_cart_slot_device::read),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a13),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a13),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a15),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a15),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(FUNC(base_md_cart_slot_device::write_tmss_bank),(base_md_cart_slot_device*)m_picocart));
}
static MACHINE_CONFIG_START( pico, pico_state )
MCFG_FRAGMENT_ADD( md_ntsc )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(pico_mem)
MCFG_DEVICE_REMOVE("genesis_snd_z80")
MCFG_MACHINE_START_OVERRIDE( pico_state, pico )
MCFG_MACHINE_RESET_OVERRIDE( pico_state, ms_megadriv )
MCFG_PICO_CARTRIDGE_ADD("picoslot", pico_cart, NULL)
MCFG_SOFTWARE_LIST_ADD("cart_list","pico")
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( picopal, pico_state )
MCFG_FRAGMENT_ADD( md_pal )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(pico_mem)
MCFG_DEVICE_REMOVE("genesis_snd_z80")
MCFG_MACHINE_START_OVERRIDE( pico_state, pico )
MCFG_MACHINE_RESET_OVERRIDE( pico_state, ms_megadriv )
MCFG_PICO_CARTRIDGE_ADD("picoslot", pico_cart, NULL)
MCFG_SOFTWARE_LIST_ADD("cart_list","pico")
MACHINE_CONFIG_END
ROM_START( pico )
ROM_REGION(MD_CPU_REGION_SIZE, "maincpu", ROMREGION_ERASEFF)
ROM_REGION( 0x10000, "soundcpu", ROMREGION_ERASEFF)
ROM_END
ROM_START( picou )
ROM_REGION(MD_CPU_REGION_SIZE, "maincpu", ROMREGION_ERASEFF)
ROM_REGION( 0x10000, "soundcpu", ROMREGION_ERASEFF)
ROM_END
ROM_START( picoj )
ROM_REGION(MD_CPU_REGION_SIZE, "maincpu", ROMREGION_ERASEFF)
ROM_REGION( 0x10000, "soundcpu", ROMREGION_ERASEFF)
ROM_END
/***************************************************************************
@ -1160,8 +861,3 @@ CONS( 1994, cdx, 0, 0, genesis_scd, md, md_cons_state,
CONS( 1994, multmega, cdx, 0, md_scd, md, md_cons_state, md_eur, "Sega", "Multi-Mega (Europe, PAL)", GAME_NOT_WORKING )
CONS( 1994, 32x_scd, 0, 0, genesis_32x_scd, md, md_cons_state, genesis, "Sega", "Sega CD (USA, NTSC, w/32X)", GAME_NOT_WORKING )
// this is a standalone system based on the md-like hardware (same vdp etc.)
CONS( 1994, pico, 0, 0, picopal, pico, md_cons_state, md_eur, "Sega", "Pico (Europe, PAL)", 0)
CONS( 1994, picou, pico, 0, pico, pico, md_cons_state, genesis, "Sega", "Pico (USA, NTSC)", 0)
CONS( 1993, picoj, pico, 0, pico, pico, md_cons_state, md_jpn, "Sega", "Pico (Japan, NTSC)", 0)

495
src/mess/drivers/segapico.c Normal file
View File

@ -0,0 +1,495 @@
/****************************************** PICO emulation ****************************************/
/* todo, make this more independent of the Genesis emulation, it's really only the same CPU + VDP
and doesn't need to be connected to the Genesis at all. */
/*
Pico mainboard (PAL version)
+---+ +-------------------------------------------------------------------------+
| | | +-+ |
| | | +--+ |B| +-+ |
| | | |A3| +-+ | | |
| +------------------------------+ +--+ |C| +-|
| | | | |
| GCMK-C2X +-+ | --> PEN
| +-----+ +--+ +-|
| | | |A3| +--------+ |
| | A1 | +--+ | | +---------+ |
| SEGA | | | A2 | |HM53861J | |
| 1994 837-10846 +-----+ | | | | |
| IAC MAIN PAL +--------+ +---------+ |
| MADE IN JAPAN +----+ |
| VA0 +----------+ |XTAL| +--+
| | SEGA | +---------+ | | | <-- VCC IN
| | 315-5640 | |MC68HC000| |53.2| +--+
| | 9434 W51 | |FN8-A | +----+ |00 | +----------+ |
| | | | | | | +----+ | SEGA | |
| | | | 2B89N | | | | 315-5313A| |
| | | |S0AH9425A| | A4 | | F1001 | +--|
| +----------+ +---------+ | | | | | |
| | | |9428 LAGG | | --> VIDEO OUT
| | | | | | |
| +----+ +----------+ +--|
| |
| +----------------------------+ |
| ||||||CARTRIDGE CONNECTOR||||| |
| +----------------------------+ |
| |
+------------------------------------------------------------------------------------------------------------+
A1 = SEGA / 315-5641 / D77591 / 9442CA010
A2 = SEGA / 315-5769 U13 / 9451MD020
A3 = BA10324AF
A4 = MALAYSIA 9336 / 651632DFP-15 / 0000988S
B = 4K16 / HC00
C = MB3514 / 9325 M36
315-5640 - touchpad controller?
315-5313A - VDP
315-5641 - PCM chip
*/
/*
Pico Implementation By ElBarto (Emmanuel Vadot, elbarto@megadrive.org)
Still missing the PCM custom chip
Some game will not boot due to this
Pico Info from Notaz (http://notaz.gp2x.de/docs/picodoc.txt)
addr acc description
-------+-----+------------
800001 byte Version register.
?vv? ????, where v can be:
00 - hardware is for Japan
01 - European version
10 - USA version
11 - ?
800003 byte Buttons, 0 for pressed, 1 for released:
bit 0: UP (white)
bit 1: DOWN (orange)
bit 2: LEFT (blue)
bit 3: RIGHT (green)
bit 4: red button
bit 5: unused?
bit 6: unused?
bit 7: pen button
800005 byte Most significant byte of pen x coordinate.
800007 byte Least significant byte of pen x coordinate.
800009 byte Most significant byte of pen y coordinate.
80000b byte Least significant byte of pen y coordinate.
80000d byte Page register. One bit means one uncovered page sensor.
00 - storyware closed
01, 03, 07, 0f, 1f, 3f - pages 1-6
either page 5 or page 6 is often unused.
800010 word PCM data register.
r/w read returns free bytes left in PCM FIFO buffer
writes write data to buffer.
800012 word PCM control register.
r/w For writes, it has following possible meanings:
?p?? ???? ???? ?rrr
p - set to enable playback?
r - sample rate / PCM data type?
0: 8kHz 4bit ADPCM?
1-7: 16kHz variants?
For reads, if bit 15 is cleared, it means PCM is 'busy' or
something like that, as games sometimes wait for it to become 1.
800019 byte Games write 'S'
80001b byte Games write 'E'
80001d byte Games write 'G'
80001f byte Games write 'A'
*/
#include "emu.h"
#include "includes/megadriv.h"
#include "machine/md_slot.h"
#include "machine/md_rom.h"
#include "includes/md_cons.h"
#define PICO_PENX 1
#define PICO_PENY 2
class pico_base_state : public md_cons_state
{
public:
pico_base_state(const machine_config &mconfig, device_type type, const char *tag)
: md_cons_state(mconfig, type, tag) { }
ioport_port *m_io_page;
ioport_port *m_io_pad;
ioport_port *m_io_penx;
ioport_port *m_io_peny;
UINT8 m_page_register;
UINT16 pico_read_penpos(int pen);
DECLARE_READ16_MEMBER(pico_68k_io_read);
DECLARE_WRITE16_MEMBER(pico_68k_io_write);
};
class pico_state : public pico_base_state
{
public:
pico_state(const machine_config &mconfig, device_type type, const char *tag)
: pico_base_state(mconfig, type, tag),
m_picocart(*this, "picoslot") { }
optional_device<pico_cart_slot_device> m_picocart;
DECLARE_MACHINE_START(pico);
};
UINT16 pico_base_state::pico_read_penpos(int pen)
{
UINT16 penpos = 0;
switch (pen)
{
case PICO_PENX:
penpos = m_io_penx->read_safe(0);
penpos |= 0x6;
penpos = penpos * 320 / 255;
penpos += 0x3d;
break;
case PICO_PENY:
penpos = m_io_peny->read_safe(0);
penpos |= 0x6;
penpos = penpos * 251 / 255;
penpos += 0x1fc;
break;
}
return penpos;
}
READ16_MEMBER(pico_base_state::pico_68k_io_read )
{
UINT8 retdata = 0;
switch (offset)
{
case 0: /* Version register ?XX?????? where XX is 00 for japan, 01 for europe and 10 for USA*/
retdata = (m_export << 6) | (m_pal << 5);
break;
case 1:
retdata = m_io_pad->read_safe(0);
break;
/*
Still notes from notaz for the pen :
The pen can be used to 'draw' either on the drawing pad or on the storyware
itself. Both storyware and drawing pad are mapped on single virtual plane, where
coordinates range:
x: 0x03c - 0x17c
y: 0x1fc - 0x2f7 (drawing pad)
0x2f8 - 0x3f3 (storyware)
*/
case 2:
retdata = pico_read_penpos(PICO_PENX) >> 8;
break;
case 3:
retdata = pico_read_penpos(PICO_PENX) & 0x00ff;
break;
case 4:
retdata = pico_read_penpos(PICO_PENY) >> 8;
break;
case 5:
retdata = pico_read_penpos(PICO_PENY) & 0x00ff;
break;
case 6:
/* Page register :
00 - storyware closed
01, 03, 07, 0f, 1f, 3f - pages 1-6
either page 5 or page 6 is often unused.
*/
{
UINT8 tmp = m_io_page->read_safe(0);
if (tmp == 2 && m_page_register != 0x3f)
{
m_page_register <<= 1;
m_page_register |= 1;
}
if (tmp == 1 && m_page_register != 0x00)
m_page_register >>= 1;
retdata = m_page_register;
break;
}
case 7:
/* Returns free bytes left in the PCM FIFO buffer */
retdata = 0x00;
break;
case 8:
/*
For reads, if bit 15 is cleared, it means PCM is 'busy' or
something like that, as games sometimes wait for it to become 1.
*/
retdata = 0x00;
}
return retdata | retdata << 8;
}
WRITE16_MEMBER(pico_base_state::pico_68k_io_write )
{
switch (offset)
{
}
}
static ADDRESS_MAP_START( pico_mem, AS_PROGRAM, 16, pico_base_state )
AM_RANGE(0x000000, 0x3fffff) AM_ROM
AM_RANGE(0x800000, 0x80001f) AM_READWRITE(pico_68k_io_read, pico_68k_io_write)
AM_RANGE(0xc00000, 0xc0001f) AM_DEVREADWRITE("gen_vdp", sega_genesis_vdp_device, megadriv_vdp_r,megadriv_vdp_w)
AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000)
ADDRESS_MAP_END
static INPUT_PORTS_START( pico )
PORT_START("PAD")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("Red Button")
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("Pen Button")
PORT_START("PAGE")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("Increment Page")
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("Decrement Page")
PORT_START("PENX")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_NAME("PEN X")
PORT_START("PENY")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_MINMAX(0,255 ) PORT_PLAYER(1) PORT_NAME("PEN Y")
INPUT_PORTS_END
static SLOT_INTERFACE_START(pico_cart)
SLOT_INTERFACE_INTERNAL("rom", MD_STD_ROM)
SLOT_INTERFACE_INTERNAL("rom_sram", MD_ROM_SRAM) // not sure these are needed...
SLOT_INTERFACE_INTERNAL("rom_sramsafe", MD_ROM_SRAM) // not sure these are needed...
SLOT_INTERFACE_END
MACHINE_START_MEMBER(pico_state,pico)
{
m_io_page = ioport("PAGE");
m_io_pad = ioport("PAD");
m_io_penx = ioport("PENX");
m_io_peny = ioport("PENY");
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(FUNC(base_md_cart_slot_device::read),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a13),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a13),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a15),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a15),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(FUNC(base_md_cart_slot_device::write_tmss_bank),(base_md_cart_slot_device*)m_picocart));
}
static MACHINE_CONFIG_START( pico, pico_state )
MCFG_FRAGMENT_ADD( md_ntsc )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(pico_mem)
MCFG_DEVICE_REMOVE("genesis_snd_z80")
MCFG_MACHINE_START_OVERRIDE( pico_state, pico )
MCFG_MACHINE_RESET_OVERRIDE( pico_base_state, ms_megadriv )
MCFG_PICO_CARTRIDGE_ADD("picoslot", pico_cart, NULL)
MCFG_SOFTWARE_LIST_ADD("cart_list","pico")
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( picopal, pico_state )
MCFG_FRAGMENT_ADD( md_pal )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(pico_mem)
MCFG_DEVICE_REMOVE("genesis_snd_z80")
MCFG_MACHINE_START_OVERRIDE( pico_state, pico )
MCFG_MACHINE_RESET_OVERRIDE( pico_base_state, ms_megadriv )
MCFG_PICO_CARTRIDGE_ADD("picoslot", pico_cart, NULL)
MCFG_SOFTWARE_LIST_ADD("cart_list","pico")
MACHINE_CONFIG_END
ROM_START( pico )
ROM_REGION(MD_CPU_REGION_SIZE, "maincpu", ROMREGION_ERASEFF)
ROM_REGION( 0x10000, "soundcpu", ROMREGION_ERASEFF)
ROM_END
ROM_START( picou )
ROM_REGION(MD_CPU_REGION_SIZE, "maincpu", ROMREGION_ERASEFF)
ROM_REGION( 0x10000, "soundcpu", ROMREGION_ERASEFF)
ROM_END
ROM_START( picoj )
ROM_REGION(MD_CPU_REGION_SIZE, "maincpu", ROMREGION_ERASEFF)
ROM_REGION( 0x10000, "soundcpu", ROMREGION_ERASEFF)
ROM_END
CONS( 1994, pico, 0, 0, picopal, pico, md_cons_state, md_eur, "Sega", "Pico (Europe, PAL)", 0)
CONS( 1994, picou, pico, 0, pico, pico, md_cons_state, genesis, "Sega", "Pico (USA, NTSC)", 0)
CONS( 1993, picoj, pico, 0, pico, pico, md_cons_state, md_jpn, "Sega", "Pico (Japan, NTSC)", 0)
/*
This looks a lot like a Pico with extra sound hardware...
YMZ263B is the basis of a Sound Blaster Clone
YMF262-M is the OPL3
YAMAHA - MIXT BOOK PLAYER COPERA
MMG-1
+-------------+
| |
|------+ |
| | |
MIDI OUT <-- | |
| | |
|------+ |
| | +------------------------------------------------------------------------------------------------------+
|------+ | | +--+ |
| | | | |YM| |
MIDI IN <-- | | | |7 | |
| | | | |12| +---------+ |
|------+ +--+ | +------+ |8B| | YAMAHA | |
| |||| | | +--+ | YMZ263B | |
+---------||--+ | +--------+ | | |
|| | |YM7 128B| +---------+ +---+ |
|| | +--------+ |YMF| |
+---------||----------+ |262| |
| || |-M | |
| || +---+ |
| || |
| || SEGA |
|------+ || 1993 837-9845 COPERA |
| | || MADE IN JAPAN +--|
| | || VA0 | --> PEN
CONTROL <-- | || | |
| | || +--|
| | || |
| | || |
|------+ || +----+ |
| || |XTAL| +------------+ |
| || | | | OKI JAPAN | +----+
| || +----------+ |53.6| | M54C864-80 | | |
| |||| | SEGA | |93 | +------------+ | |
| +--+ | 315-5639 | | Mhz| | |
| | U11| +----+ +-------------+ | E |
| |9341PD025 | | | | X |
|--+ +----------+ | SEGA | | T |
MIC <-- | +----+ +----+ | 315-5313A | | E |
| | |TC51| |TC51| | FC1001 | | N |
|--+ |832A| |832A| | 9331 AASG | | D |
| |FL-1| |FL-1| | | | E |
| |0 | |0 | | | | D |
| | | | | | | | |
|--+ +----+ +----+ +-------------+ | |
+-- | | C |
| |--+ | O |
S-AUDIO <-| | +-----------+ +-------+ | N |
| |--+ | SEGA | | SEGA | +-----------+ | N |
+-- | | 315-5640 | |315-564| | 3D4 UA | | E |
|--+ | 9333 W26 | |1 | |HD68HC000CP| | C |
| | | |D77591 | |8 | | T |
|--+ | | +-------+ | | | O |
S-VIDEO <-- | | | | | | R |
|--+ | | | | | |
| +-----------+ | JAPAN| | |
| +-----------+ | |
|--+ | |
VCC --> | +----------------------------------------------+ | |
|--+ | CARTRIDGE | +----+
| | CONNECTOR | |
| +----------------------------------------------+ |
+-----------------------------------------------------------------------------------------------------------------------------------+
*/
class copera_state : public pico_base_state
{
public:
copera_state(const machine_config &mconfig, device_type type, const char *tag)
: pico_base_state(mconfig, type, tag),
m_picocart(*this, "coperaslot") { }
optional_device<copera_cart_slot_device> m_picocart;
DECLARE_MACHINE_START(copera);
};
static ADDRESS_MAP_START( copera_mem, AS_PROGRAM, 16, copera_state )
AM_RANGE(0x000000, 0x3fffff) AM_ROM
AM_RANGE(0x800000, 0x80001f) AM_READWRITE(pico_68k_io_read, pico_68k_io_write)
AM_RANGE(0xc00000, 0xc0001f) AM_DEVREADWRITE("gen_vdp", sega_genesis_vdp_device, megadriv_vdp_r,megadriv_vdp_w)
AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000)
ADDRESS_MAP_END
static SLOT_INTERFACE_START(copera_cart)
SLOT_INTERFACE_INTERNAL("rom", MD_STD_ROM)
SLOT_INTERFACE_INTERNAL("rom_sram", MD_ROM_SRAM) // not sure these are needed...
SLOT_INTERFACE_INTERNAL("rom_sramsafe", MD_ROM_SRAM) // not sure these are needed...
SLOT_INTERFACE_END
MACHINE_START_MEMBER(copera_state,copera)
{
m_io_page = ioport("PAGE");
m_io_pad = ioport("PAD");
m_io_penx = ioport("PENX");
m_io_peny = ioport("PENY");
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(FUNC(base_md_cart_slot_device::read),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a13),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a13),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a15),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a15),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(FUNC(base_md_cart_slot_device::write_tmss_bank),(base_md_cart_slot_device*)m_picocart));
}
static MACHINE_CONFIG_START( copera, copera_state )
MCFG_FRAGMENT_ADD( md_ntsc )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(copera_mem)
MCFG_DEVICE_REMOVE("genesis_snd_z80")
MCFG_MACHINE_START_OVERRIDE( copera_state, copera )
MCFG_MACHINE_RESET_OVERRIDE( pico_base_state, ms_megadriv )
MCFG_COPERA_CARTRIDGE_ADD("coperaslot", copera_cart, NULL)
MCFG_SOFTWARE_LIST_ADD("cart_list","copera")
MACHINE_CONFIG_END
ROM_START( copera )
ROM_REGION(MD_CPU_REGION_SIZE, "maincpu", ROMREGION_ERASEFF)
ROM_REGION( 0x10000, "soundcpu", ROMREGION_ERASEFF)
ROM_END
CONS( 1993, copera, 0, 0, copera, pico, md_cons_state, md_jpn, "Yamaha / Sega", "Yamaha Mixt Book Player Copera", GAME_NOT_WORKING)

View File

@ -0,0 +1,30 @@
class md_cons_state : public md_base_state
{
public:
md_cons_state(const machine_config &mconfig, device_type type, const char *tag)
: md_base_state(mconfig, type, tag),
m_slotcart(*this, "mdslot")
{ }
ioport_port *m_io_ctrlr;
ioport_port *m_io_pad3b[4];
ioport_port *m_io_pad6b[2][4];
optional_device<md_cart_slot_device> m_slotcart;
DECLARE_DRIVER_INIT(mess_md_common);
DECLARE_DRIVER_INIT(genesis);
DECLARE_DRIVER_INIT(md_eur);
DECLARE_DRIVER_INIT(md_jpn);
READ8_MEMBER(mess_md_io_read_data_port);
WRITE16_MEMBER(mess_md_io_write_data_port);
DECLARE_MACHINE_START( md_common ); // setup ioport_port
DECLARE_MACHINE_START( ms_megadriv ); // setup ioport_port + install cartslot handlers
DECLARE_MACHINE_RESET( ms_megadriv );
};

View File

@ -51,7 +51,7 @@
const device_type MD_CART_SLOT = &device_creator<md_cart_slot_device>;
const device_type PICO_CART_SLOT = &device_creator<pico_cart_slot_device>;
const device_type COPERA_CART_SLOT = &device_creator<copera_cart_slot_device>;
//**************************************************************************
// MD cartridges Interface
@ -184,6 +184,11 @@ pico_cart_slot_device::pico_cart_slot_device(const machine_config &mconfig, cons
{
}
copera_cart_slot_device::copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
base_md_cart_slot_device(mconfig, COPERA_CART_SLOT, "Copera Cartridge Slot", tag, owner, clock, "copera_cart_slot", __FILE__)
{
}
//-------------------------------------------------
// base_md_cart_slot_device - destructor
//-------------------------------------------------

View File

@ -220,10 +220,22 @@ public:
virtual const char *file_extensions() const { return "bin,md"; }
};
// ======================> copera_cart_slot_device
class copera_cart_slot_device : public base_md_cart_slot_device
{
public:
// construction/destruction
copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
virtual const char *image_interface() const { return "copera_cart"; }
virtual const char *file_extensions() const { return "bin,md"; }
};
// device type definition
extern const device_type MD_CART_SLOT;
extern const device_type PICO_CART_SLOT;
extern const device_type COPERA_CART_SLOT;
/***************************************************************************
@ -238,6 +250,12 @@ extern const device_type PICO_CART_SLOT;
MCFG_DEVICE_ADD(_tag, PICO_CART_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_COPERA_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
MCFG_DEVICE_ADD(_tag, COPERA_CART_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_MD_CARTRIDGE_NOT_MANDATORY \
static_cast<md_cart_slot_device *>(device)->set_must_be_loaded(FALSE);

View File

@ -102,6 +102,7 @@ megadriv // 1990 Sega Mega Drive (Europe)
pico // 1994 Sega Pico (Europe)
picou // 1994 Sega Pico (USA)
picoj // 1993 Sega Pico (Japan)
copera // 1993 Sega / Yamaha
segacd // 1992 Sega Sega CD (USA)
megacd // 1993 Sega Mega-CD (Europe)
megacda // 1993 Sega Mega-CD (Asia)

View File

@ -1937,6 +1937,7 @@ $(MESSOBJ)/sega.a: \
$(MESS_MACHINE)/md_stm95.o \
$(MESS_MACHINE)/md_svp.o \
$(MESS_DRIVERS)/megadriv.o \
$(MESS_DRIVERS)/segapico.o \
$(MESS_DRIVERS)/dccons.o \
$(MAME_MACHINE)/gdrom.o \
$(MESS_MACHINE)/dccons.o \