diff options
author | Olivier Galibert <galibert@pobox.com> | 2020-11-27 13:03:04 +0100 |
---|---|---|
committer | Olivier Galibert <galibert@pobox.com> | 2020-11-27 13:03:04 +0100 |
commit | 31bbc684d263703f2bc78c6fc42e895ba3a864b1 (patch) | |
tree | 42e872e64f639a820d37ce6629a70812220ae456 | |
parent | a06478bd852cdaa85d257487496eb02bbb1d61d0 (diff) |
Fix funcube, may have side effects on ablastb which really doesn't work on the first place so I do not really care
-rw-r--r-- | src/mame/drivers/seta2.cpp | 4 | ||||
-rw-r--r-- | src/mame/includes/seta2.h | 9 | ||||
-rw-r--r-- | src/mame/video/seta2.cpp | 17 |
3 files changed, 13 insertions, 17 deletions
diff --git a/src/mame/drivers/seta2.cpp b/src/mame/drivers/seta2.cpp index 07c384021ee..ee2dab7bc93 100644 --- a/src/mame/drivers/seta2.cpp +++ b/src/mame/drivers/seta2.cpp @@ -829,9 +829,9 @@ void funcube_state::funcube_map(address_map &map) map(0x00500001, 0x00500001).rw(m_oki, FUNC(okim9810_device::read_status), FUNC(okim9810_device::write_command)); map(0x00500003, 0x00500003).w(m_oki, FUNC(okim9810_device::write_tmp_register)); - map(0x00800000, 0x0083ffff).rw(FUNC(funcube_state::spriteram_r), FUNC(funcube_state::spriteram_w)).share("spriteram"); + map(0x00800000, 0x0083ffff).rw(FUNC(funcube_state::spriteram_r), FUNC(funcube_state::spriteram_w)); map(0x00840000, 0x0084ffff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette"); // Palette - map(0x00860000, 0x0086003f).ram().w(FUNC(funcube_state::vregs_w)).share("vregs"); + map(0x00860000, 0x0086003f).rw(FUNC(funcube_state::vregs_r), FUNC(funcube_state::vregs_w)); map(0x00c00000, 0x00c002ff).rw(FUNC(funcube_state::nvram_r), FUNC(funcube_state::nvram_w)); diff --git a/src/mame/includes/seta2.h b/src/mame/includes/seta2.h index d35accb8085..f075edf22bf 100644 --- a/src/mame/includes/seta2.h +++ b/src/mame/includes/seta2.h @@ -35,9 +35,9 @@ public: m_x1_bank(*this, "x1_bank_%u", 1U), m_nvram(*this, "nvram"), - m_spriteram(*this, "spriteram"), + m_spriteram(*this, "spriteram", 0x40000, ENDIANNESS_BIG), m_tileram(*this, "tileram"), - m_vregs(*this, "vregs"), + m_vregs(*this, "vregs", 0x40, ENDIANNESS_BIG), m_leds(*this, "led%u", 0U), m_lamps(*this, "lamp%u", 0U) { } @@ -85,6 +85,7 @@ protected: void gundamex_eeprom_w(uint16_t data); void vregs_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t vregs_r(offs_t offset); uint16_t spriteram_r(offs_t offset); void spriteram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); @@ -129,9 +130,9 @@ protected: optional_memory_bank_array<8> m_x1_bank; optional_shared_ptr<uint16_t> m_nvram; - optional_shared_ptr<uint16_t> m_spriteram; + memory_share_creator<uint16_t> m_spriteram; optional_shared_ptr<uint16_t> m_tileram; - optional_shared_ptr<uint16_t> m_vregs; + memory_share_creator<uint16_t> m_vregs; output_finder<7> m_leds; output_finder<11> m_lamps; diff --git a/src/mame/video/seta2.cpp b/src/mame/video/seta2.cpp index cea97916aa6..063b5b1b2ce 100644 --- a/src/mame/video/seta2.cpp +++ b/src/mame/video/seta2.cpp @@ -149,6 +149,11 @@ ***************************************************************************/ +uint16_t seta2_state::vregs_r(offs_t offset) +{ + return m_vregs[offset]; +} + void seta2_state::vregs_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* 02/04 = horizontal display start/end @@ -786,9 +791,6 @@ TIMER_CALLBACK_MEMBER(seta2_state::raster_timer_done) void seta2_state::draw_sprites(bitmap_ind16& bitmap, const rectangle& cliprect) { - if (!m_vregs.found()) - return; // ablastb (bootleg) doesn't have obvious video registers, so just abandon, probably needs a different driver - //printf("yoffset: %04x%04x yzoom: %04x%04x | xoffset: %04x%04x xzoom: %04x%04x \n", m_vregs[0x1a/2], m_vregs[0x18/2], m_vregs[0x1e/2], m_vregs[0x1c/2] , m_vregs[0x12/2], m_vregs[0x10/2], m_vregs[0x16/2], m_vregs[0x14/2]); uint32_t yoffset = (m_vregs[0x1a / 2] << 16) | m_vregs[0x18 / 2]; @@ -897,15 +899,8 @@ uint32_t seta2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, // Black or pen 0? bitmap.fill(m_palette->pen(0), cliprect); - if (m_vregs.found()) - { - if ( (m_vregs[0x30/2] & 1) == 0 ) // 1 = BLANK SCREEN - draw_sprites(bitmap, cliprect); - } - else // ablastb doesn't seem to have the same vregs - { + if ( (m_vregs[0x30/2] & 1) == 0 ) // 1 = BLANK SCREEN draw_sprites(bitmap, cliprect); - } return 0; } |