Previous 199869 Revisions Next

r17768 Monday 10th September, 2012 at 00:41:14 UTC by hap
dynashot doesn't have a samplerom
[src/mame/drivers]homerun.c
[src/mame/includes]homerun.h

trunk/src/mame/includes/homerun.h
r17767r17768
44
55*************************************************************************/
66
7#include "sound/upd7759.h"
8
79class homerun_state : public driver_device
810{
911public:
1012   homerun_state(const machine_config &mconfig, device_type type, const char *tag)
1113      : driver_device(mconfig, type, tag),
12      m_maincpu(*this,"maincpu"),
14      m_maincpu(*this, "maincpu"),
1315      m_videoram(*this, "videoram"),
14      m_spriteram(*this, "spriteram")
16      m_spriteram(*this, "spriteram"),
17      m_d7756(*this, "d7756")
1518   { }
1619
1720   required_device<cpu_device> m_maincpu;
1821   required_shared_ptr<UINT8> m_videoram;
1922   required_shared_ptr<UINT8> m_spriteram;
23   optional_device<upd7756_device> m_d7756;
2024
25   UINT8 m_control;
26
2127   tilemap_t *m_tilemap;
2228   int m_gfx_ctrl;
2329   int m_gc_up;
2430   int m_gc_down;
2531   int m_scrollx;
2632   int m_scrolly;
27
28   DECLARE_WRITE8_MEMBER(homerun_d7756c_control_w);
33   
34   DECLARE_WRITE8_MEMBER(homerun_control_w);
35   DECLARE_WRITE8_MEMBER(homerun_d7756_sample_w);
2936   DECLARE_WRITE8_MEMBER(homerun_videoram_w);
3037   DECLARE_WRITE8_MEMBER(homerun_color_w);
3138   DECLARE_WRITE8_MEMBER(homerun_scrollhi_w);
r17767r17768
3340   DECLARE_WRITE8_MEMBER(homerun_scrollx_w);
3441
3542   DECLARE_CUSTOM_INPUT_MEMBER(homerun_40_r);
43   DECLARE_CUSTOM_INPUT_MEMBER(homerun_d7756_busy_r);
3644   DECLARE_CUSTOM_INPUT_MEMBER(ganjaja_hopper_status_r);
3745
3846   TILE_GET_INFO_MEMBER(get_homerun_tile_info);
trunk/src/mame/drivers/homerun.c
r17767r17768
99  sprites in NES format etc)
1010 
1111Todo :
12 - dump remaining sample roms
12 - dump homerun sample rom
1313 - improve controls/dips
1414 - better emulation of gfx bank switching (problematic in ganjaja)
1515 - is there 2 player mode ?
r17767r17768
5858
5959***************************************************************************/
6060
61WRITE8_MEMBER(homerun_state::homerun_d7756c_control_w)
61WRITE8_MEMBER(homerun_state::homerun_control_w)
6262{
63   // d4: start pin
64   // d5: reset pin(?)
65   // other bits: unused?
66   device_t *device = machine().device("d7756c");
67   upd7759_reset_w(device, ~data & 0x20);
68   upd7759_start_w(device, ~data & 0x10);
63   // d0, d1: somehow related to port $40?
64
65   // d4: d7756 start pin
66   // d5: d7756 reset pin(?)
67   if (m_d7756 != NULL)
68   {
69      upd7759_reset_w(m_d7756, ~data & 0x20);
70      upd7759_start_w(m_d7756, ~data & 0x10);
71   }
72
73   // other bits: ?
74   m_control = data;
6975}
7076
77WRITE8_MEMBER(homerun_state::homerun_d7756_sample_w)
78{
79   if (m_d7756 != NULL)
80      upd7759_port_w(m_d7756, 0, data);
81}
82
7183static ADDRESS_MAP_START( homerun_memmap, AS_PROGRAM, 8, homerun_state )
7284   AM_RANGE(0x0000, 0x3fff) AM_ROM
7385   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
r17767r17768
7991
8092static ADDRESS_MAP_START( homerun_iomap, AS_IO, 8, homerun_state )
8193   ADDRESS_MAP_GLOBAL_MASK(0xff)
82   AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("d7756c", upd7759_port_w)
83   AM_RANGE(0x20, 0x20) AM_WRITE(homerun_d7756c_control_w)
94   AM_RANGE(0x10, 0x10) AM_WRITE(homerun_d7756_sample_w)
95   AM_RANGE(0x20, 0x20) AM_WRITE(homerun_control_w)
8496   AM_RANGE(0x30, 0x33) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
8597   AM_RANGE(0x40, 0x40) AM_READ_PORT("IN0")
8698   AM_RANGE(0x50, 0x50) AM_READ_PORT("IN2")
r17767r17768
96108   return ret;
97109}
98110
111CUSTOM_INPUT_MEMBER(homerun_state::homerun_d7756_busy_r)
112{
113   return upd7759_busy_r(m_d7756);
114}
115
99116CUSTOM_INPUT_MEMBER(homerun_state::ganjaja_hopper_status_r)
100117{
101118   // gives hopper error if not 0
r17767r17768
113130   PORT_START("IN0")
114131   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_COIN1 )
115132   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_40_r, NULL)
116   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // ?
133   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_d7756_busy_r, NULL)
117134   PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
118135
119136   PORT_START("IN1")
r17767r17768
186203   PORT_START("IN0")
187204   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // ?
188205   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_COIN1 )
189   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // ?
206   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_d7756_busy_r, NULL)
190207   PORT_BIT( 0x76, IP_ACTIVE_HIGH, IPT_UNKNOWN )
191208
192209   PORT_START("IN1")
r17767r17768
290307   state->membank("bank1")->configure_entry(0, &ROM[0x00000]);
291308   state->membank("bank1")->configure_entries(1, 7, &ROM[0x10000], 0x4000);
292309
310   state->save_item(NAME(state->m_control));
293311   state->save_item(NAME(state->m_gfx_ctrl));
294312   state->save_item(NAME(state->m_gc_up));
295313   state->save_item(NAME(state->m_gc_down));
r17767r17768
301319{
302320   homerun_state *state = machine.driver_data<homerun_state>();
303321
322   state->m_control = 0;
304323   state->m_gfx_ctrl = 0;
305324   state->m_gc_up = 0;
306325   state->m_gc_down = 0;
r17767r17768
310329
311330/**************************************************************************/
312331
313static MACHINE_CONFIG_START( homerun, homerun_state )
332static MACHINE_CONFIG_START( dynashot, homerun_state )
314333
315334   /* basic machine hardware */
316335   MCFG_CPU_ADD("maincpu", Z80, XTAL_20MHz/4)
r17767r17768
342361   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_20MHz/8)
343362   MCFG_SOUND_CONFIG(ym2203_config)
344363   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
364MACHINE_CONFIG_END
345365
346   MCFG_SOUND_ADD("d7756c", UPD7756, UPD7759_STANDARD_CLOCK)
366static MACHINE_CONFIG_DERIVED( homerun, dynashot )
367
368   /* sound hardware */
369   MCFG_SOUND_ADD("d7756", UPD7756, UPD7759_STANDARD_CLOCK)
347370   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
348371MACHINE_CONFIG_END
349372
r17767r17768
369392   ROM_REGION( 0x20000, "gfx2", 0 )
370393   ROM_LOAD( "homerun.ic120",  0x00000, 0x20000, CRC(52f0709b) SHA1(19e675bcccadb774f60ec5929fc1fb5cf0d3f617) )
371394
372   ROM_REGION( 0x08000, "d7756c", ROMREGION_ERASE00 )
373   ROM_LOAD( "d7756c.ic98",    0x00000, 0x08000, NO_DUMP ) /* D7756C built-in rom */
395   ROM_REGION( 0x08000, "d7756", ROMREGION_ERASE00 )
396   ROM_LOAD( "d7756c.ic98",    0x00000, 0x08000, NO_DUMP ) /* D7756C built-in rom - very likely the same rom as [Moero!! Pro Yakyuu (Black/Red)] on Famicom, and [Moero!! Nettou Yakyuu '88] on MSX2 */
374397ROM_END
375398
376399
r17767r17768
384407
385408   ROM_REGION( 0x20000, "gfx2", 0 )
386409   ROM_LOAD( "2.ic120",        0x00000, 0x20000, CRC(bedf7b98) SHA1(cb6c5fcaf8df5f5c7636c3c8f79b9dda78e30c2e) )
387
388   ROM_REGION( 0x08000, "d7756c", ROMREGION_ERASE00 )
389   ROM_LOAD( "d7756c.ic98",    0x00000, 0x08000, NO_DUMP ) /* D7756C built-in rom */
390410ROM_END
391411
392412
r17767r17768
401421   ROM_REGION( 0x20000, "gfx2", 0 )
402422   ROM_LOAD( "2.ic120",        0x00000, 0x20000, CRC(e65d4d57) SHA1(2ec9e5bdaa94b808573313b6eca657d798004b53) )
403423
404   ROM_REGION( 0x08000, "d7756c", 0 )
424   ROM_REGION( 0x08000, "d7756", 0 )
405425   ROM_LOAD( "d77p56cr.ic98",  0x00000, 0x08000, CRC(06a234ac) SHA1(b4ceff3f9f78551cf4a085642e162e33b266f067) ) /* D77P56CR OTP rom (One-Time Programmable, note the extra P) */
406426ROM_END
407427
408428
409GAME( 1988, homerun,  0, homerun, homerun,  driver_device, 0, ROT0, "Jaleco", "Moero!! Pro Yakyuu Homerun Kyousou", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
410GAME( 1988, dynashot, 0, homerun, dynashot, driver_device, 0, ROT0, "Jaleco", "Dynamic Shoot Kyousou", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
411GAME( 1990, ganjaja,  0, ganjaja, ganjaja,  driver_device, 0, ROT0, "Jaleco", "Ganbare Jajamaru Saisho wa Goo / Ganbare Jajamaru Hop Step & Jump", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
429GAME( 1988, homerun,  0, homerun,  homerun,  driver_device, 0, ROT0, "Jaleco", "Moero!! Pro Yakyuu Homerun Kyousou", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
430GAME( 1988, dynashot, 0, dynashot, dynashot, driver_device, 0, ROT0, "Jaleco", "Dynamic Shoot Kyousou", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
431GAME( 1990, ganjaja,  0, ganjaja,  ganjaja,  driver_device, 0, ROT0, "Jaleco", "Ganbare Jajamaru Saisho wa Goo / Ganbare Jajamaru Hop Step & Jump", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team