mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
pgm.cpp : Fix object finder, Remove unused things (#3448)
* pgm.cpp : Fix object finder, Remove unused things * pgm.cpp : Fix build
This commit is contained in:
parent
e50bff084d
commit
caf9eb6576
@ -501,8 +501,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(pgm_state::pgm_interrupt)
|
|||||||
MACHINE_START_MEMBER(pgm_state,pgm)
|
MACHINE_START_MEMBER(pgm_state,pgm)
|
||||||
{
|
{
|
||||||
// machine().base_datetime(m_systime);
|
// machine().base_datetime(m_systime);
|
||||||
|
|
||||||
m_ics = machine().device("ics");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_RESET_MEMBER(pgm_state,pgm)
|
MACHINE_RESET_MEMBER(pgm_state,pgm)
|
||||||
|
@ -24,20 +24,22 @@ class pgm_state : public driver_device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
pgm_state(const machine_config &mconfig, device_type type, const char *tag)
|
pgm_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag)
|
||||||
m_videoregs(*this, "videoregs"),
|
, m_videoregs(*this, "videoregs")
|
||||||
m_videoram(*this, "videoram"),
|
, m_videoram(*this, "videoram")
|
||||||
m_z80_mainram(*this, "z80_mainram"),
|
, m_z80_mainram(*this, "z80_mainram")
|
||||||
m_mainram(*this, "sram"),
|
, m_mainram(*this, "sram")
|
||||||
m_maincpu(*this, "maincpu"),
|
, m_maincpu(*this, "maincpu")
|
||||||
m_soundcpu(*this, "soundcpu"),
|
, m_soundcpu(*this, "soundcpu")
|
||||||
m_gfxdecode(*this, "gfxdecode"),
|
, m_gfxdecode(*this, "gfxdecode")
|
||||||
m_palette(*this, "palette"),
|
, m_palette(*this, "palette")
|
||||||
m_soundlatch(*this, "soundlatch"),
|
, m_soundlatch(*this, "soundlatch")
|
||||||
m_soundlatch3(*this, "soundlatch3")
|
, m_soundlatch3(*this, "soundlatch3")
|
||||||
{
|
, m_ics(*this, "ics")
|
||||||
m_irq4_disabled = 0;
|
, m_bdata(*this, "sprmask")
|
||||||
}
|
{
|
||||||
|
m_irq4_disabled = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<uint16_t> m_videoregs;
|
required_shared_ptr<uint16_t> m_videoregs;
|
||||||
@ -52,10 +54,8 @@ public:
|
|||||||
std::unique_ptr<uint16_t[]> m_spritebufferram; // buffered spriteram
|
std::unique_ptr<uint16_t[]> m_spritebufferram; // buffered spriteram
|
||||||
|
|
||||||
/* video-related */
|
/* video-related */
|
||||||
tilemap_t *m_bg_tilemap;
|
tilemap_t *m_bg_tilemap;
|
||||||
tilemap_t *m_tx_tilemap;
|
tilemap_t *m_tx_tilemap;
|
||||||
uint16_t *m_sprite_temp_render;
|
|
||||||
bitmap_rgb32 m_tmppgmbitmap;
|
|
||||||
|
|
||||||
/* devices */
|
/* devices */
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
@ -64,11 +64,10 @@ public:
|
|||||||
required_device<palette_device> m_palette;
|
required_device<palette_device> m_palette;
|
||||||
required_device<generic_latch_8_device> m_soundlatch;
|
required_device<generic_latch_8_device> m_soundlatch;
|
||||||
required_device<generic_latch_8_device> m_soundlatch3;
|
required_device<generic_latch_8_device> m_soundlatch3;
|
||||||
device_t *m_ics;
|
required_device<ics2115_device> m_ics;
|
||||||
|
|
||||||
/* used by rendering */
|
/* used by rendering */
|
||||||
uint8_t *m_bdata;
|
required_region_ptr<uint8_t> m_bdata;
|
||||||
size_t m_bdatasize;
|
|
||||||
int m_aoffset;
|
int m_aoffset;
|
||||||
int m_boffset;
|
int m_boffset;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ void pgm_state::draw_sprite_line( int wide, uint16_t* dest, uint8_t* destpri, in
|
|||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
msk = ((m_bdata[(m_boffset + 1) & m_bdatasize] << 8) |( m_bdata[(m_boffset + 0) & m_bdatasize] << 0));
|
msk = ((m_bdata[(m_boffset + 1) & m_bdata.mask()] << 8) |( m_bdata[(m_boffset + 0) & m_bdata.mask()] << 0));
|
||||||
|
|
||||||
for (x = 0; x < 16; x++)
|
for (x = 0; x < 16; x++)
|
||||||
{
|
{
|
||||||
@ -177,8 +177,8 @@ void pgm_state::draw_sprite_new_zoomed( int wide, int high, int xpos, int ypos,
|
|||||||
int xcnt = 0;
|
int xcnt = 0;
|
||||||
|
|
||||||
|
|
||||||
m_aoffset = (m_bdata[(m_boffset + 3) & m_bdatasize] << 24) | (m_bdata[(m_boffset + 2) & m_bdatasize] << 16) |
|
m_aoffset = (m_bdata[(m_boffset + 3) & m_bdata.mask()] << 24) | (m_bdata[(m_boffset + 2) & m_bdata.mask()] << 16) |
|
||||||
(m_bdata[(m_boffset + 1) & m_bdatasize] << 8) | (m_bdata[(m_boffset + 0) & m_bdatasize] << 0);
|
(m_bdata[(m_boffset + 1) & m_bdata.mask()] << 8) | (m_bdata[(m_boffset + 0) & m_bdata.mask()] << 0);
|
||||||
m_aoffset = m_aoffset >> 2; m_aoffset *= 3;
|
m_aoffset = m_aoffset >> 2; m_aoffset *= 3;
|
||||||
|
|
||||||
m_boffset+=4;
|
m_boffset+=4;
|
||||||
@ -344,7 +344,7 @@ void pgm_state::draw_sprite_line_basic( int wide, uint16_t* dest, uint8_t* destp
|
|||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
msk = ((m_bdata[(m_boffset + 1) & m_bdatasize] << 8) |( m_bdata[(m_boffset + 0) & m_bdatasize] << 0));
|
msk = ((m_bdata[(m_boffset + 1) & m_bdata.mask()] << 8) |( m_bdata[(m_boffset + 0) & m_bdata.mask()] << 0));
|
||||||
|
|
||||||
for (x = 0; x < 16; x++)
|
for (x = 0; x < 16; x++)
|
||||||
{
|
{
|
||||||
@ -386,7 +386,7 @@ void pgm_state::draw_sprite_line_basic( int wide, uint16_t* dest, uint8_t* destp
|
|||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
msk = ((m_bdata[(m_boffset + 1) & m_bdatasize] << 8) |( m_bdata[(m_boffset + 0) & m_bdatasize] << 0));
|
msk = ((m_bdata[(m_boffset + 1) & m_bdata.mask()] << 8) |( m_bdata[(m_boffset + 0) & m_bdata.mask()] << 0));
|
||||||
|
|
||||||
for (x = 0; x < 16; x++)
|
for (x = 0; x < 16; x++)
|
||||||
{
|
{
|
||||||
@ -437,8 +437,8 @@ void pgm_state::draw_sprite_new_basic( int wide, int high, int xpos, int ypos, i
|
|||||||
uint8_t* destpri;
|
uint8_t* destpri;
|
||||||
int ycntdraw;
|
int ycntdraw;
|
||||||
|
|
||||||
m_aoffset = (m_bdata[(m_boffset + 3) & m_bdatasize] << 24) | (m_bdata[(m_boffset + 2) & m_bdatasize] << 16) |
|
m_aoffset = (m_bdata[(m_boffset + 3) & m_bdata.mask()] << 24) | (m_bdata[(m_boffset + 2) & m_bdata.mask()] << 16) |
|
||||||
(m_bdata[(m_boffset + 1) & m_bdatasize] << 8) | (m_bdata[(m_boffset + 0) & m_bdatasize] << 0);
|
(m_bdata[(m_boffset + 1) & m_bdata.mask()] << 8) | (m_bdata[(m_boffset + 0) & m_bdata.mask()] << 0);
|
||||||
m_aoffset = m_aoffset >> 2; m_aoffset *= 3;
|
m_aoffset = m_aoffset >> 2; m_aoffset *= 3;
|
||||||
|
|
||||||
m_boffset+=4;
|
m_boffset+=4;
|
||||||
@ -615,8 +615,6 @@ VIDEO_START_MEMBER(pgm_state,pgm)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
m_bdata = memregion("sprmask")->base();
|
|
||||||
m_bdatasize = memregion("sprmask")->bytes() - 1;
|
|
||||||
m_aoffset = 0;
|
m_aoffset = 0;
|
||||||
m_boffset = 0;
|
m_boffset = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user