From 9585dfe6bf070d2549beaace07eeef70eb2d7d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Banaan=20Ananas?= Date: Mon, 3 Jun 2013 21:40:09 +0000 Subject: [PATCH] small cleanup before i have a tackle at those 7seg leds --- src/mame/drivers/speedbal.c | 14 ++++------ src/mame/includes/speedbal.h | 18 ++++++------ src/mame/layout/speedbal.lay | 53 ++++++++++++++++-------------------- src/mame/video/speedbal.c | 17 +++++------- 4 files changed, 45 insertions(+), 57 deletions(-) diff --git a/src/mame/drivers/speedbal.c b/src/mame/drivers/speedbal.c index a4b49ada9d0..145c0f74501 100644 --- a/src/mame/drivers/speedbal.c +++ b/src/mame/drivers/speedbal.c @@ -5,10 +5,10 @@ this was available in a number of cabinet types including 'Super Pin-Ball' which mimicked a Pinball table in design, complete with 7-seg scoreboard. - todo: - decrypt Music Ball - hookup 7-segs used by Super Pinball cabinet type - verify clock speeds etc. + TODO: + - decrypt Music Ball + - hookup 7-segs used by Super Pinball cabinet type + - verify clock speeds etc. Speed Ball map @@ -88,7 +88,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(speedbal_state::speedbal_maincpu_50_w) { - logerror("%s: speedbal_maincpu_50_w %02x\n", this->machine().describe_context(), data); + //logerror("%s: speedbal_maincpu_50_w %02x\n", this->machine().describe_context(), data); } static ADDRESS_MAP_START( main_cpu_io_map, AS_IO, 8, speedbal_state ) @@ -103,9 +103,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_cpu_map, AS_PROGRAM, 8, speedbal_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0xd000, 0xdbff) AM_RAM + AM_RANGE(0xd000, 0xdbff) AM_RAM // ? AM_RANGE(0xdc00, 0xdfff) AM_RAM AM_SHARE("share1") // shared with MAIN CPU - AM_RANGE(0xf000, 0xffff) AM_RAM ADDRESS_MAP_END /* this is wrong.. needs more investigation / tracing of the code */ @@ -316,7 +315,6 @@ static MACHINE_CONFIG_START( speedbal, speedbal_state ) MCFG_GFXDECODE(speedbal) MCFG_PALETTE_LENGTH(768) - /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/includes/speedbal.h b/src/mame/includes/speedbal.h index 3bcbc80f7e0..984dd9993ab 100644 --- a/src/mame/includes/speedbal.h +++ b/src/mame/includes/speedbal.h @@ -3,21 +3,25 @@ class speedbal_state : public driver_device public: speedbal_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_background_videoram(*this, "bg_videoram"), - m_foreground_videoram(*this, "fg_videoram"), + m_maincpu(*this, "maincpu"), m_spriteram(*this, "spriteram"), - m_maincpu(*this, "maincpu") + m_background_videoram(*this, "bg_videoram"), + m_foreground_videoram(*this, "fg_videoram") { m_bitcount = 0; m_writeval = 0; } + required_device m_maincpu; + required_shared_ptr m_spriteram; required_shared_ptr m_background_videoram; required_shared_ptr m_foreground_videoram; + + int m_bitcount; + UINT8 m_writeval; + tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; - required_shared_ptr m_spriteram; - required_device m_maincpu; DECLARE_DRIVER_INIT(speedbal); DECLARE_DRIVER_INIT(musicbal); @@ -33,14 +37,10 @@ public: DECLARE_WRITE8_MEMBER(speedbal_sndcpu_c1_w); void write_data_bit(UINT8 bit); - int m_bitcount; - UINT8 m_writeval; TILE_GET_INFO_MEMBER(get_tile_info_bg); TILE_GET_INFO_MEMBER(get_tile_info_fg); virtual void video_start(); UINT32 screen_update_speedbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - - }; diff --git a/src/mame/layout/speedbal.lay b/src/mame/layout/speedbal.lay index 2659e85d7b8..b7c09ffa624 100644 --- a/src/mame/layout/speedbal.lay +++ b/src/mame/layout/speedbal.lay @@ -22,110 +22,103 @@ - + - + - + - + - + - + - + - + - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - - - diff --git a/src/mame/video/speedbal.c b/src/mame/video/speedbal.c index ad30ab8a1d2..7dfa1b7a431 100644 --- a/src/mame/video/speedbal.c +++ b/src/mame/video/speedbal.c @@ -1,10 +1,10 @@ - /**************************************************************************** - * * - * video.c * - * * - * Functions to emulate the video hardware of the machine. * - * * - ****************************************************************************/ +/**************************************************************************** + * * + * Speed Ball * + * * + * Functions to emulate the video hardware of the machine. * + * * + ****************************************************************************/ #include "emu.h" #include "includes/speedbal.h" @@ -44,9 +44,6 @@ void speedbal_state::video_start() m_fg_tilemap->set_transmask(0,0xffff,0x0001); /* split type 0 is totally transparent in front half and has pen 0 transparent in back half */ m_fg_tilemap->set_transmask(1,0x0001,0x0001); /* split type 1 has pen 0 transparent in front and back half */ - - - }