mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
namcos22: another small optimization (nw)
This commit is contained in:
parent
4d21877432
commit
583f9ae37c
@ -2115,27 +2115,20 @@ void namcos22_state::point_write(offs_t offs, uint32_t data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t namcos22_state::point_read(int32_t addr)
|
int32_t namcos22_state::pointram_read(offs_t offs) // called from point_read
|
||||||
{
|
{
|
||||||
if (addr < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
// point rom
|
|
||||||
else if (addr < m_pointrom_size)
|
|
||||||
return m_pointrom[addr];
|
|
||||||
|
|
||||||
// point ram, only used in ram test?
|
// point ram, only used in ram test?
|
||||||
int32_t result = 0;
|
int32_t result = 0;
|
||||||
if (m_is_ss22)
|
if (m_is_ss22)
|
||||||
{
|
{
|
||||||
if (addr >= 0xf80000 && addr < 0xfa0000)
|
if (offs >= 0xf80000 && offs < 0xfa0000)
|
||||||
result = m_pointram[addr - 0xf80000];
|
result = m_pointram[offs - 0xf80000];
|
||||||
else return -1;
|
else return -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (addr >= 0xf00000 && addr < 0xf20000)
|
if (offs >= 0xf00000 && offs < 0xf20000)
|
||||||
result = m_pointram[addr - 0xf00000];
|
result = m_pointram[offs - 0xf00000];
|
||||||
else return -1;
|
else return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2163,12 +2156,12 @@ WRITE16_MEMBER(namcos22_state::point_hiword_w)
|
|||||||
|
|
||||||
READ16_MEMBER(namcos22_state::point_loword_r)
|
READ16_MEMBER(namcos22_state::point_loword_r)
|
||||||
{
|
{
|
||||||
return point_read(m_point_address & 0x00ffffff) & 0xffff;
|
return point_read(m_point_address) & 0xffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
READ16_MEMBER(namcos22_state::point_hiword_ir)
|
READ16_MEMBER(namcos22_state::point_hiword_ir)
|
||||||
{
|
{
|
||||||
return point_read(m_point_address++ & 0x00ffffff) >> 16 & 0xffff;
|
return point_read(m_point_address++) >> 16 & 0xffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2219,7 +2212,7 @@ READ16_MEMBER(namcos22_state::pdp_begin_r)
|
|||||||
/* read word from point ram */
|
/* read word from point ram */
|
||||||
srcAddr = pdp_polygonram_read(offs++); /* 32 bit PointRAM address */
|
srcAddr = pdp_polygonram_read(offs++); /* 32 bit PointRAM address */
|
||||||
dstAddr = pdp_polygonram_read(offs++); /* CommRAM address; receives 24 bit PointRAM data */
|
dstAddr = pdp_polygonram_read(offs++); /* CommRAM address; receives 24 bit PointRAM data */
|
||||||
data = point_read(srcAddr & 0x00ffffff);
|
data = point_read(srcAddr);
|
||||||
pdp_polygonram_write(dstAddr, data);
|
pdp_polygonram_write(dstAddr, data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2242,7 +2235,7 @@ READ16_MEMBER(namcos22_state::pdp_begin_r)
|
|||||||
numWords = pdp_polygonram_read(offs++); /* block size */
|
numWords = pdp_polygonram_read(offs++); /* block size */
|
||||||
while (numWords--)
|
while (numWords--)
|
||||||
{
|
{
|
||||||
data = point_read(srcAddr++ & 0x00ffffff);
|
data = point_read(srcAddr++);
|
||||||
pdp_polygonram_write(dstAddr++, data);
|
pdp_polygonram_write(dstAddr++, data);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2265,7 +2258,7 @@ READ16_MEMBER(namcos22_state::pdp_begin_r)
|
|||||||
numWords = pdp_polygonram_read(offs++);
|
numWords = pdp_polygonram_read(offs++);
|
||||||
while (numWords--)
|
while (numWords--)
|
||||||
{
|
{
|
||||||
data = point_read(srcAddr++ & 0x00ffffff);
|
data = point_read(srcAddr++);
|
||||||
point_write(dstAddr++, data);
|
point_write(dstAddr++, data);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -382,6 +382,8 @@ private:
|
|||||||
uint32_t pdp_polygonram_read(offs_t offs);
|
uint32_t pdp_polygonram_read(offs_t offs);
|
||||||
void pdp_polygonram_write(offs_t offs, uint32_t data);
|
void pdp_polygonram_write(offs_t offs, uint32_t data);
|
||||||
void point_write(offs_t offs, uint32_t data);
|
void point_write(offs_t offs, uint32_t data);
|
||||||
|
int32_t pointram_read(offs_t offs);
|
||||||
|
inline int32_t point_read(offs_t offs) { offs &= 0x00ffffff; return (offs < m_pointrom_size) ? m_pointrom[offs] : pointram_read(offs); }
|
||||||
void master_enable(bool enable);
|
void master_enable(bool enable);
|
||||||
void slave_enable(bool enable);
|
void slave_enable(bool enable);
|
||||||
|
|
||||||
@ -402,7 +404,6 @@ private:
|
|||||||
void slavesim_handle_233002(const int32_t *src);
|
void slavesim_handle_233002(const int32_t *src);
|
||||||
void simulate_slavedsp(bitmap_rgb32 &bitmap);
|
void simulate_slavedsp(bitmap_rgb32 &bitmap);
|
||||||
|
|
||||||
int32_t point_read(int32_t addr);
|
|
||||||
void init_tables();
|
void init_tables();
|
||||||
void update_mixer();
|
void update_mixer();
|
||||||
void update_palette();
|
void update_palette();
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
* + cybrcomm/victlapw namco logo screen after attract demo
|
* + cybrcomm/victlapw namco logo screen after attract demo
|
||||||
* + airco22b title logo after attract demo
|
* + airco22b title logo after attract demo
|
||||||
* + aquajet namco logo/game over after ending
|
* + aquajet namco logo/game over after ending
|
||||||
* - window clipping is wrong in acedrvrw, victlapw (see rear-view mirrors)
|
* - window clipping is wrong in acedrvrw, victlapw (see rear-view mirrors), and alpinr2b character selection screen
|
||||||
* - ridgerac waving flag title screen is missing, just an empty beach scenery instead
|
* - ridgerac waving flag title screen is missing, just an empty beach scenery instead
|
||||||
* - global offset is wrong in non-super22 servicemode video test, and above that, it flickers in acedrvrw, victlapw
|
* - global offset is wrong in non-super22 servicemode video test, and above that, it flickers in acedrvrw, victlapw
|
||||||
* - dirtdash polys are broken at the start section of the mountain level, maybe bad rom?
|
* - dirtdash polys are broken at the start section of the mountain level, maybe bad rom?
|
||||||
|
Loading…
Reference in New Issue
Block a user