mirror of
https://github.com/holub/mame
synced 2025-07-03 09:06:08 +03:00
Fix funcube, may have side effects on ablastb which really doesn't work on the first place so I do not really care
This commit is contained in:
parent
a06478bd85
commit
31bbc684d2
@ -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));
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user