From c001f08c1e5b1f6e7ac9eafbdaff69e76333c46e Mon Sep 17 00:00:00 2001 From: npwoods Date: Thu, 18 Jul 2019 22:21:25 -0400 Subject: Making video_manager::effective_frameskip() public and exposing via LUA --- src/emu/video.cpp | 2 +- src/emu/video.h | 2 +- src/frontend/mame/luaengine.cpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/emu/video.cpp b/src/emu/video.cpp index c4ade5f7948..2c1617e4fb2 100644 --- a/src/emu/video.cpp +++ b/src/emu/video.cpp @@ -788,7 +788,7 @@ inline bool video_manager::effective_autoframeskip() const // forward //------------------------------------------------- -inline int video_manager::effective_frameskip() const +int video_manager::effective_frameskip() const { // if we're fast forwarding, use the maximum frameskip if (m_fastforward) diff --git a/src/emu/video.h b/src/emu/video.h index b0a67402424..b8b1c408773 100644 --- a/src/emu/video.h +++ b/src/emu/video.h @@ -82,6 +82,7 @@ public: // current speed helpers std::string speed_text(); double speed_percent() const { return m_speed_percent; } + int effective_frameskip() const; // snapshots void save_snapshot(screen_device *screen, emu_file &file); @@ -116,7 +117,6 @@ private: // effective value helpers bool effective_autoframeskip() const; - int effective_frameskip() const; bool effective_throttle() const; // speed and throttling helpers diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp index fb42192da11..87d0e1ae34b 100644 --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -1849,6 +1849,7 @@ void lua_engine::initialize() "skip_this_frame", &video_manager::skip_this_frame, "speed_factor", &video_manager::speed_factor, "speed_percent", &video_manager::speed_percent, + "effective_frameskip", &video_manager::effective_frameskip, "frame_update", &video_manager::frame_update, "size", [](video_manager &vm) { s32 width, height; -- cgit v1.2.3-70-g09d2 From 3aa9ee49927cd39b1dd7c06eaa1f4851ebf69b08 Mon Sep 17 00:00:00 2001 From: npwoods Date: Fri, 19 Jul 2019 07:47:24 -0400 Subject: Moving paste() from mame_ui_manager class to natural_keyboard class, exposing to LUA --- src/emu/natkeyboard.cpp | 21 +++++++++++++++++++++ src/emu/natkeyboard.h | 1 + src/frontend/mame/luaengine.cpp | 1 + src/frontend/mame/ui/ui.cpp | 23 +---------------------- src/frontend/mame/ui/ui.h | 1 - 5 files changed, 24 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/emu/natkeyboard.cpp b/src/emu/natkeyboard.cpp index 9a50109eb6f..3851d98719e 100644 --- a/src/emu/natkeyboard.cpp +++ b/src/emu/natkeyboard.cpp @@ -564,6 +564,27 @@ void natural_keyboard::post_coded(const char *text, size_t length, const attotim } +//------------------------------------------------- +// paste - does a paste from the keyboard +//------------------------------------------------- + +void natural_keyboard::paste() +{ + // retrieve the clipboard text + char *text = osd_get_clipboard_text(); + + // was a result returned? + if (text != nullptr) + { + // post the text + post_utf8(text); + + // free the string + free(text); + } +} + + //------------------------------------------------- // build_codes - given an input port table, create // an input code table useful for mapping unicode diff --git a/src/emu/natkeyboard.h b/src/emu/natkeyboard.h index aa29bf4503c..b90eeb9d88e 100644 --- a/src/emu/natkeyboard.h +++ b/src/emu/natkeyboard.h @@ -54,6 +54,7 @@ public: void post(const char32_t *text, size_t length = 0, const attotime &rate = attotime::zero); void post_utf8(const char *text, size_t length = 0, const attotime &rate = attotime::zero); void post_coded(const char *text, size_t length = 0, const attotime &rate = attotime::zero); + void paste(); // debugging void dump(std::ostream &str) const; diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp index fb42192da11..1ded924ccfa 100644 --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -766,6 +766,7 @@ void lua_engine::initialize() emu["romname"] = [this](){ return machine().basename(); }; emu["softname"] = [this]() { return machine().options().software_name(); }; emu["keypost"] = [this](const char *keys){ machine().ioport().natkeyboard().post_utf8(keys); }; + emu["paste"] = [this](){ machine().ioport().natkeyboard().paste(); }; emu["time"] = [this](){ return machine().time().as_double(); }; emu["start"] = [this](const char *driver) { int i = driver_list::find(driver); diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 62b84281b02..867a7b8bbf8 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -904,27 +904,6 @@ bool mame_ui_manager::can_paste() } -//------------------------------------------------- -// paste - does a paste from the keyboard -//------------------------------------------------- - -void mame_ui_manager::paste() -{ - // retrieve the clipboard text - char *text = osd_get_clipboard_text(); - - // was a result returned? - if (text != nullptr) - { - // post the text - machine().ioport().natkeyboard().post_utf8(text); - - // free the string - free(text); - } -} - - //------------------------------------------------- // draw_fps_counter //------------------------------------------------- @@ -1105,7 +1084,7 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container) { // paste command if (machine().ui_input().pressed(IPT_UI_PASTE)) - paste(); + machine().ioport().natkeyboard().paste(); } image_handler_ingame(); diff --git a/src/frontend/mame/ui/ui.h b/src/frontend/mame/ui/ui.h index 64189344dcb..e54adc80f06 100644 --- a/src/frontend/mame/ui/ui.h +++ b/src/frontend/mame/ui/ui.h @@ -223,7 +223,6 @@ public: void show_mouse(bool status); virtual bool is_menu_active() override; bool can_paste(); - void paste(); void image_handler_ingame(); void increase_frameskip(); void decrease_frameskip(); -- cgit v1.2.3-70-g09d2 From 7787a274172340b3f8b85618c8efa3107ac1106d Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 20 Jul 2019 05:42:01 +0200 Subject: lucky37.cpp: very minor comments updates (nw) --- src/mame/drivers/lucky37.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/lucky37.cpp b/src/mame/drivers/lucky37.cpp index f803972b8ed..a4b7ba0dd8e 100644 --- a/src/mame/drivers/lucky37.cpp +++ b/src/mame/drivers/lucky37.cpp @@ -2,7 +2,7 @@ // copyright-holders: /* - This hardware seems to be an evolution of the one found in lucky37.cpp. Its main components are: + This hardware seems to be an evolution of the one found in lucky74.cpp. Its main components are: * A001 CPU block, containing probably a Z80 or compatible CPU and ROM(s) (not dumped). Dumper description after opening it: 3 unknown/white chips, which had no pins, with no markings. * HD647180X0P6 MCU with internal ROM (not dumped) @@ -130,7 +130,7 @@ ROM_START( lucky21 ) ROM_REGION( 0x8000, "mcu", 0 ) ROM_LOAD( "internal_rom", 0x0000, 0x8000, NO_DUMP ) - ROM_REGION( 0xc0000, "unsorted", 0 ) + ROM_REGION( 0xc0000, "unsorted", 0 ) // no ROM 6 present ROM_LOAD( "1.bin", 0x00000, 0x20000, CRC(2198b736) SHA1(556fd89dc9d1183a672324b7e1bb6350331459d2) ) ROM_LOAD( "2.bin", 0x20000, 0x20000, CRC(fe7bbfef) SHA1(5b1413d26049e4e5c04e05a71f552d2999d57ed5) ) ROM_LOAD( "3.bin", 0x40000, 0x20000, CRC(c4c3f642) SHA1(4dba751f74717e4ef158f21c3e2a1b2d4802bb51) ) -- cgit v1.2.3-70-g09d2 From 940d6b61dbf1978cf300c29852e85c9f6e6f8566 Mon Sep 17 00:00:00 2001 From: Dirk Best Date: Sat, 20 Jul 2019 11:13:43 +0200 Subject: falco5220: Various improvements - Add RAM banking - Crude screen rendering, set amber screen color - Add RAM based gfxdecode - Identify keyboard addresses --- src/mame/drivers/falco5220.cpp | 95 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/falco5220.cpp b/src/mame/drivers/falco5220.cpp index a90fa022edd..d94a872ef7b 100644 --- a/src/mame/drivers/falco5220.cpp +++ b/src/mame/drivers/falco5220.cpp @@ -27,9 +27,11 @@ #include "emu.h" //#include "bus/rs232/rs232.h" #include "cpu/z80/z80.h" +#include "machine/bankdev.h" #include "machine/nvram.h" #include "machine/z80ctc.h" #include "machine/z80sio.h" +#include "emupal.h" #include "screen.h" class falco5220_state : public driver_device @@ -38,8 +40,12 @@ public: falco5220_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_rambank(*this, "rambank") , m_screen(*this, "screen") , m_rombank(*this, "rombank") + , m_ram(*this, "ram") + , m_charram(*this, "charram") + , m_5a(0) { } @@ -53,40 +59,94 @@ private: u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void rombank_w(u8 data); + void rambank_w(u8 data); + void unk5a_w(u8 data); void mem_map(address_map &map); + void bank_map(address_map &map); void io_map(address_map &map); required_device m_maincpu; + required_device m_rambank; required_device m_screen; - required_memory_bank m_rombank; - //required_shared_ptr m_cram; // 1x or 2x NEC D43256C-10L - //required_shared_ptr m_aram; // 1x or 2x NEC D43256C-10L + required_shared_ptr m_ram; + required_shared_ptr m_charram; + + u8 m_5a; }; u32 falco5220_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { + offs_t start = m_5a ? 0x0000 : 0x2000; + + for (int col = 0; col < 25; col++) + { + for (int row = 0; row < 80; row++) + { + u8 code = m_ram[start + col * 80 + row]; + u8 attr = m_ram[start + 0x1000 + col * 80 + row]; + + for (int y = 0; y < 16; y++) + { + u8 gfx = m_charram[code << 4 | y]; + + // underline + if (BIT(attr, 0) && y == 15) + gfx = 0xff; + + for (int x = 0; x < 8; x++) + bitmap.pix32(col*16 + y, row*8 + x) = BIT(gfx, x) ? rgb_t::white() : rgb_t::black(); + } + } + } + return 0; } +void falco5220_state::rambank_w(u8 data) +{ + if (data < 9) + m_rambank->set_bank(data); + else + logerror("rambank_w: %02x\n", data); +} + void falco5220_state::rombank_w(u8 data) { m_rombank->set_entry(data & 3); } +void falco5220_state::unk5a_w(u8 data) +{ + logerror("5a = %02x\n", data); + m_5a = data; +} + void falco5220_state::mem_map(address_map &map) { map(0x0000, 0x7fff).rom().region("roms", 0); map(0x8000, 0xbfff).bankr("rombank"); map(0xc000, 0xdfff).ram().share("nvram"); - map(0xe000, 0xffff).ram(); + map(0xe000, 0xffff).m(m_rambank, FUNC(address_map_bank_device::amap8)); +} + +void falco5220_state::bank_map(address_map &map) +{ + map(0x00000, 0x0ffff).ram().share("ram"); // 2x NEC D43256C-10L? (5220s only has 2x HY6264P-10) + map(0x10000, 0x11fff).ram().share("charram"); // CXK5864AP-10L / HY6264LP-12? } void falco5220_state::io_map(address_map &map) { map.global_mask(0xff); map(0x00, 0x00).w(FUNC(falco5220_state::rombank_w)); +// map(0x50, 0x50).r // keyboard data +// map(0x51, 0x51).r // keyboard status + map(0x52, 0x52).w(FUNC(falco5220_state::rambank_w)); +// map(0x54, 0x54).w // vram address (low)? +// map(0x55, 0x55).w // vram address (high)? + map(0x5a, 0x5a).w(FUNC(falco5220_state::unk5a_w)); // 5220s only? map(0x60, 0x63).rw("sio", FUNC(z80sio_device::ba_cd_r), FUNC(z80sio_device::ba_cd_w)); map(0x70, 0x73).rw("ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); map(0x88, 0x8b).nopw(); // second SIO? @@ -101,11 +161,27 @@ void falco5220_state::machine_start() void falco5220_state::machine_reset() { m_rombank->set_entry(0); + m_rambank->set_bank(0); } static INPUT_PORTS_START(falco5220) INPUT_PORTS_END +static const gfx_layout char_layout = +{ + 8,16, + 512, + 1, + { 0 }, + { 7, 6, 5, 4, 3, 2, 1, 0 }, + { STEP16(0, 8) }, + 8*16 +}; + +static GFXDECODE_START(chars) + GFXDECODE_RAM("charram", 0, char_layout, 0, 1) +GFXDECODE_END + static const z80_daisy_config daisy_chain[] = { { "ctc" }, @@ -120,6 +196,12 @@ void falco5220_state::falco5220(machine_config &config) m_maincpu->set_addrmap(AS_IO, &falco5220_state::io_map); m_maincpu->set_daisy_config(daisy_chain); + ADDRESS_MAP_BANK(config, m_rambank); + m_rambank->set_map(&falco5220_state::bank_map); + m_rambank->set_data_width(8); + m_rambank->set_addr_width(17); + m_rambank->set_stride(0x2000); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // CXK5864AP-10L + battery z80ctc_device &ctc(Z80CTC(config, "ctc", 12.288_MHz_XTAL / 2)); // Z0843006PSC @@ -131,8 +213,13 @@ void falco5220_state::falco5220(machine_config &config) sio.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_color(rgb_t::amber()); screen.set_raw(37.98_MHz_XTAL, 1500, 0, 1320, 422, 0, 400); // 25.32 kHz/60 Hz confirmed screen.set_screen_update(FUNC(falco5220_state::screen_update)); + + PALETTE(config, "palette", palette_device::MONOCHROME_HIGHLIGHT); + + GFXDECODE(config, "gfxdecode", "palette", chars); } ROM_START(falco5220e) -- cgit v1.2.3-70-g09d2 From d770e00b864eb19a7cecd632b6f7bfabb9b5b2ed Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sat, 20 Jul 2019 22:29:20 +1000 Subject: (nw) fixed "Unknown slot option '35hd' in slot 'iec11:fd4000:pc8477av1:0'" when fd4000 device is selected in slots menu. --- src/devices/bus/cbmiec/fd2000.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/devices/bus/cbmiec/fd2000.cpp b/src/devices/bus/cbmiec/fd2000.cpp index 3136d991593..c4d1bd311c1 100644 --- a/src/devices/bus/cbmiec/fd2000.cpp +++ b/src/devices/bus/cbmiec/fd2000.cpp @@ -239,7 +239,7 @@ void fd4000_device::device_add_mconfig(machine_config &config) add_common_devices(config); m_maincpu->set_addrmap(AS_PROGRAM, &fd4000_device::fd4000_mem); PC8477A(config, m_fdc, 24_MHz_XTAL); - FLOPPY_CONNECTOR(config, PC8477AV1_TAG":0", fd4000_floppies, "35hd", floppy_image_device::default_floppy_formats, true);//fd2000_device::floppy_formats); + FLOPPY_CONNECTOR(config, PC8477AV1_TAG":0", fd4000_floppies, "35ed", floppy_image_device::default_floppy_formats, true);//fd2000_device::floppy_formats); } -- cgit v1.2.3-70-g09d2 From 36ec7ef161f6336da88ee8becbea876818c04004 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 20 Jul 2019 15:59:04 +0200 Subject: stratos: add savestates (nw) --- src/mame/drivers/saitek_stratos.cpp | 365 +++++++++++++++++++++++------------- 1 file changed, 236 insertions(+), 129 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/saitek_stratos.cpp b/src/mame/drivers/saitek_stratos.cpp index 16544f69ae5..1f8cc6517c3 100644 --- a/src/mame/drivers/saitek_stratos.cpp +++ b/src/mame/drivers/saitek_stratos.cpp @@ -2,17 +2,45 @@ // copyright-holders:Olivier Galibert, hap /*************************************************************************** -Scisys Kasparov Stratos Chess Computer +SciSys/Saitek Stratos chesscomputer family (1986-1990) +(SciSys renamed themselves to Saitek in 1987) + +- Stratos +- Turbo King +- Corona +- *Simultano + +*: not dumped yet + +IMPORTANT: The user is expected to press the STOP button to turn off the computer. +When not using -autosave, press that button before exiting MAME, or NVRAM can get corrupt. +If that happens, the chesscomputer will become unresponsive on next boot. To force a +cold boot, press ACL, then hold the PLAY button and press GO. + +******************************************************************************* + +Hardware notes: +- W65C02 or R65C02 at 5MHz or 5.67MHz (for latter, box says 6MHz but that's a marketing lie) +- 2*32KB ROM + optional 32KB Endgame ROM sold separately +- 8KB RAM + another 8KB RAM(latter not populated on every PCB) +- NEC gate array for all I/O, Saitek calls it HELIOS +- side leds are tri-color (red + green, combined = yellow) +- unknown LCDC under epoxy blob, suspected to be an MCU + +Stratos/Turbo King are identical. +Corona has magnet sensors and two HELIOS chips. +Simultano has an extra LCD screen representing the chessboard state. TODO: - emulate LCD at lower level, probably an MCU with embedded LCDC - add LCD 7*7 DMD, it's in m_lcd_data[0x30 to 0x3b] but scrambled - corona: different addressmap, 64 leds - tking different internal artwork -- interrupt timing is derived from the main XTAL, but result should be similar with 5MHz and 5.67MHz, +- irq timing is derived from the main XTAL, but result should be similar with 5MHz and 5.67MHz, there are a couple of "FREQ. SEL" nodes on the PCB, maybe related (not the ones in input ports) +- tking(old revisions) and stratos slow responsive buttons, related to irq timing, but if that's changed, + the led blinking and in-game clock is too fast - does nvram.u7 work? it's cleared during boot, but not used after -- clean up driver ***************************************************************************/ @@ -35,6 +63,9 @@ TODO: // internal artwork #include "saitek_stratos.lh" // clickable + +namespace { + class stratos_state : public driver_device { public: @@ -54,19 +85,48 @@ public: m_inputs(*this, "IN.%u", 0) { } + DECLARE_INPUT_CHANGED_MEMBER(cpu_freq) { set_cpu_freq(); } + DECLARE_INPUT_CHANGED_MEMBER(acl_button) { if (newval) power_off(); } + DECLARE_INPUT_CHANGED_MEMBER(go_button); + + // machine drivers void stratos(machine_config &config); void corona(machine_config &config); void tking2(machine_config &config); - DECLARE_INPUT_CHANGED_MEMBER(cpu_freq) { set_cpu_freq(); } - DECLARE_INPUT_CHANGED_MEMBER(acl_button) { if (newval) power_off(); } - DECLARE_INPUT_CHANGED_MEMBER(go_button); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void device_post_load() override { update_lcd(); } private: - DECLARE_WRITE8_MEMBER(p2000_w); - DECLARE_READ8_MEMBER(p2200_r); - DECLARE_WRITE8_MEMBER(p2200_w); - DECLARE_WRITE8_MEMBER(p2400_w); + // devices/pointers + required_device m_maincpu; + required_device m_nvram; + required_memory_bank m_rombank; + required_memory_bank m_nvrambank; + required_device m_lcd_busy; + required_device m_board; + required_device m_display; + required_device m_dac; + required_device m_extrom; + output_finder<8+1> m_out_digit; + output_finder<4, 16, 4> m_out_lcd; + required_ioport_array<8+1> m_inputs; + + void main_map(address_map &map); + + void clear_lcd() { std::fill_n(m_lcd_data, ARRAY_LENGTH(m_lcd_data), 0); } + void update_leds(); + void update_lcd(); + void power_off(); + void set_cpu_freq(); + + // I/O handlers + DECLARE_WRITE8_MEMBER(select_w); + DECLARE_READ8_MEMBER(chessboard_r); + DECLARE_WRITE8_MEMBER(sound_w); + DECLARE_WRITE8_MEMBER(leds_w); DECLARE_READ8_MEMBER(control_r); DECLARE_WRITE8_MEMBER(control_w); DECLARE_READ8_MEMBER(lcd_r); @@ -75,74 +135,77 @@ private: DECLARE_DEVICE_IMAGE_LOAD_MEMBER(extrom_load); DECLARE_READ8_MEMBER(extrom_r); - void main_map(address_map &map); + std::unique_ptr m_nvram_data; - void set_cpu_freq(); - - std::unique_ptr m_nvram_data; u8 m_select; u8 m_control; u8 m_led_data; bool m_power; - u8 m_lcd_address; u8 m_lcd_count; + u8 m_lcd_address; u8 m_lcd_data[0x40]; - - void update_leds(); - void update_lcd(); - void power_off(); - virtual void machine_reset() override; - virtual void machine_start() override; - - required_device m_maincpu; - required_device m_nvram; - required_memory_bank m_rombank; - required_memory_bank m_nvrambank; - required_device m_lcd_busy; - required_device m_board; - required_device m_display; - required_device m_dac; - required_device m_extrom; - output_finder<8+1> m_out_digit; - output_finder<4, 16, 4> m_out_lcd; - required_ioport_array<8+1> m_inputs; }; - void stratos_state::machine_start() { // resolve handlers m_out_digit.resolve(); m_out_lcd.resolve(); - m_nvram_data = std::make_unique(0x2000); - m_nvram->set_base(m_nvram_data.get(), 0x2000); - + // init banks m_rombank->configure_entries(0, 2, memregion("maincpu")->base(), 0x8000); + + m_nvram_data = make_unique_clear(0x2000); + save_pointer(NAME(m_nvram_data), 0x2000); + m_nvram->set_base(m_nvram_data.get(), 0x2000); m_nvrambank->configure_entries(0, 2, m_nvram_data.get(), 0x1000); - m_control = 0x00; - m_select = 0x00; + // zerofill + m_select = 0; + m_control = 0; + m_led_data = 0; + m_power = false; + + m_lcd_count = 0; + m_lcd_address = 0; + clear_lcd(); + + // register for savestates + save_item(NAME(m_select)); + save_item(NAME(m_control)); + save_item(NAME(m_led_data)); + save_item(NAME(m_power)); + + save_item(NAME(m_lcd_count)); + save_item(NAME(m_lcd_address)); + save_item(NAME(m_lcd_data)); } void stratos_state::machine_reset() { m_power = true; - set_cpu_freq(); + m_lcd_count = 0; + m_rombank->set_entry(0); m_nvrambank->set_entry(0); + + set_cpu_freq(); } void stratos_state::set_cpu_freq() { + // released with either 5MHz or 5.67MHz speeds m_maincpu->set_unscaled_clock((ioport("FAKE")->read() & 1) ? 5.67_MHz_XTAL : 5_MHz_XTAL); } -void stratos_state::update_leds() -{ - m_display->matrix_partial(0, 2, 1 << (m_control >> 5 & 1), (~m_led_data & 0xff) | (~m_control << 6 & 0x100)); -} + + +/****************************************************************************** + I/O +******************************************************************************/ + +// soft power on/off INPUT_CHANGED_MEMBER(stratos_state::go_button) { @@ -153,6 +216,20 @@ INPUT_CHANGED_MEMBER(stratos_state::go_button) } } +void stratos_state::power_off() +{ + m_power = false; + m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); + + // clear display + m_display->matrix(0, 0); + clear_lcd(); + update_lcd(); +} + + +// Endgame ROM + DEVICE_IMAGE_LOAD_MEMBER(stratos_state::extrom_load) { u32 size = m_extrom->common_get_size("rom"); @@ -177,26 +254,69 @@ READ8_MEMBER(stratos_state::extrom_r) } -WRITE8_MEMBER(stratos_state::p2000_w) +// LCD HLE + +void stratos_state::update_lcd() { - // d0-d3: input/led mux - // d4-d7: chessboard led data - m_select = data; - m_display->matrix_partial(2, 4, ~m_select >> 4 & 0xf, 1 << (m_select & 0xf)); + // output individual segments + for (int i = 0; i < 0x40; i++) + for (int j = 0; j < 4; j++) + m_out_lcd[i >> 4][i & 0xf][j] = BIT(m_lcd_data[i], j); + + m_out_digit[0] = 0; // where? + + // upper digits + for (int i = 0; i < 4; i++) + m_out_digit[i + 1] = (m_lcd_data[0x01 + i * 2] << 4 | m_lcd_data[0x01 + i * 2 + 1]) & 0x7f; + + // lower digits + for (int i = 0; i < 4; i++) + m_out_digit[i + 5] = (m_lcd_data[0x11 + i * 2] << 4 | m_lcd_data[0x11 + i * 2 + 1]) & 0x7f; } -READ8_MEMBER(stratos_state::p2200_r) +READ8_MEMBER(stratos_state::lcd_r) { - // d0-d7: chessboard sensors - return ~m_board->read_file(m_select & 0xf); + // unknown, maybe resets lcd controller + return 0; } -WRITE8_MEMBER(stratos_state::p2200_w) +WRITE8_MEMBER(stratos_state::lcd_w) { - m_dac->write(1); + // d0-d3: lcd data + // d4-d7: unused? + data &= 0xf; + + if (m_lcd_count == 0) + m_lcd_address = data; + else + { + // write to lcd row + if (m_lcd_address > 0 && m_lcd_address <= 4) + m_lcd_data[(((m_lcd_address - 1) << 4) + (m_lcd_count - 1)) & 0x3f] = data; + } + + // it expects a specific number of writes for each row + const u8 maxcount[5] = { 1, 9, 9, 1, 12 }; + if (m_lcd_address > 4 || m_lcd_count == maxcount[m_lcd_address]) + { + m_lcd_count = 0; + update_lcd(); + } + else + m_lcd_count++; + + m_lcd_busy->adjust(attotime::from_usec(50)); // ? } -WRITE8_MEMBER(stratos_state::p2400_w) + +// HELIOS + +void stratos_state::update_leds() +{ + m_display->matrix_partial(0, 2, 1 << (m_control >> 5 & 1), (~m_led_data & 0xff) | (~m_control << 6 & 0x100)); +} + +WRITE8_MEMBER(stratos_state::leds_w) { // d0-d7: button leds data m_led_data = data; @@ -205,6 +325,25 @@ WRITE8_MEMBER(stratos_state::p2400_w) m_dac->write(0); // guessed } +WRITE8_MEMBER(stratos_state::sound_w) +{ + m_dac->write(1); +} + +WRITE8_MEMBER(stratos_state::select_w) +{ + // d0-d3: input/led mux + // d4-d7: chessboard led data + m_select = data; + m_display->matrix_partial(2, 4, ~m_select >> 4 & 0xf, 1 << (m_select & 0xf)); +} + +READ8_MEMBER(stratos_state::chessboard_r) +{ + // d0-d7: chessboard sensors + return ~m_board->read_file(m_select & 0xf); +} + READ8_MEMBER(stratos_state::control_r) { u8 data = 0; @@ -227,18 +366,6 @@ READ8_MEMBER(stratos_state::control_r) return data; } -void stratos_state::power_off() -{ - m_power = false; - m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); - - // clear display - m_display->matrix(0, 0); - - std::fill_n(m_lcd_data, ARRAY_LENGTH(m_lcd_data), 0); - update_lcd(); -} - WRITE8_MEMBER(stratos_state::control_w) { u8 prev = m_control; @@ -259,64 +386,18 @@ WRITE8_MEMBER(stratos_state::control_w) power_off(); } -void stratos_state::update_lcd() -{ - // output individual segments - for (int i = 0; i < 0x40; i++) - for (int j = 0; j < 4; j++) - m_out_lcd[i >> 4][i & 0xf][j] = BIT(m_lcd_data[i], j); - - m_out_digit[0] = 0; // where? - - // upper digits - for (int i = 0; i < 4; i++) - m_out_digit[i + 1] = (m_lcd_data[0x01 + i * 2] << 4 | m_lcd_data[0x01 + i * 2 + 1]) & 0x7f; - - // lower digits - for (int i = 0; i < 4; i++) - m_out_digit[i + 5] = (m_lcd_data[0x11 + i * 2] << 4 | m_lcd_data[0x11 + i * 2 + 1]) & 0x7f; -} - -READ8_MEMBER(stratos_state::lcd_r) -{ - // unknown, maybe resets lcd controller - return 0; -} -WRITE8_MEMBER(stratos_state::lcd_w) -{ - // d0-d3: lcd data - // d4-d7: unused? - data &= 0xf; - if (m_lcd_count == 0) - m_lcd_address = data; - else - { - // write to lcd row - if (m_lcd_address > 0 && m_lcd_address <= 4) - m_lcd_data[(((m_lcd_address - 1) << 4) + (m_lcd_count - 1)) & 0x3f] = data; - } - - // it expects a specific number of writes for each row - const u8 maxcount[5] = { 1, 9, 9, 1, 12 }; - if (m_lcd_address > 4 || m_lcd_count == maxcount[m_lcd_address]) - { - m_lcd_count = 0; - update_lcd(); - } - else - m_lcd_count++; - - m_lcd_busy->adjust(attotime::from_usec(50)); // ? -} +/****************************************************************************** + Address Maps +******************************************************************************/ void stratos_state::main_map(address_map &map) { map(0x0000, 0x1fff).ram().share("nvram.u6"); - map(0x2000, 0x2000).w(FUNC(stratos_state::p2000_w)); - map(0x2200, 0x2200).rw(FUNC(stratos_state::p2200_r), FUNC(stratos_state::p2200_w)); - map(0x2400, 0x2400).w(FUNC(stratos_state::p2400_w)); + map(0x2000, 0x2000).w(FUNC(stratos_state::select_w)); + map(0x2200, 0x2200).rw(FUNC(stratos_state::chessboard_r), FUNC(stratos_state::sound_w)); + map(0x2400, 0x2400).w(FUNC(stratos_state::leds_w)); map(0x2600, 0x2600).rw(FUNC(stratos_state::control_r), FUNC(stratos_state::control_w)); map(0x2800, 0x37ff).bankrw("nvrambank"); map(0x3800, 0x3800).rw(FUNC(stratos_state::lcd_r), FUNC(stratos_state::lcd_w)); @@ -324,6 +405,12 @@ void stratos_state::main_map(address_map &map) map(0x8000, 0xffff).bankr("rombank"); } + + +/****************************************************************************** + Input Ports +******************************************************************************/ + static INPUT_PORTS_START( stratos ) PORT_START("IN.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Set Up") @@ -387,6 +474,12 @@ static INPUT_PORTS_START( tking2 ) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_CUSTOM) INPUT_PORTS_END + + +/****************************************************************************** + Machine Drivers +******************************************************************************/ + void stratos_state::stratos(machine_config &config) { /* basic machine hardware */ @@ -401,12 +494,12 @@ void stratos_state::stratos(machine_config &config) m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); m_board->set_delay(attotime::from_msec(350)); - TIMER(config, "lcd_busy").configure_generic(timer_device::expired_delegate()); - /* video hardware */ PWM_DISPLAY(config, m_display).set_size(2+4, 8+1); config.set_default_layout(layout_saitek_stratos); + TIMER(config, "lcd_busy").configure_generic(timer_device::expired_delegate()); + /* sound hardware */ SPEAKER(config, "speaker").front_center(); DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); @@ -435,6 +528,11 @@ void stratos_state::tking2(machine_config &config) } + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + ROM_START( stratos ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("w1y01f_728m_u3.u3", 0x0000, 0x8000, CRC(b58a7256) SHA1(75b3a3a65f4ca8d52aa5b17a06319bff59d9014f) ) @@ -447,6 +545,7 @@ ROM_START( stratosa ) ROM_LOAD("bw1_819n_u4.u4", 0x8000, 0x8000, CRC(cb0de631) SHA1(f78d40213be21775966cbc832d64acd9b73de632) ) ROM_END + ROM_START( tking ) // PCB rev. 10 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("y01f_713d_u3.u3", 0x0000, 0x8000, CRC(b8c6d853) SHA1(98923f44bbbd2ea17c269850971d3df229e6057e) ) @@ -465,6 +564,7 @@ ROM_START( tkingb ) // PCB rev. 7 ROM_LOAD("y01f-b_819o_u4.u4", 0x8000, 0x8000, CRC(336040d4) SHA1(aca662b8cc4d6bafd61ca158c768ba8896117169) ) ROM_END + ROM_START( corona ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("w2_708g_u2.u2", 0x0000, 0x8000, CRC(52568bb4) SHA1(83fe91787e17bbefc2b3ec651ddb11c88990060d) ) @@ -477,14 +577,21 @@ ROM_START( coronaa ) ROM_LOAD("bw2_a14_u3.u3", 0x8000, 0x8000, CRC(abe87285) SHA1(b15f7ddeac78d252cf413ba4085523e44c6d15df) ) ROM_END +} // anonymous namespace + + + +/****************************************************************************** + Drivers +******************************************************************************/ /* YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */ -CONS( 1986, stratos, 0, 0, stratos, stratos, stratos_state, empty_init, "SciSys", "Kasparov Stratos (set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1986, stratosa, stratos, 0, stratos, stratos, stratos_state, empty_init, "SciSys", "Kasparov Stratos (set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1986, stratos, 0, 0, stratos, stratos, stratos_state, empty_init, "SciSys", "Kasparov Stratos (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1986, stratosa, stratos, 0, stratos, stratos, stratos_state, empty_init, "SciSys", "Kasparov Stratos (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, tking, 0, 0, tking2, tking2, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 1, ver. D)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // aka Turbo King II -CONS( 1988, tkinga, tking, 0, stratos, stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // oldest? -CONS( 1988, tkingb, tking, 0, stratos, stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, tking, 0, 0, tking2, tking2, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 1, ver. D)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // aka Turbo King II +CONS( 1988, tkinga, tking, 0, stratos, stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // oldest? +CONS( 1988, tkingb, tking, 0, stratos, stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 3)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1988, corona, 0, 0, corona, stratos, stratos_state, empty_init, "Saitek", "Kasparov Corona (ver. D+)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // aka Corona II -CONS( 1988, coronaa, corona, 0, corona, stratos, stratos_state, empty_init, "Saitek", "Kasparov Corona (ver. D)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1988, corona, 0, 0, corona, stratos, stratos_state, empty_init, "Saitek", "Kasparov Corona (ver. D+)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // aka Corona II +CONS( 1988, coronaa, corona, 0, corona, stratos, stratos_state, empty_init, "Saitek", "Kasparov Corona (ver. D)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) -- cgit v1.2.3-70-g09d2 From df38aea99cf625a042e7dab4405e481ad67fdb57 Mon Sep 17 00:00:00 2001 From: braintro Date: Sat, 20 Jul 2019 09:09:14 -0500 Subject: (nw) segac2.cpp: Add in Sega ID# for Poto Poto --- src/mame/drivers/segac2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/drivers/segac2.cpp b/src/mame/drivers/segac2.cpp index 8400c3e51e5..909c5505632 100644 --- a/src/mame/drivers/segac2.cpp +++ b/src/mame/drivers/segac2.cpp @@ -2019,7 +2019,7 @@ ROM_START( puyopuy2 ) /* Puyo Puyo 2 (c)1994 Compile */ ROM_END -ROM_START( potopoto ) /* Poto Poto (c)1994 Sega */ +ROM_START( potopoto ) /* Poto Poto (c)1994 Sega - 834-10778 (EMP5032 labeled 317-0218) */ ROM_REGION( 0x200000, "maincpu", 0 ) ROM_LOAD16_BYTE( "epr-16662a.ic32", 0x000000, 0x040000, CRC(bbd305d6) SHA1(1a4f4869fefac188c69bc67df0b625e43a0c3f1f) ) ROM_LOAD16_BYTE( "epr-16661a.ic31", 0x000001, 0x040000, CRC(5a7d14f4) SHA1(a615b5f481256366db7b1c6302a8dcb69708102b) ) -- cgit v1.2.3-70-g09d2 From 4c9297adc05a70d76d5cd2a627e1b52100eecc7e Mon Sep 17 00:00:00 2001 From: braintro Date: Sat, 20 Jul 2019 09:38:09 -0500 Subject: (nw) add known PALs to Gardia (Japan) set --- src/mame/drivers/system1.cpp | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/system1.cpp b/src/mame/drivers/system1.cpp index 4a0dbf7c8da..9ff8c00d12a 100644 --- a/src/mame/drivers/system1.cpp +++ b/src/mame/drivers/system1.cpp @@ -3091,8 +3091,7 @@ ROM_START( bullfgt ) ROM_LOAD( "epr-6070.93", 0x4000, 0x4000, CRC(34f080df) SHA1(0e7d28e3325c8c3f06438fde29ea0ffe57fc325f) ) /* epr-6070.93 */ ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) - /* pr-5317.106 */ + ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* pr-5317.106 */ ROM_END ROM_START( thetogyu ) @@ -3145,8 +3144,7 @@ ROM_START( spatter ) ROM_LOAD( "epr-6309.110", 0xc000, 0x4000, CRC(7423ad98) SHA1(e19b4c64795f30e1491520160d315e4148d58df2) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) - /* pr-5317.106 */ + ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* pr-5317.106 */ ROM_END ROM_START( spattera ) @@ -3173,8 +3171,7 @@ ROM_START( spattera ) ROM_LOAD( "epr-6309.110", 0xc000, 0x4000, CRC(7423ad98) SHA1(e19b4c64795f30e1491520160d315e4148d58df2) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) - /* pr-5317.106 */ + ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* pr-5317.106 */ ROM_END ROM_START( ssanchan ) @@ -3201,8 +3198,7 @@ ROM_START( ssanchan ) ROM_LOAD( "epr-6309.110", 0xc000, 0x4000, CRC(7423ad98) SHA1(e19b4c64795f30e1491520160d315e4148d58df2) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) - /* pr-5317.106 */ + ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* pr-5317.106 */ ROM_END @@ -3390,8 +3386,7 @@ ROM_START( nprinces ) ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) ) /* epr-6549.2 */ ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) - /* pr-5317.106 */ + ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* pr-5317.106 */ ROM_END ROM_START( nprinceso ) @@ -4273,8 +4268,7 @@ ROM_START( wboy2 ) ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) /* epr-7488.2 */ ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) - /* pr-5317.106 */ + ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* pr-5317.106 */ ROM_END ROM_START( wboy2u ) @@ -4304,8 +4298,7 @@ ROM_START( wboy2u ) ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) /* epr-7488.2 */ ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) - /* pr-5317.106 */ + ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* pr-5317.106 */ ROM_END ROM_START( wboy3 ) @@ -4533,7 +4526,7 @@ ROM_START( wbdeluxe ) ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) /* epr-7488.2 */ ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* pr-5317.106 */ + ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* pr-5317.106 */ ROM_END @@ -4621,7 +4614,11 @@ ROM_START( gardiaj ) /* Sega game ID# 834-6119-02 GARDIA */ ROM_LOAD( "pr-7343.ic8", 0x0200, 0x0100, CRC(371c44a6) SHA1(ac37458d1feb6566b09a795b20c21953d4ab109d) ) /* palette blue component */ ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "pr5317.ic28", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) + ROM_LOAD( "pr5317.ic28", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* MB7114E */ + + ROM_REGION( 0x0400, "plds", 0 ) + ROM_LOAD( "315-5137.bin", 0x00000, 0x0104, CRC(6ffd9e6f) SHA1(a60a3a2ec5bc256b18bfff0fec0172ee2e4fd955) ) /* TI PAL16R4A-2CN Located at IC10 */ + ROM_LOAD( "315-5138.bin", 0x00000, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) ) /* TI PAL16R4ACN Located at IC11 */ ROM_END -- cgit v1.2.3-70-g09d2 From a8b8c3513f41b5ea586a2724ea15ee41b443fdef Mon Sep 17 00:00:00 2001 From: braintro Date: Sat, 20 Jul 2019 09:46:04 -0500 Subject: New working clone New working clone ------------------ Zip & Zap (Less Explicit) [system11, The Dumping Union] --- src/mame/drivers/expro02.cpp | 43 +++++++++++++++++++++++++++++++++---------- src/mame/mame.lst | 1 + 2 files changed, 34 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/expro02.cpp b/src/mame/drivers/expro02.cpp index 52811f73571..e0a14fbeb59 100644 --- a/src/mame/drivers/expro02.cpp +++ b/src/mame/drivers/expro02.cpp @@ -1785,24 +1785,46 @@ ROM_START( zipzap ) ROM_LOAD16_BYTE( "ud17.bin", 0x000001, 0x40000, BAD_DUMP CRC(2901fae1) SHA1(0d6ca6d48c5586c05f3c02aee51a95da38b3751f) ) ROM_LOAD16_BYTE( "ue17.bin", 0x000000, 0x40000, BAD_DUMP CRC(da6c3fc8) SHA1(4bc01bc6f62553f6ac4f7252f7d9bf0d639f6935) ) /* gfx bitmaps */ + ROM_LOAD16_BYTE( "937.bin", 0x100000, 0x80000, CRC(61dd653f) SHA1(68b5ae3423363cc64d933836bf6881431dad021a) ) // good, girls + ROM_LOAD16_BYTE( "941.bin", 0x100001, 0x80000, CRC(320321ed) SHA1(00b52cd34cd86c105ff6dbd0248ff239de31c851) ) + ROM_LOAD16_BYTE( "936.bin", 0x200000, 0x80000, CRC(596543cc) SHA1(10a0eab4ca4a8749f1703ff6fcc80d731d07d087) ) // good, girls + ROM_LOAD16_BYTE( "940.bin", 0x200001, 0x80000, CRC(0c9dfb53) SHA1(541bd8c79408b7415713b517eacdd565d0ac5cb8) ) + ROM_LOAD16_BYTE( "934.bin", 0x300000, 0x80000, CRC(1e65988a) SHA1(64d6f8cbdb28755515d9bbf52f589ce1176fed58) ) // good, girls + ROM_LOAD16_BYTE( "939.bin", 0x300001, 0x80000, CRC(8790a6a3) SHA1(94f39e48b75144cab191e2de4284c28d18b8f1c7) ) ROM_LOAD16_BYTE( "938.bin", 0x400000, 0x80000, CRC(61c06b60) SHA1(b3abae020009a48b99862766e0981e1118159a47) ) // good title background ROM_LOAD16_BYTE( "942.bin", 0x400001, 0x80000, CRC(282413b8) SHA1(e2ecaaa3c5b2355eadc016b73d7d658f25e1e0db) ) // (and corrupt gfx on select mode screen) - ROM_LOAD16_BYTE( "934.bin", 0x300000, 0x80000, CRC(1e65988a) SHA1(64d6f8cbdb28755515d9bbf52f589ce1176fed58) ) // good, girls - ROM_LOAD16_BYTE( "939.bin", 0x300001, 0x80000, CRC(8790a6a3) SHA1(94f39e48b75144cab191e2de4284c28d18b8f1c7)) + ROM_REGION( 0x100000, "kan_spr", 0 ) // sprites + ROM_LOAD( "u5.bin", 0x000000, 0x80000, CRC(c274d8b5) SHA1(2c45961aaf8311f027a734df7e33fe085dfdd099) ) - ROM_LOAD16_BYTE( "936.bin", 0x200000, 0x80000, CRC(596543cc) SHA1(10a0eab4ca4a8749f1703ff6fcc80d731d07d087) ) // good, girls - ROM_LOAD16_BYTE( "940.bin", 0x200001, 0x80000, CRC(0c9dfb53) SHA1(541bd8c79408b7415713b517eacdd565d0ac5cb8) ) + ROM_REGION( 0x100000, "oki", 0 ) /* Samples */ + ROM_LOAD( "snd.bin", 0x00000, 0x80000, CRC(bc20423e) SHA1(1f4bd52ec4f9b3b3e6b10ac2b3afaadf76a2c7c9) ) // Missing a sound ROM?? + ROM_RELOAD( 0x80000, 0x80000 ) +ROM_END - ROM_LOAD16_BYTE( "937.bin", 0x100000, 0x80000, CRC(61dd653f) SHA1(68b5ae3423363cc64d933836bf6881431dad021a) ) // good, girls - ROM_LOAD16_BYTE( "941.bin", 0x100001, 0x80000, CRC(320321ed) SHA1(00b52cd34cd86c105ff6dbd0248ff239de31c851) ) +ROM_START( zipzapa ) + ROM_REGION( 0x500000, "maincpu", 0 ) /* 68000 Code */ + ROM_LOAD16_BYTE( "30.ud17", 0x000001, 0x20000, CRC(769ec252) SHA1(abb0e91036d0643146d81b652defb8f6fb0b5a58) ) + ROM_LOAD16_BYTE( "31.ue17", 0x000000, 0x20000, CRC(e098ef98) SHA1(d08db27e4c6ae9a3f46c40d3c816c2efe23ac92b) ) + /* gfx bitmaps */ + ROM_LOAD16_BYTE( "37.rd2b", 0x100000, 0x80000, CRC(0b59d718) SHA1(9e7a9bff55396953f7ccfeb1d968e3e814cd3990) ) + ROM_LOAD16_BYTE( "33.rd2a", 0x100001, 0x80000, CRC(df35c8f5) SHA1(69b7aeea9af03611bae12a899ece53068df62eec) ) + ROM_LOAD16_BYTE( "38.rd3b", 0x200000, 0x80000, CRC(575dfc8c) SHA1(4400d5f0f6d63bfc10894c28de3fe8aa83ee49a9) ) + ROM_LOAD16_BYTE( "34.rd3a", 0x200001, 0x80000, CRC(f8bd156b) SHA1(6c95c597898b0dca1b3ccece0e46d67333fdc6ea) ) + ROM_LOAD16_BYTE( "39", 0x300000, 0x80000, CRC(302375c0) SHA1(1618bafab0bec265db9f2414f65fef7e3467e13c) ) + ROM_LOAD16_BYTE( "35", 0x300001, 0x80000, CRC(9b6409a6) SHA1(aa0c38a149bd33e287f2ada5960429352bd63a23) ) + ROM_LOAD16_BYTE( "36.rd1b", 0x400000, 0x80000, CRC(f3256bbb) SHA1(0ca9a02f1824b72fc903bc78d83392297b076094) ) + ROM_LOAD16_BYTE( "32.rd1a", 0x400001, 0x80000, CRC(1dd511a9) SHA1(c8c96ad9e56e1990bdaee5ba8e1942c1de180ef2) ) ROM_REGION( 0x100000, "kan_spr", 0 ) // sprites - ROM_LOAD( "u5.bin", 0x000000, 0x80000, CRC(c274d8b5) SHA1(2c45961aaf8311f027a734df7e33fe085dfdd099) ) + ROM_LOAD( "40.u5", 0x000000, 0x80000, CRC(c274d8b5) SHA1(2c45961aaf8311f027a734df7e33fe085dfdd099) ) // == u5.bin above ROM_REGION( 0x100000, "oki", 0 ) /* Samples */ - ROM_LOAD( "snd.bin", 0x00000, 0x80000, CRC(bc20423e) SHA1(1f4bd52ec4f9b3b3e6b10ac2b3afaadf76a2c7c9) ) - ROM_RELOAD( 0x80000, 0x80000 ) + ROM_LOAD( "29.ub6", 0x00000, 0x20000, CRC(2cf3b8ea) SHA1(84a306a1afdc04c9828e5fbda2c050183d9006a3) ) // Correct loading?? + ROM_RELOAD( 0x20000, 0x20000 ) + ROM_RELOAD( 0x40000, 0x20000 ) + ROM_RELOAD( 0x60000, 0x20000 ) + ROM_LOAD( "28.uc6", 0x80000, 0x80000, CRC(e5d026c7) SHA1(7e011d14ec8da493250ec7506909417e64690e73) ) // bad dump or loading / banking issue?? ROM_END @@ -1888,4 +1910,5 @@ GAME( 1996, pgalvip, 0, galhustl, galhustl, expro02_state, empty_init, GAME( 1997, pgalvipa, pgalvip, galhustl, galhustl, expro02_state, empty_init, ROT0, "", "Pocket Gals V.I.P (set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1997, galhustl, pgalvip, galhustl, galhustl, expro02_state, empty_init, ROT0, "ACE International", "Gals Hustler", MACHINE_SUPPORTS_SAVE ) // hack of the above? -GAME( 1995, zipzap, 0, zipzap, zipzap, expro02_state, empty_init, ROT90, "Barko Corp", "Zip & Zap", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1995, zipzap, 0, zipzap, zipzap, expro02_state, empty_init, ROT90, "Barko Corp", "Zip & Zap (Explicit)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // "A" nudity level +GAME( 1995, zipzapa, zipzap, zipzap, zipzap, expro02_state, empty_init, ROT90, "Barko Corp", "Zip & Zap (Less Explicit)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // "B" nudity level diff --git a/src/mame/mame.lst b/src/mame/mame.lst index f5244544745..471b174c70e 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -12842,6 +12842,7 @@ smissw // supmodel // (c) 1994 Comad & New Japan System wownfant // (c) 2002 Comad zipzap // (c) 1995 Barko Corp +zipzapa // (c) 1995 Barko Corp @source:exprraid.cpp exprraid // (c) 1986 Data East Corporation -- cgit v1.2.3-70-g09d2 From 117f89253b1bea80d33ef67eeeca433e5b462be4 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sun, 21 Jul 2019 02:14:18 +1000 Subject: New SKELETON: SWTPC 8212 terminal. --- src/mame/drivers/terminal.cpp | 11 +++++++++++ src/mame/mame.lst | 1 + 2 files changed, 12 insertions(+) (limited to 'src') diff --git a/src/mame/drivers/terminal.cpp b/src/mame/drivers/terminal.cpp index 618e97de484..e3df889d092 100644 --- a/src/mame/drivers/terminal.cpp +++ b/src/mame/drivers/terminal.cpp @@ -87,6 +87,16 @@ ROM_START( 7951om ) // TTL (no cpu) // 1k x 6bits display ram 64-characters uppe ROM_END +ROM_START( swtpc8212 ) // MC6802P, 2xMC6821P, INS8250N, MCM66750, MC6845P, bank of 8 dips, crystals unknown. On the back is a 25-pin RS-232 port, and a 25-pin printer port. + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "8224g_ver.1.1_6oct80.ic1", 0xf000, 0x0800, CRC(7d7f3c21) SHA1(f7e6e20b36a1c724a4e348bc784d0b7b5fb462a3) ) + ROM_LOAD( "8224g_ver.1.1_6oct80.ic2", 0xf800, 0x0800, CRC(2b118c22) SHA1(5fa031c834c7c582d5715764941499fcef51f477) ) + + ROM_REGION( 0x0800, "chargen", 0 ) + ROM_LOAD( "grafix_8x12_22aug80.bin", 0x0000, 0x0800, CRC(a525ed65) SHA1(813d2e85ddb258c5b032b959e695ad33200cbcc4) ) +ROM_END + + ROM_START( teleguide ) // order unknown // i8051, i8031 (layout very similar to loewed) // 64k ram + battery-backed nvram // b&w ROM_REGION( 0x38000, "maincpu", 0 ) ROM_LOAD( "cardreader_17044-068_349-1163.bin", 0x00000, 0x10000, CRC(3c980c0d) SHA1(9904ffd283a11defbe3daf2cb9029bcead8b02d0) ) @@ -102,4 +112,5 @@ COMP( 1991, alcat258, 0, 0, terminal, terminal, terminal_state, empty COMP( 1992, loewed, 0, 0, terminal, terminal, terminal_state, empty_init, "Loewe", "Multitel D", MACHINE_IS_SKELETON ) COMP( 1988, loewe715, 0, 0, terminal, terminal, terminal_state, empty_init, "Loewe", "Multicom 715L", MACHINE_IS_SKELETON ) COMP( 1987, 7951om, 0, 0, terminal, terminal, terminal_state, empty_init, "Mera-Elzab", "7951om", MACHINE_IS_SKELETON ) +COMP( 1980, swtpc8212, 0, 0, terminal, terminal, terminal_state, empty_init, "Southwest Technical Products Corporation", "SWTPC 8212", MACHINE_IS_SKELETON ) COMP( 1992, teleguide, 0, 0, terminal, terminal, terminal_state, empty_init, "Loewe / Televerket", "Teleguide", MACHINE_IS_SKELETON ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 471b174c70e..bce9f1dfe74 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -37754,6 +37754,7 @@ t4490 // Terco 4490 Mill CNC Control (c) 1986 alcat258 // loewe715 // loewed // +swtpc8212 // teleguide // @source:terracre.cpp -- cgit v1.2.3-70-g09d2 From 4c2c3e52ee3a125a50908a4991fabf4adf114493 Mon Sep 17 00:00:00 2001 From: npwoods Date: Sat, 20 Jul 2019 14:49:15 -0400 Subject: Exposed natual_keyboard object to LUA (#5364) --- src/emu/natkeyboard.cpp | 14 ++++++++++++++ src/emu/natkeyboard.h | 2 ++ src/frontend/mame/luaengine.cpp | 19 ++++++++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/emu/natkeyboard.cpp b/src/emu/natkeyboard.cpp index 3851d98719e..17782815d22 100644 --- a/src/emu/natkeyboard.cpp +++ b/src/emu/natkeyboard.cpp @@ -486,6 +486,13 @@ void natural_keyboard::post_utf8(const char *text, size_t length, const attotime } +void natural_keyboard::post_utf8(const std::string &text, const attotime &rate) +{ + if (!text.empty()) + post_utf8(text.c_str(), text.size(), rate); +} + + //------------------------------------------------- // post_coded - post a coded string //------------------------------------------------- @@ -564,6 +571,13 @@ void natural_keyboard::post_coded(const char *text, size_t length, const attotim } +void natural_keyboard::post_coded(const std::string &text, const attotime &rate) +{ + if (!text.empty()) + post_coded(text.c_str(), text.size(), rate); +} + + //------------------------------------------------- // paste - does a paste from the keyboard //------------------------------------------------- diff --git a/src/emu/natkeyboard.h b/src/emu/natkeyboard.h index b90eeb9d88e..fa3df156285 100644 --- a/src/emu/natkeyboard.h +++ b/src/emu/natkeyboard.h @@ -53,7 +53,9 @@ public: void post(char32_t ch); void post(const char32_t *text, size_t length = 0, const attotime &rate = attotime::zero); void post_utf8(const char *text, size_t length = 0, const attotime &rate = attotime::zero); + void post_utf8(const std::string &text, const attotime &rate = attotime::zero); void post_coded(const char *text, size_t length = 0, const attotime &rate = attotime::zero); + void post_coded(const std::string &text, const attotime &rate = attotime::zero); void paste(); // debugging diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp index 808d4314342..ea5f783c70d 100644 --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -766,7 +766,6 @@ void lua_engine::initialize() emu["romname"] = [this](){ return machine().basename(); }; emu["softname"] = [this]() { return machine().options().software_name(); }; emu["keypost"] = [this](const char *keys){ machine().ioport().natkeyboard().post_utf8(keys); }; - emu["paste"] = [this](){ machine().ioport().natkeyboard().paste(); }; emu["time"] = [this](){ return machine().time().as_double(); }; emu["start"] = [this](const char *driver) { int i = driver_list::find(driver); @@ -1672,6 +1671,7 @@ void lua_engine::initialize() sol().registry().new_usertype("ioport", "new", sol::no_constructor, "count_players", &ioport_manager::count_players, + "natkeyboard", &ioport_manager::natkeyboard, "ports", sol::property([this](ioport_manager &im) { sol::table port_table = sol().create_table(); for (auto &port : im.ports()) @@ -1679,6 +1679,23 @@ void lua_engine::initialize() return port_table; })); +/* natkeyboard library + * + * manager:machine():ioport():natkeyboard() + * + * natkeyboard.empty - is the natural keyboard buffer empty? + * natkeyboard.in_use - is the natural keyboard in use? + * natkeyboard:paste() - paste clipboard data + * natkeyboard:post() - post data to natural keyboard + * natkeyboard:post_coded() - post data to natural keyboard + */ + + sol().registry().new_usertype("natkeyboard", "new", sol::no_constructor, + "empty", sol::property(&natural_keyboard::empty), + "in_use", sol::property(&natural_keyboard::in_use, &natural_keyboard::set_in_use), + "paste", &natural_keyboard::paste, + "post", [](natural_keyboard &nat, const std::string &text) { nat.post_utf8(text); }, + "post_coded", [](natural_keyboard &nat, const std::string &text) { nat.post_coded(text); }); /* ioport_port library * -- cgit v1.2.3-70-g09d2 From 0ba5d412a4efcc62cef5240271350bfdeef7b8af Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 21 Jul 2019 00:36:19 +0200 Subject: saitek_corona: move to own driver (nw) --- scripts/target/mame/mess.lua | 2 + src/mame/drivers/saitek_corona.cpp | 156 +++++++++ src/mame/drivers/saitek_stratos.cpp | 184 ++++------ src/mame/includes/saitek_stratos.h | 72 ++++ src/mame/layout/saitek_corona.lay | 661 ++++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 6 +- src/mame/mess.flt | 1 + 7 files changed, 964 insertions(+), 118 deletions(-) create mode 100644 src/mame/drivers/saitek_corona.cpp create mode 100644 src/mame/includes/saitek_stratos.h create mode 100644 src/mame/layout/saitek_corona.lay (limited to 'src') diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 2a3049e20d1..9020ab3996c 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -3060,7 +3060,9 @@ files { MAME_DIR .. "src/mame/drivers/saitek_cp2000.cpp", MAME_DIR .. "src/mame/drivers/saitek_delta1.cpp", MAME_DIR .. "src/mame/drivers/saitek_risc2500.cpp", + MAME_DIR .. "src/mame/includes/saitek_stratos.h", MAME_DIR .. "src/mame/drivers/saitek_stratos.cpp", + MAME_DIR .. "src/mame/drivers/saitek_corona.cpp", -- subdriver of saitek_stratos } createMESSProjects(_target, _subtarget, "samcoupe") diff --git a/src/mame/drivers/saitek_corona.cpp b/src/mame/drivers/saitek_corona.cpp new file mode 100644 index 00000000000..32cc8f1a2fe --- /dev/null +++ b/src/mame/drivers/saitek_corona.cpp @@ -0,0 +1,156 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/*************************************************************************** + +Saitek Corona. This is a subclass of saitek_corona_state. +Please refer to saitek_stratos.cpp for driver notes. + +To be brief, Saitek Corona has two "HELIOS" chips, I/O addressing is completely +different compared to Stratos/Turbo King. + +***************************************************************************/ + +#include "emu.h" +#include "includes/saitek_stratos.h" + +#include "cpu/m6502/m65c02.h" +#include "machine/nvram.h" +#include "machine/sensorboard.h" +#include "sound/dac.h" +#include "sound/volt_reg.h" + +#include "softlist.h" +#include "speaker.h" + +// internal artwork +#include "saitek_corona.lh" // clickable + + +class corona_state : public saitek_stratos_state +{ +public: + corona_state(const machine_config &mconfig, device_type type, const char *tag) : + saitek_stratos_state(mconfig, type, tag), + m_board(*this, "board"), + m_dac(*this, "dac") + { } + + // machine drivers + void corona(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + // devices/pointers + required_device m_board; + required_device m_dac; + + void main_map(address_map &map); +}; + +void corona_state::machine_start() +{ + saitek_stratos_state::machine_start(); +} + +void corona_state::machine_reset() +{ + saitek_stratos_state::machine_reset(); +} + + + +/****************************************************************************** + I/O +******************************************************************************/ + +// HELIOS + + +/****************************************************************************** + Address Maps +******************************************************************************/ + +void corona_state::main_map(address_map &map) +{ + map(0x0000, 0x1fff).ram(); + map(0x8000, 0xffff).rom(); +} + + + +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( corona ) + PORT_INCLUDE( saitek_stratos ) + + PORT_MODIFY("IN.6") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_CUSTOM) +INPUT_PORTS_END + + + +/****************************************************************************** + Machine Drivers +******************************************************************************/ + +void corona_state::corona(machine_config &config) +{ + /* basic machine hardware */ + M65C02(config, m_maincpu, 5_MHz_XTAL); // see set_cpu_freq + m_maincpu->set_addrmap(AS_PROGRAM, &corona_state::main_map); + m_maincpu->set_periodic_int(FUNC(corona_state::irq0_line_hold), attotime::from_hz(100)); + + SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS); + m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); + m_board->set_delay(attotime::from_msec(200)); + + /* video hardware */ + PWM_DISPLAY(config, m_display).set_size(2+4, 8+1); + config.set_default_layout(layout_saitek_corona); + + TIMER(config, "lcd_busy").configure_generic(timer_device::expired_delegate()); + + /* sound hardware */ + SPEAKER(config, "speaker").front_center(); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); + VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); + + /* extension rom */ + GENERIC_CARTSLOT(config, m_extrom, generic_plain_slot, "saitek_egr", "bin"); + m_extrom->set_device_load(FUNC(corona_state::extrom_load), this); + + SOFTWARE_LIST(config, "cart_list").set_original("saitek_egr"); +} + + + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + +ROM_START( corona ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("w2_708g_u2.u2", 0x0000, 0x8000, CRC(52568bb4) SHA1(83fe91787e17bbefc2b3ec651ddb11c88990060d) ) + ROM_LOAD("bw2_708a_u3.u3", 0x8000, 0x8000, CRC(32848f73) SHA1(a447543e3eb4757f9afed26fde77b66985eb96a7) ) +ROM_END + +ROM_START( coronaa ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("w2_a14c_u2.u2", 0x0000, 0x8000, CRC(be82e199) SHA1(cfcc573774b6907ed137dca01fa7f3fce493a89f) ) + ROM_LOAD("bw2_a14_u3.u3", 0x8000, 0x8000, CRC(abe87285) SHA1(b15f7ddeac78d252cf413ba4085523e44c6d15df) ) +ROM_END + + + +/****************************************************************************** + Drivers +******************************************************************************/ + +/* YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */ +CONS( 1988, corona, 0, 0, corona, corona, corona_state, empty_init, "Saitek", "Kasparov Corona (ver. D+)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // aka Corona II +CONS( 1988, coronaa, corona, 0, corona, corona, corona_state, empty_init, "Saitek", "Kasparov Corona (ver. D)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/saitek_stratos.cpp b/src/mame/drivers/saitek_stratos.cpp index 1f8cc6517c3..2d6ca005429 100644 --- a/src/mame/drivers/saitek_stratos.cpp +++ b/src/mame/drivers/saitek_stratos.cpp @@ -7,7 +7,7 @@ SciSys/Saitek Stratos chesscomputer family (1986-1990) - Stratos - Turbo King -- Corona +- Corona --> it's in saitek_corona.cpp - *Simultano *: not dumped yet @@ -34,7 +34,6 @@ Simultano has an extra LCD screen representing the chessboard state. TODO: - emulate LCD at lower level, probably an MCU with embedded LCDC - add LCD 7*7 DMD, it's in m_lcd_data[0x30 to 0x3b] but scrambled -- corona: different addressmap, 64 leds - tking different internal artwork - irq timing is derived from the main XTAL, but result should be similar with 5MHz and 5.67MHz, there are a couple of "FREQ. SEL" nodes on the PCB, maybe related (not the ones in input ports) @@ -45,82 +44,51 @@ TODO: ***************************************************************************/ #include "emu.h" +#include "includes/saitek_stratos.h" + #include "cpu/m6502/m65c02.h" #include "machine/nvram.h" #include "machine/sensorboard.h" -#include "machine/timer.h" #include "sound/dac.h" #include "sound/volt_reg.h" -#include "video/pwm.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" #include "softlist.h" #include "speaker.h" -#include - // internal artwork #include "saitek_stratos.lh" // clickable -namespace { - -class stratos_state : public driver_device +class stratos_state : public saitek_stratos_state { public: stratos_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), + saitek_stratos_state(mconfig, type, tag), m_nvram(*this, "nvram.u7"), m_rombank(*this, "rombank"), m_nvrambank(*this, "nvrambank"), - m_lcd_busy(*this, "lcd_busy"), m_board(*this, "board"), - m_display(*this, "display"), - m_dac(*this, "dac"), - m_extrom(*this, "extrom"), - m_out_digit(*this, "digit%u", 0U), - m_out_lcd(*this, "lcd%u.%u.%u", 0U, 0U, 0U), - m_inputs(*this, "IN.%u", 0) + m_dac(*this, "dac") { } - DECLARE_INPUT_CHANGED_MEMBER(cpu_freq) { set_cpu_freq(); } - DECLARE_INPUT_CHANGED_MEMBER(acl_button) { if (newval) power_off(); } - DECLARE_INPUT_CHANGED_MEMBER(go_button); - // machine drivers void stratos(machine_config &config); - void corona(machine_config &config); void tking2(machine_config &config); protected: virtual void machine_start() override; virtual void machine_reset() override; - virtual void device_post_load() override { update_lcd(); } private: // devices/pointers - required_device m_maincpu; required_device m_nvram; required_memory_bank m_rombank; required_memory_bank m_nvrambank; - required_device m_lcd_busy; required_device m_board; - required_device m_display; required_device m_dac; - required_device m_extrom; - output_finder<8+1> m_out_digit; - output_finder<4, 16, 4> m_out_lcd; - required_ioport_array<8+1> m_inputs; void main_map(address_map &map); - - void clear_lcd() { std::fill_n(m_lcd_data, ARRAY_LENGTH(m_lcd_data), 0); } void update_leds(); - void update_lcd(); - void power_off(); - void set_cpu_freq(); // I/O handlers DECLARE_WRITE8_MEMBER(select_w); @@ -130,9 +98,6 @@ private: DECLARE_READ8_MEMBER(control_r); DECLARE_WRITE8_MEMBER(control_w); DECLARE_READ8_MEMBER(lcd_r); - DECLARE_WRITE8_MEMBER(lcd_w); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(extrom_load); DECLARE_READ8_MEMBER(extrom_r); std::unique_ptr m_nvram_data; @@ -140,19 +105,49 @@ private: u8 m_select; u8 m_control; u8 m_led_data; - bool m_power; - - u8 m_lcd_count; - u8 m_lcd_address; - u8 m_lcd_data[0x40]; }; -void stratos_state::machine_start() +// saitek_stratos_state + +void saitek_stratos_state::machine_start() { // resolve handlers m_out_digit.resolve(); m_out_lcd.resolve(); + // zerofill + m_power = false; + m_lcd_count = 0; + m_lcd_address = 0; + + // register for savestates + save_item(NAME(m_power)); + save_item(NAME(m_lcd_count)); + save_item(NAME(m_lcd_address)); + save_item(NAME(m_lcd_data)); +} + +void saitek_stratos_state::machine_reset() +{ + m_power = true; + m_lcd_count = 0; + clear_lcd(); + + set_cpu_freq(); +} + +void saitek_stratos_state::set_cpu_freq() +{ + // released with either 5MHz or 5.67MHz speeds + m_maincpu->set_unscaled_clock((ioport("FAKE")->read() & 1) ? 5.67_MHz_XTAL : 5_MHz_XTAL); +} + +// stratos_state + +void stratos_state::machine_start() +{ + saitek_stratos_state::machine_start(); + // init banks m_rombank->configure_entries(0, 2, memregion("maincpu")->base(), 0x8000); @@ -165,38 +160,19 @@ void stratos_state::machine_start() m_select = 0; m_control = 0; m_led_data = 0; - m_power = false; - - m_lcd_count = 0; - m_lcd_address = 0; - clear_lcd(); // register for savestates save_item(NAME(m_select)); save_item(NAME(m_control)); save_item(NAME(m_led_data)); - save_item(NAME(m_power)); - - save_item(NAME(m_lcd_count)); - save_item(NAME(m_lcd_address)); - save_item(NAME(m_lcd_data)); } void stratos_state::machine_reset() { - m_power = true; - m_lcd_count = 0; + saitek_stratos_state::machine_reset(); m_rombank->set_entry(0); m_nvrambank->set_entry(0); - - set_cpu_freq(); -} - -void stratos_state::set_cpu_freq() -{ - // released with either 5MHz or 5.67MHz speeds - m_maincpu->set_unscaled_clock((ioport("FAKE")->read() & 1) ? 5.67_MHz_XTAL : 5_MHz_XTAL); } @@ -207,7 +183,7 @@ void stratos_state::set_cpu_freq() // soft power on/off -INPUT_CHANGED_MEMBER(stratos_state::go_button) +INPUT_CHANGED_MEMBER(saitek_stratos_state::go_button) { if (newval && !m_power) { @@ -216,7 +192,7 @@ INPUT_CHANGED_MEMBER(stratos_state::go_button) } } -void stratos_state::power_off() +void saitek_stratos_state::power_off() { m_power = false; m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); @@ -230,7 +206,7 @@ void stratos_state::power_off() // Endgame ROM -DEVICE_IMAGE_LOAD_MEMBER(stratos_state::extrom_load) +DEVICE_IMAGE_LOAD_MEMBER(saitek_stratos_state::extrom_load) { u32 size = m_extrom->common_get_size("rom"); @@ -256,7 +232,7 @@ READ8_MEMBER(stratos_state::extrom_r) // LCD HLE -void stratos_state::update_lcd() +void saitek_stratos_state::update_lcd() { // output individual segments for (int i = 0; i < 0x40; i++) @@ -274,13 +250,7 @@ void stratos_state::update_lcd() m_out_digit[i + 5] = (m_lcd_data[0x11 + i * 2] << 4 | m_lcd_data[0x11 + i * 2 + 1]) & 0x7f; } -READ8_MEMBER(stratos_state::lcd_r) -{ - // unknown, maybe resets lcd controller - return 0; -} - -WRITE8_MEMBER(stratos_state::lcd_w) +void saitek_stratos_state::lcd_w(u8 data) { // d0-d3: lcd data // d4-d7: unused? @@ -308,6 +278,12 @@ WRITE8_MEMBER(stratos_state::lcd_w) m_lcd_busy->adjust(attotime::from_usec(50)); // ? } +READ8_MEMBER(stratos_state::lcd_r) +{ + // unknown, maybe resets lcd controller + return 0; +} + // HELIOS @@ -411,7 +387,7 @@ void stratos_state::main_map(address_map &map) Input Ports ******************************************************************************/ -static INPUT_PORTS_START( stratos ) +INPUT_PORTS_START( saitek_stratos ) PORT_START("IN.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Set Up") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_CODE(KEYCODE_L) PORT_NAME("Level") @@ -433,7 +409,7 @@ static INPUT_PORTS_START( stratos ) PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("King") PORT_START("IN.4") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Play") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("Play") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Tab / Color") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-") @@ -458,17 +434,17 @@ static INPUT_PORTS_START( stratos ) PORT_CONFSETTING( 0x80, DEF_STR( Normal ) ) PORT_START("RESET") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CHANGED_MEMBER(DEVICE_SELF, stratos_state, go_button, nullptr) PORT_NAME("Go") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, stratos_state, acl_button, nullptr) PORT_NAME("ACL") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CHANGED_MEMBER(DEVICE_SELF, saitek_stratos_state, go_button, nullptr) PORT_NAME("Go") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, saitek_stratos_state, acl_button, nullptr) PORT_NAME("ACL") PORT_START("FAKE") - PORT_CONFNAME( 0x01, 0x00, "CPU Frequency" ) PORT_CHANGED_MEMBER(DEVICE_SELF, stratos_state, cpu_freq, nullptr) // factory set + PORT_CONFNAME( 0x01, 0x00, "CPU Frequency" ) PORT_CHANGED_MEMBER(DEVICE_SELF, saitek_stratos_state, cpu_freq, nullptr) // factory set PORT_CONFSETTING( 0x00, "5MHz" ) PORT_CONFSETTING( 0x01, "5.67MHz" ) INPUT_PORTS_END static INPUT_PORTS_START( tking2 ) - PORT_INCLUDE( stratos ) + PORT_INCLUDE( saitek_stratos ) PORT_MODIFY("IN.5") PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_CUSTOM) @@ -512,18 +488,12 @@ void stratos_state::stratos(machine_config &config) SOFTWARE_LIST(config, "cart_list").set_original("saitek_egr"); } -void stratos_state::corona(machine_config &config) -{ - stratos(config); - - m_board->set_type(sensorboard_device::MAGNETS); -} - void stratos_state::tking2(machine_config &config) { stratos(config); + m_maincpu->set_periodic_int(FUNC(stratos_state::irq0_line_hold), attotime::from_hz(100)); - // seems much more responsive + // seems much more responsive (not just because of higher irq rate) m_board->set_delay(attotime::from_msec(200)); } @@ -565,33 +535,15 @@ ROM_START( tkingb ) // PCB rev. 7 ROM_END -ROM_START( corona ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("w2_708g_u2.u2", 0x0000, 0x8000, CRC(52568bb4) SHA1(83fe91787e17bbefc2b3ec651ddb11c88990060d) ) - ROM_LOAD("bw2_708a_u3.u3", 0x8000, 0x8000, CRC(32848f73) SHA1(a447543e3eb4757f9afed26fde77b66985eb96a7) ) -ROM_END - -ROM_START( coronaa ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("w2_a14c_u2.u2", 0x0000, 0x8000, CRC(be82e199) SHA1(cfcc573774b6907ed137dca01fa7f3fce493a89f) ) - ROM_LOAD("bw2_a14_u3.u3", 0x8000, 0x8000, CRC(abe87285) SHA1(b15f7ddeac78d252cf413ba4085523e44c6d15df) ) -ROM_END - -} // anonymous namespace - - /****************************************************************************** Drivers ******************************************************************************/ -/* YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */ -CONS( 1986, stratos, 0, 0, stratos, stratos, stratos_state, empty_init, "SciSys", "Kasparov Stratos (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1986, stratosa, stratos, 0, stratos, stratos, stratos_state, empty_init, "SciSys", "Kasparov Stratos (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) - -CONS( 1990, tking, 0, 0, tking2, tking2, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 1, ver. D)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // aka Turbo King II -CONS( 1988, tkinga, tking, 0, stratos, stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // oldest? -CONS( 1988, tkingb, tking, 0, stratos, stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 3)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) +/* YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */ +CONS( 1986, stratos, 0, 0, stratos, saitek_stratos, stratos_state, empty_init, "SciSys", "Kasparov Stratos (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1986, stratosa, stratos, 0, stratos, saitek_stratos, stratos_state, empty_init, "SciSys", "Kasparov Stratos (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1988, corona, 0, 0, corona, stratos, stratos_state, empty_init, "Saitek", "Kasparov Corona (ver. D+)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // aka Corona II -CONS( 1988, coronaa, corona, 0, corona, stratos, stratos_state, empty_init, "Saitek", "Kasparov Corona (ver. D)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, tking, 0, 0, tking2, tking2, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 1, ver. D)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // aka Turbo King II +CONS( 1988, tkinga, tking, 0, stratos, saitek_stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) // oldest? +CONS( 1988, tkingb, tking, 0, stratos, saitek_stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (set 3)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/includes/saitek_stratos.h b/src/mame/includes/saitek_stratos.h new file mode 100644 index 00000000000..231ea8b53b9 --- /dev/null +++ b/src/mame/includes/saitek_stratos.h @@ -0,0 +1,72 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/* + + Saitek Stratos family chess computers shared class + Used in: saitek_stratos.cpp (main driver), saitek_corona.cpp + +*/ + +#ifndef MAME_INCLUDES_SAITEK_STRATOS_H +#define MAME_INCLUDES_SAITEK_STRATOS_H + +#pragma once + +#include "machine/timer.h" +#include "video/pwm.h" +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" + +#include + + +class saitek_stratos_state : public driver_device +{ +public: + saitek_stratos_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_lcd_busy(*this, "lcd_busy"), + m_display(*this, "display"), + m_extrom(*this, "extrom"), + m_out_digit(*this, "digit%u", 0U), + m_out_lcd(*this, "lcd%u.%u.%u", 0U, 0U, 0U), + m_inputs(*this, "IN.%u", 0) + { } + + DECLARE_INPUT_CHANGED_MEMBER(cpu_freq) { set_cpu_freq(); } + DECLARE_INPUT_CHANGED_MEMBER(acl_button) { if (newval) power_off(); } + DECLARE_INPUT_CHANGED_MEMBER(go_button); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void device_post_load() override { update_lcd(); } + + // devices/pointers + required_device m_maincpu; + required_device m_lcd_busy; + required_device m_display; + required_device m_extrom; + output_finder<8+1> m_out_digit; + output_finder<4, 16, 4> m_out_lcd; + required_ioport_array<8+1> m_inputs; + + // common handlers + void clear_lcd() { std::fill_n(m_lcd_data, ARRAY_LENGTH(m_lcd_data), 0); } + void update_lcd(); + void power_off(); + void set_cpu_freq(); + + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(extrom_load); + void lcd_w(u8 data); + + bool m_power; + u8 m_lcd_count; + u8 m_lcd_address; + u8 m_lcd_data[0x40]; +}; + +INPUT_PORTS_EXTERN( saitek_stratos ); + +#endif // MAME_INCLUDES_SAITEK_STRATOS_H diff --git a/src/mame/layout/saitek_corona.lay b/src/mame/layout/saitek_corona.lay new file mode 100644 index 00000000000..af4152e892a --- /dev/null +++ b/src/mame/layout/saitek_corona.lay @@ -0,0 +1,661 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index bce9f1dfe74..3c3b6c7ce28 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -34112,6 +34112,10 @@ sage2 // @source:saitek_chesstrv.cpp chesstrv // +@source:saitek_corona.cpp +corona +coronaa + @source:saitek_cp2000.cpp cp2000 // @@ -34123,8 +34127,6 @@ risc2500 // montreux // @source:saitek_stratos.cpp -corona -coronaa stratos stratosa tking diff --git a/src/mame/mess.flt b/src/mame/mess.flt index f486bb025cd..1ba447dd2f1 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -692,6 +692,7 @@ rzone.cpp sacstate.cpp sage2.cpp saitek_chesstrv.cpp +saitek_corona.cpp saitek_cp2000.cpp saitek_delta1.cpp saitek_risc2500.cpp -- cgit v1.2.3-70-g09d2 From 1440861929a344f4bd7f78616854e041f55702d5 Mon Sep 17 00:00:00 2001 From: MooglyGuy Date: Sun, 21 Jul 2019 02:07:17 +0200 Subject: -dpb_brushproc: Added recently-dumped PAL image, nw --- src/mame/video/dpb_brushproc.cpp | 14 ++++++++++++++ src/mame/video/dpb_brushproc.h | 5 +++++ 2 files changed, 19 insertions(+) (limited to 'src') diff --git a/src/mame/video/dpb_brushproc.cpp b/src/mame/video/dpb_brushproc.cpp index 5bbbd5e8db3..e85bb000d12 100644 --- a/src/mame/video/dpb_brushproc.cpp +++ b/src/mame/video/dpb_brushproc.cpp @@ -49,6 +49,9 @@ dpb7000_brushproc_card_device::dpb7000_brushproc_card_device(const machine_confi , m_prom_addr(0) , m_prom_base(nullptr) , m_prom_out(0) + , m_pal_in(0) + , m_pal_base(nullptr) + , m_pal_out(0) , m_store1(*this) , m_store2(*this) , m_mult_fa(*this, "mult_fa") @@ -59,6 +62,7 @@ dpb7000_brushproc_card_device::dpb7000_brushproc_card_device(const machine_confi , m_alu_fe(*this, "alu_fe") , m_alu_ee(*this, "alu_ee") , m_prom(*this, "prom") + , m_pal(*this, "pal") { } @@ -98,6 +102,9 @@ void dpb7000_brushproc_card_device::device_start() save_item(NAME(m_prom_addr)); save_item(NAME(m_prom_out)); + save_item(NAME(m_pal_in)); + save_item(NAME(m_pal_out)); + m_store1.resolve_safe(); m_store2.resolve_safe(); } @@ -139,6 +146,10 @@ void dpb7000_brushproc_card_device::device_reset() m_prom_base = m_prom->base(); m_prom_out = 0; + m_pal_in = 0; + m_pal_base = m_pal->base(); + m_pal_out = 0; + m_mult_fa->xm_w(0); m_mult_fa->ym_w(0); m_mult_fa->rs_w(0); @@ -170,6 +181,9 @@ void dpb7000_brushproc_card_device::device_add_mconfig(machine_config &config) ROM_START( dpb7000_brushproc ) ROM_REGION(0x200, "prom", 0) ROM_LOAD("pb-02c-17593-baa.bin", 0x000, 0x200, CRC(a74cc1f5) SHA1(3b789d5a29c70c93dec56f44be8c14b41915bdef)) + + ROM_REGION16_BE(0x800, "pal", 0) + ROMX_LOAD("pb-02c-17593-hba.bin", 0x000, 0x800, CRC(76018e4f) SHA1(73d995e2e78410676061d45857756d5305a9984a), ROM_GROUPWORD) ROM_END const tiny_rom_entry *dpb7000_brushproc_card_device::device_rom_region() const diff --git a/src/mame/video/dpb_brushproc.h b/src/mame/video/dpb_brushproc.h index 9f8625b947d..2ae645edded 100644 --- a/src/mame/video/dpb_brushproc.h +++ b/src/mame/video/dpb_brushproc.h @@ -106,6 +106,10 @@ protected: uint8_t *m_prom_base; uint8_t m_prom_out; + uint16_t m_pal_in; + uint8_t *m_pal_base; + uint16_t m_pal_out; + devcb_write8 m_store1; devcb_write8 m_store2; @@ -117,6 +121,7 @@ protected: required_device m_alu_fe; required_device m_alu_ee; required_memory_region m_prom; + required_memory_region m_pal; }; // device type definition -- cgit v1.2.3-70-g09d2