iqblock.c: fix paletteram regression, cleanup (nw)

This commit is contained in:
Alex W. Jackson 2014-04-24 02:57:58 +00:00
parent abaff58802
commit 0f281a617c
4 changed files with 11 additions and 38 deletions

View File

@ -92,11 +92,6 @@ WRITE8_MEMBER(iqblock_state::iqblock_irqack_w)
m_maincpu->set_input_line(0, CLEAR_LINE); m_maincpu->set_input_line(0, CLEAR_LINE);
} }
READ8_MEMBER(iqblock_state::extrarom_r)
{
return memregion("user1")->base()[offset];
}
WRITE8_MEMBER(iqblock_state::port_C_w) WRITE8_MEMBER(iqblock_state::port_C_w)
{ {
@ -120,16 +115,15 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( main_portmap, AS_IO, 8, iqblock_state ) static ADDRESS_MAP_START( main_portmap, AS_IO, 8, iqblock_state )
AM_RANGE(0x2000, 0x23ff) AM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0x2000, 0x23ff) AM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0x2800, 0x2bff) AM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext") AM_RANGE(0x2800, 0x2bff) AM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext")
AM_RANGE(0x6000, 0x603f) AM_WRITE(iqblock_fgscroll_w)
AM_RANGE(0x6800, 0x69ff) AM_WRITE(iqblock_fgvideoram_w) /* initialized up to 6fff... bug or larger tilemap? */
AM_RANGE(0x7000, 0x7fff) AM_WRITE(iqblock_bgvideoram_w)
AM_RANGE(0x5080, 0x5083) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) AM_RANGE(0x5080, 0x5083) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE(0x5090, 0x5090) AM_READ_PORT("SW0") AM_RANGE(0x5090, 0x5090) AM_READ_PORT("SW0")
AM_RANGE(0x50a0, 0x50a0) AM_READ_PORT("SW1") AM_RANGE(0x50a0, 0x50a0) AM_READ_PORT("SW1")
AM_RANGE(0x50b0, 0x50b1) AM_DEVWRITE("ymsnd", ym2413_device, write) // UM3567_data_port_0_w AM_RANGE(0x50b0, 0x50b1) AM_DEVWRITE("ymsnd", ym2413_device, write) // UM3567_data_port_0_w
AM_RANGE(0x50c0, 0x50c0) AM_WRITE(iqblock_irqack_w) AM_RANGE(0x50c0, 0x50c0) AM_WRITE(iqblock_irqack_w)
AM_RANGE(0x7000, 0x7fff) AM_READ(iqblock_bgvideoram_r) AM_RANGE(0x6000, 0x603f) AM_WRITE(iqblock_fgscroll_w)
AM_RANGE(0x8000, 0xffff) AM_READ(extrarom_r) AM_RANGE(0x6800, 0x69ff) AM_WRITE(iqblock_fgvideoram_w) AM_SHARE("fgvideoram") /* initialized up to 6fff... bug or larger tilemap? */
AM_RANGE(0x7000, 0x7fff) AM_RAM_WRITE(iqblock_bgvideoram_w) AM_SHARE("bgvideoram")
AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION("user1", 0)
ADDRESS_MAP_END ADDRESS_MAP_END
static INPUT_PORTS_START( iqblock ) static INPUT_PORTS_START( iqblock )
@ -433,11 +427,6 @@ DRIVER_INIT_MEMBER(iqblock_state,iqblock)
if ((i & 0x0090) == 0x0010) rom[i] ^= 0x20; if ((i & 0x0090) == 0x0010) rom[i] ^= 0x20;
} }
/* initialize pointers for I/O mapped RAM */
m_generic_paletteram_8.set_target(rom + 0x12000, 0x800);
m_generic_paletteram2_8.set_target(rom + 0x12800, 0x800);
m_fgvideoram = rom + 0x16800;
m_bgvideoram = rom + 0x17000;
m_maincpu->space(AS_PROGRAM).install_write_handler(0xfe26, 0xfe26, write8_delegate(FUNC(iqblock_state::iqblock_prot_w),this)); m_maincpu->space(AS_PROGRAM).install_write_handler(0xfe26, 0xfe26, write8_delegate(FUNC(iqblock_state::iqblock_prot_w),this));
m_video_type=1; m_video_type=1;
} }
@ -455,11 +444,6 @@ DRIVER_INIT_MEMBER(iqblock_state,grndtour)
if ((i & 0x0060) == 0x0040) rom[i] ^= 0x20; if ((i & 0x0060) == 0x0040) rom[i] ^= 0x20;
} }
/* initialize pointers for I/O mapped RAM */
m_generic_paletteram_8.set_target(rom + 0x12000, 0x800);
m_generic_paletteram2_8.set_target(rom + 0x12800, 0x800);
m_fgvideoram = rom + 0x16800;
m_bgvideoram = rom + 0x17000;
m_maincpu->space(AS_PROGRAM).install_write_handler(0xfe39, 0xfe39, write8_delegate(FUNC(iqblock_state::grndtour_prot_w),this)); m_maincpu->space(AS_PROGRAM).install_write_handler(0xfe39, 0xfe39, write8_delegate(FUNC(iqblock_state::grndtour_prot_w),this));
m_video_type=0; m_video_type=0;
} }

View File

@ -54,8 +54,7 @@ public:
m_videoram(*this, "videoram"), m_videoram(*this, "videoram"),
m_gfxdecode(*this, "gfxdecode"), m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"), m_screen(*this, "screen"),
m_palette(*this, "palette"), m_palette(*this, "palette") { }
m_generic_paletteram_16(*this, "paletteram") { }
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu; optional_device<cpu_device> m_audiocpu;
@ -74,7 +73,6 @@ public:
required_device<gfxdecode_device> m_gfxdecode; required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen; required_device<screen_device> m_screen;
required_device<palette_device> m_palette; required_device<palette_device> m_palette;
required_shared_ptr<UINT16> m_generic_paletteram_16;
int m_bullets_base; int m_bullets_base;
int m_sprites_base; int m_sprites_base;

View File

@ -4,19 +4,17 @@ public:
iqblock_state(const machine_config &mconfig, device_type type, const char *tag) iqblock_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag), : driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"), m_maincpu(*this,"maincpu"),
m_rambase(*this, "rambase"),
m_gfxdecode(*this, "gfxdecode"), m_gfxdecode(*this, "gfxdecode"),
m_generic_paletteram_8(*this, "paletteram"), m_rambase(*this, "rambase"),
m_generic_paletteram2_8(*this, "paletteram2") { } m_bgvideoram(*this, "bgvideoram"),
m_fgvideoram(*this, "fgvideoram") { }
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;
required_shared_ptr<UINT8> m_rambase;
required_device<gfxdecode_device> m_gfxdecode; required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<UINT8> m_generic_paletteram_8; required_shared_ptr<UINT8> m_rambase;
required_shared_ptr<UINT8> m_generic_paletteram2_8; required_shared_ptr<UINT8> m_bgvideoram;
required_shared_ptr<UINT8> m_fgvideoram;
UINT8 *m_bgvideoram;
UINT8 *m_fgvideoram;
int m_videoenable; int m_videoenable;
int m_video_type; int m_video_type;
tilemap_t *m_bg_tilemap; tilemap_t *m_bg_tilemap;
@ -25,10 +23,8 @@ public:
DECLARE_WRITE8_MEMBER(iqblock_prot_w); DECLARE_WRITE8_MEMBER(iqblock_prot_w);
DECLARE_WRITE8_MEMBER(grndtour_prot_w); DECLARE_WRITE8_MEMBER(grndtour_prot_w);
DECLARE_WRITE8_MEMBER(iqblock_irqack_w); DECLARE_WRITE8_MEMBER(iqblock_irqack_w);
DECLARE_READ8_MEMBER(extrarom_r);
DECLARE_WRITE8_MEMBER(iqblock_fgvideoram_w); DECLARE_WRITE8_MEMBER(iqblock_fgvideoram_w);
DECLARE_WRITE8_MEMBER(iqblock_bgvideoram_w); DECLARE_WRITE8_MEMBER(iqblock_bgvideoram_w);
DECLARE_READ8_MEMBER(iqblock_bgvideoram_r);
DECLARE_WRITE8_MEMBER(iqblock_fgscroll_w); DECLARE_WRITE8_MEMBER(iqblock_fgscroll_w);
DECLARE_WRITE8_MEMBER(port_C_w); DECLARE_WRITE8_MEMBER(port_C_w);
DECLARE_DRIVER_INIT(grndtour); DECLARE_DRIVER_INIT(grndtour);

View File

@ -63,11 +63,6 @@ WRITE8_MEMBER(iqblock_state::iqblock_bgvideoram_w)
m_bg_tilemap->mark_tile_dirty(offset & 0x7ff); m_bg_tilemap->mark_tile_dirty(offset & 0x7ff);
} }
READ8_MEMBER(iqblock_state::iqblock_bgvideoram_r)
{
return m_bgvideoram[offset];
}
WRITE8_MEMBER(iqblock_state::iqblock_fgscroll_w) WRITE8_MEMBER(iqblock_state::iqblock_fgscroll_w)
{ {
m_fg_tilemap->set_scrolly(offset,data); m_fg_tilemap->set_scrolly(offset,data);