From c63e975a6ef2fac6e7fd22bbae9ccada521ec367 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 28 Sep 2024 09:22:32 +0200 Subject: New systems marked not working ------------------------------ Dynasty (Ver. 1.02) [Ioannis Bampoulas, TeamEurope] - igs/igs017.cpp: dumped GFX ROM for tarzanb [Hammy] - skeleton/whtm68k.cpp: very preliminary GFX and sound --- src/mame/igs/igs017.cpp | 4 +- src/mame/mame.lst | 3 + src/mame/skeleton/dyna_d0703.cpp | 183 +++++++++++++++++++++++++++++++++++++++ src/mame/skeleton/whtm68k.cpp | 133 ++++++++++++++++++++-------- 4 files changed, 284 insertions(+), 39 deletions(-) create mode 100644 src/mame/skeleton/dyna_d0703.cpp diff --git a/src/mame/igs/igs017.cpp b/src/mame/igs/igs017.cpp index acdf9063711..ee5cf3adebe 100644 --- a/src/mame/igs/igs017.cpp +++ b/src/mame/igs/igs017.cpp @@ -5732,8 +5732,8 @@ ROM_START( tarzanb ) // V110 TARZAN C ROM_REGION( 0x40000, "maincpu", 0 ) ROM_LOAD( "t.z._v110.u19", 0x00000, 0x40000, CRC(16026d12) SHA1(df08641b4bc1437648f0a8cd5f7a8a4786c07041) ) - ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) - ROM_LOAD( "igs_a2103_cg_v100f.u15", 0x00000, 0x400000, BAD_DUMP CRC(dcbff16f) SHA1(2bf77ef4448c26124c8d8d18bb7ffe4105cfa940) ) // using tarzanc's one for now, but versions differ + ROM_REGION( 0x400000, "igs017_igs031:sprites", ROMREGION_ERASE00 ) + ROM_LOAD( "igs_a2103_cg_v100f.u15", 0x000000, 0x200000, CRC(afe56ed5) SHA1(656cee6a59f2930eec9acd11b84b416cc7354e01) ) ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) ROM_LOAD( "t.z._text_u5.u5", 0x00000, 0x80000, CRC(1724e039) SHA1(d628499b61f98f7c9034d70b82ee25e002190ece) ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 004142c3bd3..9186882ba5e 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -42090,6 +42090,9 @@ cm2005 cm2005a cm2005b +@source:skeleton/dyna_d0703.cpp +dynasty + @source:skeleton/e100.cpp e100 // diff --git a/src/mame/skeleton/dyna_d0703.cpp b/src/mame/skeleton/dyna_d0703.cpp new file mode 100644 index 00000000000..9b078e0cfad --- /dev/null +++ b/src/mame/skeleton/dyna_d0703.cpp @@ -0,0 +1,183 @@ +// license:BSD-3-Clause +// copyright-holders: + +/* +Dyna D0703 PCB + +This PCB is a slight evolution of the one in misc/dyna_d0404.cpp. +It's called DYNA System2007(D0703) V1.05.01 in ROM. +Currently unknown what produces the sound. + +The main components are: +208-pin custom (sanded off). MCU/CPU? +2x Lattice (unreadable model) +1x AMIC A67L93361E-7.5F SRAM +2x IDT71024 SRAM +2x A625308AM-70S SRAM +25.2000 MHz XTAL +Epson RTC62421 +*/ + + +#include "emu.h" + +#include "cpu/arm7/arm7.h" +#include "machine/msm6242.h" + +#include "emupal.h" +#include "screen.h" +#include "speaker.h" +#include "tilemap.h" + + +namespace { + +class dyna_d0703_state : public driver_device +{ +public: + dyna_d0703_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu") + { } + + void dyna_d0703(machine_config &config); + +protected: + virtual void video_start() override ATTR_COLD; + +private: + required_device m_maincpu; + + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + void program_map(address_map &map) ATTR_COLD; +}; + + +uint32_t dyna_d0703_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + + return 0; +} + +void dyna_d0703_state::video_start() +{ +} + + +void dyna_d0703_state::program_map(address_map &map) +{ + map(0x00000000, 0x0007ffff).rom(); +} + + +static INPUT_PORTS_START( dynasty ) + PORT_START("IN0") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN1") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN2") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("DSW1") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW1:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW1:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW1:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW1:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW1:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW1:8") +INPUT_PORTS_END + + +static GFXDECODE_START( gfx_dyna_d0703 ) + // TODO +GFXDECODE_END + + +void dyna_d0703_state::dyna_d0703(machine_config &config) +{ + ARM7(config, m_maincpu, 25.2_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &dyna_d0703_state::program_map); + + RTC62421(config, "rtc", 32.768_kHz_XTAL); + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); // TODO + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); + screen.set_size(64*8, 64*8); + screen.set_visarea(0, 64*8-1, 0, 32*8-1); + screen.set_screen_update(FUNC(dyna_d0703_state::screen_update)); + + GFXDECODE(config, "gfxdecode", "palette", gfx_dyna_d0703); + + PALETTE(config, "palette").set_entries(0x100); // TODO + + // sound hardware + SPEAKER(config, "mono").front_center(); + // TODO: identify +} + + +ROM_START( dynasty ) // DYNASTY Ver.1.02 at 0x10000 in ROM + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD( "dynasty_ver_102.j11", 0x00000, 0x80000, CRC(c52b5482) SHA1(7c63f1817f30d40362af51f6ccb549e42dcd6fe2) ) + + ROM_REGION( 0x1100100, "unsorted", 0 ) + ROM_LOAD( "a29800uv.h11", 0x0000000, 0x0100000, CRC(592fe6e6) SHA1(9775182eb9038034e3667dcfeeb914a8978f42a8) ) + ROM_LOAD( "m29w128gh.f11", 0x0100000, 0x1000100, CRC(5153985e) SHA1(3cf995080e1e716567c300f2004b1310097ab843) ) + +ROM_END + +} // anonymous namespace + + +GAME( 2009, dynasty, 0, dyna_d0703, dynasty, dyna_d0703_state, empty_init, ROT0, "Dyna", "Dynasty (Ver. 1.02)", MACHINE_IS_SKELETON ) diff --git a/src/mame/skeleton/whtm68k.cpp b/src/mame/skeleton/whtm68k.cpp index 52312588ec9..f923ad82c06 100644 --- a/src/mame/skeleton/whtm68k.cpp +++ b/src/mame/skeleton/whtm68k.cpp @@ -26,7 +26,12 @@ K-665 sound chip (Oki M6295 clone) TODO: -- everything. Currently stops with 'BK RAM ERROR'. +- correct GFX decoding; +- hook up RAMDAC devices / colors; +- audio CPU ROM banking; +- CRTC?; +- inputs; +- lamps. */ @@ -34,6 +39,8 @@ TODO: #include "cpu/m68000/m68000.h" #include "cpu/mcs51/mcs51.h" +#include "machine/gen_latch.h" +#include "machine/nvram.h" #include "sound/okim6295.h" #include "sound/ymopl.h" #include "video/mc6845.h" @@ -64,7 +71,8 @@ public: driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), - m_txtram(*this, "txtram") + m_bgram(*this, "bgram"), + m_fgram(*this, "fgram") { } void unkwht(machine_config &config) ATTR_COLD; @@ -75,54 +83,91 @@ protected: private: required_device m_maincpu; required_device m_gfxdecode; - required_shared_ptr m_txtram; + required_shared_ptr m_bgram; + required_shared_ptr m_fgram; - tilemap_t *m_txt_tilemap = nullptr; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; - TILE_GET_INFO_MEMBER(get_txt_tile_info); - void txtram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + TILE_GET_INFO_MEMBER(get_bg_tile_info); + TILE_GET_INFO_MEMBER(get_fg_tile_info); + void bgram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void fgram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void main_program_map(address_map &map) ATTR_COLD; void audio_program_map(address_map &map) ATTR_COLD; void audio_io_map(address_map &map) ATTR_COLD; + void ramdac_map(address_map &map) ATTR_COLD; + void ramdac2_map(address_map &map) ATTR_COLD; }; void whtm68k_state::video_start() { - m_txt_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(whtm68k_state::get_txt_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); + m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(whtm68k_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); + m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(whtm68k_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); + + m_fg_tilemap->set_transparent_pen(0); } // TODO: wrong, just to show something -TILE_GET_INFO_MEMBER(whtm68k_state::get_txt_tile_info) +TILE_GET_INFO_MEMBER(whtm68k_state::get_bg_tile_info) +{ + uint16_t const tile = m_bgram[tile_index] & 0xfff; + uint16_t const attr = m_bgram[tile_index] & 0xf000 >> 12; + tileinfo.set(0, tile, attr, 0); +} + +TILE_GET_INFO_MEMBER(whtm68k_state::get_fg_tile_info) { - int const tile = m_txtram[tile_index] & 0xfff; - tileinfo.set(0, tile, 0, 0); + uint16_t const tile = ((m_fgram[tile_index] & 0xfff) | 0x1000); // TODO: actually find tile bank + uint16_t const attr = m_fgram[tile_index] & 0xf000 >> 12; + tileinfo.set(0, tile, attr, 0); } uint32_t whtm68k_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { bitmap.fill(rgb_t::black(), cliprect); - m_txt_tilemap->draw(screen, bitmap, cliprect, 0, 0); + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); return 0; } -void whtm68k_state::txtram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void whtm68k_state::bgram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + COMBINE_DATA(&m_bgram[offset]); + m_bg_tilemap->mark_tile_dirty(offset); +} + +void whtm68k_state::fgram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { - COMBINE_DATA(&m_txtram[offset]); - m_txt_tilemap->mark_tile_dirty(offset); + COMBINE_DATA(&m_fgram[offset]); + m_fg_tilemap->mark_tile_dirty(offset); } + void whtm68k_state::main_program_map(address_map &map) { map(0x000000, 0x03ffff).rom(); - map(0xd00000, 0xd03fff).ram().w(FUNC(whtm68k_state::txtram_w)).share(m_txtram); - map(0xd10000, 0xd13fff).ram(); - map(0xd20000, 0xd23fff).ram(); - map(0xe00000, 0xe03fff).ram(); + map(0x800100, 0x800101).nopw(); //TODO: map(0x800101, 0x800101).w("ramdac", FUNC(ramdac_device::index_w)); + map(0x800102, 0x800103).nopw(); //TODO: map(0x800103, 0x800103).w("ramdac", FUNC(ramdac_device::mask_w)); + map(0x800104, 0x800105).nopw(); //TODO: map(0x800105, 0x800105).w("ramdac", FUNC(ramdac_device::pal_w)); + map(0x800200, 0x800201).nopw(); //TODO: map(0x800201, 0x800201).w("ramdac2", FUNC(ramdac_device::index_w)); + map(0x800202, 0x800203).nopw(); //TODO: map(0x800203, 0x800203).w("ramdac2", FUNC(ramdac_device::mask_w)); + map(0x800204, 0x800205).nopw(); //TODO: map(0x800205, 0x800205).w("ramdac2", FUNC(ramdac_device::pal_w)); + map(0x810002, 0x810003).portr("IN0"); + map(0x810100, 0x810101).portr("DSW1"); // ?? + map(0x810300, 0x810301).portr("DSW2"); // ?? + map(0x810401, 0x810401).w("soundlatch", FUNC(generic_latch_8_device::write)); + map(0xd00000, 0xd03fff).ram().w(FUNC(whtm68k_state::bgram_w)).share(m_bgram); + map(0xd10000, 0xd13fff).ram().w(FUNC(whtm68k_state::fgram_w)).share(m_fgram); + map(0xd20000, 0xd23fff).ram(); // attribute RAM? or third bitmap? + map(0xe00000, 0xe03fff).ram(); // work RAM? + map(0xe10000, 0xe10fff).ram().share("nvram"); + map(0xe30000, 0xe30001).nopr(); // TODO: read continuously during gameplay } void whtm68k_state::audio_program_map(address_map &map) @@ -135,22 +180,31 @@ void whtm68k_state::audio_io_map(address_map &map) { map(0x8000, 0x803f).ram(); // ?? map(0xa000, 0xa000).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - // some kind of latch with the main CPU or inputs? Returning rand activates the sound chips. - map(0xb000, 0xb000).nopr();//lr8(NAME([this] () -> uint8_t { return machine().rand(); })); + map(0xb000, 0xb000).r("soundlatch", FUNC(generic_latch_8_device::read)).nopw(); // TODO: write? latch acknowledge? map(0xc000, 0xc001).w("ym", FUNC(ym2413_device::write)); } +void whtm68k_state::ramdac_map(address_map &map) +{ + map(0x000, 0x2ff).rw("ramdac", FUNC(ramdac_device::ramdac_pal_r), FUNC(ramdac_device::ramdac_rgb666_w)); +} + +void whtm68k_state::ramdac2_map(address_map &map) +{ + map(0x000, 0x2ff).rw("ramdac2", FUNC(ramdac_device::ramdac_pal_r), FUNC(ramdac_device::ramdac_rgb666_w)); +} + static INPUT_PORTS_START( unkwht ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) // Coin related? Gives 'coin jam if pressed' + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) // Coin + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(4) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(4) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(4) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(4) PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -200,14 +254,14 @@ const gfx_layout gfx_8x8x4_packed_msb_r = 8,8, RGN_FRAC(1,1), 4, - { STEP4(0,1) }, + { STEP4(3,-1) }, { STEP8(28,-4) }, { STEP8(0,4*8) }, 8*8*4 }; static GFXDECODE_START( gfx_wht ) - GFXDECODE_ENTRY( "tiles", 0, gfx_8x8x4_packed_msb_r, 0, 16 ) + GFXDECODE_ENTRY( "tiles", 0, gfx_8x8x4_packed_msb_r, 0, 16 ) GFXDECODE_END @@ -216,13 +270,13 @@ void whtm68k_state::unkwht(machine_config &config) // basic machine hardware M68000(config, m_maincpu, 24_MHz_XTAL / 2); m_maincpu->set_addrmap(AS_PROGRAM, &whtm68k_state::main_program_map); - m_maincpu->set_vblank_int("screen", FUNC(whtm68k_state::irq2_line_hold)); + m_maincpu->set_vblank_int("screen", FUNC(whtm68k_state::irq1_line_hold)); i80c32_device &audiocpu(I80C32(config, "audiocpu", 12_MHz_XTAL)); audiocpu.set_addrmap(AS_PROGRAM, &whtm68k_state::audio_program_map); audiocpu.set_addrmap(AS_IO, &whtm68k_state::audio_io_map); audiocpu.port_in_cb<0>().set([this] () { LOGPORTS("%s: 80C32 port 0 read\n", machine().describe_context()); return 0; }); - audiocpu.port_in_cb<1>().set([this] () { LOGPORTS("%s: 80C32 port 1 read\n", machine().describe_context()); return 0; }); + audiocpu.port_in_cb<1>().set([this] () { LOGPORTS("%s: 80C32 port 1 read\n", machine().describe_context()); return 0; }); // TODO: read all the time audiocpu.port_in_cb<2>().set([this] () { LOGPORTS("%s: 80C32 port 2 read\n", machine().describe_context()); return 0; }); audiocpu.port_in_cb<3>().set([this] () { LOGPORTS("%s: 80C32 port 3 read\n", machine().describe_context()); return 0; }); audiocpu.port_out_cb<0>().set([this] (uint8_t data) { LOGPORTS("%s: 80C32 port 0 write %02x\n", machine().describe_context(), data); }); @@ -230,10 +284,12 @@ void whtm68k_state::unkwht(machine_config &config) audiocpu.port_out_cb<2>().set([this] (uint8_t data) { LOGPORTS("%s: 80C32 port 2 write %02x\n", machine().describe_context(), data); }); audiocpu.port_out_cb<3>().set([this] (uint8_t data) { LOGPORTS("%s: 80C32 port 3 write %02x\n", machine().describe_context(), data); }); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); // TODO: everything screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); - screen.set_size(32*8, 32*8); + screen.set_size(512, 512); screen.set_visarea_full(); screen.set_screen_update(FUNC(whtm68k_state::screen_update)); @@ -242,15 +298,18 @@ void whtm68k_state::unkwht(machine_config &config) crtc.set_show_border_area(false); crtc.set_char_width(8); - RAMDAC(config, "ramdac", 0, "palette"); // MU9C4870-80PC - RAMDAC(config, "ramdac2", 0, "palette"); // MU9C4870-80PC + RAMDAC(config, "ramdac", 0, "palette").set_addrmap(0, &whtm68k_state::ramdac_map); // MU9C4870-80PC + RAMDAC(config, "ramdac2", 0, "palette2").set_addrmap(0, &whtm68k_state::ramdac2_map); // MU9C4870-80PC GFXDECODE(config, "gfxdecode", "palette", gfx_wht); - PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x400); // TODO + PALETTE(config, "palette").set_entries(0x100); // TODO + PALETTE(config, "palette2").set_entries(0x100); // TODO + + GENERIC_LATCH_8(config, "soundlatch"); SPEAKER(config, "mono").front_center(); - YM2413(config, "ym", 3.579545_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 1.0); // KB89C67? + YM2413(config, "ym", 3.579545_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 1.0); // KB89C67? OKIM6295(config, "oki", 12_MHz_XTAL / 12, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock and pin 7 not verified } -- cgit v1.2.3