mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 19:51:48 +01:00
* fixed 2-Cell vertical scrolling when column 0 is shifted.
* added support for 2-Cell vertical scrolling in Interlaced 2 mode. * improved Z80 core accuracy
This commit is contained in:
parent
f2e93d4949
commit
b40bcf31d1
@ -14,6 +14,8 @@ Genesis Plus GX 1.4.0 (??/??/????) (Eke-Eke)
|
|||||||
* added 3-Band EQ for fully configurable sound filtering (credits to Neil C / Etanza Systems)
|
* added 3-Band EQ for fully configurable sound filtering (credits to Neil C / Etanza Systems)
|
||||||
* removed libsamplerate support, implemented faster/better FIR resampler (thanks to Blargg and AamirM)
|
* removed libsamplerate support, implemented faster/better FIR resampler (thanks to Blargg and AamirM)
|
||||||
* improved VDP sprite masking emulation: fixes 3D level in Mickey Mania (thanks to Nemesis for his sprite test program)
|
* improved VDP sprite masking emulation: fixes 3D level in Mickey Mania (thanks to Nemesis for his sprite test program)
|
||||||
|
* fixed 2-Cell vertical scrolling when column 0 is shifted.
|
||||||
|
* added support for 2-Cell vertical scrolling in Interlaced 2 mode.
|
||||||
* fixed lightgun autodetection: fixes cursor position in Lethal Enforcers II
|
* fixed lightgun autodetection: fixes cursor position in Lethal Enforcers II
|
||||||
* improved DIVU/DVIS (thanks to Jorge Cwik) & MULU/MULS 68000 instructions timing accuracy
|
* improved DIVU/DVIS (thanks to Jorge Cwik) & MULU/MULS 68000 instructions timing accuracy
|
||||||
* updated Z80 core to last version (fixes interrupt Mode 0 timing and some BIT instructions)
|
* updated Z80 core to last version (fixes interrupt Mode 0 timing and some BIT instructions)
|
||||||
|
257
source/render.c
257
source/render.c
@ -970,13 +970,13 @@ static void render_bg(uint32 line, uint32 width)
|
|||||||
|
|
||||||
/* common data */
|
/* common data */
|
||||||
uint32 xscroll = get_hscroll(line);
|
uint32 xscroll = get_hscroll(line);
|
||||||
|
uint32 yscroll = *(uint32 *)&vsram[0];
|
||||||
uint32 pf_col_mask = playfield_col_mask;
|
uint32 pf_col_mask = playfield_col_mask;
|
||||||
uint32 pf_row_mask = playfield_row_mask;
|
uint32 pf_row_mask = playfield_row_mask;
|
||||||
uint32 pf_shift = playfield_shift;
|
uint32 pf_shift = playfield_shift;
|
||||||
uint32 pf_y_mask = y_mask;
|
uint32 pf_y_mask = y_mask;
|
||||||
uint32 *vs = (uint32 *)&vsram[0];
|
|
||||||
|
|
||||||
/* B Plane */
|
/* Plane B */
|
||||||
uint8 *buf = ntb_buf;
|
uint8 *buf = ntb_buf;
|
||||||
uint32 start = 0;
|
uint32 start = 0;
|
||||||
uint32 end = width >> 4;
|
uint32 end = width >> 4;
|
||||||
@ -984,21 +984,21 @@ static void render_bg(uint32 line, uint32 width)
|
|||||||
#ifdef LSB_FIRST
|
#ifdef LSB_FIRST
|
||||||
uint32 shift = (xscroll >> 16) & 0x0F;
|
uint32 shift = (xscroll >> 16) & 0x0F;
|
||||||
uint32 index = pf_col_mask + 1 - ((xscroll >> 20) & pf_col_mask);
|
uint32 index = pf_col_mask + 1 - ((xscroll >> 20) & pf_col_mask);
|
||||||
uint32 y_scroll = (line + ((vs[0] >> 16) & 0x3FF)) & pf_row_mask;
|
uint32 v_line = (line + ((yscroll >> 16) & 0x3FF)) & pf_row_mask;
|
||||||
#else
|
#else
|
||||||
uint32 shift = (xscroll & 0x0F);
|
uint32 shift = (xscroll & 0x0F);
|
||||||
uint32 index = pf_col_mask + 1 - ((xscroll >> 4) & pf_col_mask);
|
uint32 index = pf_col_mask + 1 - ((xscroll >> 4) & pf_col_mask);
|
||||||
uint32 y_scroll = (line + (vs[0] & 0x3FF)) & pf_row_mask;
|
uint32 v_line = (line + (yscroll & 0x3FF)) & pf_row_mask;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32 v_line = (y_scroll & 7) << 3;
|
uint32 *nt = (uint32 *)&vram[ntbb + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
uint32 *nt = (uint32 *)&vram[ntbb + (((y_scroll >> 3) << pf_shift) & pf_y_mask)];
|
v_line = (v_line & 7) << 3;
|
||||||
|
|
||||||
if(shift)
|
if(shift)
|
||||||
{
|
{
|
||||||
dst = (uint32 *)&buf[0x10 + shift];
|
dst = (uint32 *)&buf[0x10 + shift];
|
||||||
atbuf = nt[(index-1) & pf_col_mask];
|
atbuf = nt[(index-1) & pf_col_mask];
|
||||||
DRAW_COLUMN(atbuf, v_line);
|
DRAW_COLUMN(atbuf, v_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = (uint32 *)&buf[0x20 + shift];
|
dst = (uint32 *)&buf[0x20 + shift];
|
||||||
@ -1010,8 +1010,10 @@ static void render_bg(uint32 line, uint32 width)
|
|||||||
|
|
||||||
/* Window and Plane A */
|
/* Window and Plane A */
|
||||||
buf = nta_buf;
|
buf = nta_buf;
|
||||||
|
|
||||||
uint32 a = (reg[18] & 0x1F) << 3;
|
uint32 a = (reg[18] & 0x1F) << 3;
|
||||||
uint32 w = (reg[18] >> 7) & 1;
|
uint32 w = (reg[18] >> 7) & 1;
|
||||||
|
|
||||||
if (w == (line >= a))
|
if (w == (line >= a))
|
||||||
{
|
{
|
||||||
/* Window takes up entire line */
|
/* Window takes up entire line */
|
||||||
@ -1035,15 +1037,15 @@ static void render_bg(uint32 line, uint32 width)
|
|||||||
#ifdef LSB_FIRST
|
#ifdef LSB_FIRST
|
||||||
shift = (xscroll & 0x0F);
|
shift = (xscroll & 0x0F);
|
||||||
index = pf_col_mask + start + 1 - ((xscroll >> 4) & pf_col_mask);
|
index = pf_col_mask + start + 1 - ((xscroll >> 4) & pf_col_mask);
|
||||||
y_scroll = (line + (vs[0] & 0x3FF)) & pf_row_mask;
|
v_line = (line + (yscroll & 0x3FF)) & pf_row_mask;
|
||||||
#else
|
#else
|
||||||
shift = (xscroll >> 16) & 0x0F;
|
shift = (xscroll >> 16) & 0x0F;
|
||||||
index = pf_col_mask + start + 1 - ((xscroll >> 20) & pf_col_mask);
|
index = pf_col_mask + start + 1 - ((xscroll >> 20) & pf_col_mask);
|
||||||
y_scroll = (line + ((vs[0] >> 16) & 0x3FF)) & pf_row_mask;
|
v_line = (line + ((yscroll >> 16) & 0x3FF)) & pf_row_mask;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
v_line = (y_scroll & 7) << 3;
|
nt = (uint32 *)&vram[ntab + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
nt = (uint32 *)&vram[ntab + (((y_scroll >> 3) << pf_shift) & pf_y_mask)];
|
v_line = (v_line & 7) << 3;
|
||||||
|
|
||||||
if(shift)
|
if(shift)
|
||||||
{
|
{
|
||||||
@ -1053,7 +1055,7 @@ static void render_bg(uint32 line, uint32 width)
|
|||||||
if (start) atbuf = nt[index & pf_col_mask];
|
if (start) atbuf = nt[index & pf_col_mask];
|
||||||
else atbuf = nt[(index-1) & pf_col_mask];
|
else atbuf = nt[(index-1) & pf_col_mask];
|
||||||
|
|
||||||
DRAW_COLUMN(atbuf, v_line);
|
DRAW_COLUMN(atbuf, v_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = (uint32 *)&buf[0x20 + shift + (start<<4)];
|
dst = (uint32 *)&buf[0x20 + shift + (start<<4)];
|
||||||
@ -1074,6 +1076,7 @@ static void render_bg(uint32 line, uint32 width)
|
|||||||
v_line = (line & 7) << 3;
|
v_line = (line & 7) << 3;
|
||||||
nt = (uint32 *)&vram[ntwb | ((line >> 3) << (6 + (reg[12] & 1)))];
|
nt = (uint32 *)&vram[ntwb | ((line >> 3) << (6 + (reg[12] & 1)))];
|
||||||
dst = (uint32 *)&buf[0x20 + (start << 4)];
|
dst = (uint32 *)&buf[0x20 + (start << 4)];
|
||||||
|
|
||||||
for(column = start; column < end; column ++)
|
for(column = start; column < end; column ++)
|
||||||
{
|
{
|
||||||
atbuf = nt[column];
|
atbuf = nt[column];
|
||||||
@ -1094,7 +1097,7 @@ static void render_bg_vs(uint32 line, uint32 width)
|
|||||||
uint32 pf_y_mask = y_mask;
|
uint32 pf_y_mask = y_mask;
|
||||||
uint32 *vs = (uint32 *)&vsram[0];
|
uint32 *vs = (uint32 *)&vsram[0];
|
||||||
|
|
||||||
/* B Plane */
|
/* Plane B */
|
||||||
uint8 *buf = ntb_buf;
|
uint8 *buf = ntb_buf;
|
||||||
uint32 start = 0;
|
uint32 start = 0;
|
||||||
uint32 end = width >> 4;
|
uint32 end = width >> 4;
|
||||||
@ -1107,36 +1110,45 @@ static void render_bg_vs(uint32 line, uint32 width)
|
|||||||
uint32 index = pf_col_mask + 1 - ((xscroll >> 4) & pf_col_mask);
|
uint32 index = pf_col_mask + 1 - ((xscroll >> 4) & pf_col_mask);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32 y_scroll, v_line, *nt;
|
uint32 v_line, *nt;
|
||||||
|
|
||||||
if(shift)
|
if(shift)
|
||||||
{
|
{
|
||||||
y_scroll = (line & pf_row_mask);
|
|
||||||
v_line = (y_scroll & 7) << 3;
|
|
||||||
nt = (uint32 *)&vram[ntbb + (((y_scroll >> 3) << pf_shift) & pf_y_mask)];
|
|
||||||
dst = (uint32 *)&buf[0x10 + shift];
|
dst = (uint32 *)&buf[0x10 + shift];
|
||||||
|
|
||||||
|
#ifdef LSB_FIRST
|
||||||
|
v_line = (line + ((vs[0] >> 16) & 0x3FF)) & pf_row_mask;
|
||||||
|
#else
|
||||||
|
v_line = (line + (vs[0] & 0x3FF)) & pf_row_mask;
|
||||||
|
#endif
|
||||||
|
nt = (uint32 *)&vram[ntbb + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
|
v_line = (v_line & 7) << 3;
|
||||||
|
|
||||||
atbuf = nt[(index-1) & pf_col_mask];
|
atbuf = nt[(index-1) & pf_col_mask];
|
||||||
DRAW_COLUMN(atbuf, v_line);
|
DRAW_COLUMN(atbuf, v_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = (uint32 *)&buf[0x20 + shift];
|
dst = (uint32 *)&buf[0x20 + shift];
|
||||||
for(column = start; column < end; column ++, index ++)
|
for(column = 0; column < end; column ++, index ++)
|
||||||
{
|
{
|
||||||
#ifdef LSB_FIRST
|
#ifdef LSB_FIRST
|
||||||
y_scroll = (line + ((vs[column] >> 16) & 0x3FF)) & pf_row_mask;
|
v_line = (line + ((vs[column] >> 16) & 0x3FF)) & pf_row_mask;
|
||||||
#else
|
#else
|
||||||
y_scroll = (line + (vs[column] & 0x3FF)) & pf_row_mask;
|
v_line = (line + (vs[column] & 0x3FF)) & pf_row_mask;
|
||||||
#endif
|
#endif
|
||||||
v_line = (y_scroll & 7) << 3;
|
nt = (uint32 *)&vram[ntbb + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
nt = (uint32 *)&vram[ntbb + (((y_scroll >> 3) << pf_shift) & pf_y_mask)];
|
v_line = (v_line & 7) << 3;
|
||||||
|
|
||||||
atbuf = nt[index & pf_col_mask];
|
atbuf = nt[index & pf_col_mask];
|
||||||
DRAW_COLUMN(atbuf, v_line)
|
DRAW_COLUMN(atbuf, v_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Window and Plane A */
|
/* Window and Plane A */
|
||||||
buf = nta_buf;
|
buf = nta_buf;
|
||||||
|
|
||||||
uint32 a = (reg[18] & 0x1F) << 3;
|
uint32 a = (reg[18] & 0x1F) << 3;
|
||||||
uint32 w = (reg[18] >> 7) & 1;
|
uint32 w = (reg[18] >> 7) & 1;
|
||||||
|
|
||||||
if (w == (line >= a))
|
if (w == (line >= a))
|
||||||
{
|
{
|
||||||
/* Window takes up entire line */
|
/* Window takes up entire line */
|
||||||
@ -1168,27 +1180,33 @@ static void render_bg_vs(uint32 line, uint32 width)
|
|||||||
if(shift)
|
if(shift)
|
||||||
{
|
{
|
||||||
dst = (uint32 *)&buf[0x10 + shift + (start<<4)];
|
dst = (uint32 *)&buf[0x10 + shift + (start<<4)];
|
||||||
y_scroll = (line & pf_row_mask);
|
|
||||||
v_line = (y_scroll & 7) << 3;
|
#ifdef LSB_FIRST
|
||||||
nt = (uint32 *)&vram[ntab + (((y_scroll >> 3) << pf_shift) & pf_y_mask)];
|
v_line = (line + (vs[start] & 0x3FF)) & pf_row_mask;
|
||||||
|
#else
|
||||||
|
v_line = (line + ((vs[start] >> 16) & 0x3FF)) & pf_row_mask;
|
||||||
|
#endif
|
||||||
|
nt = (uint32 *)&vram[ntab + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
|
v_line = (v_line & 7) << 3;
|
||||||
|
|
||||||
/* Window bug */
|
/* Window bug */
|
||||||
if (start) atbuf = nt[index & pf_col_mask];
|
if (start) atbuf = nt[index & pf_col_mask];
|
||||||
else atbuf = nt[(index-1) & pf_col_mask];
|
else atbuf = nt[(index-1) & pf_col_mask];
|
||||||
|
|
||||||
DRAW_COLUMN(atbuf, v_line);
|
DRAW_COLUMN(atbuf, v_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = (uint32 *)&buf[0x20 + shift + (start<<4)];
|
dst = (uint32 *)&buf[0x20 + shift + (start<<4)];
|
||||||
for(column = start; column < end; column ++, index ++)
|
for(column = start; column < end; column ++, index ++)
|
||||||
{
|
{
|
||||||
#ifdef LSB_FIRST
|
#ifdef LSB_FIRST
|
||||||
y_scroll = (line + (vs[column] & 0x3FF)) & pf_row_mask;
|
v_line = (line + (vs[column] & 0x3FF)) & pf_row_mask;
|
||||||
#else
|
#else
|
||||||
y_scroll = (line + ((vs[column] >> 16) & 0x3FF)) & pf_row_mask;
|
v_line = (line + ((vs[column] >> 16) & 0x3FF)) & pf_row_mask;
|
||||||
#endif
|
#endif
|
||||||
v_line = (y_scroll & 7) << 3;
|
nt = (uint32 *)&vram[ntab + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
nt = (uint32 *)&vram[ntab + (((y_scroll >> 3) << pf_shift) & pf_y_mask)];
|
v_line = (v_line & 7) << 3;
|
||||||
|
|
||||||
atbuf = nt[index & pf_col_mask];
|
atbuf = nt[index & pf_col_mask];
|
||||||
DRAW_COLUMN(atbuf, v_line)
|
DRAW_COLUMN(atbuf, v_line)
|
||||||
}
|
}
|
||||||
@ -1218,13 +1236,13 @@ static void render_bg_im2(uint32 line, uint32 width, uint32 odd)
|
|||||||
|
|
||||||
/* common data */
|
/* common data */
|
||||||
uint32 xscroll = get_hscroll(line);
|
uint32 xscroll = get_hscroll(line);
|
||||||
|
uint32 yscroll = *(uint32 *)&vsram[0];
|
||||||
uint32 pf_col_mask = playfield_col_mask;
|
uint32 pf_col_mask = playfield_col_mask;
|
||||||
uint32 pf_row_mask = playfield_row_mask;
|
uint32 pf_row_mask = playfield_row_mask;
|
||||||
uint32 pf_shift = playfield_shift;
|
uint32 pf_shift = playfield_shift;
|
||||||
uint32 pf_y_mask = y_mask;
|
uint32 pf_y_mask = y_mask;
|
||||||
uint32 *vs = (uint32 *)&vsram[0];
|
|
||||||
|
|
||||||
/* B Plane */
|
/* Plane B */
|
||||||
uint8 *buf = ntb_buf;
|
uint8 *buf = ntb_buf;
|
||||||
uint32 start = 0;
|
uint32 start = 0;
|
||||||
uint32 end = width >> 4;
|
uint32 end = width >> 4;
|
||||||
@ -1232,28 +1250,28 @@ static void render_bg_im2(uint32 line, uint32 width, uint32 odd)
|
|||||||
#ifdef LSB_FIRST
|
#ifdef LSB_FIRST
|
||||||
uint32 shift = (xscroll >> 16) & 0x0F;
|
uint32 shift = (xscroll >> 16) & 0x0F;
|
||||||
uint32 index = pf_col_mask + 1 - ((xscroll >> 20) & pf_col_mask);
|
uint32 index = pf_col_mask + 1 - ((xscroll >> 20) & pf_col_mask);
|
||||||
uint32 y_scroll = (line + ((vs[0] >> 17) & 0x3FF)) & pf_row_mask; /* IM2 specific */
|
uint32 v_line = (line + ((yscroll >> 17) & 0x3FF)) & pf_row_mask;
|
||||||
#else
|
#else
|
||||||
uint32 shift = (xscroll & 0x0F);
|
uint32 shift = (xscroll & 0x0F);
|
||||||
uint32 index = pf_col_mask + 1 - ((xscroll >> 4) & pf_col_mask);
|
uint32 index = pf_col_mask + 1 - ((xscroll >> 4) & pf_col_mask);
|
||||||
uint32 y_scroll = (line + ((vs[0] >> 1) & 0x3FF)) & pf_row_mask; /* IM2 specific */
|
uint32 v_line = (line + ((yscroll >> 1) & 0x3FF)) & pf_row_mask;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32 v_line = (((y_scroll & 7) << 1) | odd) << 3; /* IM2 specific */
|
uint32 *nt = (uint32 *)&vram[ntbb + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
uint32 *nt = (uint32 *)&vram[ntbb + (((y_scroll >> 3) << pf_shift) & pf_y_mask)];
|
v_line = (((v_line & 7) << 1) | odd) << 3;
|
||||||
|
|
||||||
if(shift)
|
if(shift)
|
||||||
{
|
{
|
||||||
dst = (uint32 *)&buf[0x10 + shift];
|
dst = (uint32 *)&buf[0x10 + shift];
|
||||||
atbuf = nt[(index-1) & pf_col_mask];
|
atbuf = nt[(index-1) & pf_col_mask];
|
||||||
DRAW_COLUMN_IM2(atbuf, v_line); /* IM2 specific */
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = (uint32 *)&buf[0x20 + shift];
|
dst = (uint32 *)&buf[0x20 + shift];
|
||||||
for(column = 0; column < end; column ++, index ++)
|
for(column = 0; column < end; column ++, index ++)
|
||||||
{
|
{
|
||||||
atbuf = nt[index & pf_col_mask];
|
atbuf = nt[index & pf_col_mask];
|
||||||
DRAW_COLUMN_IM2(atbuf, v_line) /* IM2 specific */
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Window and Plane A */
|
/* Window and Plane A */
|
||||||
@ -1283,15 +1301,15 @@ static void render_bg_im2(uint32 line, uint32 width, uint32 odd)
|
|||||||
#ifdef LSB_FIRST
|
#ifdef LSB_FIRST
|
||||||
shift = (xscroll & 0x0F);
|
shift = (xscroll & 0x0F);
|
||||||
index = pf_col_mask + start + 1 - ((xscroll >> 4) & pf_col_mask);
|
index = pf_col_mask + start + 1 - ((xscroll >> 4) & pf_col_mask);
|
||||||
y_scroll = (line + ((vs[0] >> 1) & 0x3FF)) & pf_row_mask; /* IM2 specific */
|
v_line = (line + ((yscroll >> 1) & 0x3FF)) & pf_row_mask;
|
||||||
#else
|
#else
|
||||||
shift = (xscroll >> 16) & 0x0F;
|
shift = (xscroll >> 16) & 0x0F;
|
||||||
index = pf_col_mask + start + 1 - ((xscroll >> 20) & pf_col_mask);
|
index = pf_col_mask + start + 1 - ((xscroll >> 20) & pf_col_mask);
|
||||||
y_scroll = (line + ((vs[0] >> 17) & 0x3FF)) & pf_row_mask; /* IM2 specific */
|
v_line = (line + ((yscroll >> 17) & 0x3FF)) & pf_row_mask;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
v_line = (((y_scroll & 7) << 1) | odd) << 3; /* IM2 specific */
|
nt = (uint32 *)&vram[ntab + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
nt = (uint32 *)&vram[ntab + (((y_scroll >> 3) << pf_shift) & pf_y_mask)];
|
v_line = (((v_line & 7) << 1) | odd) << 3;
|
||||||
|
|
||||||
if(shift)
|
if(shift)
|
||||||
{
|
{
|
||||||
@ -1301,14 +1319,14 @@ static void render_bg_im2(uint32 line, uint32 width, uint32 odd)
|
|||||||
if (start) atbuf = nt[index & pf_col_mask];
|
if (start) atbuf = nt[index & pf_col_mask];
|
||||||
else atbuf = nt[(index-1) & pf_col_mask];
|
else atbuf = nt[(index-1) & pf_col_mask];
|
||||||
|
|
||||||
DRAW_COLUMN_IM2(atbuf, v_line); /* IM2 specific */
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = (uint32 *)&buf[0x20 + shift + (start<<4)];
|
dst = (uint32 *)&buf[0x20 + shift + (start<<4)];
|
||||||
for(column = start; column < end; column ++, index ++)
|
for(column = start; column < end; column ++, index ++)
|
||||||
{
|
{
|
||||||
atbuf = nt[index & pf_col_mask];
|
atbuf = nt[index & pf_col_mask];
|
||||||
DRAW_COLUMN_IM2(atbuf, v_line) /* IM2 specific */
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set for Window */
|
/* set for Window */
|
||||||
@ -1319,17 +1337,159 @@ static void render_bg_im2(uint32 line, uint32 width, uint32 odd)
|
|||||||
/* Window */
|
/* Window */
|
||||||
if (w)
|
if (w)
|
||||||
{
|
{
|
||||||
v_line = ((line & 7) << 1 | odd) << 3; /* IM2 specific */
|
v_line = ((line & 7) << 1 | odd) << 3;
|
||||||
nt = (uint32 *)&vram[ntwb | ((line >> 3) << (6 + (reg[12] & 1)))];
|
nt = (uint32 *)&vram[ntwb | ((line >> 3) << (6 + (reg[12] & 1)))];
|
||||||
dst = (uint32 *)&buf[0x20 + (start << 4)];
|
dst = (uint32 *)&buf[0x20 + (start << 4)];
|
||||||
for(column = start; column < end; column ++)
|
for(column = start; column < end; column ++)
|
||||||
{
|
{
|
||||||
atbuf = nt[column];
|
atbuf = nt[column];
|
||||||
DRAW_COLUMN_IM2(atbuf, v_line) /* IM2 specific */
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void render_bg_im2_vs(uint32 line, uint32 width, uint32 odd)
|
||||||
|
{
|
||||||
|
uint32 column, atex, atbuf, offs, *src, *dst;
|
||||||
|
|
||||||
|
/* common data */
|
||||||
|
uint32 xscroll = get_hscroll(line);
|
||||||
|
uint32 pf_col_mask = playfield_col_mask;
|
||||||
|
uint32 pf_row_mask = playfield_row_mask;
|
||||||
|
uint32 pf_shift = playfield_shift;
|
||||||
|
uint32 pf_y_mask = y_mask;
|
||||||
|
uint32 *vs = (uint32 *)&vsram[0];
|
||||||
|
|
||||||
|
/* Plane B */
|
||||||
|
uint8 *buf = ntb_buf;
|
||||||
|
uint32 start = 0;
|
||||||
|
uint32 end = width >> 4;
|
||||||
|
|
||||||
|
#ifdef LSB_FIRST
|
||||||
|
uint32 shift = (xscroll >> 16) & 0x0F;
|
||||||
|
uint32 index = pf_col_mask + 1 - ((xscroll >> 20) & pf_col_mask);
|
||||||
|
#else
|
||||||
|
uint32 shift = (xscroll & 0x0F);
|
||||||
|
uint32 index = pf_col_mask + 1 - ((xscroll >> 4) & pf_col_mask);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint32 v_line, *nt;
|
||||||
|
|
||||||
|
if(shift)
|
||||||
|
{
|
||||||
|
dst = (uint32 *)&buf[0x10 + shift];
|
||||||
|
|
||||||
|
#ifdef LSB_FIRST
|
||||||
|
v_line = (line + ((vs[0] >> 17) & 0x3FF)) & pf_row_mask;
|
||||||
|
#else
|
||||||
|
v_line = (line + ((vs[0] >> 1) & 0x3FF)) & pf_row_mask;
|
||||||
|
#endif
|
||||||
|
nt = (uint32 *)&vram[ntbb + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
|
v_line = (((v_line & 7) << 1) | odd) << 3;
|
||||||
|
|
||||||
|
atbuf = nt[(index-1) & pf_col_mask];
|
||||||
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
|
}
|
||||||
|
|
||||||
|
dst = (uint32 *)&buf[0x20 + shift];
|
||||||
|
for(column = 0; column < end; column ++, index ++)
|
||||||
|
{
|
||||||
|
#ifdef LSB_FIRST
|
||||||
|
v_line = (line + ((vs[column] >> 17) & 0x3FF)) & pf_row_mask;
|
||||||
|
#else
|
||||||
|
v_line = (line + ((vs[column] >> 1) & 0x3FF)) & pf_row_mask;
|
||||||
|
#endif
|
||||||
|
nt = (uint32 *)&vram[ntbb + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
|
v_line = (((v_line & 7) << 1) | odd) << 3;
|
||||||
|
|
||||||
|
atbuf = nt[index & pf_col_mask];
|
||||||
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Window and Plane A */
|
||||||
|
buf = nta_buf;
|
||||||
|
uint32 a = (reg[18] & 0x1F) << 3;
|
||||||
|
uint32 w = (reg[18] >> 7) & 1;
|
||||||
|
if (w == (line >= a))
|
||||||
|
{
|
||||||
|
/* Window takes up entire line */
|
||||||
|
a = 0;
|
||||||
|
w = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Window and Plane A share the line */
|
||||||
|
a = clip[0].enable;
|
||||||
|
w = clip[1].enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Plane A */
|
||||||
|
if (a)
|
||||||
|
{
|
||||||
|
/* set for Plane A */
|
||||||
|
start = clip[0].left;
|
||||||
|
end = clip[0].right;
|
||||||
|
|
||||||
|
#ifdef LSB_FIRST
|
||||||
|
shift = (xscroll & 0x0F);
|
||||||
|
index = pf_col_mask + start + 1 - ((xscroll >> 4) & pf_col_mask);
|
||||||
|
#else
|
||||||
|
shift = (xscroll >> 16) & 0x0F;
|
||||||
|
index = pf_col_mask + start + 1 - ((xscroll >> 20) & pf_col_mask);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if(shift)
|
||||||
|
{
|
||||||
|
dst = (uint32 *)&buf[0x10 + shift + (start<<4)];
|
||||||
|
|
||||||
|
#ifdef LSB_FIRST
|
||||||
|
v_line = (line + ((vs[start] >> 1) & 0x3FF)) & pf_row_mask;
|
||||||
|
#else
|
||||||
|
v_line = (line + ((vs[start] >> 17) & 0x3FF)) & pf_row_mask;
|
||||||
|
#endif
|
||||||
|
nt = (uint32 *)&vram[ntab + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
|
v_line = (((v_line & 7) << 1) | odd) << 3;
|
||||||
|
|
||||||
|
/* Window bug */
|
||||||
|
if (start) atbuf = nt[index & pf_col_mask];
|
||||||
|
else atbuf = nt[(index-1) & pf_col_mask];
|
||||||
|
|
||||||
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
|
}
|
||||||
|
|
||||||
|
dst = (uint32 *)&buf[0x20 + shift + (start<<4)];
|
||||||
|
for(column = start; column < end; column ++, index ++)
|
||||||
|
{
|
||||||
|
#ifdef LSB_FIRST
|
||||||
|
v_line = (line + ((vs[column] >> 1) & 0x3FF)) & pf_row_mask;
|
||||||
|
#else
|
||||||
|
v_line = (line + ((vs[column] >> 17) & 0x3FF)) & pf_row_mask;
|
||||||
|
#endif
|
||||||
|
nt = (uint32 *)&vram[ntab + (((v_line >> 3) << pf_shift) & pf_y_mask)];
|
||||||
|
v_line = (((v_line & 7) << 1) | odd) << 3;
|
||||||
|
|
||||||
|
atbuf = nt[index & pf_col_mask];
|
||||||
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* set for Window */
|
||||||
|
start = clip[1].left;
|
||||||
|
end = clip[1].right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Window */
|
||||||
|
if (w)
|
||||||
|
{
|
||||||
|
v_line = ((line & 7) << 1 | odd) << 3;
|
||||||
|
nt = (uint32 *)&vram[ntwb | ((line >> 3) << (6 + (reg[12] & 1)))];
|
||||||
|
dst = (uint32 *)&buf[0x20 + (start << 4)];
|
||||||
|
for(column = start; column < end; column ++)
|
||||||
|
{
|
||||||
|
atbuf = nt[column];
|
||||||
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
/* Object render functions */
|
/* Object render functions */
|
||||||
@ -1622,7 +1782,8 @@ void render_line(uint32 line, uint32 overscan)
|
|||||||
uint32 odd = odd_frame;
|
uint32 odd = odd_frame;
|
||||||
|
|
||||||
/* render BG layers */
|
/* render BG layers */
|
||||||
render_bg_im2(line, width, odd);
|
if(reg[11] & 4) render_bg_im2_vs(line, width, odd);
|
||||||
|
else render_bg_im2(line, width, odd);
|
||||||
|
|
||||||
if (reg[12] & 8)
|
if (reg[12] & 8)
|
||||||
{
|
{
|
||||||
|
400
source/z80/z80.c
400
source/z80/z80.c
@ -131,8 +131,6 @@
|
|||||||
#define INT_IRQ 0x01
|
#define INT_IRQ 0x01
|
||||||
#define NMI_IRQ 0x02
|
#define NMI_IRQ 0x02
|
||||||
|
|
||||||
#define PRVPC Z80.prvpc.d /* previous program counter */
|
|
||||||
|
|
||||||
#define PCD Z80.pc.d
|
#define PCD Z80.pc.d
|
||||||
#define PC Z80.pc.w.l
|
#define PC Z80.pc.w.l
|
||||||
|
|
||||||
@ -248,7 +246,7 @@ static const UINT8 cc_ed[0x100] = {
|
|||||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8};
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8};
|
||||||
|
|
||||||
static const UINT8 cc_xy[0x100] = {
|
/*static const UINT8 cc_xy[0x100] = {
|
||||||
4, 4, 4, 4, 4, 4, 4, 4, 4,15, 4, 4, 4, 4, 4, 4,
|
4, 4, 4, 4, 4, 4, 4, 4, 4,15, 4, 4, 4, 4, 4, 4,
|
||||||
4, 4, 4, 4, 4, 4, 4, 4, 4,15, 4, 4, 4, 4, 4, 4,
|
4, 4, 4, 4, 4, 4, 4, 4, 4,15, 4, 4, 4, 4, 4, 4,
|
||||||
4,14,20,10, 9, 9,11, 4, 4,15,20,10, 9, 9,11, 4,
|
4,14,20,10, 9, 9,11, 4, 4,15,20,10, 9, 9,11, 4,
|
||||||
@ -265,6 +263,26 @@ static const UINT8 cc_xy[0x100] = {
|
|||||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
4,14, 4,23, 4,15, 4, 4, 4, 8, 4, 4, 4, 4, 4, 4,
|
4,14, 4,23, 4,15, 4, 4, 4, 8, 4, 4, 4, 4, 4, 4,
|
||||||
4, 4, 4, 4, 4, 4, 4, 4, 4,10, 4, 4, 4, 4, 4, 4};
|
4, 4, 4, 4, 4, 4, 4, 4, 4,10, 4, 4, 4, 4, 4, 4};
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* illegal combo should return 4 + cc_op[i] */
|
||||||
|
static const UINT8 cc_xy[0x100] ={
|
||||||
|
8,14,11,10, 8, 8,11, 8, 8,15,11,10, 8, 8,11, 8,
|
||||||
|
12,14,11,10, 8, 8,11, 8,16,15,11,10, 8, 8,11, 8,
|
||||||
|
11,14,20,10, 9, 9,12, 8,11,15,20,10, 9, 9,12, 8,
|
||||||
|
11,14,17,10,23,23,19, 8,11,15,17,10, 8, 8,11, 8,
|
||||||
|
8, 8, 8, 8, 9, 9,19, 8, 8, 8, 8, 8, 9, 9,19, 8,
|
||||||
|
8, 8, 8, 8, 9, 9,19, 8, 8, 8, 8, 8, 9, 9,19, 8,
|
||||||
|
9, 9, 9, 9, 9, 9,19, 9, 9, 9, 9, 9, 9, 9,19, 9,
|
||||||
|
19,19,19,19,19,19, 8,19, 8, 8, 8, 8, 9, 9,19, 8,
|
||||||
|
8, 8, 8, 8, 9, 9,19, 8, 8, 8, 8, 8, 9, 9,19, 8,
|
||||||
|
8, 8, 8, 8, 9, 9,19, 8, 8, 8, 8, 8, 9, 9,19, 8,
|
||||||
|
8, 8, 8, 8, 9, 9,19, 8, 8, 8, 8, 8, 9, 9,19, 8,
|
||||||
|
8, 8, 8, 8, 9, 9,19, 8, 8, 8, 8, 8, 9, 9,19, 8,
|
||||||
|
9,14,14,14,14,15,11,15, 9,14,14, 0,14,21,11,15,
|
||||||
|
9,14,14,15,14,15,11,15, 9, 8,14,15,14, 4,11,15,
|
||||||
|
9,14,14,23,14,15,11,15, 9, 8,14, 8,14, 4,11,15,
|
||||||
|
9,14,14, 8,14,15,11,15, 9,10,14, 8,14, 4,11,15};
|
||||||
|
|
||||||
static const UINT8 cc_xycb[0x100] = {
|
static const UINT8 cc_xycb[0x100] = {
|
||||||
23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,
|
23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,
|
||||||
@ -296,7 +314,7 @@ static const UINT8 cc_ex[0x100] = {
|
|||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, /* INI/IND (cycle-accurate I/O port reads) */
|
||||||
5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, /* LDIR/CPIR/INIR/OTIR LDDR/CPDR/INDR/OTDR */
|
5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, /* LDIR/CPIR/INIR/OTIR LDDR/CPDR/INDR/OTDR */
|
||||||
6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2,
|
6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2,
|
||||||
6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2,
|
6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2,
|
||||||
@ -533,8 +551,6 @@ INLINE void BURNODD(int cycles, int opcodes, int cyclesum)
|
|||||||
#define ENTER_HALT { \
|
#define ENTER_HALT { \
|
||||||
PC--; \
|
PC--; \
|
||||||
HALT = 1; \
|
HALT = 1; \
|
||||||
if( Z80.irq_state == CLEAR_LINE ) \
|
|
||||||
z80_burn( z80_ICount ); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
@ -622,8 +638,8 @@ INLINE UINT32 ARG16(void)
|
|||||||
* Calculate the effective address EA of an opcode using
|
* Calculate the effective address EA of an opcode using
|
||||||
* IX+offset resp. IY+offset addressing.
|
* IX+offset resp. IY+offset addressing.
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
#define EAX { EA = (UINT32)(UINT16)(IX + (INT8)ARG()); MEMPTR = EA; } while (0)
|
#define EAX do { EA = (UINT32)(UINT16)(IX + (INT8)ARG()); MEMPTR = EA; } while (0)
|
||||||
#define EAY { EA = (UINT32)(UINT16)(IY + (INT8)ARG()); MEMPTR = EA; } while (0)
|
#define EAY do { EA = (UINT32)(UINT16)(IY + (INT8)ARG()); MEMPTR = EA; } while (0)
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
* POP
|
* POP
|
||||||
@ -929,7 +945,6 @@ INLINE UINT8 DEC(UINT8 value)
|
|||||||
diff = hf ? 0x06 : 0x00; \
|
diff = hf ? 0x06 : 0x00; \
|
||||||
if (nf) A -= diff; \
|
if (nf) A -= diff; \
|
||||||
else A += diff; \
|
else A += diff; \
|
||||||
\
|
|
||||||
F = SZP[A] | (F & NF); \
|
F = SZP[A] | (F & NF); \
|
||||||
if (cf || (lo <= 9 ? hi >= 10 : hi >= 9)) F |= CF; \
|
if (cf || (lo <= 9 ? hi >= 10 : hi >= 9)) F |= CF; \
|
||||||
if (nf ? hf && lo <= 5 : lo >= 10) F |= HF; \
|
if (nf ? hf && lo <= 5 : lo >= 10) F |= HF; \
|
||||||
@ -1215,6 +1230,7 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value)
|
|||||||
unsigned t; \
|
unsigned t; \
|
||||||
UINT8 io = IN(BC); \
|
UINT8 io = IN(BC); \
|
||||||
MEMPTR = BC + 1; \
|
MEMPTR = BC + 1; \
|
||||||
|
CC(ex,0xa2); \
|
||||||
B--; \
|
B--; \
|
||||||
WM( HL, io ); \
|
WM( HL, io ); \
|
||||||
HL++; \
|
HL++; \
|
||||||
@ -1277,6 +1293,7 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value)
|
|||||||
unsigned t; \
|
unsigned t; \
|
||||||
UINT8 io = IN(BC); \
|
UINT8 io = IN(BC); \
|
||||||
MEMPTR = BC - 1; \
|
MEMPTR = BC - 1; \
|
||||||
|
CC(ex,0xaa); \
|
||||||
B--; \
|
B--; \
|
||||||
WM( HL, io ); \
|
WM( HL, io ); \
|
||||||
HL--; \
|
HL--; \
|
||||||
@ -2007,7 +2024,7 @@ OP(dd,06) { illegal_1(); op_06(); } /* DB DD */
|
|||||||
OP(dd,07) { illegal_1(); op_07(); } /* DB DD */
|
OP(dd,07) { illegal_1(); op_07(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,08) { illegal_1(); op_08(); } /* DB DD */
|
OP(dd,08) { illegal_1(); op_08(); } /* DB DD */
|
||||||
OP(dd,09) { R++; ADD16(ix,bc); } /* ADD IX,BC */
|
OP(dd,09) { ADD16(ix,bc); } /* ADD IX,BC */
|
||||||
OP(dd,0a) { illegal_1(); op_0a(); } /* DB DD */
|
OP(dd,0a) { illegal_1(); op_0a(); } /* DB DD */
|
||||||
OP(dd,0b) { illegal_1(); op_0b(); } /* DB DD */
|
OP(dd,0b) { illegal_1(); op_0b(); } /* DB DD */
|
||||||
OP(dd,0c) { illegal_1(); op_0c(); } /* DB DD */
|
OP(dd,0c) { illegal_1(); op_0c(); } /* DB DD */
|
||||||
@ -2025,7 +2042,7 @@ OP(dd,16) { illegal_1(); op_16(); } /* DB DD */
|
|||||||
OP(dd,17) { illegal_1(); op_17(); } /* DB DD */
|
OP(dd,17) { illegal_1(); op_17(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,18) { illegal_1(); op_18(); } /* DB DD */
|
OP(dd,18) { illegal_1(); op_18(); } /* DB DD */
|
||||||
OP(dd,19) { R++; ADD16(ix,de); } /* ADD IX,DE */
|
OP(dd,19) { ADD16(ix,de); } /* ADD IX,DE */
|
||||||
OP(dd,1a) { illegal_1(); op_1a(); } /* DB DD */
|
OP(dd,1a) { illegal_1(); op_1a(); } /* DB DD */
|
||||||
OP(dd,1b) { illegal_1(); op_1b(); } /* DB DD */
|
OP(dd,1b) { illegal_1(); op_1b(); } /* DB DD */
|
||||||
OP(dd,1c) { illegal_1(); op_1c(); } /* DB DD */
|
OP(dd,1c) { illegal_1(); op_1c(); } /* DB DD */
|
||||||
@ -2034,34 +2051,34 @@ OP(dd,1e) { illegal_1(); op_1e(); } /* DB DD */
|
|||||||
OP(dd,1f) { illegal_1(); op_1f(); } /* DB DD */
|
OP(dd,1f) { illegal_1(); op_1f(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,20) { illegal_1(); op_20(); } /* DB DD */
|
OP(dd,20) { illegal_1(); op_20(); } /* DB DD */
|
||||||
OP(dd,21) { R++; IX = ARG16(); } /* LD IX,w */
|
OP(dd,21) { IX = ARG16(); } /* LD IX,w */
|
||||||
OP(dd,22) { R++; EA = ARG16(); WM16( EA, &Z80.ix ); MEMPTR = EA+1; } /* LD (w),IX */
|
OP(dd,22) { EA = ARG16(); WM16( EA, &Z80.ix ); MEMPTR = EA+1; } /* LD (w),IX */
|
||||||
OP(dd,23) { R++; IX++; } /* INC IX */
|
OP(dd,23) { IX++; } /* INC IX */
|
||||||
OP(dd,24) { R++; HX = INC(HX); } /* INC HX */
|
OP(dd,24) { HX = INC(HX); } /* INC HX */
|
||||||
OP(dd,25) { R++; HX = DEC(HX); } /* DEC HX */
|
OP(dd,25) { HX = DEC(HX); } /* DEC HX */
|
||||||
OP(dd,26) { R++; HX = ARG(); } /* LD HX,n */
|
OP(dd,26) { HX = ARG(); } /* LD HX,n */
|
||||||
OP(dd,27) { illegal_1(); op_27(); } /* DB DD */
|
OP(dd,27) { illegal_1(); op_27(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,28) { illegal_1(); op_28(); } /* DB DD */
|
OP(dd,28) { illegal_1(); op_28(); } /* DB DD */
|
||||||
OP(dd,29) { R++; ADD16(ix,ix); } /* ADD IX,IX */
|
OP(dd,29) { ADD16(ix,ix); } /* ADD IX,IX */
|
||||||
OP(dd,2a) { R++; EA = ARG16(); RM16( EA, &Z80.ix ); MEMPTR = EA+1; } /* LD IX,(w) */
|
OP(dd,2a) { EA = ARG16(); RM16( EA, &Z80.ix ); MEMPTR = EA+1; } /* LD IX,(w) */
|
||||||
OP(dd,2b) { R++; IX--; } /* DEC IX */
|
OP(dd,2b) { IX--; } /* DEC IX */
|
||||||
OP(dd,2c) { R++; LX = INC(LX); } /* INC LX */
|
OP(dd,2c) { LX = INC(LX); } /* INC LX */
|
||||||
OP(dd,2d) { R++; LX = DEC(LX); } /* DEC LX */
|
OP(dd,2d) { LX = DEC(LX); } /* DEC LX */
|
||||||
OP(dd,2e) { R++; LX = ARG(); } /* LD LX,n */
|
OP(dd,2e) { LX = ARG(); } /* LD LX,n */
|
||||||
OP(dd,2f) { illegal_1(); op_2f(); } /* DB DD */
|
OP(dd,2f) { illegal_1(); op_2f(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,30) { illegal_1(); op_30(); } /* DB DD */
|
OP(dd,30) { illegal_1(); op_30(); } /* DB DD */
|
||||||
OP(dd,31) { illegal_1(); op_31(); } /* DB DD */
|
OP(dd,31) { illegal_1(); op_31(); } /* DB DD */
|
||||||
OP(dd,32) { illegal_1(); op_32(); } /* DB DD */
|
OP(dd,32) { illegal_1(); op_32(); } /* DB DD */
|
||||||
OP(dd,33) { illegal_1(); op_33(); } /* DB DD */
|
OP(dd,33) { illegal_1(); op_33(); } /* DB DD */
|
||||||
OP(dd,34) { R++; EAX; WM( EA, INC(RM(EA)) ); } /* INC (IX+o) */
|
OP(dd,34) { EAX; WM( EA, INC(RM(EA)) ); } /* INC (IX+o) */
|
||||||
OP(dd,35) { R++; EAX; WM( EA, DEC(RM(EA)) ); } /* DEC (IX+o) */
|
OP(dd,35) { EAX; WM( EA, DEC(RM(EA)) ); } /* DEC (IX+o) */
|
||||||
OP(dd,36) { R++; EAX; WM( EA, ARG() ); } /* LD (IX+o),n */
|
OP(dd,36) { EAX; WM( EA, ARG() ); } /* LD (IX+o),n */
|
||||||
OP(dd,37) { illegal_1(); op_37(); } /* DB DD */
|
OP(dd,37) { illegal_1(); op_37(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,38) { illegal_1(); op_38(); } /* DB DD */
|
OP(dd,38) { illegal_1(); op_38(); } /* DB DD */
|
||||||
OP(dd,39) { R++; ADD16(ix,sp); } /* ADD IX,SP */
|
OP(dd,39) { ADD16(ix,sp); } /* ADD IX,SP */
|
||||||
OP(dd,3a) { illegal_1(); op_3a(); } /* DB DD */
|
OP(dd,3a) { illegal_1(); op_3a(); } /* DB DD */
|
||||||
OP(dd,3b) { illegal_1(); op_3b(); } /* DB DD */
|
OP(dd,3b) { illegal_1(); op_3b(); } /* DB DD */
|
||||||
OP(dd,3c) { illegal_1(); op_3c(); } /* DB DD */
|
OP(dd,3c) { illegal_1(); op_3c(); } /* DB DD */
|
||||||
@ -2073,144 +2090,144 @@ OP(dd,40) { illegal_1(); op_40(); } /* DB DD */
|
|||||||
OP(dd,41) { illegal_1(); op_41(); } /* DB DD */
|
OP(dd,41) { illegal_1(); op_41(); } /* DB DD */
|
||||||
OP(dd,42) { illegal_1(); op_42(); } /* DB DD */
|
OP(dd,42) { illegal_1(); op_42(); } /* DB DD */
|
||||||
OP(dd,43) { illegal_1(); op_43(); } /* DB DD */
|
OP(dd,43) { illegal_1(); op_43(); } /* DB DD */
|
||||||
OP(dd,44) { R++; B = HX; } /* LD B,HX */
|
OP(dd,44) { B = HX; } /* LD B,HX */
|
||||||
OP(dd,45) { R++; B = LX; } /* LD B,LX */
|
OP(dd,45) { B = LX; } /* LD B,LX */
|
||||||
OP(dd,46) { R++; EAX; B = RM(EA); } /* LD B,(IX+o) */
|
OP(dd,46) { EAX; B = RM(EA); } /* LD B,(IX+o) */
|
||||||
OP(dd,47) { illegal_1(); op_47(); } /* DB DD */
|
OP(dd,47) { illegal_1(); op_47(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,48) { illegal_1(); op_48(); } /* DB DD */
|
OP(dd,48) { illegal_1(); op_48(); } /* DB DD */
|
||||||
OP(dd,49) { illegal_1(); op_49(); } /* DB DD */
|
OP(dd,49) { illegal_1(); op_49(); } /* DB DD */
|
||||||
OP(dd,4a) { illegal_1(); op_4a(); } /* DB DD */
|
OP(dd,4a) { illegal_1(); op_4a(); } /* DB DD */
|
||||||
OP(dd,4b) { illegal_1(); op_4b(); } /* DB DD */
|
OP(dd,4b) { illegal_1(); op_4b(); } /* DB DD */
|
||||||
OP(dd,4c) { R++; C = HX; } /* LD C,HX */
|
OP(dd,4c) { C = HX; } /* LD C,HX */
|
||||||
OP(dd,4d) { R++; C = LX; } /* LD C,LX */
|
OP(dd,4d) { C = LX; } /* LD C,LX */
|
||||||
OP(dd,4e) { R++; EAX; C = RM(EA); } /* LD C,(IX+o) */
|
OP(dd,4e) { EAX; C = RM(EA); } /* LD C,(IX+o) */
|
||||||
OP(dd,4f) { illegal_1(); op_4f(); } /* DB DD */
|
OP(dd,4f) { illegal_1(); op_4f(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,50) { illegal_1(); op_50(); } /* DB DD */
|
OP(dd,50) { illegal_1(); op_50(); } /* DB DD */
|
||||||
OP(dd,51) { illegal_1(); op_51(); } /* DB DD */
|
OP(dd,51) { illegal_1(); op_51(); } /* DB DD */
|
||||||
OP(dd,52) { illegal_1(); op_52(); } /* DB DD */
|
OP(dd,52) { illegal_1(); op_52(); } /* DB DD */
|
||||||
OP(dd,53) { illegal_1(); op_53(); } /* DB DD */
|
OP(dd,53) { illegal_1(); op_53(); } /* DB DD */
|
||||||
OP(dd,54) { R++; D = HX; } /* LD D,HX */
|
OP(dd,54) { D = HX; } /* LD D,HX */
|
||||||
OP(dd,55) { R++; D = LX; } /* LD D,LX */
|
OP(dd,55) { D = LX; } /* LD D,LX */
|
||||||
OP(dd,56) { R++; EAX; D = RM(EA); } /* LD D,(IX+o) */
|
OP(dd,56) { EAX; D = RM(EA); } /* LD D,(IX+o) */
|
||||||
OP(dd,57) { illegal_1(); op_57(); } /* DB DD */
|
OP(dd,57) { illegal_1(); op_57(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,58) { illegal_1(); op_58(); } /* DB DD */
|
OP(dd,58) { illegal_1(); op_58(); } /* DB DD */
|
||||||
OP(dd,59) { illegal_1(); op_59(); } /* DB DD */
|
OP(dd,59) { illegal_1(); op_59(); } /* DB DD */
|
||||||
OP(dd,5a) { illegal_1(); op_5a(); } /* DB DD */
|
OP(dd,5a) { illegal_1(); op_5a(); } /* DB DD */
|
||||||
OP(dd,5b) { illegal_1(); op_5b(); } /* DB DD */
|
OP(dd,5b) { illegal_1(); op_5b(); } /* DB DD */
|
||||||
OP(dd,5c) { R++; E = HX; } /* LD E,HX */
|
OP(dd,5c) { E = HX; } /* LD E,HX */
|
||||||
OP(dd,5d) { R++; E = LX; } /* LD E,LX */
|
OP(dd,5d) { E = LX; } /* LD E,LX */
|
||||||
OP(dd,5e) { R++; EAX; E = RM(EA); } /* LD E,(IX+o) */
|
OP(dd,5e) { EAX; E = RM(EA); } /* LD E,(IX+o) */
|
||||||
OP(dd,5f) { illegal_1(); op_5f(); } /* DB DD */
|
OP(dd,5f) { illegal_1(); op_5f(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,60) { R++; HX = B; } /* LD HX,B */
|
OP(dd,60) { HX = B; } /* LD HX,B */
|
||||||
OP(dd,61) { R++; HX = C; } /* LD HX,C */
|
OP(dd,61) { HX = C; } /* LD HX,C */
|
||||||
OP(dd,62) { R++; HX = D; } /* LD HX,D */
|
OP(dd,62) { HX = D; } /* LD HX,D */
|
||||||
OP(dd,63) { R++; HX = E; } /* LD HX,E */
|
OP(dd,63) { HX = E; } /* LD HX,E */
|
||||||
OP(dd,64) { } /* LD HX,HX */
|
OP(dd,64) { } /* LD HX,HX */
|
||||||
OP(dd,65) { R++; HX = LX; } /* LD HX,LX */
|
OP(dd,65) { HX = LX; } /* LD HX,LX */
|
||||||
OP(dd,66) { R++; EAX; H = RM(EA); } /* LD H,(IX+o) */
|
OP(dd,66) { EAX; H = RM(EA); } /* LD H,(IX+o) */
|
||||||
OP(dd,67) { R++; HX = A; } /* LD HX,A */
|
OP(dd,67) { HX = A; } /* LD HX,A */
|
||||||
|
|
||||||
OP(dd,68) { R++; LX = B; } /* LD LX,B */
|
OP(dd,68) { LX = B; } /* LD LX,B */
|
||||||
OP(dd,69) { R++; LX = C; } /* LD LX,C */
|
OP(dd,69) { LX = C; } /* LD LX,C */
|
||||||
OP(dd,6a) { R++; LX = D; } /* LD LX,D */
|
OP(dd,6a) { LX = D; } /* LD LX,D */
|
||||||
OP(dd,6b) { R++; LX = E; } /* LD LX,E */
|
OP(dd,6b) { LX = E; } /* LD LX,E */
|
||||||
OP(dd,6c) { R++; LX = HX; } /* LD LX,HX */
|
OP(dd,6c) { LX = HX; } /* LD LX,HX */
|
||||||
OP(dd,6d) { } /* LD LX,LX */
|
OP(dd,6d) { } /* LD LX,LX */
|
||||||
OP(dd,6e) { R++; EAX; L = RM(EA); } /* LD L,(IX+o) */
|
OP(dd,6e) { EAX; L = RM(EA); } /* LD L,(IX+o) */
|
||||||
OP(dd,6f) { R++; LX = A; } /* LD LX,A */
|
OP(dd,6f) { LX = A; } /* LD LX,A */
|
||||||
|
|
||||||
OP(dd,70) { R++; EAX; WM( EA, B ); } /* LD (IX+o),B */
|
OP(dd,70) { EAX; WM( EA, B ); } /* LD (IX+o),B */
|
||||||
OP(dd,71) { R++; EAX; WM( EA, C ); } /* LD (IX+o),C */
|
OP(dd,71) { EAX; WM( EA, C ); } /* LD (IX+o),C */
|
||||||
OP(dd,72) { R++; EAX; WM( EA, D ); } /* LD (IX+o),D */
|
OP(dd,72) { EAX; WM( EA, D ); } /* LD (IX+o),D */
|
||||||
OP(dd,73) { R++; EAX; WM( EA, E ); } /* LD (IX+o),E */
|
OP(dd,73) { EAX; WM( EA, E ); } /* LD (IX+o),E */
|
||||||
OP(dd,74) { R++; EAX; WM( EA, H ); } /* LD (IX+o),H */
|
OP(dd,74) { EAX; WM( EA, H ); } /* LD (IX+o),H */
|
||||||
OP(dd,75) { R++; EAX; WM( EA, L ); } /* LD (IX+o),L */
|
OP(dd,75) { EAX; WM( EA, L ); } /* LD (IX+o),L */
|
||||||
OP(dd,76) { illegal_1(); op_76(); } /* DB DD */
|
OP(dd,76) { illegal_1(); op_76(); } /* DB DD */
|
||||||
OP(dd,77) { R++; EAX; WM( EA, A ); } /* LD (IX+o),A */
|
OP(dd,77) { EAX; WM( EA, A ); } /* LD (IX+o),A */
|
||||||
|
|
||||||
OP(dd,78) { illegal_1(); op_78(); } /* DB DD */
|
OP(dd,78) { illegal_1(); op_78(); } /* DB DD */
|
||||||
OP(dd,79) { illegal_1(); op_79(); } /* DB DD */
|
OP(dd,79) { illegal_1(); op_79(); } /* DB DD */
|
||||||
OP(dd,7a) { illegal_1(); op_7a(); } /* DB DD */
|
OP(dd,7a) { illegal_1(); op_7a(); } /* DB DD */
|
||||||
OP(dd,7b) { illegal_1(); op_7b(); } /* DB DD */
|
OP(dd,7b) { illegal_1(); op_7b(); } /* DB DD */
|
||||||
OP(dd,7c) { R++; A = HX; } /* LD A,HX */
|
OP(dd,7c) { A = HX; } /* LD A,HX */
|
||||||
OP(dd,7d) { R++; A = LX; } /* LD A,LX */
|
OP(dd,7d) { A = LX; } /* LD A,LX */
|
||||||
OP(dd,7e) { R++; EAX; A = RM(EA); } /* LD A,(IX+o) */
|
OP(dd,7e) { EAX; A = RM(EA); } /* LD A,(IX+o) */
|
||||||
OP(dd,7f) { illegal_1(); op_7f(); } /* DB DD */
|
OP(dd,7f) { illegal_1(); op_7f(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,80) { illegal_1(); op_80(); } /* DB DD */
|
OP(dd,80) { illegal_1(); op_80(); } /* DB DD */
|
||||||
OP(dd,81) { illegal_1(); op_81(); } /* DB DD */
|
OP(dd,81) { illegal_1(); op_81(); } /* DB DD */
|
||||||
OP(dd,82) { illegal_1(); op_82(); } /* DB DD */
|
OP(dd,82) { illegal_1(); op_82(); } /* DB DD */
|
||||||
OP(dd,83) { illegal_1(); op_83(); } /* DB DD */
|
OP(dd,83) { illegal_1(); op_83(); } /* DB DD */
|
||||||
OP(dd,84) { R++; ADD(HX); } /* ADD A,HX */
|
OP(dd,84) { ADD(HX); } /* ADD A,HX */
|
||||||
OP(dd,85) { R++; ADD(LX); } /* ADD A,LX */
|
OP(dd,85) { ADD(LX); } /* ADD A,LX */
|
||||||
OP(dd,86) { R++; EAX; ADD(RM(EA)); } /* ADD A,(IX+o) */
|
OP(dd,86) { EAX; ADD(RM(EA)); } /* ADD A,(IX+o) */
|
||||||
OP(dd,87) { illegal_1(); op_87(); } /* DB DD */
|
OP(dd,87) { illegal_1(); op_87(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,88) { illegal_1(); op_88(); } /* DB DD */
|
OP(dd,88) { illegal_1(); op_88(); } /* DB DD */
|
||||||
OP(dd,89) { illegal_1(); op_89(); } /* DB DD */
|
OP(dd,89) { illegal_1(); op_89(); } /* DB DD */
|
||||||
OP(dd,8a) { illegal_1(); op_8a(); } /* DB DD */
|
OP(dd,8a) { illegal_1(); op_8a(); } /* DB DD */
|
||||||
OP(dd,8b) { illegal_1(); op_8b(); } /* DB DD */
|
OP(dd,8b) { illegal_1(); op_8b(); } /* DB DD */
|
||||||
OP(dd,8c) { R++; ADC(HX); } /* ADC A,HX */
|
OP(dd,8c) { ADC(HX); } /* ADC A,HX */
|
||||||
OP(dd,8d) { R++; ADC(LX); } /* ADC A,LX */
|
OP(dd,8d) { ADC(LX); } /* ADC A,LX */
|
||||||
OP(dd,8e) { R++; EAX; ADC(RM(EA)); } /* ADC A,(IX+o) */
|
OP(dd,8e) { EAX; ADC(RM(EA)); } /* ADC A,(IX+o) */
|
||||||
OP(dd,8f) { illegal_1(); op_8f(); } /* DB DD */
|
OP(dd,8f) { illegal_1(); op_8f(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,90) { illegal_1(); op_90(); } /* DB DD */
|
OP(dd,90) { illegal_1(); op_90(); } /* DB DD */
|
||||||
OP(dd,91) { illegal_1(); op_91(); } /* DB DD */
|
OP(dd,91) { illegal_1(); op_91(); } /* DB DD */
|
||||||
OP(dd,92) { illegal_1(); op_92(); } /* DB DD */
|
OP(dd,92) { illegal_1(); op_92(); } /* DB DD */
|
||||||
OP(dd,93) { illegal_1(); op_93(); } /* DB DD */
|
OP(dd,93) { illegal_1(); op_93(); } /* DB DD */
|
||||||
OP(dd,94) { R++; SUB(HX); } /* SUB HX */
|
OP(dd,94) { SUB(HX); } /* SUB HX */
|
||||||
OP(dd,95) { R++; SUB(LX); } /* SUB LX */
|
OP(dd,95) { SUB(LX); } /* SUB LX */
|
||||||
OP(dd,96) { R++; EAX; SUB(RM(EA)); } /* SUB (IX+o) */
|
OP(dd,96) { EAX; SUB(RM(EA)); } /* SUB (IX+o) */
|
||||||
OP(dd,97) { illegal_1(); op_97(); } /* DB DD */
|
OP(dd,97) { illegal_1(); op_97(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,98) { illegal_1(); op_98(); } /* DB DD */
|
OP(dd,98) { illegal_1(); op_98(); } /* DB DD */
|
||||||
OP(dd,99) { illegal_1(); op_99(); } /* DB DD */
|
OP(dd,99) { illegal_1(); op_99(); } /* DB DD */
|
||||||
OP(dd,9a) { illegal_1(); op_9a(); } /* DB DD */
|
OP(dd,9a) { illegal_1(); op_9a(); } /* DB DD */
|
||||||
OP(dd,9b) { illegal_1(); op_9b(); } /* DB DD */
|
OP(dd,9b) { illegal_1(); op_9b(); } /* DB DD */
|
||||||
OP(dd,9c) { R++; SBC(HX); } /* SBC A,HX */
|
OP(dd,9c) { SBC(HX); } /* SBC A,HX */
|
||||||
OP(dd,9d) { R++; SBC(LX); } /* SBC A,LX */
|
OP(dd,9d) { SBC(LX); } /* SBC A,LX */
|
||||||
OP(dd,9e) { R++; EAX; SBC(RM(EA)); } /* SBC A,(IX+o) */
|
OP(dd,9e) { EAX; SBC(RM(EA)); } /* SBC A,(IX+o) */
|
||||||
OP(dd,9f) { illegal_1(); op_9f(); } /* DB DD */
|
OP(dd,9f) { illegal_1(); op_9f(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,a0) { illegal_1(); op_a0(); } /* DB DD */
|
OP(dd,a0) { illegal_1(); op_a0(); } /* DB DD */
|
||||||
OP(dd,a1) { illegal_1(); op_a1(); } /* DB DD */
|
OP(dd,a1) { illegal_1(); op_a1(); } /* DB DD */
|
||||||
OP(dd,a2) { illegal_1(); op_a2(); } /* DB DD */
|
OP(dd,a2) { illegal_1(); op_a2(); } /* DB DD */
|
||||||
OP(dd,a3) { illegal_1(); op_a3(); } /* DB DD */
|
OP(dd,a3) { illegal_1(); op_a3(); } /* DB DD */
|
||||||
OP(dd,a4) { R++; AND(HX); } /* AND HX */
|
OP(dd,a4) { AND(HX); } /* AND HX */
|
||||||
OP(dd,a5) { R++; AND(LX); } /* AND LX */
|
OP(dd,a5) { AND(LX); } /* AND LX */
|
||||||
OP(dd,a6) { R++; EAX; AND(RM(EA)); } /* AND (IX+o) */
|
OP(dd,a6) { EAX; AND(RM(EA)); } /* AND (IX+o) */
|
||||||
OP(dd,a7) { illegal_1(); op_a7(); } /* DB DD */
|
OP(dd,a7) { illegal_1(); op_a7(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,a8) { illegal_1(); op_a8(); } /* DB DD */
|
OP(dd,a8) { illegal_1(); op_a8(); } /* DB DD */
|
||||||
OP(dd,a9) { illegal_1(); op_a9(); } /* DB DD */
|
OP(dd,a9) { illegal_1(); op_a9(); } /* DB DD */
|
||||||
OP(dd,aa) { illegal_1(); op_aa(); } /* DB DD */
|
OP(dd,aa) { illegal_1(); op_aa(); } /* DB DD */
|
||||||
OP(dd,ab) { illegal_1(); op_ab(); } /* DB DD */
|
OP(dd,ab) { illegal_1(); op_ab(); } /* DB DD */
|
||||||
OP(dd,ac) { R++; XOR(HX); } /* XOR HX */
|
OP(dd,ac) { XOR(HX); } /* XOR HX */
|
||||||
OP(dd,ad) { R++; XOR(LX); } /* XOR LX */
|
OP(dd,ad) { XOR(LX); } /* XOR LX */
|
||||||
OP(dd,ae) { R++; EAX; XOR(RM(EA)); } /* XOR (IX+o) */
|
OP(dd,ae) { EAX; XOR(RM(EA)); } /* XOR (IX+o) */
|
||||||
OP(dd,af) { illegal_1(); op_af(); } /* DB DD */
|
OP(dd,af) { illegal_1(); op_af(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,b0) { illegal_1(); op_b0(); } /* DB DD */
|
OP(dd,b0) { illegal_1(); op_b0(); } /* DB DD */
|
||||||
OP(dd,b1) { illegal_1(); op_b1(); } /* DB DD */
|
OP(dd,b1) { illegal_1(); op_b1(); } /* DB DD */
|
||||||
OP(dd,b2) { illegal_1(); op_b2(); } /* DB DD */
|
OP(dd,b2) { illegal_1(); op_b2(); } /* DB DD */
|
||||||
OP(dd,b3) { illegal_1(); op_b3(); } /* DB DD */
|
OP(dd,b3) { illegal_1(); op_b3(); } /* DB DD */
|
||||||
OP(dd,b4) { R++; OR(HX); } /* OR HX */
|
OP(dd,b4) { OR(HX); } /* OR HX */
|
||||||
OP(dd,b5) { R++; OR(LX); } /* OR LX */
|
OP(dd,b5) { OR(LX); } /* OR LX */
|
||||||
OP(dd,b6) { R++; EAX; OR(RM(EA)); } /* OR (IX+o) */
|
OP(dd,b6) { EAX; OR(RM(EA)); } /* OR (IX+o) */
|
||||||
OP(dd,b7) { illegal_1(); op_b7(); } /* DB DD */
|
OP(dd,b7) { illegal_1(); op_b7(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,b8) { illegal_1(); op_b8(); } /* DB DD */
|
OP(dd,b8) { illegal_1(); op_b8(); } /* DB DD */
|
||||||
OP(dd,b9) { illegal_1(); op_b9(); } /* DB DD */
|
OP(dd,b9) { illegal_1(); op_b9(); } /* DB DD */
|
||||||
OP(dd,ba) { illegal_1(); op_ba(); } /* DB DD */
|
OP(dd,ba) { illegal_1(); op_ba(); } /* DB DD */
|
||||||
OP(dd,bb) { illegal_1(); op_bb(); } /* DB DD */
|
OP(dd,bb) { illegal_1(); op_bb(); } /* DB DD */
|
||||||
OP(dd,bc) { R++; CP(HX); } /* CP HX */
|
OP(dd,bc) { CP(HX); } /* CP HX */
|
||||||
OP(dd,bd) { R++; CP(LX); } /* CP LX */
|
OP(dd,bd) { CP(LX); } /* CP LX */
|
||||||
OP(dd,be) { R++; EAX; CP(RM(EA)); } /* CP (IX+o) */
|
OP(dd,be) { EAX; CP(RM(EA)); } /* CP (IX+o) */
|
||||||
OP(dd,bf) { illegal_1(); op_bf(); } /* DB DD */
|
OP(dd,bf) { illegal_1(); op_bf(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,c0) { illegal_1(); op_c0(); } /* DB DD */
|
OP(dd,c0) { illegal_1(); op_c0(); } /* DB DD */
|
||||||
@ -2225,7 +2242,7 @@ OP(dd,c7) { illegal_1(); op_c7(); } /* DB DD */
|
|||||||
OP(dd,c8) { illegal_1(); op_c8(); } /* DB DD */
|
OP(dd,c8) { illegal_1(); op_c8(); } /* DB DD */
|
||||||
OP(dd,c9) { illegal_1(); op_c9(); } /* DB DD */
|
OP(dd,c9) { illegal_1(); op_c9(); } /* DB DD */
|
||||||
OP(dd,ca) { illegal_1(); op_ca(); } /* DB DD */
|
OP(dd,ca) { illegal_1(); op_ca(); } /* DB DD */
|
||||||
OP(dd,cb) { R++; EAX; EXEC(xycb,ARG()); } /* ** DD CB xx */
|
OP(dd,cb) { EAX; EXEC(xycb,ARG()); } /* **** DD CB xx */
|
||||||
OP(dd,cc) { illegal_1(); op_cc(); } /* DB DD */
|
OP(dd,cc) { illegal_1(); op_cc(); } /* DB DD */
|
||||||
OP(dd,cd) { illegal_1(); op_cd(); } /* DB DD */
|
OP(dd,cd) { illegal_1(); op_cd(); } /* DB DD */
|
||||||
OP(dd,ce) { illegal_1(); op_ce(); } /* DB DD */
|
OP(dd,ce) { illegal_1(); op_ce(); } /* DB DD */
|
||||||
@ -2245,21 +2262,21 @@ OP(dd,d9) { illegal_1(); op_d9(); } /* DB DD */
|
|||||||
OP(dd,da) { illegal_1(); op_da(); } /* DB DD */
|
OP(dd,da) { illegal_1(); op_da(); } /* DB DD */
|
||||||
OP(dd,db) { illegal_1(); op_db(); } /* DB DD */
|
OP(dd,db) { illegal_1(); op_db(); } /* DB DD */
|
||||||
OP(dd,dc) { illegal_1(); op_dc(); } /* DB DD */
|
OP(dd,dc) { illegal_1(); op_dc(); } /* DB DD */
|
||||||
OP(dd,dd) { illegal_1(); op_dd(); } /* DB DD */
|
OP(dd,dd) { EXEC(dd,ROP()); } /* **** DD DD xx */
|
||||||
OP(dd,de) { illegal_1(); op_de(); } /* DB DD */
|
OP(dd,de) { illegal_1(); op_de(); } /* DB DD */
|
||||||
OP(dd,df) { illegal_1(); op_df(); } /* DB DD */
|
OP(dd,df) { illegal_1(); op_df(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,e0) { illegal_1(); op_e0(); } /* DB DD */
|
OP(dd,e0) { illegal_1(); op_e0(); } /* DB DD */
|
||||||
OP(dd,e1) { R++; POP( ix ); } /* POP IX */
|
OP(dd,e1) { POP( ix ); } /* POP IX */
|
||||||
OP(dd,e2) { illegal_1(); op_e2(); } /* DB DD */
|
OP(dd,e2) { illegal_1(); op_e2(); } /* DB DD */
|
||||||
OP(dd,e3) { R++; EXSP( ix ); } /* EX (SP),IX */
|
OP(dd,e3) { EXSP( ix ); } /* EX (SP),IX */
|
||||||
OP(dd,e4) { illegal_1(); op_e4(); } /* DB DD */
|
OP(dd,e4) { illegal_1(); op_e4(); } /* DB DD */
|
||||||
OP(dd,e5) { R++; PUSH( ix ); } /* PUSH IX */
|
OP(dd,e5) { PUSH( ix ); } /* PUSH IX */
|
||||||
OP(dd,e6) { illegal_1(); op_e6(); } /* DB DD */
|
OP(dd,e6) { illegal_1(); op_e6(); } /* DB DD */
|
||||||
OP(dd,e7) { illegal_1(); op_e7(); } /* DB DD */
|
OP(dd,e7) { illegal_1(); op_e7(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,e8) { illegal_1(); op_e8(); } /* DB DD */
|
OP(dd,e8) { illegal_1(); op_e8(); } /* DB DD */
|
||||||
OP(dd,e9) { R++; PC = IX; } /* JP (IX) */
|
OP(dd,e9) { PC = IX; } /* JP (IX) */
|
||||||
OP(dd,ea) { illegal_1(); op_ea(); } /* DB DD */
|
OP(dd,ea) { illegal_1(); op_ea(); } /* DB DD */
|
||||||
OP(dd,eb) { illegal_1(); op_eb(); } /* DB DD */
|
OP(dd,eb) { illegal_1(); op_eb(); } /* DB DD */
|
||||||
OP(dd,ec) { illegal_1(); op_ec(); } /* DB DD */
|
OP(dd,ec) { illegal_1(); op_ec(); } /* DB DD */
|
||||||
@ -2277,11 +2294,11 @@ OP(dd,f6) { illegal_1(); op_f6(); } /* DB DD */
|
|||||||
OP(dd,f7) { illegal_1(); op_f7(); } /* DB DD */
|
OP(dd,f7) { illegal_1(); op_f7(); } /* DB DD */
|
||||||
|
|
||||||
OP(dd,f8) { illegal_1(); op_f8(); } /* DB DD */
|
OP(dd,f8) { illegal_1(); op_f8(); } /* DB DD */
|
||||||
OP(dd,f9) { R++; SP = IX; } /* LD SP,IX */
|
OP(dd,f9) { SP = IX; } /* LD SP,IX */
|
||||||
OP(dd,fa) { illegal_1(); op_fa(); } /* DB DD */
|
OP(dd,fa) { illegal_1(); op_fa(); } /* DB DD */
|
||||||
OP(dd,fb) { illegal_1(); op_fb(); } /* DB DD */
|
OP(dd,fb) { illegal_1(); op_fb(); } /* DB DD */
|
||||||
OP(dd,fc) { illegal_1(); op_fc(); } /* DB DD */
|
OP(dd,fc) { illegal_1(); op_fc(); } /* DB DD */
|
||||||
OP(dd,fd) { illegal_1(); op_fd(); } /* DB DD */
|
OP(dd,fd) { EXEC(fd,ROP()); } /* **** DD FD xx */
|
||||||
OP(dd,fe) { illegal_1(); op_fe(); } /* DB DD */
|
OP(dd,fe) { illegal_1(); op_fe(); } /* DB DD */
|
||||||
OP(dd,ff) { illegal_1(); op_ff(); } /* DB DD */
|
OP(dd,ff) { illegal_1(); op_ff(); } /* DB DD */
|
||||||
|
|
||||||
@ -2298,7 +2315,7 @@ OP(fd,06) { illegal_1(); op_06(); } /* DB FD */
|
|||||||
OP(fd,07) { illegal_1(); op_07(); } /* DB FD */
|
OP(fd,07) { illegal_1(); op_07(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,08) { illegal_1(); op_08(); } /* DB FD */
|
OP(fd,08) { illegal_1(); op_08(); } /* DB FD */
|
||||||
OP(fd,09) { R++; ADD16(iy,bc); } /* ADD IY,BC */
|
OP(fd,09) { ADD16(iy,bc); } /* ADD IY,BC */
|
||||||
OP(fd,0a) { illegal_1(); op_0a(); } /* DB FD */
|
OP(fd,0a) { illegal_1(); op_0a(); } /* DB FD */
|
||||||
OP(fd,0b) { illegal_1(); op_0b(); } /* DB FD */
|
OP(fd,0b) { illegal_1(); op_0b(); } /* DB FD */
|
||||||
OP(fd,0c) { illegal_1(); op_0c(); } /* DB FD */
|
OP(fd,0c) { illegal_1(); op_0c(); } /* DB FD */
|
||||||
@ -2316,7 +2333,7 @@ OP(fd,16) { illegal_1(); op_16(); } /* DB FD */
|
|||||||
OP(fd,17) { illegal_1(); op_17(); } /* DB FD */
|
OP(fd,17) { illegal_1(); op_17(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,18) { illegal_1(); op_18(); } /* DB FD */
|
OP(fd,18) { illegal_1(); op_18(); } /* DB FD */
|
||||||
OP(fd,19) { R++; ADD16(iy,de); } /* ADD IY,DE */
|
OP(fd,19) { ADD16(iy,de); } /* ADD IY,DE */
|
||||||
OP(fd,1a) { illegal_1(); op_1a(); } /* DB FD */
|
OP(fd,1a) { illegal_1(); op_1a(); } /* DB FD */
|
||||||
OP(fd,1b) { illegal_1(); op_1b(); } /* DB FD */
|
OP(fd,1b) { illegal_1(); op_1b(); } /* DB FD */
|
||||||
OP(fd,1c) { illegal_1(); op_1c(); } /* DB FD */
|
OP(fd,1c) { illegal_1(); op_1c(); } /* DB FD */
|
||||||
@ -2325,34 +2342,34 @@ OP(fd,1e) { illegal_1(); op_1e(); } /* DB FD */
|
|||||||
OP(fd,1f) { illegal_1(); op_1f(); } /* DB FD */
|
OP(fd,1f) { illegal_1(); op_1f(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,20) { illegal_1(); op_20(); } /* DB FD */
|
OP(fd,20) { illegal_1(); op_20(); } /* DB FD */
|
||||||
OP(fd,21) { R++; IY = ARG16(); } /* LD IY,w */
|
OP(fd,21) { IY = ARG16(); } /* LD IY,w */
|
||||||
OP(fd,22) { R++; EA = ARG16(); WM16( EA, &Z80.iy ); MEMPTR = EA+1; } /* LD (w),IY */
|
OP(fd,22) { EA = ARG16(); WM16( EA, &Z80.iy ); MEMPTR = EA+1; } /* LD (w),IY */
|
||||||
OP(fd,23) { R++; IY++; } /* INC IY */
|
OP(fd,23) { IY++; } /* INC IY */
|
||||||
OP(fd,24) { R++; HY = INC(HY); } /* INC HY */
|
OP(fd,24) { HY = INC(HY); } /* INC HY */
|
||||||
OP(fd,25) { R++; HY = DEC(HY); } /* DEC HY */
|
OP(fd,25) { HY = DEC(HY); } /* DEC HY */
|
||||||
OP(fd,26) { R++; HY = ARG(); } /* LD HY,n */
|
OP(fd,26) { HY = ARG(); } /* LD HY,n */
|
||||||
OP(fd,27) { illegal_1(); op_27(); } /* DB FD */
|
OP(fd,27) { illegal_1(); op_27(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,28) { illegal_1(); op_28(); } /* DB FD */
|
OP(fd,28) { illegal_1(); op_28(); } /* DB FD */
|
||||||
OP(fd,29) { R++; ADD16(iy,iy); } /* ADD IY,IY */
|
OP(fd,29) { ADD16(iy,iy); } /* ADD IY,IY */
|
||||||
OP(fd,2a) { R++; EA = ARG16(); RM16( EA, &Z80.iy ); MEMPTR = EA+1; } /* LD IY,(w) */
|
OP(fd,2a) { EA = ARG16(); RM16( EA, &Z80.iy ); MEMPTR = EA+1; } /* LD IY,(w) */
|
||||||
OP(fd,2b) { R++; IY--; } /* DEC IY */
|
OP(fd,2b) { IY--; } /* DEC IY */
|
||||||
OP(fd,2c) { R++; LY = INC(LY); } /* INC LY */
|
OP(fd,2c) { LY = INC(LY); } /* INC LY */
|
||||||
OP(fd,2d) { R++; LY = DEC(LY); } /* DEC LY */
|
OP(fd,2d) { LY = DEC(LY); } /* DEC LY */
|
||||||
OP(fd,2e) { R++; LY = ARG(); } /* LD LY,n */
|
OP(fd,2e) { LY = ARG(); } /* LD LY,n */
|
||||||
OP(fd,2f) { illegal_1(); op_2f(); } /* DB FD */
|
OP(fd,2f) { illegal_1(); op_2f(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,30) { illegal_1(); op_30(); } /* DB FD */
|
OP(fd,30) { illegal_1(); op_30(); } /* DB FD */
|
||||||
OP(fd,31) { illegal_1(); op_31(); } /* DB FD */
|
OP(fd,31) { illegal_1(); op_31(); } /* DB FD */
|
||||||
OP(fd,32) { illegal_1(); op_32(); } /* DB FD */
|
OP(fd,32) { illegal_1(); op_32(); } /* DB FD */
|
||||||
OP(fd,33) { illegal_1(); op_33(); } /* DB FD */
|
OP(fd,33) { illegal_1(); op_33(); } /* DB FD */
|
||||||
OP(fd,34) { R++; EAY; WM( EA, INC(RM(EA)) ); } /* INC (IY+o) */
|
OP(fd,34) { EAY; WM( EA, INC(RM(EA)) ); } /* INC (IY+o) */
|
||||||
OP(fd,35) { R++; EAY; WM( EA, DEC(RM(EA)) ); } /* DEC (IY+o) */
|
OP(fd,35) { EAY; WM( EA, DEC(RM(EA)) ); } /* DEC (IY+o) */
|
||||||
OP(fd,36) { R++; EAY; WM( EA, ARG() ); } /* LD (IY+o),n */
|
OP(fd,36) { EAY; WM( EA, ARG() ); } /* LD (IY+o),n */
|
||||||
OP(fd,37) { illegal_1(); op_37(); } /* DB FD */
|
OP(fd,37) { illegal_1(); op_37(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,38) { illegal_1(); op_38(); } /* DB FD */
|
OP(fd,38) { illegal_1(); op_38(); } /* DB FD */
|
||||||
OP(fd,39) { R++; ADD16(iy,sp); } /* ADD IY,SP */
|
OP(fd,39) { ADD16(iy,sp); } /* ADD IY,SP */
|
||||||
OP(fd,3a) { illegal_1(); op_3a(); } /* DB FD */
|
OP(fd,3a) { illegal_1(); op_3a(); } /* DB FD */
|
||||||
OP(fd,3b) { illegal_1(); op_3b(); } /* DB FD */
|
OP(fd,3b) { illegal_1(); op_3b(); } /* DB FD */
|
||||||
OP(fd,3c) { illegal_1(); op_3c(); } /* DB FD */
|
OP(fd,3c) { illegal_1(); op_3c(); } /* DB FD */
|
||||||
@ -2364,144 +2381,144 @@ OP(fd,40) { illegal_1(); op_40(); } /* DB FD */
|
|||||||
OP(fd,41) { illegal_1(); op_41(); } /* DB FD */
|
OP(fd,41) { illegal_1(); op_41(); } /* DB FD */
|
||||||
OP(fd,42) { illegal_1(); op_42(); } /* DB FD */
|
OP(fd,42) { illegal_1(); op_42(); } /* DB FD */
|
||||||
OP(fd,43) { illegal_1(); op_43(); } /* DB FD */
|
OP(fd,43) { illegal_1(); op_43(); } /* DB FD */
|
||||||
OP(fd,44) { R++; B = HY; } /* LD B,HY */
|
OP(fd,44) { B = HY; } /* LD B,HY */
|
||||||
OP(fd,45) { R++; B = LY; } /* LD B,LY */
|
OP(fd,45) { B = LY; } /* LD B,LY */
|
||||||
OP(fd,46) { R++; EAY; B = RM(EA); } /* LD B,(IY+o) */
|
OP(fd,46) { EAY; B = RM(EA); } /* LD B,(IY+o) */
|
||||||
OP(fd,47) { illegal_1(); op_47(); } /* DB FD */
|
OP(fd,47) { illegal_1(); op_47(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,48) { illegal_1(); op_48(); } /* DB FD */
|
OP(fd,48) { illegal_1(); op_48(); } /* DB FD */
|
||||||
OP(fd,49) { illegal_1(); op_49(); } /* DB FD */
|
OP(fd,49) { illegal_1(); op_49(); } /* DB FD */
|
||||||
OP(fd,4a) { illegal_1(); op_4a(); } /* DB FD */
|
OP(fd,4a) { illegal_1(); op_4a(); } /* DB FD */
|
||||||
OP(fd,4b) { illegal_1(); op_4b(); } /* DB FD */
|
OP(fd,4b) { illegal_1(); op_4b(); } /* DB FD */
|
||||||
OP(fd,4c) { R++; C = HY; } /* LD C,HY */
|
OP(fd,4c) { C = HY; } /* LD C,HY */
|
||||||
OP(fd,4d) { R++; C = LY; } /* LD C,LY */
|
OP(fd,4d) { C = LY; } /* LD C,LY */
|
||||||
OP(fd,4e) { R++; EAY; C = RM(EA); } /* LD C,(IY+o) */
|
OP(fd,4e) { EAY; C = RM(EA); } /* LD C,(IY+o) */
|
||||||
OP(fd,4f) { illegal_1(); op_4f(); } /* DB FD */
|
OP(fd,4f) { illegal_1(); op_4f(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,50) { illegal_1(); op_50(); } /* DB FD */
|
OP(fd,50) { illegal_1(); op_50(); } /* DB FD */
|
||||||
OP(fd,51) { illegal_1(); op_51(); } /* DB FD */
|
OP(fd,51) { illegal_1(); op_51(); } /* DB FD */
|
||||||
OP(fd,52) { illegal_1(); op_52(); } /* DB FD */
|
OP(fd,52) { illegal_1(); op_52(); } /* DB FD */
|
||||||
OP(fd,53) { illegal_1(); op_53(); } /* DB FD */
|
OP(fd,53) { illegal_1(); op_53(); } /* DB FD */
|
||||||
OP(fd,54) { R++; D = HY; } /* LD D,HY */
|
OP(fd,54) { D = HY; } /* LD D,HY */
|
||||||
OP(fd,55) { R++; D = LY; } /* LD D,LY */
|
OP(fd,55) { D = LY; } /* LD D,LY */
|
||||||
OP(fd,56) { R++; EAY; D = RM(EA); } /* LD D,(IY+o) */
|
OP(fd,56) { EAY; D = RM(EA); } /* LD D,(IY+o) */
|
||||||
OP(fd,57) { illegal_1(); op_57(); } /* DB FD */
|
OP(fd,57) { illegal_1(); op_57(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,58) { illegal_1(); op_58(); } /* DB FD */
|
OP(fd,58) { illegal_1(); op_58(); } /* DB FD */
|
||||||
OP(fd,59) { illegal_1(); op_59(); } /* DB FD */
|
OP(fd,59) { illegal_1(); op_59(); } /* DB FD */
|
||||||
OP(fd,5a) { illegal_1(); op_5a(); } /* DB FD */
|
OP(fd,5a) { illegal_1(); op_5a(); } /* DB FD */
|
||||||
OP(fd,5b) { illegal_1(); op_5b(); } /* DB FD */
|
OP(fd,5b) { illegal_1(); op_5b(); } /* DB FD */
|
||||||
OP(fd,5c) { R++; E = HY; } /* LD E,HY */
|
OP(fd,5c) { E = HY; } /* LD E,HY */
|
||||||
OP(fd,5d) { R++; E = LY; } /* LD E,LY */
|
OP(fd,5d) { E = LY; } /* LD E,LY */
|
||||||
OP(fd,5e) { R++; EAY; E = RM(EA); } /* LD E,(IY+o) */
|
OP(fd,5e) { EAY; E = RM(EA); } /* LD E,(IY+o) */
|
||||||
OP(fd,5f) { illegal_1(); op_5f(); } /* DB FD */
|
OP(fd,5f) { illegal_1(); op_5f(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,60) { R++; HY = B; } /* LD HY,B */
|
OP(fd,60) { HY = B; } /* LD HY,B */
|
||||||
OP(fd,61) { R++; HY = C; } /* LD HY,C */
|
OP(fd,61) { HY = C; } /* LD HY,C */
|
||||||
OP(fd,62) { R++; HY = D; } /* LD HY,D */
|
OP(fd,62) { HY = D; } /* LD HY,D */
|
||||||
OP(fd,63) { R++; HY = E; } /* LD HY,E */
|
OP(fd,63) { HY = E; } /* LD HY,E */
|
||||||
OP(fd,64) { R++; } /* LD HY,HY */
|
OP(fd,64) { } /* LD HY,HY */
|
||||||
OP(fd,65) { R++; HY = LY; } /* LD HY,LY */
|
OP(fd,65) { HY = LY; } /* LD HY,LY */
|
||||||
OP(fd,66) { R++; EAY; H = RM(EA); } /* LD H,(IY+o) */
|
OP(fd,66) { EAY; H = RM(EA); } /* LD H,(IY+o) */
|
||||||
OP(fd,67) { R++; HY = A; } /* LD HY,A */
|
OP(fd,67) { HY = A; } /* LD HY,A */
|
||||||
|
|
||||||
OP(fd,68) { R++; LY = B; } /* LD LY,B */
|
OP(fd,68) { LY = B; } /* LD LY,B */
|
||||||
OP(fd,69) { R++; LY = C; } /* LD LY,C */
|
OP(fd,69) { LY = C; } /* LD LY,C */
|
||||||
OP(fd,6a) { R++; LY = D; } /* LD LY,D */
|
OP(fd,6a) { LY = D; } /* LD LY,D */
|
||||||
OP(fd,6b) { R++; LY = E; } /* LD LY,E */
|
OP(fd,6b) { LY = E; } /* LD LY,E */
|
||||||
OP(fd,6c) { R++; LY = HY; } /* LD LY,HY */
|
OP(fd,6c) { LY = HY; } /* LD LY,HY */
|
||||||
OP(fd,6d) { R++; } /* LD LY,LY */
|
OP(fd,6d) { } /* LD LY,LY */
|
||||||
OP(fd,6e) { R++; EAY; L = RM(EA); } /* LD L,(IY+o) */
|
OP(fd,6e) { EAY; L = RM(EA); } /* LD L,(IY+o) */
|
||||||
OP(fd,6f) { R++; LY = A; } /* LD LY,A */
|
OP(fd,6f) { LY = A; } /* LD LY,A */
|
||||||
|
|
||||||
OP(fd,70) { R++; EAY; WM( EA, B ); } /* LD (IY+o),B */
|
OP(fd,70) { EAY; WM( EA, B ); } /* LD (IY+o),B */
|
||||||
OP(fd,71) { R++; EAY; WM( EA, C ); } /* LD (IY+o),C */
|
OP(fd,71) { EAY; WM( EA, C ); } /* LD (IY+o),C */
|
||||||
OP(fd,72) { R++; EAY; WM( EA, D ); } /* LD (IY+o),D */
|
OP(fd,72) { EAY; WM( EA, D ); } /* LD (IY+o),D */
|
||||||
OP(fd,73) { R++; EAY; WM( EA, E ); } /* LD (IY+o),E */
|
OP(fd,73) { EAY; WM( EA, E ); } /* LD (IY+o),E */
|
||||||
OP(fd,74) { R++; EAY; WM( EA, H ); } /* LD (IY+o),H */
|
OP(fd,74) { EAY; WM( EA, H ); } /* LD (IY+o),H */
|
||||||
OP(fd,75) { R++; EAY; WM( EA, L ); } /* LD (IY+o),L */
|
OP(fd,75) { EAY; WM( EA, L ); } /* LD (IY+o),L */
|
||||||
OP(fd,76) { illegal_1(); op_76(); } /* DB FD */
|
OP(fd,76) { illegal_1(); op_76(); } /* DB FD */
|
||||||
OP(fd,77) { R++; EAY; WM( EA, A ); } /* LD (IY+o),A */
|
OP(fd,77) { EAY; WM( EA, A ); } /* LD (IY+o),A */
|
||||||
|
|
||||||
OP(fd,78) { illegal_1(); op_78(); } /* DB FD */
|
OP(fd,78) { illegal_1(); op_78(); } /* DB FD */
|
||||||
OP(fd,79) { illegal_1(); op_79(); } /* DB FD */
|
OP(fd,79) { illegal_1(); op_79(); } /* DB FD */
|
||||||
OP(fd,7a) { illegal_1(); op_7a(); } /* DB FD */
|
OP(fd,7a) { illegal_1(); op_7a(); } /* DB FD */
|
||||||
OP(fd,7b) { illegal_1(); op_7b(); } /* DB FD */
|
OP(fd,7b) { illegal_1(); op_7b(); } /* DB FD */
|
||||||
OP(fd,7c) { R++; A = HY; } /* LD A,HY */
|
OP(fd,7c) { A = HY; } /* LD A,HY */
|
||||||
OP(fd,7d) { R++; A = LY; } /* LD A,LY */
|
OP(fd,7d) { A = LY; } /* LD A,LY */
|
||||||
OP(fd,7e) { R++; EAY; A = RM(EA); } /* LD A,(IY+o) */
|
OP(fd,7e) { EAY; A = RM(EA); } /* LD A,(IY+o) */
|
||||||
OP(fd,7f) { illegal_1(); op_7f(); } /* DB FD */
|
OP(fd,7f) { illegal_1(); op_7f(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,80) { illegal_1(); op_80(); } /* DB FD */
|
OP(fd,80) { illegal_1(); op_80(); } /* DB FD */
|
||||||
OP(fd,81) { illegal_1(); op_81(); } /* DB FD */
|
OP(fd,81) { illegal_1(); op_81(); } /* DB FD */
|
||||||
OP(fd,82) { illegal_1(); op_82(); } /* DB FD */
|
OP(fd,82) { illegal_1(); op_82(); } /* DB FD */
|
||||||
OP(fd,83) { illegal_1(); op_83(); } /* DB FD */
|
OP(fd,83) { illegal_1(); op_83(); } /* DB FD */
|
||||||
OP(fd,84) { R++; ADD(HY); } /* ADD A,HY */
|
OP(fd,84) { ADD(HY); } /* ADD A,HY */
|
||||||
OP(fd,85) { R++; ADD(LY); } /* ADD A,LY */
|
OP(fd,85) { ADD(LY); } /* ADD A,LY */
|
||||||
OP(fd,86) { R++; EAY; ADD(RM(EA)); } /* ADD A,(IY+o) */
|
OP(fd,86) { EAY; ADD(RM(EA)); } /* ADD A,(IY+o) */
|
||||||
OP(fd,87) { illegal_1(); op_87(); } /* DB FD */
|
OP(fd,87) { illegal_1(); op_87(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,88) { illegal_1(); op_88(); } /* DB FD */
|
OP(fd,88) { illegal_1(); op_88(); } /* DB FD */
|
||||||
OP(fd,89) { illegal_1(); op_89(); } /* DB FD */
|
OP(fd,89) { illegal_1(); op_89(); } /* DB FD */
|
||||||
OP(fd,8a) { illegal_1(); op_8a(); } /* DB FD */
|
OP(fd,8a) { illegal_1(); op_8a(); } /* DB FD */
|
||||||
OP(fd,8b) { illegal_1(); op_8b(); } /* DB FD */
|
OP(fd,8b) { illegal_1(); op_8b(); } /* DB FD */
|
||||||
OP(fd,8c) { R++; ADC(HY); } /* ADC A,HY */
|
OP(fd,8c) { ADC(HY); } /* ADC A,HY */
|
||||||
OP(fd,8d) { R++; ADC(LY); } /* ADC A,LY */
|
OP(fd,8d) { ADC(LY); } /* ADC A,LY */
|
||||||
OP(fd,8e) { R++; EAY; ADC(RM(EA)); } /* ADC A,(IY+o) */
|
OP(fd,8e) { EAY; ADC(RM(EA)); } /* ADC A,(IY+o) */
|
||||||
OP(fd,8f) { illegal_1(); op_8f(); } /* DB FD */
|
OP(fd,8f) { illegal_1(); op_8f(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,90) { illegal_1(); op_90(); } /* DB FD */
|
OP(fd,90) { illegal_1(); op_90(); } /* DB FD */
|
||||||
OP(fd,91) { illegal_1(); op_91(); } /* DB FD */
|
OP(fd,91) { illegal_1(); op_91(); } /* DB FD */
|
||||||
OP(fd,92) { illegal_1(); op_92(); } /* DB FD */
|
OP(fd,92) { illegal_1(); op_92(); } /* DB FD */
|
||||||
OP(fd,93) { illegal_1(); op_93(); } /* DB FD */
|
OP(fd,93) { illegal_1(); op_93(); } /* DB FD */
|
||||||
OP(fd,94) { R++; SUB(HY); } /* SUB HY */
|
OP(fd,94) { SUB(HY); } /* SUB HY */
|
||||||
OP(fd,95) { R++; SUB(LY); } /* SUB LY */
|
OP(fd,95) { SUB(LY); } /* SUB LY */
|
||||||
OP(fd,96) { R++; EAY; SUB(RM(EA)); } /* SUB (IY+o) */
|
OP(fd,96) { EAY; SUB(RM(EA)); } /* SUB (IY+o) */
|
||||||
OP(fd,97) { illegal_1(); op_97(); } /* DB FD */
|
OP(fd,97) { illegal_1(); op_97(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,98) { illegal_1(); op_98(); } /* DB FD */
|
OP(fd,98) { illegal_1(); op_98(); } /* DB FD */
|
||||||
OP(fd,99) { illegal_1(); op_99(); } /* DB FD */
|
OP(fd,99) { illegal_1(); op_99(); } /* DB FD */
|
||||||
OP(fd,9a) { illegal_1(); op_9a(); } /* DB FD */
|
OP(fd,9a) { illegal_1(); op_9a(); } /* DB FD */
|
||||||
OP(fd,9b) { illegal_1(); op_9b(); } /* DB FD */
|
OP(fd,9b) { illegal_1(); op_9b(); } /* DB FD */
|
||||||
OP(fd,9c) { R++; SBC(HY); } /* SBC A,HY */
|
OP(fd,9c) { SBC(HY); } /* SBC A,HY */
|
||||||
OP(fd,9d) { R++; SBC(LY); } /* SBC A,LY */
|
OP(fd,9d) { SBC(LY); } /* SBC A,LY */
|
||||||
OP(fd,9e) { R++; EAY; SBC(RM(EA)); } /* SBC A,(IY+o) */
|
OP(fd,9e) { EAY; SBC(RM(EA)); } /* SBC A,(IY+o) */
|
||||||
OP(fd,9f) { illegal_1(); op_9f(); } /* DB FD */
|
OP(fd,9f) { illegal_1(); op_9f(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,a0) { illegal_1(); op_a0(); } /* DB FD */
|
OP(fd,a0) { illegal_1(); op_a0(); } /* DB FD */
|
||||||
OP(fd,a1) { illegal_1(); op_a1(); } /* DB FD */
|
OP(fd,a1) { illegal_1(); op_a1(); } /* DB FD */
|
||||||
OP(fd,a2) { illegal_1(); op_a2(); } /* DB FD */
|
OP(fd,a2) { illegal_1(); op_a2(); } /* DB FD */
|
||||||
OP(fd,a3) { illegal_1(); op_a3(); } /* DB FD */
|
OP(fd,a3) { illegal_1(); op_a3(); } /* DB FD */
|
||||||
OP(fd,a4) { R++; AND(HY); } /* AND HY */
|
OP(fd,a4) { AND(HY); } /* AND HY */
|
||||||
OP(fd,a5) { R++; AND(LY); } /* AND LY */
|
OP(fd,a5) { AND(LY); } /* AND LY */
|
||||||
OP(fd,a6) { R++; EAY; AND(RM(EA)); } /* AND (IY+o) */
|
OP(fd,a6) { EAY; AND(RM(EA)); } /* AND (IY+o) */
|
||||||
OP(fd,a7) { illegal_1(); op_a7(); } /* DB FD */
|
OP(fd,a7) { illegal_1(); op_a7(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,a8) { illegal_1(); op_a8(); } /* DB FD */
|
OP(fd,a8) { illegal_1(); op_a8(); } /* DB FD */
|
||||||
OP(fd,a9) { illegal_1(); op_a9(); } /* DB FD */
|
OP(fd,a9) { illegal_1(); op_a9(); } /* DB FD */
|
||||||
OP(fd,aa) { illegal_1(); op_aa(); } /* DB FD */
|
OP(fd,aa) { illegal_1(); op_aa(); } /* DB FD */
|
||||||
OP(fd,ab) { illegal_1(); op_ab(); } /* DB FD */
|
OP(fd,ab) { illegal_1(); op_ab(); } /* DB FD */
|
||||||
OP(fd,ac) { R++; XOR(HY); } /* XOR HY */
|
OP(fd,ac) { XOR(HY); } /* XOR HY */
|
||||||
OP(fd,ad) { R++; XOR(LY); } /* XOR LY */
|
OP(fd,ad) { XOR(LY); } /* XOR LY */
|
||||||
OP(fd,ae) { R++; EAY; XOR(RM(EA)); } /* XOR (IY+o) */
|
OP(fd,ae) { EAY; XOR(RM(EA)); } /* XOR (IY+o) */
|
||||||
OP(fd,af) { illegal_1(); op_af(); } /* DB FD */
|
OP(fd,af) { illegal_1(); op_af(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,b0) { illegal_1(); op_b0(); } /* DB FD */
|
OP(fd,b0) { illegal_1(); op_b0(); } /* DB FD */
|
||||||
OP(fd,b1) { illegal_1(); op_b1(); } /* DB FD */
|
OP(fd,b1) { illegal_1(); op_b1(); } /* DB FD */
|
||||||
OP(fd,b2) { illegal_1(); op_b2(); } /* DB FD */
|
OP(fd,b2) { illegal_1(); op_b2(); } /* DB FD */
|
||||||
OP(fd,b3) { illegal_1(); op_b3(); } /* DB FD */
|
OP(fd,b3) { illegal_1(); op_b3(); } /* DB FD */
|
||||||
OP(fd,b4) { R++; OR(HY); } /* OR HY */
|
OP(fd,b4) { OR(HY); } /* OR HY */
|
||||||
OP(fd,b5) { R++; OR(LY); } /* OR LY */
|
OP(fd,b5) { OR(LY); } /* OR LY */
|
||||||
OP(fd,b6) { R++; EAY; OR(RM(EA)); } /* OR (IY+o) */
|
OP(fd,b6) { EAY; OR(RM(EA)); } /* OR (IY+o) */
|
||||||
OP(fd,b7) { illegal_1(); op_b7(); } /* DB FD */
|
OP(fd,b7) { illegal_1(); op_b7(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,b8) { illegal_1(); op_b8(); } /* DB FD */
|
OP(fd,b8) { illegal_1(); op_b8(); } /* DB FD */
|
||||||
OP(fd,b9) { illegal_1(); op_b9(); } /* DB FD */
|
OP(fd,b9) { illegal_1(); op_b9(); } /* DB FD */
|
||||||
OP(fd,ba) { illegal_1(); op_ba(); } /* DB FD */
|
OP(fd,ba) { illegal_1(); op_ba(); } /* DB FD */
|
||||||
OP(fd,bb) { illegal_1(); op_bb(); } /* DB FD */
|
OP(fd,bb) { illegal_1(); op_bb(); } /* DB FD */
|
||||||
OP(fd,bc) { R++; CP(HY); } /* CP HY */
|
OP(fd,bc) { CP(HY); } /* CP HY */
|
||||||
OP(fd,bd) { R++; CP(LY); } /* CP LY */
|
OP(fd,bd) { CP(LY); } /* CP LY */
|
||||||
OP(fd,be) { R++; EAY; CP(RM(EA)); } /* CP (IY+o) */
|
OP(fd,be) { EAY; CP(RM(EA)); } /* CP (IY+o) */
|
||||||
OP(fd,bf) { illegal_1(); op_bf(); } /* DB FD */
|
OP(fd,bf) { illegal_1(); op_bf(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,c0) { illegal_1(); op_c0(); } /* DB FD */
|
OP(fd,c0) { illegal_1(); op_c0(); } /* DB FD */
|
||||||
@ -2516,7 +2533,7 @@ OP(fd,c7) { illegal_1(); op_c7(); } /* DB FD */
|
|||||||
OP(fd,c8) { illegal_1(); op_c8(); } /* DB FD */
|
OP(fd,c8) { illegal_1(); op_c8(); } /* DB FD */
|
||||||
OP(fd,c9) { illegal_1(); op_c9(); } /* DB FD */
|
OP(fd,c9) { illegal_1(); op_c9(); } /* DB FD */
|
||||||
OP(fd,ca) { illegal_1(); op_ca(); } /* DB FD */
|
OP(fd,ca) { illegal_1(); op_ca(); } /* DB FD */
|
||||||
OP(fd,cb) { R++; EAY; EXEC(xycb,ARG()); } /* ** FD CB xx */
|
OP(fd,cb) { EAY; EXEC(xycb,ARG()); } /* **** FD CB xx */
|
||||||
OP(fd,cc) { illegal_1(); op_cc(); } /* DB FD */
|
OP(fd,cc) { illegal_1(); op_cc(); } /* DB FD */
|
||||||
OP(fd,cd) { illegal_1(); op_cd(); } /* DB FD */
|
OP(fd,cd) { illegal_1(); op_cd(); } /* DB FD */
|
||||||
OP(fd,ce) { illegal_1(); op_ce(); } /* DB FD */
|
OP(fd,ce) { illegal_1(); op_ce(); } /* DB FD */
|
||||||
@ -2536,21 +2553,21 @@ OP(fd,d9) { illegal_1(); op_d9(); } /* DB FD */
|
|||||||
OP(fd,da) { illegal_1(); op_da(); } /* DB FD */
|
OP(fd,da) { illegal_1(); op_da(); } /* DB FD */
|
||||||
OP(fd,db) { illegal_1(); op_db(); } /* DB FD */
|
OP(fd,db) { illegal_1(); op_db(); } /* DB FD */
|
||||||
OP(fd,dc) { illegal_1(); op_dc(); } /* DB FD */
|
OP(fd,dc) { illegal_1(); op_dc(); } /* DB FD */
|
||||||
OP(fd,dd) { illegal_1(); op_dd(); } /* DB FD */
|
OP(fd,dd) { EXEC(dd,ROP()); } /* **** FD DD xx */
|
||||||
OP(fd,de) { illegal_1(); op_de(); } /* DB FD */
|
OP(fd,de) { illegal_1(); op_de(); } /* DB FD */
|
||||||
OP(fd,df) { illegal_1(); op_df(); } /* DB FD */
|
OP(fd,df) { illegal_1(); op_df(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,e0) { illegal_1(); op_e0(); } /* DB FD */
|
OP(fd,e0) { illegal_1(); op_e0(); } /* DB FD */
|
||||||
OP(fd,e1) { R++; POP( iy ); } /* POP IY */
|
OP(fd,e1) { POP( iy ); } /* POP IY */
|
||||||
OP(fd,e2) { illegal_1(); op_e2(); } /* DB FD */
|
OP(fd,e2) { illegal_1(); op_e2(); } /* DB FD */
|
||||||
OP(fd,e3) { R++; EXSP( iy ); } /* EX (SP),IY */
|
OP(fd,e3) { EXSP( iy ); } /* EX (SP),IY */
|
||||||
OP(fd,e4) { illegal_1(); op_e4(); } /* DB FD */
|
OP(fd,e4) { illegal_1(); op_e4(); } /* DB FD */
|
||||||
OP(fd,e5) { R++; PUSH( iy ); } /* PUSH IY */
|
OP(fd,e5) { PUSH( iy ); } /* PUSH IY */
|
||||||
OP(fd,e6) { illegal_1(); op_e6(); } /* DB FD */
|
OP(fd,e6) { illegal_1(); op_e6(); } /* DB FD */
|
||||||
OP(fd,e7) { illegal_1(); op_e7(); } /* DB FD */
|
OP(fd,e7) { illegal_1(); op_e7(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,e8) { illegal_1(); op_e8(); } /* DB FD */
|
OP(fd,e8) { illegal_1(); op_e8(); } /* DB FD */
|
||||||
OP(fd,e9) { R++; PC = IY; } /* JP (IY) */
|
OP(fd,e9) { PC = IY; } /* JP (IY) */
|
||||||
OP(fd,ea) { illegal_1(); op_ea(); } /* DB FD */
|
OP(fd,ea) { illegal_1(); op_ea(); } /* DB FD */
|
||||||
OP(fd,eb) { illegal_1(); op_eb(); } /* DB FD */
|
OP(fd,eb) { illegal_1(); op_eb(); } /* DB FD */
|
||||||
OP(fd,ec) { illegal_1(); op_ec(); } /* DB FD */
|
OP(fd,ec) { illegal_1(); op_ec(); } /* DB FD */
|
||||||
@ -2568,11 +2585,11 @@ OP(fd,f6) { illegal_1(); op_f6(); } /* DB FD */
|
|||||||
OP(fd,f7) { illegal_1(); op_f7(); } /* DB FD */
|
OP(fd,f7) { illegal_1(); op_f7(); } /* DB FD */
|
||||||
|
|
||||||
OP(fd,f8) { illegal_1(); op_f8(); } /* DB FD */
|
OP(fd,f8) { illegal_1(); op_f8(); } /* DB FD */
|
||||||
OP(fd,f9) { R++; SP = IY; } /* LD SP,IY */
|
OP(fd,f9) { SP = IY; } /* LD SP,IY */
|
||||||
OP(fd,fa) { illegal_1(); op_fa(); } /* DB FD */
|
OP(fd,fa) { illegal_1(); op_fa(); } /* DB FD */
|
||||||
OP(fd,fb) { illegal_1(); op_fb(); } /* DB FD */
|
OP(fd,fb) { illegal_1(); op_fb(); } /* DB FD */
|
||||||
OP(fd,fc) { illegal_1(); op_fc(); } /* DB FD */
|
OP(fd,fc) { illegal_1(); op_fc(); } /* DB FD */
|
||||||
OP(fd,fd) { illegal_1(); op_fd(); } /* DB FD */
|
OP(fd,fd) { EXEC(fd,ROP()); } /* **** FD FD xx */
|
||||||
OP(fd,fe) { illegal_1(); op_fe(); } /* DB FD */
|
OP(fd,fe) { illegal_1(); op_fe(); } /* DB FD */
|
||||||
OP(fd,ff) { illegal_1(); op_ff(); } /* DB FD */
|
OP(fd,ff) { illegal_1(); op_ff(); } /* DB FD */
|
||||||
|
|
||||||
@ -3172,9 +3189,6 @@ static void take_interrupt(void)
|
|||||||
{
|
{
|
||||||
int irq_vector;
|
int irq_vector;
|
||||||
|
|
||||||
/* there isn't a valid previous program counter */
|
|
||||||
PRVPC = -1;
|
|
||||||
|
|
||||||
/* Check if processor was halted */
|
/* Check if processor was halted */
|
||||||
LEAVE_HALT;
|
LEAVE_HALT;
|
||||||
|
|
||||||
@ -3193,8 +3207,8 @@ static void take_interrupt(void)
|
|||||||
PUSH( pc );
|
PUSH( pc );
|
||||||
RM16( irq_vector, &Z80.pc );
|
RM16( irq_vector, &Z80.pc );
|
||||||
LOG(("Z80 #%d IM2 [$%04x] = $%04x\n",cpu_getactivecpu() , irq_vector, PCD));
|
LOG(("Z80 #%d IM2 [$%04x] = $%04x\n",cpu_getactivecpu() , irq_vector, PCD));
|
||||||
/* CALL opcode timing */
|
/* CALL $xxxx + 'interrupt latency' cycles */
|
||||||
z80_ICount -= cc[Z80_TABLE_op][0xcd];
|
z80_ICount -= cc[Z80_TABLE_op][0xcd] + cc[Z80_TABLE_ex][0xff];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* Interrupt mode 1. RST 38h */
|
/* Interrupt mode 1. RST 38h */
|
||||||
@ -3328,6 +3342,7 @@ void z80_init(int index, int clock, const void *config, int (*irqcallback)(int))
|
|||||||
/* Reset registers to their initial values */
|
/* Reset registers to their initial values */
|
||||||
Z80.daisy = config;
|
Z80.daisy = config;
|
||||||
Z80.irq_callback = irqcallback;
|
Z80.irq_callback = irqcallback;
|
||||||
|
|
||||||
/* setup cycle tables */
|
/* setup cycle tables */
|
||||||
cc[Z80_TABLE_op] = cc_op;
|
cc[Z80_TABLE_op] = cc_op;
|
||||||
cc[Z80_TABLE_cb] = cc_cb;
|
cc[Z80_TABLE_cb] = cc_cb;
|
||||||
@ -3385,7 +3400,6 @@ int z80_execute(int cycles)
|
|||||||
if (Z80.nmi_pending)
|
if (Z80.nmi_pending)
|
||||||
{
|
{
|
||||||
LOG(("Z80 #%d take NMI\n", cpu_getactivecpu()));
|
LOG(("Z80 #%d take NMI\n", cpu_getactivecpu()));
|
||||||
PRVPC = -1; /* there isn't a valid previous program counter */
|
|
||||||
LEAVE_HALT; /* Check if processor was halted */
|
LEAVE_HALT; /* Check if processor was halted */
|
||||||
|
|
||||||
IFF1 = 0;
|
IFF1 = 0;
|
||||||
@ -3396,17 +3410,19 @@ int z80_execute(int cycles)
|
|||||||
Z80.nmi_pending = FALSE;
|
Z80.nmi_pending = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
while( z80_ICount > 0 )
|
||||||
{
|
{
|
||||||
/* check for IRQs before each instruction */
|
/* check for IRQs before each instruction */
|
||||||
if (Z80.irq_state != CLEAR_LINE && IFF1 && !Z80.after_ei)
|
if (Z80.irq_state != CLEAR_LINE && IFF1 && !Z80.after_ei)
|
||||||
take_interrupt();
|
take_interrupt();
|
||||||
Z80.after_ei = FALSE;
|
Z80.after_ei = FALSE;
|
||||||
|
|
||||||
PRVPC = PCD;
|
if (z80_ICount > 0)
|
||||||
|
{
|
||||||
R++;
|
R++;
|
||||||
EXEC_INLINE(op,ROP());
|
EXEC_INLINE(op,ROP());
|
||||||
} while( z80_ICount > 0 );
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return cycles - z80_ICount;
|
return cycles - z80_ICount;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user