diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c index 377dbbf9cf2..d6073eaead6 100644 --- a/src/emu/rendlay.c +++ b/src/emu/rendlay.c @@ -482,6 +482,10 @@ layout_element::layout_element(running_machine &machine, xml_data_node &elemnode m_maxstate = 262143; if (newcomp.m_type == component::CTYPE_DOTMATRIX) m_maxstate = 255; + if (newcomp.m_type == component::CTYPE_SIMPLECOUNTER) + { + m_maxstate = xml_get_attribute_int_with_subst(machine, *compnode, "maxstate", 999); + } } // determine the scale/offset for normalization @@ -632,6 +636,13 @@ layout_element::component::component(running_machine &machine, xml_data_node &co else if (strcmp(compnode.name, "dotmatrix") == 0) m_type = CTYPE_DOTMATRIX; + // simplecounter nodes + else if (strcmp(compnode.name, "simplecounter") == 0) + { + m_type = CTYPE_SIMPLECOUNTER; + m_digits = xml_get_attribute_int_with_subst(machine, compnode, "digits", 2); + } + // led7seg nodes else if (strcmp(compnode.name, "led7seg") == 0) m_type = CTYPE_LED7SEG; @@ -729,6 +740,10 @@ void layout_element::component::draw(running_machine &machine, bitmap_argb32 &de draw_dotmatrix(dest, bounds, state); break; + case CTYPE_SIMPLECOUNTER: + draw_simplecounter(machine, dest, bounds, state); + break; + default: throw emu_fatalerror("Unknown component type requested draw()"); } @@ -840,6 +855,8 @@ void layout_element::component::draw_text(running_machine &machine, bitmap_argb3 render_font *font = machine.render().font_alloc("default"); float aspect = 1.0f; INT32 width; + + while (1) { width = font->string_width(bounds.height(), aspect, m_string); @@ -848,6 +865,7 @@ void layout_element::component::draw_text(running_machine &machine, bitmap_argb3 aspect *= 0.9f; } + // get alignment INT32 curx; switch (m_textalign) @@ -914,6 +932,14 @@ void layout_element::component::draw_text(running_machine &machine, bitmap_argb3 machine.render().font_free(font); } +void layout_element::component::draw_simplecounter(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state) +{ + char temp[256]; + sprintf(temp, "%0*d", m_digits, state); + m_string = astring(temp); + draw_text(machine, dest, bounds); +} + //------------------------------------------------- // load_bitmap - load a PNG file with artwork for diff --git a/src/emu/rendlay.h b/src/emu/rendlay.h index bdc65553d45..9e2addd6278 100644 --- a/src/emu/rendlay.h +++ b/src/emu/rendlay.h @@ -121,6 +121,7 @@ private: CTYPE_LED14SEGSC, CTYPE_LED16SEGSC, CTYPE_DOTMATRIX, + CTYPE_SIMPLECOUNTER, CTYPE_MAX }; @@ -128,6 +129,7 @@ private: void draw_rect(bitmap_argb32 &dest, const rectangle &bounds); void draw_disk(bitmap_argb32 &dest, const rectangle &bounds); void draw_text(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds); + void draw_simplecounter(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state); void load_bitmap(); void draw_led7seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern); void draw_led14seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern); @@ -152,6 +154,7 @@ private: render_bounds m_bounds; // bounds of the element render_color m_color; // color of the element astring m_string; // string for text components + int m_digits; // number of digits for simple counters int m_textalign; // text alignment to box bitmap_argb32 m_bitmap; // source bitmap for images astring m_dirname; // directory name of image file (for lazy loading) diff --git a/src/mame/drivers/bfm_sc4.c b/src/mame/drivers/bfm_sc4.c index 5d5dadbd388..299c2b8b308 100644 --- a/src/mame/drivers/bfm_sc4.c +++ b/src/mame/drivers/bfm_sc4.c @@ -22648,8 +22648,6 @@ ROM_START( sc_unsrt ) // 95008423.bin sc4goldw Golden Winner (Bellfruit) (Scorpion 4) // Champion Chips (Bellfruit) ROM_LOAD( "95008558.bin", 0x0000, 0x100000, CRC(6c032de9) SHA1(3aed801f8b6f2d62fffa03054afd8ff1c3ff3ac3) ) - // Clever Clogs (Mazooma) - ROM_LOAD( "95008361.bin", 0x0000, 0x0ff54f, CRC(d1cc7b58) SHA1(32328e0e56bbf65e91e32de8802edce38f0abc65) ) // Costa Del Dosh (Bellfruit) ROM_LOAD( "95008420.bin", 0x0000, 0x100000, CRC(cce5f09a) SHA1(8b1f30eb1c48a3e3c6c403f28e97918ddac51033) ) // Deal Or No Deal Red Hot (Bellfruit) @@ -22754,31 +22752,63 @@ GAME( 200?, sc4pstatj ,sc4pstat, sc4, sc4, sc4, ROT0, "QPS","Paystation (V041) ( GAME( 200?, sc4pstato ,sc4pstat, sc4, sc4, sc4, ROT0, "QPS","Paystation (V042) (Qps) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) GAME( 200?, sc4pstatq ,sc4pstat, sc4, sc4, sc4, ROT0, "QPS","Paystation (V042) (Qps) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) +const stepper_interface* sc4cvani_reel_configs[6] = +{ + &starpoint_interface_48step, + &starpoint_interface_48step, + &starpoint_interface_48step, + 0, + &starpoint_interface_200step_reel, + 0, +}; + +static DRIVER_INIT( sc4cvani ) +{ + sc4_state *state = machine.driver_data(); + DRIVER_INIT_CALL( sc4 ); + state->m_reel_setup = sc4cvani_reel_configs; +} // PR2052 CASHLVANIA VANIASND CASH'!'VANIA -GAME( 200?, sc4cvani ,0, sc4, sc4, sc4, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvania ,sc4cvani, sc4, sc4, sc4, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvanib ,sc4cvani, sc4, sc4, sc4, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvanic ,sc4cvani, sc4, sc4, sc4, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvanid ,sc4cvani, sc4, sc4, sc4, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvanie ,sc4cvani, sc4, sc4, sc4, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvanif ,sc4cvani, sc4, sc4, sc4, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvanig ,sc4cvani, sc4, sc4, sc4, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvanih ,sc4cvani, sc4, sc4, sc4, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvanii ,sc4cvani, sc4, sc4, sc4, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvani ,0, sc4, sc4, sc4cvani, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvania ,sc4cvani, sc4, sc4, sc4cvani, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvanib ,sc4cvani, sc4, sc4, sc4cvani, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvanic ,sc4cvani, sc4, sc4, sc4cvani, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvanid ,sc4cvani, sc4, sc4, sc4cvani, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvanie ,sc4cvani, sc4, sc4, sc4cvani, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvanif ,sc4cvani, sc4, sc4, sc4cvani, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvanig ,sc4cvani, sc4, sc4, sc4cvani, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvanih ,sc4cvani, sc4, sc4, sc4cvani, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvanii ,sc4cvani, sc4, sc4, sc4cvani, ROT0, "QPS","Cashvania (Qps) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL ) +const stepper_interface* sc4cvclb_reel_configs[6] = +{ + &starpoint_interface_48step, + &starpoint_interface_48step, + &starpoint_interface_48step, + &starpoint_interface_48step, + 0, + &starpoint_interface_200step_reel, +}; + +static DRIVER_INIT( sc4cvclb ) +{ + sc4_state *state = machine.driver_data(); + DRIVER_INIT_CALL( sc4 ); + state->m_reel_setup = sc4cvclb_reel_configs; +} // PRXXXX CLUBCASHLVANIA V1.0 CLUBVANIASND CLUB CASH!VANIA -GAME( 200?, sc4cvclb ,0, sc4, sc4, sc4, ROT0, "QPS","Cashvania Club (V1.0) (Qps) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvclba ,sc4cvclb, sc4, sc4, sc4, ROT0, "QPS","Cashvania Club (V1.0) (Qps) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvclbc ,sc4cvclb, sc4, sc4, sc4, ROT0, "QPS","Cashvania Club (V1.0) (Qps) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvclbd ,sc4cvclb, sc4, sc4, sc4, ROT0, "QPS","Cashvania Club (V1.0) (Qps) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvclb ,0, sc4, sc4, sc4cvclb, ROT0, "QPS","Cashvania Club (V1.0) (Qps) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvclba ,sc4cvclb, sc4, sc4, sc4cvclb, ROT0, "QPS","Cashvania Club (V1.0) (Qps) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvclbc ,sc4cvclb, sc4, sc4, sc4cvclb, ROT0, "QPS","Cashvania Club (V1.0) (Qps) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvclbd ,sc4cvclb, sc4, sc4, sc4cvclb, ROT0, "QPS","Cashvania Club (V1.0) (Qps) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) // PRXXXX CLUBCASHLVANIA V2.0 CLUBVANIASND CLUB CASH!VANIA -GAME( 200?, sc4cvclbb ,sc4cvclb, sc4, sc4, sc4, ROT0, "QPS","Cashvania Club (V2.0) (Qps) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvclbe ,sc4cvclb, sc4, sc4, sc4, ROT0, "QPS","Cashvania Club (V2.0) (Qps) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvclbb ,sc4cvclb, sc4, sc4, sc4cvclb, ROT0, "QPS","Cashvania Club (V2.0) (Qps) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvclbe ,sc4cvclb, sc4, sc4, sc4cvclb, ROT0, "QPS","Cashvania Club (V2.0) (Qps) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) // PRXXXX CLUBCASHLVANIA 411 CLUBVANIASND CLUB CASH!VANIA -GAME( 200?, sc4cvclbf ,sc4cvclb, sc4, sc4, sc4, ROT0, "QPS","Cashvania Club (V411) (Qps) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sc4cvclbg ,sc4cvclb, sc4, sc4, sc4, ROT0, "QPS","Cashvania Club (V411) (Qps) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvclbf ,sc4cvclb, sc4, sc4, sc4cvclb, ROT0, "QPS","Cashvania Club (V411) (Qps) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc4cvclbg ,sc4cvclb, sc4, sc4, sc4cvclb, ROT0, "QPS","Cashvania Club (V411) (Qps) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) // PR6912 SOUTH PARK PR6912 SOUTH PARK SOUNDS11 SOUTH PARK GAME( 200?, sc4spark ,0, sc4, sc4, sc4, ROT0, "BFM","South Park (BFM) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) diff --git a/src/mame/drivers/bfm_sc4h.c b/src/mame/drivers/bfm_sc4h.c index 2e8c5f8450a..09698e3bec3 100644 --- a/src/mame/drivers/bfm_sc4h.c +++ b/src/mame/drivers/bfm_sc4h.c @@ -246,21 +246,17 @@ WRITE8_MEMBER(sc4_state::mux_output2_w) int i; int off = offset<<3; + // some games use this as a matrix port (luckb etc.) for (i=0; i<8; i++) { output_set_indexed_value("matrix", off+i, ((data & (1 << i)) != 0)); } - - if (offset>=20) - { - offset-=20; - // todo, reorder to what our 7segs expect - UINT8 bf7segdata = BITSWAP8(data,7,6,5,4,3,2,1,0); - output_set_digit_value(offset, bf7segdata); - - } - + // others drive 7-segs with it.. so rendering it there as well in our debug layouts + + // todo: reorder properly! + UINT8 bf7segdata = BITSWAP8(data,7,6,5,4,3,2,1,0); + output_set_digit_value(offset, bf7segdata); } WRITE16_MEMBER(sc4_state::sc4_mem_w) diff --git a/src/mame/includes/bfm_sc45.h b/src/mame/includes/bfm_sc45.h index e6107d108e1..01fe002a747 100644 --- a/src/mame/includes/bfm_sc45.h +++ b/src/mame/includes/bfm_sc45.h @@ -2233,7 +2233,7 @@ INPUT_PORTS_EXTERN( sc4_base ); #define sc_ccogs_others \ ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) \ - ROM_LOAD( "clevercogssnd", 0x0000, 0x100000, NO_DUMP ) \ + ROM_LOAD( "95008361.bin", 0x0000, 0x0ff54f, CRC(d1cc7b58) SHA1(32328e0e56bbf65e91e32de8802edce38f0abc65) ) #define sc_cclas_others \ ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) \ diff --git a/src/mame/layout/bfm_sc4.lay b/src/mame/layout/bfm_sc4.lay index 8b77ecf36de..7986b64b89f 100644 --- a/src/mame/layout/bfm_sc4.lay +++ b/src/mame/layout/bfm_sc4.lay @@ -14,397 +14,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -2035,44 +1655,106 @@ - + - + - + - + - + - + - + - + + - + - + - + - + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +