mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
megaphx: Mark Hammer Boy working
- Patch PIC ROM to shorten timer or the game times out waiting for an answer from the PIC - Start fixing dip switches for Hammer Boy - Various cleanups
This commit is contained in:
parent
668410eabf
commit
cebab066ba
@ -4,9 +4,9 @@
|
||||
Dinamic / Inder arcade hardware
|
||||
|
||||
Mega Phoenix
|
||||
Hammer Boy
|
||||
|
||||
also known to exist on this hardware:
|
||||
Hammer Boy
|
||||
Nonamed 2 (ever finished? only code seen has 1991 date and is vastly incomplete) (versions exist for Amstrad CPC, MSX and Spectrum)
|
||||
After The War
|
||||
|
||||
@ -227,19 +227,64 @@ static INPUT_PORTS_START( megaphx )
|
||||
PORT_DIPSETTING( 0x14, "5")
|
||||
PORT_DIPSETTING( 0x18, "6")
|
||||
PORT_DIPSETTING( 0x1c, "7")
|
||||
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW2:!6") // something to do with time in hammer boy??
|
||||
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW2:!6")
|
||||
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW2:!7")
|
||||
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW2:!8")
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( hamboy )
|
||||
PORT_INCLUDE(megaphx)
|
||||
|
||||
PORT_MODIFY("DSW1")
|
||||
PORT_DIPNAME(0x07, 0x06, DEF_STR( Coin_A )) PORT_DIPLOCATION("SW1:!1,!2,!3")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ))
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( 4C_1C ))
|
||||
PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ))
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ))
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ))
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ))
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ))
|
||||
PORT_DIPSETTING( 0x07, DEF_STR( 1C_4C ))
|
||||
PORT_DIPNAME(0x38, 0x30, DEF_STR( Coin_B )) PORT_DIPLOCATION("SW1:!4,!5,!6")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ))
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ))
|
||||
PORT_DIPSETTING( 0x28, DEF_STR( 3C_1C ))
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ))
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ))
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ))
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 1C_3C ))
|
||||
PORT_DIPSETTING( 0x38, DEF_STR( 1C_4C ))
|
||||
PORT_DIPNAME(0xc0, 0x80, DEF_STR( Lives )) PORT_DIPLOCATION("SW1:!7,!8")
|
||||
PORT_DIPSETTING( 0x00, "1")
|
||||
PORT_DIPSETTING( 0x40, "2")
|
||||
PORT_DIPSETTING( 0x80, "3")
|
||||
PORT_DIPSETTING( 0xc0, "4")
|
||||
|
||||
PORT_MODIFY("DSW2")
|
||||
PORT_DIPNAME(0x01, 0x00, DEF_STR( Demo_Sounds )) PORT_DIPLOCATION("SW2:!1")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ))
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ))
|
||||
PORT_SERVICE_DIPLOC(0x02, IP_ACTIVE_HIGH, "SW2:!2")
|
||||
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x00, "SW2:!3")
|
||||
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x00, "SW2:!4")
|
||||
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x00, "SW2:!5")
|
||||
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x00, "SW2:!6") // 6 or 7 needs to be off or the timer runs at ridiculous speed
|
||||
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x00, "SW2:!7")
|
||||
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW2:!8")
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
// pic port a
|
||||
//
|
||||
// 3--- r serial clock
|
||||
// -2-- w serial clock
|
||||
// --1- w not used
|
||||
// ---0 rw serial data
|
||||
|
||||
READ8_MEMBER( megaphx_state::pic_porta_r )
|
||||
{
|
||||
uint8_t data = 0;
|
||||
|
||||
// 3- serial clock
|
||||
// -0 serial data
|
||||
|
||||
// clear when the pic starts reading the command
|
||||
m_ppi_to_pic_command = 0;
|
||||
|
||||
@ -251,23 +296,25 @@ READ8_MEMBER( megaphx_state::pic_porta_r )
|
||||
|
||||
WRITE8_MEMBER( megaphx_state::pic_porta_w )
|
||||
{
|
||||
// 2-- serial clock
|
||||
// -1- not used
|
||||
// --0 serial data
|
||||
|
||||
m_pic_to_ppi_data = BIT(data, 0);
|
||||
m_pic_to_ppi_clock = BIT(data, 2);
|
||||
}
|
||||
|
||||
// pic port b
|
||||
//
|
||||
// 7------- w not used
|
||||
// -6------ w watchdog (not enabled by megaphx)
|
||||
// --5----- r start2
|
||||
// ---4---- r start1
|
||||
// ----3--- w dsw clock
|
||||
// -----2-- w dsw shift/load
|
||||
// ------1- r dip switch data
|
||||
// -------0 r ppi to pic command incoming
|
||||
|
||||
READ8_MEMBER( megaphx_state::pic_portb_r )
|
||||
{
|
||||
uint8_t data = 0;
|
||||
|
||||
// 5--- start2
|
||||
// -4-- start1
|
||||
// --1- dip switch data
|
||||
// ---0 ppi to pic command incoming
|
||||
|
||||
data |= m_ppi_to_pic_command << 0;
|
||||
data |= m_dsw_data << 1;
|
||||
data |= ioport("START")->read() << 4;
|
||||
@ -277,10 +324,6 @@ READ8_MEMBER( megaphx_state::pic_portb_r )
|
||||
|
||||
WRITE8_MEMBER( megaphx_state::pic_portb_w )
|
||||
{
|
||||
// 7--- not used
|
||||
// -6-- watchdog (not enabled by megaphx)
|
||||
// --3- dsw clock
|
||||
// ---2 dsw shift/load
|
||||
|
||||
m_dsw_shifter[0]->shift_load_w(BIT(data, 2));
|
||||
m_dsw_shifter[1]->shift_load_w(BIT(data, 2));
|
||||
@ -288,15 +331,21 @@ WRITE8_MEMBER( megaphx_state::pic_portb_w )
|
||||
m_dsw_shifter[1]->clock_w(BIT(data, 3));
|
||||
}
|
||||
|
||||
// ppi port c
|
||||
//
|
||||
// 7------- w ppi to pic clock
|
||||
// -6------ w ppi to pic data
|
||||
// --5----- w unknown
|
||||
// ---4---- w ppi to pic command
|
||||
// ----3--- r pic to ppi clock
|
||||
// -----2-- r unknown
|
||||
// ------1- r pic to ppi data
|
||||
// -------0 r unknown
|
||||
|
||||
READ8_MEMBER( megaphx_state::ppi_portc_r )
|
||||
{
|
||||
uint8_t data = 0;
|
||||
|
||||
// 3--- pic to ppi clock
|
||||
// -2-- unknown
|
||||
// --1- pic to ppi data
|
||||
// ---0 unknown
|
||||
|
||||
data |= m_pic_to_ppi_data << 1;
|
||||
data |= m_pic_to_ppi_clock << 3;
|
||||
|
||||
@ -305,10 +354,9 @@ READ8_MEMBER( megaphx_state::ppi_portc_r )
|
||||
|
||||
WRITE8_MEMBER( megaphx_state::ppi_portc_w )
|
||||
{
|
||||
// 7--- ppi to pic clock
|
||||
// -6-- ppi to pic data
|
||||
// --5- unknown
|
||||
// ---4 ppi to pic command
|
||||
// avoid bogus write on reset
|
||||
if (data == 0xff)
|
||||
return;
|
||||
|
||||
// only set, don't clear here. otherwise the pic has no chance to pick it up
|
||||
if (BIT(data, 4))
|
||||
@ -324,10 +372,10 @@ WRITE_LINE_MEMBER( megaphx_state::dsw_w )
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_START(megaphx_state::megaphx)
|
||||
MCFG_CPU_ADD("maincpu", M68000, 8000000) // ?? can't read xtal due to reflections, CPU is an 8Mhz part
|
||||
MCFG_CPU_ADD("maincpu", M68000, 16_MHz_XTAL / 2)
|
||||
MCFG_CPU_PROGRAM_MAP(megaphx_68k_map)
|
||||
|
||||
MCFG_CPU_ADD("pic", PIC16C54, 12000000) /* 3MHz */
|
||||
MCFG_CPU_ADD("pic", PIC16C54, 6_MHz_XTAL) // correct?
|
||||
MCFG_PIC16C5x_READ_A_CB(READ8(megaphx_state, pic_porta_r))
|
||||
MCFG_PIC16C5x_WRITE_A_CB(WRITE8(megaphx_state, pic_porta_w))
|
||||
MCFG_PIC16C5x_READ_B_CB(READ8(megaphx_state, pic_portb_r))
|
||||
@ -384,6 +432,7 @@ ROM_START( megaphx )
|
||||
|
||||
ROM_REGION( 0x100000, "pic", 0 )
|
||||
ROM_LOAD( "pic16c54-xt.bin", 0x000000, 0x430, CRC(21f396fb) SHA1(c8badb9b3681e684bced0ced1de4c3a15641de8b) )
|
||||
ROM_FILL(0x2c, 1, 0x01) // patch timer length or its too slow (pic issue?)
|
||||
|
||||
ROM_REGION( 0x100000, "pals", 0 ) // jedutil won't convert these? are they bad?
|
||||
ROM_LOAD( "p31_u31_palce16v8h-25.jed", 0x000, 0xbd4, CRC(05ef04b7) SHA1(330dd81a832b6675fb0473868c26fe9bec2da854) )
|
||||
@ -413,8 +462,9 @@ ROM_START( hamboy )
|
||||
ROM_LOAD( "HammerBoy - U35.bin", 0x000000, 0x2000, CRC(cd22f2a4) SHA1(c5cf5b1ce528412493e2b5f565ed38e3e9123d37) )
|
||||
|
||||
ROM_REGION( 0x100000, "pic", 0 )
|
||||
ROM_LOAD( "pic16c54-xt.bin", 0x000000, 0x430, BAD_DUMP CRC(21f396fb) SHA1(c8badb9b3681e684bced0ced1de4c3a15641de8b) ) // from Mega Phoenix, probably wrong for this
|
||||
ROM_LOAD( "pic16c54-xt.bin", 0x000000, 0x430, CRC(21f396fb) SHA1(c8badb9b3681e684bced0ced1de4c3a15641de8b) )
|
||||
ROM_FILL(0x2c, 1, 0x01) // patch timer length or its too slow (pic issue?)
|
||||
ROM_END
|
||||
|
||||
GAME( 1991, megaphx, 0, megaphx, megaphx, megaphx_state, megaphx, ROT0, "Dinamic / Inder", "Mega Phoenix", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
|
||||
GAME( 1990, hamboy, 0, megaphx, megaphx, hamboy_state, megaphx, ROT0, "Dinamic / Inder", "Hammer Boy", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
|
||||
GAME( 1990, hamboy, 0, megaphx, hamboy, hamboy_state, megaphx, ROT0, "Dinamic / Inder", "Hammer Boy", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
|
||||
|
Loading…
Reference in New Issue
Block a user