mirror of
https://github.com/holub/mame
synced 2025-06-01 18:41:47 +03:00
Removed unnecessary parameters from upd7220
This commit is contained in:
parent
2a91df12ac
commit
972513cb9a
@ -127,14 +127,14 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
|
||||
int res_x,res_y;
|
||||
int pen = (tile_data >> xi) & 1 ? color : 0;
|
||||
|
||||
if(yi >= 8) { pen = 0; }
|
||||
|
||||
res_x = x * 8 + xi;
|
||||
res_y = y * lr + yi;
|
||||
|
||||
if(res_x > screen_max_x || res_y > screen_max_y)
|
||||
if(!device->machine().primary_screen->visible_area().contains(res_x, res_y))
|
||||
continue;
|
||||
|
||||
if(yi >= 8) { pen = 0; }
|
||||
|
||||
bitmap.pix32(res_y, res_x) = palette[pen];
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
|
||||
res_x = (x*8+xi) * (1);
|
||||
res_y = y*lr+yi;
|
||||
|
||||
if(res_x > 640 || res_y > 494) //TODO
|
||||
if(!device->machine().primary_screen->visible_area().contains(res_x, res_y))
|
||||
continue;
|
||||
|
||||
/*
|
||||
|
@ -166,14 +166,14 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
|
||||
int res_x,res_y;
|
||||
int pen = (tile_data >> xi) & 1 ? 1 : 0;
|
||||
|
||||
if(yi >= 16) { pen = 0; }
|
||||
|
||||
res_x = x * 8 + xi;
|
||||
res_y = y * lr + yi;
|
||||
|
||||
if(res_x > screen_max_x || res_y > screen_max_y)
|
||||
if(!device->machine().primary_screen->visible_area().contains(res_x, res_y))
|
||||
continue;
|
||||
|
||||
if(yi >= 16) { pen = 0; }
|
||||
|
||||
bitmap.pix32(res_y, res_x) = palette[pen];
|
||||
}
|
||||
}
|
||||
|
@ -59,8 +59,8 @@
|
||||
- Apple Club 1: how to pass an hand?
|
||||
(Applesauce Pirates)
|
||||
|
||||
- Brandish 2: Intro needs some window masking effects;
|
||||
- Dragon Buster: missing bitplanes for the PCG (or not?), slight issue with window masking;
|
||||
- Brandish 2: Intro needs some window masking effects (or not?);
|
||||
- Dragon Buster: slight issue with window masking;
|
||||
- Far Side Moon: doesn't detect sound board (tied to 0x00ec ports)
|
||||
- Jan Borg Suzume: gets stuck at a pic8259 read;
|
||||
- Jump Hero: right status display isn't shown during gameplay (changes the mode dynamically?)
|
||||
@ -2855,7 +2855,8 @@ static INPUT_PORTS_START( pc9801 )
|
||||
PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_RESET PORT_SENSITIVITY(30) PORT_KEYDELTA(30)
|
||||
|
||||
PORT_START("MOUSE_B")
|
||||
PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_CODE(MOUSECODE_BUTTON3) PORT_NAME("Mouse Middle Button")
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_NAME("Mouse Right Button")
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_NAME("Mouse Left Button")
|
||||
@ -3234,7 +3235,7 @@ READ8_MEMBER(pc9801_state::ppi_mouse_porta_r)
|
||||
UINT8 isporthi;
|
||||
const char *const mousenames[] = { "MOUSE_X", "MOUSE_Y" };
|
||||
|
||||
res = ioport("MOUSE_B")->read() & 0xe0;
|
||||
res = ioport("MOUSE_B")->read() & 0xf0;
|
||||
isporthi = ((m_mouse.control & 0x20) >> 5)*4;
|
||||
|
||||
if((m_mouse.control & 0x80) == 0)
|
||||
|
@ -214,17 +214,17 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
|
||||
{
|
||||
int res_x,res_y;
|
||||
|
||||
res_x = x * 8 + xi;
|
||||
res_y = y * lr + yi;
|
||||
|
||||
if(!device->machine().primary_screen->visible_area().contains(res_x, res_y))
|
||||
continue;
|
||||
|
||||
if(yi >= 16)
|
||||
pen = 0;
|
||||
else
|
||||
pen = ((tile_data >> xi) & 1) ? color : 0;
|
||||
|
||||
res_x = x * 8 + xi;
|
||||
res_y = y * lr + yi;
|
||||
|
||||
if(res_x > screen_max_x || res_y > screen_max_y)
|
||||
continue;
|
||||
|
||||
if(pen)
|
||||
bitmap.pix32(res_y, res_x) = palette[pen];
|
||||
}
|
||||
|
@ -412,8 +412,9 @@ inline void upd7220_device::recompute_parameters()
|
||||
|
||||
if (LOG)
|
||||
{
|
||||
logerror("uPD7220 '%s' Screen: %u x %u @ %f Hz\n", tag(), horiz_pix_total, vert_pix_total, 1 / ATTOSECONDS_TO_DOUBLE(refresh));
|
||||
logerror("uPD7220 '%s' Visible Area: (%u, %u) - (%u, %u)\n", tag(), visarea.min_x, visarea.min_y, visarea.max_x, visarea.max_y);
|
||||
printf("uPD7220 '%s' Screen: %u x %u @ %f Hz\n", tag(), horiz_pix_total, vert_pix_total, 1 / ATTOSECONDS_TO_DOUBLE(refresh));
|
||||
printf("Visible Area: (%u, %u) - (%u, %u)\n", visarea.min_x, visarea.min_y, visarea.max_x, visarea.max_y);
|
||||
printf("%d %d %d %d\n",m_vs,m_vbp,m_al,m_vfp);
|
||||
}
|
||||
|
||||
if (m_m)
|
||||
@ -1570,7 +1571,7 @@ void upd7220_device::update_text(bitmap_rgb32 &bitmap, const rectangle &cliprect
|
||||
addr = sad + (y * m_pitch);
|
||||
|
||||
if (m_draw_text_cb)
|
||||
m_draw_text_cb(this, bitmap, addr, y, wd, m_pitch, 0, 0, m_aw * 8 - 1, m_al - 1, m_lr, m_dc, m_ead);
|
||||
m_draw_text_cb(this, bitmap, addr, y, wd, m_pitch, m_lr, m_dc, m_ead);
|
||||
}
|
||||
|
||||
sy = y + 1;
|
||||
@ -1637,7 +1638,7 @@ void upd7220_device::update_graphics(bitmap_rgb32 &bitmap, const rectangle &clip
|
||||
addr = (sad & 0x3ffff) + ((y / m_lr) * m_pitch);
|
||||
|
||||
if (m_draw_text_cb)
|
||||
m_draw_text_cb(this, bitmap, addr, (y + tsy) / m_lr, wd, m_pitch, 0, 0, m_aw * 8 - 1, len + bsy - 1, m_lr, m_dc, m_ead);
|
||||
m_draw_text_cb(this, bitmap, addr, (y + tsy) / m_lr, wd, m_pitch, m_lr, m_dc, m_ead);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,8 +67,8 @@
|
||||
typedef void (*upd7220_display_pixels_func)(device_t *device, bitmap_rgb32 &bitmap, int y, int x, UINT32 address);
|
||||
#define UPD7220_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_rgb32 &bitmap, int y, int x, UINT32 address)
|
||||
|
||||
typedef void (*upd7220_draw_text_line)(device_t *device, bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y,int lr, int cursor_on, int cursor_addr);
|
||||
#define UPD7220_DRAW_TEXT_LINE(name) void name(device_t *device, bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y,int lr, int cursor_on, int cursor_addr)
|
||||
typedef void (*upd7220_draw_text_line)(device_t *device, bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd, int pitch, int lr, int cursor_on, int cursor_addr);
|
||||
#define UPD7220_DRAW_TEXT_LINE(name) void name(device_t *device, bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd, int pitch, int lr, int cursor_on, int cursor_addr)
|
||||
|
||||
|
||||
// ======================> upd7220_interface
|
||||
|
Loading…
Reference in New Issue
Block a user