diff options
author | Michaël Banaan Ananas <happppp@users.noreply.github.com> | 2012-09-09 18:24:17 +0000 |
---|---|---|
committer | Michaël Banaan Ananas <happppp@users.noreply.github.com> | 2012-09-09 18:24:17 +0000 |
commit | db910043a6dcd0684cf1be04a1456eb1593db321 (patch) | |
tree | abdd1436cbd151b6ba4333705510eb1bef10cca8 /src | |
parent | f91d58a9b953ba71481955d60be58648c9e98245 (diff) |
update notes 2
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/sound/upd7759.c | 15 | ||||
-rw-r--r-- | src/mame/drivers/homerun.c | 30 | ||||
-rw-r--r-- | src/mame/video/homerun.c | 7 |
3 files changed, 38 insertions, 14 deletions
diff --git a/src/emu/sound/upd7759.c b/src/emu/sound/upd7759.c index 43716b0041e..7c9fd1fa262 100644 --- a/src/emu/sound/upd7759.c +++ b/src/emu/sound/upd7759.c @@ -4,6 +4,13 @@ by: Juergen Buchmueller, Mike Balfour, Howie Cohen, Olivier Galibert, and Aaron Giles + TODO: + - is there a doable method to dump the internal maskrom? :( + - low-level emulation + - watchdog? - according to uPD775x datasheet, the chip goes into standy mode + if CS/ST/RESET have not been accessed for more than 3 seconds + - convert to MAME modern device + ************************************************************* uPD7759 Description: @@ -684,16 +691,18 @@ static DEVICE_START( upd7759 ) assert(device->type() == UPD7759); // other chips do not support slave mode chip->timer = device->machine().scheduler().timer_alloc(FUNC(upd7759_slave_update), chip); chip->rommask = 0; + + /* set the DRQ callback */ + chip->drqcallback = intf->drqcallback; } else { UINT32 romsize = device->region()->bytes(); if (romsize >= 0x20000) chip->rommask = 0x1ffff; else chip->rommask = romsize - 1; - } - /* set the DRQ callback */ - chip->drqcallback = intf->drqcallback; + chip->drqcallback = NULL; + } /* assume /RESET and /START are both high */ chip->reset = 1; diff --git a/src/mame/drivers/homerun.c b/src/mame/drivers/homerun.c index 022f40b2307..b267e8fa620 100644 --- a/src/mame/drivers/homerun.c +++ b/src/mame/drivers/homerun.c @@ -9,8 +9,8 @@ sprites in NES format etc) Todo : - - voice ( unemulated D7756C ) - - controls/dips + - dump remaining sample roms + - improve controls/dips - better emulation of gfx bank switching (problematic in ganjaja) - is there 2 player mode ? @@ -60,6 +60,9 @@ Notes: WRITE8_MEMBER(homerun_state::homerun_d7756c_control_w) { + // d4: start pin + // d5: reset pin(?) + // other bits: unused? device_t *device = machine().device("d7756c"); upd7759_reset_w(device, ~data & 0x20); upd7759_start_w(device, ~data & 0x10); @@ -110,18 +113,22 @@ static INPUT_PORTS_START( homerun ) PORT_START("IN0") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_40_r, NULL) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // ? + PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_START("IN2") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("DSW") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DIPSW:1,2") @@ -143,21 +150,21 @@ static INPUT_PORTS_START( dynashot ) PORT_START("IN0") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_40_r, NULL) - PORT_BIT( 0xb7, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0xb7, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_START("IN2") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0xdf, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("DSW") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DIPSW:1,2") @@ -188,7 +195,8 @@ static INPUT_PORTS_START( ganjaja ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P1 Right / Scissors") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) // unused? PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_hopper_status_r, NULL) - PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("IN2") PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // bit masked with IN0 IPT_COIN1, maybe coin lockout? @@ -201,7 +209,7 @@ static INPUT_PORTS_START( ganjaja ) PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) ) PORT_DIPNAME( 0x02, 0x02, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DIPSW:2") PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) ) // game will boot with 1 credit inserted PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DIPSW:3" ) PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIPSW:4" ) PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIPSW:5" ) diff --git a/src/mame/video/homerun.c b/src/mame/video/homerun.c index 34f7a8dd931..73bc0dbb5e2 100644 --- a/src/mame/video/homerun.c +++ b/src/mame/video/homerun.c @@ -10,6 +10,8 @@ #define half_screen 116 +/**************************************************************************/ + WRITE8_MEMBER(homerun_state::homerun_scrollhi_w) { // d0: scroll y high bit @@ -68,6 +70,9 @@ WRITE8_MEMBER(homerun_state::homerun_color_w) palette_set_color(machine(), offset, MAKE_RGB(r,g,b)); } + +/**************************************************************************/ + TILE_GET_INFO_MEMBER(homerun_state::get_homerun_tile_info) { int tileno = (m_videoram[tile_index]) + ((m_videoram[tile_index + 0x1000] & 0x38) << 5) + ((m_gfx_ctrl & 1) << 11); @@ -76,12 +81,14 @@ TILE_GET_INFO_MEMBER(homerun_state::get_homerun_tile_info) SET_TILE_INFO_MEMBER(0, tileno, palno, 0); } + VIDEO_START( homerun ) { homerun_state *state = machine.driver_data<homerun_state>(); state->m_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(homerun_state::get_homerun_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); } + static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect ) { homerun_state *state = machine.driver_data<homerun_state>(); |