mirror of
https://github.com/holub/mame
synced 2025-05-16 19:00:43 +03:00
More commands implemented
This commit is contained in:
parent
e25be75dd5
commit
a7334deb14
@ -697,6 +697,26 @@ void h63484_device::command_clr_exec()
|
|||||||
m_rwp[m_rwp_dn] = offset;
|
m_rwp[m_rwp_dn] = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void h63484_device::command_cpy_exec()
|
||||||
|
{
|
||||||
|
INT16 ax, ay;
|
||||||
|
UINT32 src_offset,dst_offset;
|
||||||
|
//int inc_x,inc_y;
|
||||||
|
|
||||||
|
src_offset = ((m_pr[0] & 0xff) << 12) | ((m_pr[1]&0xfff0) >> 4);
|
||||||
|
ax = m_pr[2];
|
||||||
|
ay = m_pr[3];
|
||||||
|
|
||||||
|
//inc_x = (ax < 0) ? -1 : 1;
|
||||||
|
//inc_y = (ay < 0) ? -1 : 1;
|
||||||
|
|
||||||
|
dst_offset = m_rwp[m_rwp_dn] & 0xfffff;
|
||||||
|
|
||||||
|
printf("%08x %08x %d %d\n",src_offset,dst_offset,ax,ay);
|
||||||
|
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
|
||||||
void h63484_device::process_fifo()
|
void h63484_device::process_fifo()
|
||||||
{
|
{
|
||||||
UINT8 data;
|
UINT8 data;
|
||||||
@ -745,6 +765,28 @@ void h63484_device::process_fifo()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case COMMAND_WPTN:
|
||||||
|
if(m_param_ptr == 1)
|
||||||
|
{
|
||||||
|
m_dn = m_pr[0]; // number of param words
|
||||||
|
|
||||||
|
//if(m_dn > 0x10 || m_dn == 0)
|
||||||
|
// fatalerror("stop!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(m_param_ptr == (1 + m_dn))
|
||||||
|
{
|
||||||
|
int pra = m_cr & 0xf;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for(i=0;i<m_dn;i++)
|
||||||
|
m_pram[(i + pra) & 0xf] = m_pr[1 + i];
|
||||||
|
|
||||||
|
command_end_seq();
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case COMMAND_RD:
|
case COMMAND_RD:
|
||||||
if (m_param_ptr == 0)
|
if (m_param_ptr == 0)
|
||||||
{
|
{
|
||||||
@ -756,6 +798,16 @@ void h63484_device::process_fifo()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case COMMAND_WT:
|
||||||
|
if (m_param_ptr == 1)
|
||||||
|
{
|
||||||
|
writebyte(((m_rwp[m_rwp_dn]+0) & 0xfffff),(m_pr[0] & 0xff00) >> 8);
|
||||||
|
writebyte(((m_rwp[m_rwp_dn]+1) & 0xfffff),(m_pr[0] & 0x00ff) >> 0);
|
||||||
|
m_rwp[m_rwp_dn]+=2;
|
||||||
|
m_rwp[m_rwp_dn]&=0xfffff;
|
||||||
|
command_end_seq();
|
||||||
|
}
|
||||||
|
|
||||||
case COMMAND_CLR:
|
case COMMAND_CLR:
|
||||||
if (m_param_ptr == 3)
|
if (m_param_ptr == 3)
|
||||||
{
|
{
|
||||||
@ -764,8 +816,25 @@ void h63484_device::process_fifo()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case COMMAND_CPY:
|
||||||
|
if (m_param_ptr == 4)
|
||||||
|
{
|
||||||
|
command_cpy_exec();
|
||||||
|
command_end_seq();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case COMMAND_AMOVE:
|
||||||
|
if (m_param_ptr == 2)
|
||||||
|
{
|
||||||
|
m_cpx = m_pr[0];
|
||||||
|
m_cpy = m_pr[1];
|
||||||
|
command_end_seq();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalerror("stop!\n");
|
fatalerror("stop!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -798,6 +867,9 @@ void h63484_device::check_video_registers(int offset)
|
|||||||
m_mwr[(offset & 0x18) >> 3] = vreg_data & 0xfff; // pitch
|
m_mwr[(offset & 0x18) >> 3] = vreg_data & 0xfff; // pitch
|
||||||
m_mwr_chr[(offset & 0x18) >> 3] = (vreg_data & 0x8000) >> 15;
|
m_mwr_chr[(offset & 0x18) >> 3] = (vreg_data & 0x8000) >> 15;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
if(LOG) printf("%s -> %04x\n",acrtc_regnames[m_ar/2],vreg_data);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -841,8 +913,6 @@ WRITE16_MEMBER( h63484_device::address_w )
|
|||||||
|
|
||||||
WRITE16_MEMBER( h63484_device::data_w )
|
WRITE16_MEMBER( h63484_device::data_w )
|
||||||
{
|
{
|
||||||
if(LOG) printf("%s -> %02x\n",acrtc_regnames[m_ar/2],data);
|
|
||||||
|
|
||||||
if(ACCESSING_BITS_8_15)
|
if(ACCESSING_BITS_8_15)
|
||||||
m_vreg[m_ar] = (data & 0xff00) >> 8;
|
m_vreg[m_ar] = (data & 0xff00) >> 8;
|
||||||
|
|
||||||
@ -853,6 +923,7 @@ WRITE16_MEMBER( h63484_device::data_w )
|
|||||||
{
|
{
|
||||||
queue_w((data & 0xff00) >> 8);
|
queue_w((data & 0xff00) >> 8);
|
||||||
queue_w((data & 0x00ff) >> 0);
|
queue_w((data & 0x00ff) >> 0);
|
||||||
|
if(LOG) printf("%s -> %02x\n",acrtc_regnames[m_ar/2],data);
|
||||||
process_fifo();
|
process_fifo();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -881,3 +952,12 @@ void h63484_device::device_reset()
|
|||||||
{
|
{
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// update_screen -
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void h63484_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect)
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
@ -81,6 +81,7 @@ private:
|
|||||||
void command_end_seq();
|
void command_end_seq();
|
||||||
void command_wpr_exec();
|
void command_wpr_exec();
|
||||||
void command_clr_exec();
|
void command_clr_exec();
|
||||||
|
void command_cpy_exec();
|
||||||
void process_fifo();
|
void process_fifo();
|
||||||
void exec_abort_sequence();
|
void exec_abort_sequence();
|
||||||
void check_video_registers(int offset);
|
void check_video_registers(int offset);
|
||||||
@ -102,7 +103,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
UINT16 m_cr;
|
UINT16 m_cr;
|
||||||
UINT16 m_pr[9]; /* parameter byte register */
|
UINT16 m_pr[0x10]; /* parameter byte register */
|
||||||
int m_param_ptr; /* parameter pointer */
|
int m_param_ptr; /* parameter pointer */
|
||||||
|
|
||||||
UINT32 m_rwp[4];
|
UINT32 m_rwp[4];
|
||||||
@ -114,9 +115,15 @@ private:
|
|||||||
UINT16 m_cl0;
|
UINT16 m_cl0;
|
||||||
UINT16 m_cl1;
|
UINT16 m_cl1;
|
||||||
|
|
||||||
|
INT16 m_cpx;
|
||||||
|
INT16 m_cpy;
|
||||||
|
|
||||||
UINT16 m_mwr[4];
|
UINT16 m_mwr[4];
|
||||||
UINT8 m_mwr_chr[4];
|
UINT8 m_mwr_chr[4];
|
||||||
|
|
||||||
|
UINT16 m_pram[0x10];
|
||||||
|
UINT8 m_dn;
|
||||||
|
|
||||||
const address_space_config m_space_config;
|
const address_space_config m_space_config;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1199,7 +1199,7 @@ static void hd63484_command_w(device_t *device, UINT16 cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ((hd63484->fifo[0] & 0xf0ff) == 0x6000) /* hd63484->cpy */
|
else if ((hd63484->fifo[0] & 0xf0ff) == 0x6000) /* CPY */
|
||||||
{
|
{
|
||||||
docpy16(device, hd63484->fifo[0], ((hd63484->fifo[1] & 0x00ff) << 12) | ((hd63484->fifo[2] & 0xfff0) >> 4), &hd63484->rwp, hd63484->fifo[3], hd63484->fifo[4]);
|
docpy16(device, hd63484->fifo[0], ((hd63484->fifo[1] & 0x00ff) << 12) | ((hd63484->fifo[2] & 0xfff0) >> 4), &hd63484->rwp, hd63484->fifo[3], hd63484->fifo[4]);
|
||||||
|
|
||||||
@ -1211,7 +1211,7 @@ static void hd63484_command_w(device_t *device, UINT16 cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ((hd63484->fifo[0] & 0xf0fc) == 0x7000) /* Shd63484->cpy */
|
else if ((hd63484->fifo[0] & 0xf0fc) == 0x7000) /* SCPY */
|
||||||
{
|
{
|
||||||
docpy16(device, hd63484->fifo[0], ((hd63484->fifo[1] & 0x00ff) << 12) | ((hd63484->fifo[2] & 0xfff0) >> 4), &hd63484->rwp, hd63484->fifo[3], hd63484->fifo[4]);
|
docpy16(device, hd63484->fifo[0], ((hd63484->fifo[1] & 0x00ff) << 12) | ((hd63484->fifo[2] & 0xfff0) >> 4), &hd63484->rwp, hd63484->fifo[3], hd63484->fifo[4]);
|
||||||
|
|
||||||
|
@ -448,18 +448,17 @@ static ADDRESS_MAP_START( skattv_mem, AS_PROGRAM, 16 )
|
|||||||
AM_RANGE(0x800100, 0x800101) AM_READWRITE(test_r,wh2_w) //related to input
|
AM_RANGE(0x800100, 0x800101) AM_READWRITE(test_r,wh2_w) //related to input
|
||||||
AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_r, ay8910_address_data_w, 0x00ff) //18b too
|
AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_r, ay8910_address_data_w, 0x00ff) //18b too
|
||||||
AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8("duart68681", duart68681_r, duart68681_w, 0xff )
|
AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8("duart68681", duart68681_r, duart68681_w, 0xff )
|
||||||
// AM_RANGE(0xffd246, 0xffd247) AM_READ(handler3_r)
|
|
||||||
// AM_RANGE(0xffd248, 0xffd249) AM_READ(handler3_r)
|
|
||||||
AM_RANGE(0xffc000, 0xffffff) AM_RAM
|
AM_RANGE(0xffc000, 0xffffff) AM_RAM
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static ADDRESS_MAP_START( quickjac_mem, AS_PROGRAM, 16 )
|
static ADDRESS_MAP_START( quickjac_mem, AS_PROGRAM, 16 )
|
||||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
AM_RANGE(0x000000, 0x01ffff) AM_ROM
|
||||||
AM_RANGE(0x400000, 0x40001f) AM_DEVREADWRITE8("duart68681", duart68681_r, duart68681_w, 0xff )
|
// AM_RANGE(0x400000, 0x40001f) ?
|
||||||
AM_RANGE(0x800080, 0x800081) AM_DEVREADWRITE_MODERN("h63484", h63484_device, status_r, address_w) // bad
|
AM_RANGE(0x800080, 0x800081) AM_DEVREADWRITE_MODERN("h63484", h63484_device, status_r, address_w) // bad
|
||||||
AM_RANGE(0x800082, 0x800083) AM_DEVREADWRITE_MODERN("h63484", h63484_device, data_r, data_w) // bad
|
AM_RANGE(0x800082, 0x800083) AM_DEVREADWRITE_MODERN("h63484", h63484_device, data_r, data_w) // bad
|
||||||
AM_RANGE(0x800100, 0x8001ff) AM_READ(test_r) //18b too
|
AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_r, ay8910_address_data_w, 0x00ff) //18b too
|
||||||
AM_RANGE(0xffc000, 0xffffff) AM_RAM
|
AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8("duart68681", duart68681_r, duart68681_w, 0xff )
|
||||||
|
AM_RANGE(0xff0000, 0xffffff) AM_RAM
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static ADDRESS_MAP_START( backgamn_mem, AS_PROGRAM, 16 )
|
static ADDRESS_MAP_START( backgamn_mem, AS_PROGRAM, 16 )
|
||||||
|
Loading…
Reference in New Issue
Block a user