diff --git a/src/mame/misc/vpoker.cpp b/src/mame/misc/vpoker.cpp index 4e114c821be..2e08136b662 100644 --- a/src/mame/misc/vpoker.cpp +++ b/src/mame/misc/vpoker.cpp @@ -1,9 +1,22 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese, Roberto Fresca +// copyright-holders: Angelo Salese, Roberto Fresca, Grull Osgo /************************************************************************************************************** Challenger Draw Poker (c) 198? Videotronics. - Driver by Angelo Salese & Roberto Fresca. + Driver by Angelo Salese, Roberto Fresca & Grull Osgo. + + + The Challenger series had three games: + + * Challenger Draw Poker + https://flyers.arcade-museum.com/videogames/show/4296 + https://flyers.arcade-museum.com/videogames/show/4374 + + * Challenger Black Jack 21 + https://flyers.arcade-museum.com/videogames/show/4295 + + * Challenger In Between + https://flyers.arcade-museum.com/videogames/show/4297 Notes: @@ -13,15 +26,15 @@ 1) "Challenger Draw Poker", from Bend Electronics Co. Inc. 2) "VHI Draw Poker", from Video Horizons, Inc. - Both companies shared the same address and phone number: - 63353 Nels Anderson Road. Bend, Oregon 97701. - Tel: 503-389-7626. + Both companies shared the same address and phone number: + 63353 Nels Anderson Road. Bend, Oregon 97701. + Tel: 503-389-7626. - Bend Electronics Co. Inc. claims that they are worldwide distributors for Videotronics, Inc. + Bend Electronics Co. Inc. claims that they are worldwide distributors for Videotronics, Inc. - There are some legal issues between all these companies... - https://scholar.google.com/scholar_case?case=7993095852400122011 - http://www.plainsite.org/dockets/201rtodjb/nevada-district-court/videotronics-inc-v-bend-electronics/ + There are some legal issues between all these companies... + https://scholar.google.com/scholar_case?case=7993095852400122011 + http://www.plainsite.org/dockets/201rtodjb/nevada-district-court/videotronics-inc-v-bend-electronics/ =============================================================================================================== @@ -122,6 +135,41 @@ Coins in: dd +=============================================================================================================== + + Notes by game: + + + * 5-Aces Poker + + Game Mode Access: Before entering the game mode, a system check must be completed. + Once the check is finished, you can insert coins and start playing. + + Entering Setup Mode: To enter the Setup Mode, press the SETUP key (F2). + + SET UP + TIMER 6... + + In Setup Mode, you can adjust each item using the following controls: + + - BET button (M key) to increase the value or turn the item off. + - DEAL button (1 key) to decrease the value or turn the item on. + - Use the CANCEL button to move to the next item. + + SET UP + TIMER 6 (range: 1 to 12) + MAX BET 8 (range: 5 to 50) + AUTO BET OFF (options: OFF/ON) + AUTO DEAL OFF (options: OFF/ON) + REBET OFF (options: OFF/ON) + + After adjusting the last item, you will return to the game mode. + + Saving NVRAM Data: If you need to power off the machine but want to save the NVRAM data, + press the "Save and Halt" service (key 9), then turn off the machine. Upon reboot, all + previous data will be restored. + + =============================================================================================================== Updates [2025-03-04]: @@ -145,25 +193,31 @@ Updates [2025-03-06]: - Rewrote the lamps scheme. - - Fixed the button-lamps layouts. + - Fixed the button-lamps layouts accordingly. - Added workaround for the NMI routine (vpoker). - Fixed vpoker NVRAM issues. - Fixed mech counters support per game. + Updates [2025-03-08]: + + - Workaround for NMI to get the Save and Halt function (5-Aces). + - Solved any issues regarding interrupt vectors. + - Documented the 5-Aces Poker SETUP mode. + - Fixed the 5-Aces Poker vertical refresh rate. + - Renamed function according to its own interrupts vector name. + - Unified most of the inputs. + - Rewrote the 5-Aces Poker machine config to use the vpoker one as base config. + - Added links to the Challenger Draw Poker flyers. + - Added technical notes. + TODO: - - Add workaround for the NMI routine (5acespkr). - - Fix the 5acespkr NVRAM issues. - - Find why vectors are changed in 5acespkr. - - Investigate about what seems to be a custom processor - due to the weird routines related to interrupts, and the - complete lack of SWI triggers. + - Nothing... :) **************************************************************************************************************/ - #include "emu.h" #include "cpu/m6809/m6809.h" #include "machine/6840ptm.h" @@ -190,13 +244,13 @@ public: m_dac(*this, "dac"), m_in0(*this, "IN0"), m_in1(*this, "IN1"), + m_in2(*this, "IN2"), m_lamps(*this, "lamp%u", 0U) { } void vpoker(machine_config &config); void fiveaces(machine_config &config); - void init_5aces(); protected: virtual void machine_start() override ATTR_COLD; @@ -206,12 +260,14 @@ private: uint8_t nvram_r(offs_t offset); void nvram_w(offs_t offset, u8 data); std::unique_ptr m_videoram; + std::unique_ptr m_nvram_data; uint8_t m_blit_ram[8]; uint8_t blitter_r(offs_t offset); void blitter_w(offs_t offset, uint8_t data); void ptm_irq(int state); void ptm_5_irq(int state); - void swi_int(int state); + void firq_coin_line(int state); + void five_nmi_line(int state); uint32_t screen_update_vpoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; required_device m_gfxdecode; @@ -219,10 +275,9 @@ private: required_device m_dac; required_ioport m_in0; required_ioport m_in1; + required_ioport m_in2; output_finder<9> m_lamps; void main_map(address_map &map) ATTR_COLD; - - std::unique_ptr m_nvram_data; }; @@ -259,9 +314,12 @@ uint32_t vpoker_state::screen_update_vpoker(screen_device &screen, bitmap_ind16 uint8_t vpoker_state::blitter_r(offs_t offset) { + if(m_in2->read() == 1 ) // Save and Halt + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + if(offset == 6) return m_in0->read(); - + if(offset == 7) return m_in1->read(); @@ -352,11 +410,11 @@ static INPUT_PORTS_START( vpoker ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin In") PORT_IMPULSE(3) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_GAMBLE_BOOK ) // PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("IN0-10") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) PORT_NAME("IN0-20") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) PORT_NAME("IN0-40") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("IN0-80") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_GAMBLE_BOOK ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-10") PORT_CODE(KEYCODE_Q) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-20") PORT_CODE(KEYCODE_E) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-40") PORT_CODE(KEYCODE_R) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-80") PORT_CODE(KEYCODE_T) PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) @@ -367,29 +425,21 @@ static INPUT_PORTS_START( vpoker ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Deal") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Draw") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) + + PORT_START("IN2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END static INPUT_PORTS_START( 5acespkr ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin In") PORT_IMPULSE(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // setu change value (up/off) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("IN0-10") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // setup - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) PORT_NAME("IN0-40") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("IN0-80") + PORT_INCLUDE( vpoker ) - PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Deal") // setup change value (down/up-1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Draw") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) // setup netx item + PORT_MODIFY("IN0") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") // setup + + PORT_MODIFY("IN2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Save and Halt") INPUT_PORTS_END @@ -438,7 +488,6 @@ void vpoker_state::ptm_irq(int state) sum = ~sum + 1; nvram_w(0x9f, sum); - sum = 0; } } @@ -447,8 +496,7 @@ void vpoker_state::ptm_5_irq(int state) m_maincpu->set_input_line(M6809_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); } - -void vpoker_state::swi_int(int state) +void vpoker_state::firq_coin_line(int state) { if(m_in0->read() == 0xfe) m_maincpu->set_input_line(M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); @@ -481,7 +529,7 @@ void vpoker_state::vpoker(machine_config &config) // 6840 PTM ptm6840_device &ptm(PTM6840(config, "6840ptm", XTAL(4'000'000) / 4)); - ptm.set_external_clocks(500, 0000, 3000); + ptm.set_external_clocks(500, 0, 3000); ptm.irq_callback().set(FUNC(vpoker_state::ptm_irq)); ptm.o2_callback().set("dac", FUNC(dac_1bit_device::data_w)); @@ -493,34 +541,22 @@ void vpoker_state::vpoker(machine_config &config) void vpoker_state::fiveaces(machine_config &config) { - // basic machine hardware - MC6809(config, m_maincpu, XTAL(4'000'000)); - m_maincpu->set_addrmap(AS_PROGRAM, &vpoker_state::main_map); - - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + vpoker(config); // video hardware - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(30); - screen.screen_vblank().set(FUNC(vpoker_state::swi_int)); + screen_device &screen(SCREEN(config.replace(), "screen", SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(60); + screen.screen_vblank().set(FUNC(vpoker_state::firq_coin_line)); screen.set_size(512, 256); screen.set_visarea(48, 448-1, 0, 240-1); // 512x256 total screen.set_screen_update(FUNC(vpoker_state::screen_update_vpoker)); screen.set_palette(m_palette); - GFXDECODE(config, m_gfxdecode, m_palette, gfx_vpoker); - - PALETTE(config, m_palette, palette_device::GBR_3BIT); - // 6840 PTM - ptm6840_device &ptm(PTM6840(config, "6840ptm", XTAL(4'000'000) / 4)); + ptm6840_device &ptm(PTM6840(config.replace(), "6840ptm", XTAL(4'000'000) / 4)); ptm.set_external_clocks(500, 0, 1000000); ptm.irq_callback().set(FUNC(vpoker_state::ptm_5_irq)); ptm.o2_callback().set("dac", FUNC(dac_1bit_device::data_w)); - - // sound hardware - SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); } @@ -564,23 +600,6 @@ ROM_START( 5acespkr ) ROM_LOAD16_BYTE( "bjok1.bin", 0x2001, 0x1000, CRC(20cdda67) SHA1(6c631b09e3da5f6660aa1c018fc0ff3004f7fe85) ) ROM_END - -/***************************************** -* Driver Init * -*****************************************/ - -void vpoker_state::init_5aces() -{ -// Changing the vector temporarily for testing purposes, -// otherwise the coin in routine will be tied to the -// SW2 interrupt, and there is no code to trigger it. - - uint8_t *ROM = memregion("maincpu")->base(); - - ROM[0x3ffa] = 0x79; -} - - } // Anonymous namespace @@ -588,6 +607,6 @@ void vpoker_state::init_5aces() * Game Drivers * *****************************************/ -// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT -GAMEL( 198?, vpoker, 0, vpoker, vpoker, vpoker_state, empty_init, ROT0, "Videotronics, Inc.", "Challenger Draw Poker", 0, layout_vpoker ) -GAMEL( 198?, 5acespkr, 0, fiveaces, 5acespkr, vpoker_state, init_5aces, ROT0, "", "5-Aces Poker", MACHINE_UNEMULATED_PROTECTION, layout_5acespkr ) +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT +GAMEL( 198?, vpoker, 0, vpoker, vpoker, vpoker_state, empty_init, ROT0, "Videotronics, Inc.", "Challenger Draw Poker", 0, layout_vpoker ) +GAMEL( 198?, 5acespkr, 0, fiveaces, 5acespkr, vpoker_state, empty_init, ROT0, "", "5-Aces Poker", 0, layout_5acespkr )