From 112a1658ff3334400329c1f0d15865b683f35e5b Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 26 Jul 2023 14:07:44 +0200 Subject: taitosj: fix bitmap size regression, schick,slapfght_ms: remove set_log --- src/mame/alliedleisure/killcom.cpp | 2 +- src/mame/pacman/schick.cpp | 9 ++++----- src/mame/taito/taitosj_v.cpp | 26 +++++++++++++------------- src/mame/toaplan/slapfght_ms.cpp | 4 ++-- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/mame/alliedleisure/killcom.cpp b/src/mame/alliedleisure/killcom.cpp index d3f14839ffa..0901d5ca840 100644 --- a/src/mame/alliedleisure/killcom.cpp +++ b/src/mame/alliedleisure/killcom.cpp @@ -2,7 +2,7 @@ // copyright-holders:Chris Moore /*************************************************************************** -Killer Comet hardware, by Centuri (previously known as Allied Leisure) +Killer Comet hardware, by Centuri (formerly known as Allied Leisure) driver by Chris Moore Killer Comet memory map diff --git a/src/mame/pacman/schick.cpp b/src/mame/pacman/schick.cpp index abd943a4c86..3bba80f55a6 100644 --- a/src/mame/pacman/schick.cpp +++ b/src/mame/pacman/schick.cpp @@ -45,8 +45,7 @@ public: m_colorram(*this, "colorram"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_ay(*this, "ay%u", 1U), - m_irq_mask(0) + m_ay(*this, "ay%u", 1U) { } @@ -106,10 +105,10 @@ private: uint8_t soundlatch_read_and_clear(); - uint8_t m_irq_mask; uint32_t screen_update_schick(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); tilemap_t *m_bg_tilemap = nullptr; + uint8_t m_irq_mask = 0; uint8_t m_charbank = 0; uint8_t m_spritebank = 0; uint8_t m_palettebank = 0; @@ -593,9 +592,9 @@ void schick_state::schick(machine_config &config) // all dividers unknown LS259(config, m_latch); // 3I, TODO: identify bits' function. 0 is correct, 2, 6 and 7 seem to be set when switching from title screen to game screen, 1, 3, 4 and 5 seem to never be set during gameplay m_latch->q_out_cb<0>().set(FUNC(schick_state::irq_mask_w)); - m_latch->q_out_cb<1>().set_log("m_latch bit 1 set"); + m_latch->q_out_cb<1>().set([this](int state) { logerror("%s latch bit 1 w: %d\n", machine().describe_context(), state); }); m_latch->q_out_cb<2>().set(FUNC(schick_state::schick_palettebank_w)); - m_latch->q_out_cb<3>().set_log("m_latch bit 3 set"); + m_latch->q_out_cb<3>().set([this](int state) { logerror("%s latch bit 3 w: %d\n", machine().describe_context(), state); }); m_latch->q_out_cb<4>().set(FUNC(schick_state::coin_counter_1_w)); m_latch->q_out_cb<5>().set(FUNC(schick_state::coin_counter_2_w)); m_latch->q_out_cb<6>().set(FUNC(schick_state::schick_colortablebank_w)); diff --git a/src/mame/taito/taitosj_v.cpp b/src/mame/taito/taitosj_v.cpp index 10da31c56a1..3b6a0282fb6 100644 --- a/src/mame/taito/taitosj_v.cpp +++ b/src/mame/taito/taitosj_v.cpp @@ -171,16 +171,16 @@ void taitosj_state::device_post_load() void taitosj_state::video_start() { - m_sprite_layer_collbitmap1.allocate(16,16); + m_sprite_layer_collbitmap1.allocate(16, 16); for (int i = 0; i < 3; i++) { - m_screen->register_screen_bitmap(m_layer_bitmap[i]); - m_screen->register_screen_bitmap(m_sprite_layer_collbitmap2[i]); + m_layer_bitmap[i].allocate(32*8, 32*8); + m_sprite_layer_collbitmap2[i].allocate(32*8, 32*8); } - m_sprite_sprite_collbitmap1.allocate(32,32); - m_sprite_sprite_collbitmap2.allocate(32,32); + m_sprite_sprite_collbitmap1.allocate(32, 32); + m_sprite_sprite_collbitmap2.allocate(32, 32); m_gfxdecode->gfx(0)->set_source(m_characterram); m_gfxdecode->gfx(1)->set_source(m_characterram); @@ -251,7 +251,7 @@ inline int taitosj_state::get_sprite_xy(uint8_t which, uint8_t* sx, uint8_t* sy) { offs_t offs = which * 4; - *sx = m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs + 0] - 1; + *sx = m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs + 0] - 1; *sy = 240 - m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs + 1]; return (*sy < 240); @@ -331,7 +331,7 @@ void taitosj_state::check_sprite_sprite_collision() { if (SPRITES_ON) { - // check each pair of sprites + // check each pair of sprites for (int which1 = 0; which1 < 0x20; which1++) { uint8_t sx1, sy1; @@ -544,10 +544,10 @@ void taitosj_state::draw_sprites(bitmap_ind16 &bitmap) { uint8_t sx, sy; - int which = (sprite - 1) & 0x1f; // move last sprite at the head of the list + int which = (sprite - 1) & 0x1f; // move last sprite at the head of the list offs_t offs = which * 4; - if ((which >= 0x10) && (which <= 0x17)) continue; // no sprites here + if ((which >= 0x10) && (which <= 0x17)) continue; // no sprites here if (get_sprite_xy(which, &sx, &sy)) { @@ -623,7 +623,7 @@ void taitosj_state::kikstart_copy_layer(bitmap_ind16 &bitmap, const rectangle &c { int i, scrolly, scrollx[32 * 8]; - for (i = 1; i < 32*8; i++) // 1-255 ! + for (i = 1; i < 32*8; i++) // 1-255 ! if (GLOBAL_FLIP_Y) switch (which) { @@ -639,7 +639,7 @@ void taitosj_state::kikstart_copy_layer(bitmap_ind16 &bitmap, const rectangle &c case 2: scrollx[i] = 0xff - m_kikstart_scrollram[0x100 + i - 1] - ((m_scroll[2 * which] - 0x12) & 0xff);break; } - scrolly = m_scroll[2 * which + 1]; // always 0 + scrolly = m_scroll[2 * which + 1]; // always 0 copyscrollbitmap_trans(bitmap, m_layer_bitmap[which], 32 * 8, scrollx, 1, &scrolly, cliprect, TRANSPARENT_PEN); // store parts covered with sprites for sprites/layers collision detection @@ -689,8 +689,8 @@ void taitosj_state::check_collision(int *sprites_on, rectangle *sprite_areas) int taitosj_state::video_update_common(bitmap_ind16 &bitmap, const rectangle &cliprect, copy_layer_func_t copy_layer_func) { - int sprites_on[0x20]; // 1 if sprite is active - rectangle sprite_areas[0x20]; // areas on bitmap (sprite locations) + int sprites_on[0x20]; // 1 if sprite is active + rectangle sprite_areas[0x20]; // areas on bitmap (sprite locations) set_pens(); diff --git a/src/mame/toaplan/slapfght_ms.cpp b/src/mame/toaplan/slapfght_ms.cpp index 6dfbeca45f9..22bd3685153 100644 --- a/src/mame/toaplan/slapfght_ms.cpp +++ b/src/mame/toaplan/slapfght_ms.cpp @@ -393,13 +393,13 @@ void slapfght_ms_state::slapfighm(machine_config &config) ym2203_device &ym1(YM2203(config, "ym1", 20_MHz_XTAL / 5)); // divisor unknown ym1.port_a_read_callback().set_ioport("IN0"); ym1.port_b_read_callback().set_ioport("IN1"); - ym1.irq_handler().set_log("ym 1 IRQ"); + ym1.irq_handler().set([this](int state) { if (state) logerror("ym 1 IRQ\n"); }); ym1.add_route(ALL_OUTPUTS, "mono", 0.15); ym2203_device &ym2(YM2203(config, "ym2", 20_MHz_XTAL / 5)); // divisor unknown ym2.port_a_read_callback().set_ioport("SW1"); ym2.port_b_read_callback().set_ioport("SW2"); - ym2.irq_handler().set_log("ym 2 IRQ"); + ym2.irq_handler().set([this](int state) { if (state) logerror("ym 2 IRQ\n"); }); ym2.add_route(ALL_OUTPUTS, "mono", 0.15); } -- cgit v1.2.3