mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
topland: Fix the background gradient [O. Galibert]
This commit is contained in:
parent
47fe92a260
commit
2430775b33
@ -138,7 +138,9 @@ the TMS320C25 is being used as a co-processor to relieve the
|
||||
along with the 68000.
|
||||
|
||||
Gradiation RAM is used to display a rotatable gradient background.
|
||||
The rotation is most likely handled by the TC0430GRW ROZ chip.
|
||||
The rotation is handled by the TC0430GRW ROZ chip which outputs
|
||||
coordinates for a X=a1+b1*x+c1*y, Y=a2+b2*x+c2*y mapping. The
|
||||
coordinates are used unconventionally as indices in a color palette.
|
||||
|
||||
"Power common ram" is for communication with a processor
|
||||
controlling the sit-in-cabinet (deluxe mechanized version only).
|
||||
@ -160,7 +162,7 @@ DIPs are the same as topland, which is clearly wrong if you try
|
||||
them ("SWB:7,8" do not set Coin B to multiple credits for each
|
||||
coin!)
|
||||
|
||||
Therefore, some verificiation could still be needed, once the
|
||||
Therefore, some verification could still be needed, once the
|
||||
emulation is complete.
|
||||
|
||||
|
||||
@ -391,7 +393,7 @@ static ADDRESS_MAP_START( airsys_map, AS_PROGRAM, 16, taitoair_state )
|
||||
AM_RANGE(0x906000, 0x906007) AM_RAM // DMA?
|
||||
AM_RANGE(0x908000, 0x90ffff) AM_RAM AM_SHARE("line_ram") /* "line ram" */
|
||||
AM_RANGE(0x910000, 0x91ffff) AM_RAM AM_SHARE("dsp_ram") /* "dsp common ram" (TMS320C25) */
|
||||
AM_RANGE(0x980000, 0x98000f) AM_RAM AM_SHARE("backregs") /* TC0430GRW? */
|
||||
AM_RANGE(0x980000, 0x98000f) AM_RAM AM_SHARE("tc0430grw") /* TC0430GRW roz transform coefficients */
|
||||
AM_RANGE(0xa00000, 0xa00007) AM_READ(stick_input_r)
|
||||
AM_RANGE(0xa00100, 0xa00107) AM_READ(stick2_input_r)
|
||||
AM_RANGE(0xa00200, 0xa0020f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0x00ff) /* other I/O */
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
m_dsp_ram(*this, "dsp_ram"),
|
||||
m_paletteram(*this, "paletteram"),
|
||||
m_gradram(*this, "gradram"),
|
||||
m_backregs(*this, "backregs"),
|
||||
m_tc0430grw(*this, "tc0430grw"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_dsp(*this, "dsp"),
|
||||
@ -49,7 +49,7 @@ public:
|
||||
required_shared_ptr<UINT16> m_dsp_ram; // Shared 68000/TMS32025 RAM
|
||||
required_shared_ptr<UINT16> m_paletteram;
|
||||
required_shared_ptr<UINT16> m_gradram;
|
||||
required_shared_ptr<UINT16> m_backregs;
|
||||
required_shared_ptr<UINT16> m_tc0430grw;
|
||||
|
||||
/* video-related */
|
||||
taitoair_poly m_q;
|
||||
|
@ -575,36 +575,43 @@ UINT32 taitoair_state::screen_update_taitoair(screen_device &screen, bitmap_ind1
|
||||
{
|
||||
m_tc0080vco->tilemap_update();
|
||||
|
||||
bitmap.fill(0, cliprect);
|
||||
UINT32 counter1 = (m_tc0430grw[0] << 16) | m_tc0430grw[1];
|
||||
UINT32 inc1x = INT16(m_tc0430grw[2]);
|
||||
UINT32 inc1y = INT16(m_tc0430grw[3]);
|
||||
UINT32 counter2 = (m_tc0430grw[4] << 16) | m_tc0430grw[5];
|
||||
UINT32 inc2x = INT16(m_tc0430grw[6]);
|
||||
UINT32 inc2y = INT16(m_tc0430grw[7]);
|
||||
|
||||
{
|
||||
int x,y;
|
||||
// Deltas are 118/31
|
||||
int dx = cliprect.min_x + 118;
|
||||
int dy = cliprect.min_y - 48 + 31;
|
||||
|
||||
/*
|
||||
[0x980000-3] dword for Y 0
|
||||
[0x980004-7] dword for rotation param 0
|
||||
[0x980008-b] dword for Y 1
|
||||
[0x98000c-f] dword for rotation param 1
|
||||
*/
|
||||
counter1 += dx*inc1x + dy*inc1y;
|
||||
counter2 += dx*inc2x + dy*inc2y;
|
||||
|
||||
for(y=cliprect.min_y;y<cliprect.max_y/2;y++)
|
||||
{
|
||||
for(x=cliprect.min_x;x<cliprect.max_x;x++)
|
||||
{
|
||||
bitmap.pix16(y, x) = 0x2000 + (0x3f - ((y >> 2) & 0x3f));
|
||||
for(int y = cliprect.min_y; y <= cliprect.max_y; y++) {
|
||||
UINT32 c1b = counter1;
|
||||
UINT32 c2b = counter2;
|
||||
UINT16 *dest = &bitmap.pix(y, cliprect.min_x);
|
||||
for(int x = cliprect.min_x; x <= cliprect.max_x; x++) {
|
||||
UINT16 base = 0;
|
||||
UINT32 cntr = 0;
|
||||
if(c2b & 0x800000) {
|
||||
base = 0x2040;
|
||||
cntr = c2b;
|
||||
} else if(c1b & 0x800000) {
|
||||
base = 0x2000;
|
||||
cntr = c1b;
|
||||
}
|
||||
*dest++ = base | (cntr >= 0x83f000 ? 0x3f : (cntr >> 12) & 0x3f);
|
||||
|
||||
c1b += inc1x;
|
||||
c2b += inc2x;
|
||||
}
|
||||
|
||||
#if 0
|
||||
for(y=cliprect.max_y/2;y<cliprect.max_y;y++)
|
||||
{
|
||||
for(x=cliprect.min_x;x<cliprect.max_x;x++)
|
||||
{
|
||||
bitmap.pix16(y, x) = 0x2040 + (0x3f - ((y >> 2) & 0x3f));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
counter1 += inc1y;
|
||||
counter2 += inc2y;
|
||||
}
|
||||
|
||||
|
||||
m_tc0080vco->tilemap_draw(screen, bitmap, cliprect, 0, 0, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user