diff options
author | hap <happppp@users.noreply.github.com> | 2020-06-05 11:46:19 +0200 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2020-06-05 11:46:32 +0200 |
commit | a389827f359d4079fc2a8f54561b3d3b0d8321fd (patch) | |
tree | bed8ca4615c0392404b2e23fdf26645a29d0acfc | |
parent | 2721b87a400f493773e9f084810e26f4aa682539 (diff) |
konppc: remove 7seg led hack (nw)
-rw-r--r-- | src/mame/drivers/gticlub.cpp | 45 | ||||
-rw-r--r-- | src/mame/drivers/hornet.cpp | 29 | ||||
-rw-r--r-- | src/mame/drivers/nwk-tr.cpp | 113 | ||||
-rw-r--r-- | src/mame/drivers/zr107.cpp | 27 | ||||
-rw-r--r-- | src/mame/includes/namcos22.h | 22 | ||||
-rw-r--r-- | src/mame/machine/konppc.cpp | 43 | ||||
-rw-r--r-- | src/mame/machine/konppc.h | 2 |
7 files changed, 102 insertions, 179 deletions
diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp index 6ca351f2853..bef93b13626 100644 --- a/src/mame/drivers/gticlub.cpp +++ b/src/mame/drivers/gticlub.cpp @@ -275,9 +275,9 @@ public: m_analog1(*this, "AN1"), m_analog2(*this, "AN2"), m_analog3(*this, "AN3"), - m_ports(*this, "IN%u", 0) - { - } + m_ports(*this, "IN%u", 0), + m_pcb_digit(*this, "pcbdigit%u", 0U) + { } void thunderh(machine_config &config); void hangplt(machine_config &config); @@ -289,6 +289,9 @@ public: void init_hangpltu(); void init_gticlub(); +protected: + virtual void machine_start() override; + private: // TODO: Needs verification on real hardware static const int m_sound_timer_usec = 2400; @@ -312,13 +315,11 @@ private: optional_device<screen_device> m_lscreen; optional_device<screen_device> m_rscreen; optional_device_array<voodoo_device, 2> m_voodoo; - required_shared_ptr<uint32_t> m_work_ram; required_shared_ptr<uint32_t> m_generic_paletteram_32; - optional_ioport m_analog0, m_analog1, m_analog2, m_analog3; - required_ioport_array<4> m_ports; + output_finder<2> m_pcb_digit; void paletteram32_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t gticlub_k001604_tile_r(offs_t offset); @@ -339,7 +340,6 @@ private: void soundtimer_en_w(uint16_t data); void soundtimer_count_w(uint16_t data); - DECLARE_MACHINE_START(gticlub); DECLARE_MACHINE_RESET(gticlub); DECLARE_MACHINE_RESET(hangplt); DECLARE_VIDEO_START(gticlub); @@ -360,9 +360,6 @@ private: void sharc_map(address_map &map); void sound_memmap(address_map &map); - void gticlub_led_setreg(int offset, uint8_t data); - - uint8_t m_gticlub_led_reg[2]; emu_timer *m_sound_irq_timer; std::unique_ptr<uint32_t[]> m_sharc_dataram_0; std::unique_ptr<uint32_t[]> m_sharc_dataram_1; @@ -464,7 +461,7 @@ void gticlub_state::sysreg_w(offs_t offset, uint8_t data) { case 0: case 1: - gticlub_led_setreg(offset, data); + m_pcb_digit[offset] = bitswap<8>(~data,7,0,1,2,3,4,5,6) & 0x7f; break; case 3: @@ -485,6 +482,9 @@ void gticlub_state::sysreg_w(offs_t offset, uint8_t data) m_konppc->set_cgboard_id((data >> 4) & 0x3); break; + + default: + break; } } @@ -520,8 +520,10 @@ void gticlub_state::soundtimer_count_w(uint16_t data) /******************************************************************/ -MACHINE_START_MEMBER(gticlub_state,gticlub) +void gticlub_state::machine_start() { + m_pcb_digit.resolve(); + /* set conservative DRC options */ m_maincpu->ppcdrc_set_options(PPCDRC_COMPATIBLE_OPTIONS); @@ -848,15 +850,9 @@ MACHINE_RESET_MEMBER(gticlub_state,gticlub) m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } -void gticlub_state::gticlub_led_setreg(int offset, uint8_t data) -{ - m_gticlub_led_reg[offset] = data; -} - VIDEO_START_MEMBER(gticlub_state,gticlub) { - m_gticlub_led_reg[0] = m_gticlub_led_reg[1] = 0x7f; /* tick = 0; debug_tex_page = 0; @@ -922,9 +918,6 @@ uint32_t gticlub_state::screen_update_gticlub(screen_device &screen, bitmap_rgb3 } #endif - draw_7segment_led(bitmap, 3, 3, m_gticlub_led_reg[0]); - draw_7segment_led(bitmap, 9, 3, m_gticlub_led_reg[1]); - //m_dsp->set_input_line(SHARC_INPUT_FLAG1, ASSERT_LINE); m_dsp->set_flag_input(1, ASSERT_LINE); return 0; @@ -938,9 +931,6 @@ uint32_t gticlub_state::screen_update_lscreen(screen_device &screen, bitmap_rgb3 m_voodoo[0]->voodoo_update(bitmap, cliprect); m_k001604_1->draw_front_layer(screen, bitmap, cliprect); - draw_7segment_led(bitmap, 3, 3, m_gticlub_led_reg[0]); - draw_7segment_led(bitmap, 9, 3, m_gticlub_led_reg[1]); - return 0; } @@ -952,9 +942,6 @@ uint32_t gticlub_state::screen_update_rscreen(screen_device &screen, bitmap_rgb3 m_voodoo[1]->voodoo_update(bitmap, cliprect); m_k001604_2->draw_front_layer(screen, bitmap, cliprect); - draw_7segment_led(bitmap, 3, 3, m_gticlub_led_reg[0]); - draw_7segment_led(bitmap, 9, 3, m_gticlub_led_reg[1]); - return 0; } @@ -976,7 +963,6 @@ void gticlub_state::gticlub(machine_config &config) EEPROM_93C56_16BIT(config, "eeprom"); - MCFG_MACHINE_START_OVERRIDE(gticlub_state,gticlub) MCFG_MACHINE_RESET_OVERRIDE(gticlub_state,gticlub) ADC1038(config, m_adc1038, 0); @@ -1037,7 +1023,7 @@ void gticlub_state::thunderh(machine_config &config) // Todo: K056230 from the I m_adc1038->set_gti_club_hack(false); m_k056230->set_thunderh_hack(true); - + M68000(config, m_gn680, XTAL(32'000'000) / 2); // 16MHz m_gn680->set_addrmap(AS_PROGRAM, >iclub_state::gn680_memmap); } @@ -1081,7 +1067,6 @@ void gticlub_state::hangplt(machine_config &config) EEPROM_93C56_16BIT(config, "eeprom"); - MCFG_MACHINE_START_OVERRIDE(gticlub_state,gticlub) MCFG_MACHINE_RESET_OVERRIDE(gticlub_state,hangplt) ADC1038(config, m_adc1038, 0); diff --git a/src/mame/drivers/hornet.cpp b/src/mame/drivers/hornet.cpp index ad12ded3aa4..5ad07a0e6ca 100644 --- a/src/mame/drivers/hornet.cpp +++ b/src/mame/drivers/hornet.cpp @@ -6,7 +6,7 @@ Konami 'Hornet' Hardware Konami, 1997-2000 -f + Known games on this hardware include.... Game (C) Year @@ -392,6 +392,7 @@ public: m_eepromout(*this, "EEPROMOUT"), m_analog1(*this, "ANALOG1"), m_analog2(*this, "ANALOG2"), + m_pcb_digit(*this, "pcbdigit%u", 0U), m_user3_ptr(*this, "user3"), m_user5_ptr(*this, "user5"), m_lan_ds2401(*this, "lan_serial_id"), @@ -431,14 +432,13 @@ private: optional_device_array<voodoo_device, 2> m_voodoo; required_ioport m_in0, m_in1, m_in2, m_dsw; optional_ioport m_eepromout, m_analog1, m_analog2; + output_finder<2> m_pcb_digit; optional_region_ptr<uint8_t> m_user3_ptr; optional_region_ptr<uint8_t> m_user5_ptr; optional_device<ds2401_device> m_lan_ds2401; required_device<watchdog_timer_device> m_watchdog; emu_timer *m_sound_irq_timer; - uint8_t m_led_reg0; - uint8_t m_led_reg1; std::unique_ptr<uint8_t[]> m_jvs_sdata; uint32_t m_jvs_sdata_ptr; uint16_t m_gn680_latch; @@ -549,8 +549,6 @@ uint32_t hornet_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap m_k037122_1->tile_draw(screen, bitmap, cliprect); - draw_7segment_led(bitmap, 3, 3, m_led_reg0); - draw_7segment_led(bitmap, 9, 3, m_led_reg1); return 0; } @@ -560,8 +558,6 @@ uint32_t hornet_state::screen_update_rscreen(screen_device &screen, bitmap_rgb32 m_k037122_2->tile_draw(screen, bitmap, cliprect); - draw_7segment_led(bitmap, 3, 3, m_led_reg0); - draw_7segment_led(bitmap, 9, 3, m_led_reg1); return 0; } @@ -600,6 +596,9 @@ uint8_t hornet_state::sysreg_r(offs_t offset) case 4: /* I/O port 4 - DIP switches */ r = m_dsw->read(); break; + + default: + break; } return r; } @@ -608,12 +607,9 @@ void hornet_state::sysreg_w(offs_t offset, uint8_t data) { switch (offset) { - case 0: /* LED Register 0 */ - m_led_reg0 = data; - break; - - case 1: /* LED Register 1 */ - m_led_reg1 = data; + case 0: /* 7seg LEDs on PCB */ + case 1: + m_pcb_digit[offset] = bitswap<8>(~data,7,0,1,2,3,4,5,6) & 0x7f; break; case 2: /* Parallel data register */ @@ -1087,6 +1083,8 @@ INPUT_PORTS_END void hornet_state::machine_start() { + m_pcb_digit.resolve(); + m_jvs_sdata_ptr = 0; m_jvs_sdata = make_unique_clear<uint8_t[]>(1024); @@ -1096,8 +1094,6 @@ void hornet_state::machine_start() /* configure fast RAM regions for DRC */ m_maincpu->ppcdrc_add_fastram(0x00000000, 0x003fffff, false, m_workram); - save_item(NAME(m_led_reg0)); - save_item(NAME(m_led_reg1)); save_pointer(NAME(m_jvs_sdata), 1024); save_item(NAME(m_jvs_sdata_ptr)); @@ -1423,7 +1419,6 @@ void hornet_state::jamma_jvs_cmd_exec() void hornet_state::init_hornet() { m_konppc->set_cgboard_texture_bank(0, "bank5", memregion("user5")->base()); - m_led_reg0 = m_led_reg1 = 0x7f; m_maincpu->ppc4xx_spu_set_tx_handler(write8smo_delegate(*this, FUNC(hornet_state::jamma_jvs_w))); } @@ -1450,7 +1445,6 @@ void hornet_state::init_sscope() { m_konppc->set_cgboard_texture_bank(0, "bank5", memregion("user5")->base()); m_konppc->set_cgboard_texture_bank(1, "bank6", memregion("user5")->base()); - m_led_reg0 = m_led_reg1 = 0x7f; m_maincpu->ppc4xx_spu_set_tx_handler(write8smo_delegate(*this, FUNC(hornet_state::jamma_jvs_w))); } @@ -1459,7 +1453,6 @@ void hornet_state::init_sscope2() //fixme: eventually set sscope2 to load gfx ro { m_konppc->set_cgboard_texture_bank(0, "bank5", memregion("user5")->base()); m_konppc->set_cgboard_texture_bank(1, "bank6", memregion("user5")->base()); - m_led_reg0 = m_led_reg1 = 0x7f; m_maincpu->ppc4xx_spu_set_tx_handler(write8smo_delegate(*this, FUNC(hornet_state::jamma_jvs_w))); } diff --git a/src/mame/drivers/nwk-tr.cpp b/src/mame/drivers/nwk-tr.cpp index a13b9e17899..9270faf21a9 100644 --- a/src/mame/drivers/nwk-tr.cpp +++ b/src/mame/drivers/nwk-tr.cpp @@ -307,8 +307,10 @@ public: m_analog3(*this, "ANALOG3"), m_analog4(*this, "ANALOG4"), m_analog5(*this, "ANALOG5"), + m_pcb_digit(*this, "pcbdigit%u", 0U), m_palette(*this, "palette"), - m_generic_paletteram_32(*this, "paletteram") { } + m_generic_paletteram_32(*this, "paletteram") + { } void thrilld(machine_config &config); void nwktr(machine_config &config); @@ -319,8 +321,6 @@ private: // TODO: Needs verification on real hardware static const int m_sound_timer_usec = 2400; - uint8_t m_led_reg0; - uint8_t m_led_reg1; required_shared_ptr<uint32_t> m_work_ram; required_device<ppc_device> m_maincpu; required_device<cpu_device> m_audiocpu; @@ -332,8 +332,10 @@ private: required_device<adc12138_device> m_adc12138; required_device_array<voodoo_device, 2> m_voodoo; required_ioport m_in0, m_in1, m_in2, m_dsw, m_analog1, m_analog2, m_analog3, m_analog4, m_analog5; + output_finder<2> m_pcb_digit; required_device<palette_device> m_palette; required_shared_ptr<uint32_t> m_generic_paletteram_32; + emu_timer *m_sound_irq_timer; int m_fpga_uploaded; int m_lanc2_ram_r; @@ -343,8 +345,8 @@ private: std::unique_ptr<uint32_t[]> m_sharc0_dataram; std::unique_ptr<uint32_t[]> m_sharc1_dataram; void paletteram32_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); - uint32_t sysreg_r(offs_t offset, uint32_t mem_mask = ~0); - void sysreg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint8_t sysreg_r(offs_t offset); + void sysreg_w(offs_t offset, uint8_t data); uint32_t lanc1_r(offs_t offset); void lanc1_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t lanc2_r(offs_t offset, uint32_t mem_mask = ~0); @@ -403,8 +405,6 @@ uint32_t nwktr_state::screen_update_lscreen(screen_device &screen, bitmap_rgb32 m_k001604->draw_front_layer(screen, bitmap, tilemap_rect); - draw_7segment_led(bitmap, 3, 3, m_led_reg0); - draw_7segment_led(bitmap, 9, 3, m_led_reg1); return 0; } @@ -419,83 +419,73 @@ uint32_t nwktr_state::screen_update_rscreen(screen_device &screen, bitmap_rgb32 m_k001604->draw_front_layer(screen, bitmap, tilemap_rect); - draw_7segment_led(bitmap, 3, 3, m_led_reg0); - draw_7segment_led(bitmap, 9, 3, m_led_reg1); return 0; } /*****************************************************************************/ -uint32_t nwktr_state::sysreg_r(offs_t offset, uint32_t mem_mask) +uint8_t nwktr_state::sysreg_r(offs_t offset) { - uint32_t r = 0; - if (offset == 0) - { - if (ACCESSING_BITS_24_31) - { - r |= m_in0->read() << 24; - } - if (ACCESSING_BITS_16_23) - { - r |= m_in1->read() << 16; - } - if (ACCESSING_BITS_8_15) - { - r |= m_in2->read() << 8; - } - if (ACCESSING_BITS_0_7) - { - r |= m_adc12138->do_r() | (m_adc12138->eoc_r() << 2); - } - } - else if (offset == 1) + uint8_t r = 0; + + switch (offset) { - if (ACCESSING_BITS_24_31) - { - r |= m_dsw->read() << 24; - } + case 0: + r = m_in0->read(); + break; + case 1: + r = m_in1->read(); + break; + case 2: + r = m_in2->read(); + break; + case 3: + r = m_adc12138->do_r() | (m_adc12138->eoc_r() << 2); + break; + case 4: + r = m_dsw->read(); + break; + default: + break; } + return r; } -void nwktr_state::sysreg_w(offs_t offset, uint32_t data, uint32_t mem_mask) +void nwktr_state::sysreg_w(offs_t offset, uint8_t data) { - if( offset == 0 ) - { - if (ACCESSING_BITS_24_31) - { - m_led_reg0 = (data >> 24) & 0xff; - } - if (ACCESSING_BITS_16_23) - { - m_led_reg1 = (data >> 16) & 0xff; - } - return; - } - if( offset == 1 ) + switch (offset) { - if (ACCESSING_BITS_24_31) + case 0: + case 1: + m_pcb_digit[offset] = bitswap<8>(~data,7,0,1,2,3,4,5,6) & 0x7f; + break; + + case 4: { - int cs = (data >> 27) & 0x1; - int conv = (data >> 26) & 0x1; - int di = (data >> 25) & 0x1; - int sclk = (data >> 24) & 0x1; + int cs = (data >> 3) & 0x1; + int conv = (data >> 2) & 0x1; + int di = (data >> 1) & 0x1; + int sclk = data & 0x1; m_adc12138->cs_w(cs); m_adc12138->conv_w(conv); m_adc12138->di_w(di); m_adc12138->sclk_w(sclk); + break; } - if (ACCESSING_BITS_0_7) - { - if (data & 0x80) // CG Board 1 IRQ Ack + + case 7: + if (data & 0x80) // CG Board 1 IRQ Ack m_maincpu->set_input_line(INPUT_LINE_IRQ1, CLEAR_LINE); - if (data & 0x40) // CG Board 0 IRQ Ack + if (data & 0x40) // CG Board 0 IRQ Ack m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); m_konppc->set_cgboard_id((data >> 4) & 1); - } - return; + break; + + default: + break; } } @@ -675,6 +665,8 @@ void nwktr_state::soundtimer_count_w(uint16_t data) void nwktr_state::machine_start() { + m_pcb_digit.resolve(); + /* set conservative DRC options */ m_maincpu->ppcdrc_set_options(PPCDRC_COMPATIBLE_OPTIONS); @@ -942,7 +934,6 @@ void nwktr_state::init_nwktr() m_sharc0_dataram = std::make_unique<uint32_t[]>(0x100000 / 4); m_sharc1_dataram = std::make_unique<uint32_t[]>(0x100000 / 4); - m_led_reg0 = m_led_reg1 = 0x7f; lanc2_init(); } diff --git a/src/mame/drivers/zr107.cpp b/src/mame/drivers/zr107.cpp index 9c08cd60b2c..df3a81a72b4 100644 --- a/src/mame/drivers/zr107.cpp +++ b/src/mame/drivers/zr107.cpp @@ -208,10 +208,12 @@ public: m_analog1(*this, "ANALOG1"), m_analog2(*this, "ANALOG2"), m_analog3(*this, "ANALOG3"), + m_pcb_digit(*this, "pcbdigit%u", 0U), m_screen(*this, "screen"), m_palette(*this, "palette"), m_generic_paletteram_32(*this, "paletteram"), - m_konppc(*this, "konppc") { } + m_konppc(*this, "konppc") + { } void zr107(machine_config &config); @@ -227,14 +229,13 @@ protected: required_device<k001005_device> m_k001005; required_device<k001006_device> m_k001006_1; required_ioport m_in0, m_in1, m_in2, m_in3, m_in4, m_out4, m_eepromout, m_analog1, m_analog2, m_analog3; + output_finder<2> m_pcb_digit; required_device<screen_device> m_screen; required_device<palette_device> m_palette; required_shared_ptr<uint32_t> m_generic_paletteram_32; required_device<konppc_device> m_konppc; std::unique_ptr<uint32_t[]> m_sharc_dataram; - uint8_t m_led_reg0; - uint8_t m_led_reg1; int m_ccu_vcth; int m_ccu_vctl; uint8_t m_sound_ctrl; @@ -312,8 +313,6 @@ uint32_t jetwave_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma m_k001005->draw(bitmap, cliprect); m_k001604->draw_front_layer(screen, bitmap, cliprect); - draw_7segment_led(bitmap, 3, 3, m_led_reg0); - draw_7segment_led(bitmap, 9, 3, m_led_reg1); return 0; } @@ -353,8 +352,6 @@ uint32_t midnrun_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma m_k001005->draw(bitmap, cliprect); m_k056832->tilemap_draw(screen, bitmap, cliprect, 0, 0, 0); - draw_7segment_led(bitmap, 3, 3, m_led_reg0); - draw_7segment_led(bitmap, 9, 3, m_led_reg1); return 0; } @@ -383,6 +380,8 @@ uint8_t zr107_state::sysreg_r(offs_t offset) break; case 5: /* Parallel data port */ break; + default: + break; } return r; } @@ -391,12 +390,9 @@ void zr107_state::sysreg_w(offs_t offset, uint8_t data) { switch (offset) { - case 0: /* LED Register 0 */ - m_led_reg0 = data; - break; - - case 1: /* LED Register 1 */ - m_led_reg1 = data; + case 0: /* 7seg LEDs on PCB */ + case 1: + m_pcb_digit[offset] = bitswap<8>(~data,7,0,1,2,3,4,5,6) & 0x7f; break; case 2: /* Parallel data register */ @@ -447,6 +443,8 @@ void zr107_state::sysreg_w(offs_t offset, uint8_t data) m_watchdog->watchdog_reset(); break; + default: + break; } } @@ -483,6 +481,8 @@ void zr107_state::ccu_w(uint32_t data) void zr107_state::machine_start() { + m_pcb_digit.resolve(); + /* set conservative DRC options */ m_maincpu->ppcdrc_set_options(PPCDRC_COMPATIBLE_OPTIONS); @@ -851,7 +851,6 @@ void jetwave_state::jetwave(machine_config &config) void zr107_state::driver_init() { m_sharc_dataram = std::make_unique<uint32_t[]>(0x100000/4); - m_led_reg0 = m_led_reg1 = 0x7f; m_ccu_vcth = m_ccu_vctl = 0; m_dsp->enable_recompiler(); diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h index c1f791b439c..b1a70010567 100644 --- a/src/mame/includes/namcos22.h +++ b/src/mame/includes/namcos22.h @@ -267,16 +267,16 @@ protected: virtual void video_start() override; virtual void device_post_load() override; - void namcos22_textram_w(offs_t offset, u32 data, u32 mem_mask); + void namcos22_textram_w(offs_t offset, u32 data, u32 mem_mask = ~0); u16 namcos22_tilemapattr_r(offs_t offset); - void namcos22_tilemapattr_w(offs_t offset, u16 data, u16 mem_mask); + void namcos22_tilemapattr_w(offs_t offset, u16 data, u16 mem_mask = ~0); u32 namcos22_dspram_r(offs_t offset); - void namcos22_dspram_w(offs_t offset, u32 data, u32 mem_mask); - void namcos22_cgram_w(offs_t offset, u32 data, u32 mem_mask); - void namcos22_paletteram_w(offs_t offset, u32 data, u32 mem_mask); - void namcos22_dspram16_bank_w(offs_t offset, u16 data, u16 mem_mask); + void namcos22_dspram_w(offs_t offset, u32 data, u32 mem_mask = ~0); + void namcos22_cgram_w(offs_t offset, u32 data, u32 mem_mask = ~0); + void namcos22_paletteram_w(offs_t offset, u32 data, u32 mem_mask = ~0); + void namcos22_dspram16_bank_w(offs_t offset, u16 data, u16 mem_mask = ~0); u16 namcos22_dspram16_r(offs_t offset); - void namcos22_dspram16_w(offs_t offset, u16 data, u16 mem_mask); + void namcos22_dspram16_w(offs_t offset, u16 data, u16 mem_mask = ~0); u16 pdp_status_r(); u16 pdp_begin_r(); u16 dsp_hold_signal_r(); @@ -311,12 +311,12 @@ protected: DECLARE_READ32_MEMBER(namcos22_sci_r); DECLARE_WRITE32_MEMBER(namcos22_sci_w); u16 namcos22_shared_r(offs_t offset); - void namcos22_shared_w(offs_t offset, u16 data, u16 mem_mask); + void namcos22_shared_w(offs_t offset, u16 data, u16 mem_mask = ~0); u16 namcos22_keycus_r(offs_t offset); - void namcos22_keycus_w(offs_t offset, u16 data, u16 mem_mask); + void namcos22_keycus_w(offs_t offset, u16 data, u16 mem_mask = ~0); DECLARE_READ16_MEMBER(namcos22_portbit_r); DECLARE_WRITE16_MEMBER(namcos22_portbit_w); - void namcos22_cpuleds_w(offs_t offset, u32 data, u32 mem_mask); + void namcos22_cpuleds_w(offs_t offset, u32 data, u32 mem_mask = ~0); u8 mcu_port4_s22_r(); u8 iomcu_port4_s22_r(); DECLARE_READ16_MEMBER(mcuc74_speedup_r); @@ -550,7 +550,7 @@ private: DECLARE_WRITE16_MEMBER(namcos22s_czattr_w); DECLARE_READ16_MEMBER(namcos22s_czattr_r); - void namcos22s_czram_w(offs_t offset, u32 data, u32 mem_mask); + void namcos22s_czram_w(offs_t offset, u32 data, u32 mem_mask = ~0); u32 namcos22s_czram_r(offs_t offset); DECLARE_READ32_MEMBER(namcos22s_vics_control_r); DECLARE_WRITE32_MEMBER(namcos22s_vics_control_w); diff --git a/src/mame/machine/konppc.cpp b/src/mame/machine/konppc.cpp index 0b1225260f1..2ed065fdedd 100644 --- a/src/mame/machine/konppc.cpp +++ b/src/mame/machine/konppc.cpp @@ -498,46 +498,3 @@ WRITE32_MEMBER( konppc_device::nwk_voodoo_1_w) m_voodoo[1]->voodoo_w(offset, data, mem_mask); } } - -/*****************************************************************************/ - -#define LED_ON 0xff00ff00 - -void draw_7segment_led(bitmap_rgb32 &bitmap, int x, int y, uint8_t value) -{ - if ((value & 0x7f) == 0x7f) - { - return; - } - - bitmap.plot_box(x-1, y-1, 7, 11, 0x00000000); - - /* Top */ - if( (value & 0x40) == 0 ) { - bitmap.plot_box(x+1, y+0, 3, 1, LED_ON); - } - /* Middle */ - if( (value & 0x01) == 0 ) { - bitmap.plot_box(x+1, y+4, 3, 1, LED_ON); - } - /* Bottom */ - if( (value & 0x08) == 0 ) { - bitmap.plot_box(x+1, y+8, 3, 1, LED_ON); - } - /* Top Left */ - if( (value & 0x02) == 0 ) { - bitmap.plot_box(x+0, y+1, 1, 3, LED_ON); - } - /* Top Right */ - if( (value & 0x20) == 0 ) { - bitmap.plot_box(x+4, y+1, 1, 3, LED_ON); - } - /* Bottom Left */ - if( (value & 0x04) == 0 ) { - bitmap.plot_box(x+0, y+5, 1, 3, LED_ON); - } - /* Bottom Right */ - if( (value & 0x10) == 0 ) { - bitmap.plot_box(x+4, y+5, 1, 3, LED_ON); - } -} diff --git a/src/mame/machine/konppc.h b/src/mame/machine/konppc.h index 7a158b3c573..e3862b23b9a 100644 --- a/src/mame/machine/konppc.h +++ b/src/mame/machine/konppc.h @@ -106,6 +106,4 @@ private: DECLARE_DEVICE_TYPE(KONPPC, konppc_device) -void draw_7segment_led(bitmap_rgb32 &bitmap, int x, int y, uint8_t value); - #endif // MAME_MACHINE_KONPPC_H |