mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
(mess) x68k: don't copy so much with the crtc text copy op (nw)
This commit is contained in:
parent
6c1ca80f19
commit
d0c5b717ca
@ -107,8 +107,6 @@
|
||||
Dragon Buster: Text is black and unreadable. (Text layer actually covers it)
|
||||
Tetris: Black dots over screen (text layer).
|
||||
Parodius Da!: Black squares in areas.
|
||||
Akumajo Drac: no sfx starting on second stage (m68000 only, 030 is fine), simon sprite flickers
|
||||
|
||||
|
||||
More detailed documentation at http://x68kdev.emuvibes.com/iomap.html - if you can stand broken english :)
|
||||
|
||||
@ -709,25 +707,6 @@ WRITE_LINE_MEMBER( x68k_state::fdc_irq )
|
||||
m_maincpu->set_input_line(1, CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(x68k_state::x68k_fm_w)
|
||||
{
|
||||
switch(offset)
|
||||
{
|
||||
case 0x00:
|
||||
case 0x01:
|
||||
m_ym2151->write(space, offset, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
READ16_MEMBER(x68k_state::x68k_fm_r)
|
||||
{
|
||||
if(offset == 0x01)
|
||||
return m_ym2151->read(space, 1);
|
||||
|
||||
return 0xffff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(x68k_state::x68k_ct_w)
|
||||
{
|
||||
// CT1 and CT2 bits from YM2151 port 0x1b
|
||||
@ -1165,7 +1144,7 @@ static ADDRESS_MAP_START(x68k_map, AS_PROGRAM, 16, x68k_state )
|
||||
AM_RANGE(0xe8a000, 0xe8bfff) AM_DEVREADWRITE8(RP5C15_TAG, rp5c15_device, read, write, 0x00ff)
|
||||
// AM_RANGE(0xe8c000, 0xe8dfff) AM_READWRITE(x68k_printer_r, x68k_printer_w)
|
||||
AM_RANGE(0xe8e000, 0xe8ffff) AM_READWRITE(x68k_sysport_r, x68k_sysport_w)
|
||||
AM_RANGE(0xe90000, 0xe91fff) AM_READWRITE(x68k_fm_r, x68k_fm_w)
|
||||
AM_RANGE(0xe90000, 0xe91fff) AM_DEVREADWRITE8("ym2151", ym2151_device, read, write, 0x00ff)
|
||||
AM_RANGE(0xe92000, 0xe92001) AM_DEVREADWRITE8("okim6258", okim6258_device, okim6258_status_r, okim6258_ctrl_w, 0x00ff)
|
||||
AM_RANGE(0xe92002, 0xe92003) AM_DEVREADWRITE8("okim6258", okim6258_device, okim6258_status_r, okim6258_data_w, 0x00ff)
|
||||
AM_RANGE(0xe94000, 0xe94003) AM_DEVICE8("upd72065", upd72065_device, map, 0x00ff)
|
||||
@ -1202,7 +1181,7 @@ static ADDRESS_MAP_START(x68kxvi_map, AS_PROGRAM, 16, x68k_state )
|
||||
AM_RANGE(0xe8a000, 0xe8bfff) AM_DEVREADWRITE8(RP5C15_TAG, rp5c15_device, read, write, 0x00ff)
|
||||
// AM_RANGE(0xe8c000, 0xe8dfff) AM_READWRITE(x68k_printer_r, x68k_printer_w)
|
||||
AM_RANGE(0xe8e000, 0xe8ffff) AM_READWRITE(x68k_sysport_r, x68k_sysport_w)
|
||||
AM_RANGE(0xe90000, 0xe91fff) AM_READWRITE(x68k_fm_r, x68k_fm_w)
|
||||
AM_RANGE(0xe90000, 0xe91fff) AM_DEVREADWRITE8("ym2151", ym2151_device, read, write, 0x00ff)
|
||||
AM_RANGE(0xe92000, 0xe92001) AM_DEVREADWRITE8("okim6258", okim6258_device, okim6258_status_r, okim6258_ctrl_w, 0x00ff)
|
||||
AM_RANGE(0xe92002, 0xe92003) AM_DEVREADWRITE8("okim6258", okim6258_device, okim6258_status_r, okim6258_data_w, 0x00ff)
|
||||
AM_RANGE(0xe94000, 0xe94003) AM_DEVICE8("upd72065", upd72065_device, map, 0x00ff)
|
||||
@ -1241,7 +1220,7 @@ static ADDRESS_MAP_START(x68030_map, AS_PROGRAM, 32, x68k_state )
|
||||
AM_RANGE(0xe8a000, 0xe8bfff) AM_DEVREADWRITE8(RP5C15_TAG, rp5c15_device, read, write, 0x00ff00ff)
|
||||
// AM_RANGE(0xe8c000, 0xe8dfff) AM_READWRITE(x68k_printer_r, x68k_printer_w)
|
||||
AM_RANGE(0xe8e000, 0xe8ffff) AM_READWRITE16(x68k_sysport_r, x68k_sysport_w,0xffffffff)
|
||||
AM_RANGE(0xe90000, 0xe91fff) AM_READWRITE16(x68k_fm_r, x68k_fm_w,0xffffffff)
|
||||
AM_RANGE(0xe90000, 0xe91fff) AM_DEVREADWRITE8("ym2151", ym2151_device, read, write, 0x00ff00ff)
|
||||
AM_RANGE(0xe92000, 0xe92003) AM_DEVREAD8("okim6258", okim6258_device, okim6258_status_r, 0x00ff00ff) AM_WRITE8(x68030_adpcm_w, 0x00ff00ff)
|
||||
AM_RANGE(0xe94000, 0xe94003) AM_DEVICE8("upd72065", upd72065_device, map, 0x00ff00ff)
|
||||
AM_RANGE(0xe94004, 0xe94007) AM_READWRITE16(x68k_fdc_r, x68k_fdc_w,0xffffffff)
|
||||
|
@ -299,8 +299,6 @@ public:
|
||||
DECLARE_WRITE16_MEMBER(x68k_scc_w);
|
||||
DECLARE_WRITE16_MEMBER(x68k_fdc_w);
|
||||
DECLARE_READ16_MEMBER(x68k_fdc_r);
|
||||
DECLARE_WRITE16_MEMBER(x68k_fm_w);
|
||||
DECLARE_READ16_MEMBER(x68k_fm_r);
|
||||
DECLARE_WRITE16_MEMBER(x68k_ioc_w);
|
||||
DECLARE_READ16_MEMBER(x68k_ioc_r);
|
||||
DECLARE_WRITE16_MEMBER(x68k_sysport_w);
|
||||
@ -336,7 +334,7 @@ public:
|
||||
|
||||
private:
|
||||
inline void x68k_plot_pixel(bitmap_rgb32 &bitmap, int x, int y, UINT32 color);
|
||||
void x68k_crtc_text_copy(int src, int dest);
|
||||
void x68k_crtc_text_copy(int src, int dest, UINT8 planes);
|
||||
void x68k_crtc_refresh_mode();
|
||||
void x68k_draw_text(bitmap_rgb32 &bitmap, int xscr, int yscr, rectangle rect);
|
||||
bool x68k_draw_gfx_scanline(bitmap_ind16 &bitmap, rectangle cliprect, UINT8 priority);
|
||||
|
@ -24,9 +24,9 @@
|
||||
1 sprite layer - up to 128 16x16 sprites, 16 colours per sprite, maximum 16 sprites per scanline (not yet implemented).
|
||||
|
||||
Questions: What do the other bits in m_video.reg[2] do?
|
||||
What is "special priority mode"?
|
||||
How is the intensity applied during blending if at all?
|
||||
Black appears to be opaque only at priority 2 but not 3, is that right?
|
||||
How is the gfx layer cleared in pacland and text layer in akumajo?
|
||||
Are the gfx layers blended from the bottom up or all at once?
|
||||
|
||||
*/
|
||||
@ -90,28 +90,21 @@ bitmap_rgb32* ::x68k_get_gfx_page(int pri,int type)
|
||||
return NULL; // should never reach here either.
|
||||
}
|
||||
*/
|
||||
void x68k_state::x68k_crtc_text_copy(int src, int dest)
|
||||
void x68k_state::x68k_crtc_text_copy(int src, int dest, UINT8 planes)
|
||||
{
|
||||
// copys one raster in T-VRAM to another raster
|
||||
int src_ram = src * 256; // 128 bytes per scanline
|
||||
int dest_ram = dest * 256;
|
||||
int line;
|
||||
|
||||
if(dest > 250)
|
||||
return; // for some reason, Salamander causes a SIGSEGV in a debug build in this function.
|
||||
|
||||
for(line=0;line<8;line++)
|
||||
{
|
||||
// update RAM in each plane
|
||||
memcpy(m_tvram+dest_ram,m_tvram+src_ram,128);
|
||||
memcpy(m_tvram+dest_ram+0x10000,m_tvram+src_ram+0x10000,128);
|
||||
memcpy(m_tvram+dest_ram+0x20000,m_tvram+src_ram+0x20000,128);
|
||||
memcpy(m_tvram+dest_ram+0x30000,m_tvram+src_ram+0x30000,128);
|
||||
|
||||
src_ram+=64;
|
||||
dest_ram+=64;
|
||||
}
|
||||
|
||||
// update RAM in each plane
|
||||
if(planes & 1)
|
||||
memcpy(m_tvram+dest_ram,m_tvram+src_ram,512);
|
||||
if(planes & 2)
|
||||
memcpy(m_tvram+dest_ram+0x10000,m_tvram+src_ram+0x10000,512);
|
||||
if(planes & 4)
|
||||
memcpy(m_tvram+dest_ram+0x20000,m_tvram+src_ram+0x20000,512);
|
||||
if(planes & 8)
|
||||
memcpy(m_tvram+dest_ram+0x30000,m_tvram+src_ram+0x30000,512);
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::x68k_crtc_operation_end)
|
||||
@ -188,8 +181,8 @@ TIMER_CALLBACK_MEMBER(x68k_state::x68k_hsync)
|
||||
m_crtc.hblank = hstate;
|
||||
m_mfpdev->i7_w(!m_crtc.hblank);
|
||||
|
||||
if(m_crtc.operation & 8) // is this supposed to happen when the src or dest line is scanned?
|
||||
x68k_crtc_text_copy((m_crtc.reg[22] & 0xff00) >> 8,(m_crtc.reg[22] & 0x00ff));
|
||||
if(m_crtc.operation & 8)
|
||||
x68k_crtc_text_copy((m_crtc.reg[22] & 0xff00) >> 8,(m_crtc.reg[22] & 0x00ff),(m_crtc.reg[21] & 0xf));
|
||||
|
||||
if(m_crtc.vmultiple == 2) // 256-line (doublescan)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user