(MESS) Apollo updates: [Hans Ostermeyer]

* 3c505: fixed rare race conditions (between command response PCPs and receive packet PCPs)
   * receive command PCP data is now saved in m_rcv_response until receive occurs 
   * improved end of command recognition with set_command_pending
* 3c505: using now portable byte order functions from endian.h (lsb_first -> htole16)
* 3c505: implemented CMD_CONFIGURE_82586 (to skip broadcast and multicast ethernet packets)
* struct pcb_struct is now packed to correct size (byte packing)
* added pcb_struct m_rcv_response as a one element receive PCB queue
* provide ready signal for the floppy controller
* improved mouse behaviour (especially if mouse is not grabbed)
* delay response for boot_$volun (find partner node), so that real Apollo Workstations will be prefered as diskless boot server
This commit is contained in:
R. Belmont 2013-03-09 04:05:14 +00:00
parent 2533e6401e
commit 96427263e2
4 changed files with 426 additions and 355 deletions

File diff suppressed because it is too large Load Diff

View File

@ -440,7 +440,7 @@ READ8_MEMBER(apollo_state::apollo_dma_read_byte){
{
SLOG1(("dma read byte at offset %x+%03x = %02x", page_offset, offset, data));
}
// logerror(" %02x", data);
return data;
}
@ -460,6 +460,7 @@ WRITE8_MEMBER(apollo_state::apollo_dma_write_byte){
{
SLOG1(("dma write byte at offset %x+%03x = %02x", page_offset, offset , data));
}
// logerror(" %02x", data);
}
READ8_MEMBER(apollo_state::apollo_dma_read_word){
@ -1409,6 +1410,9 @@ MACHINE_START_MEMBER(apollo_state,apollo)
fdc->setup_intrq_cb(pc_fdc_at_device::line_cb(FUNC(apollo_state::fdc_interrupt), this));
fdc->setup_drq_cb(pc_fdc_at_device::line_cb(FUNC(apollo_state::fdc_dma_drq), this));
// motor is on, floppy disk is ready
fdc->fdc->ready_w(1);
device_start_apollo_ptm (machine().device(APOLLO_PTM_TAG) );
device_start_apollo_sio(machine().device(APOLLO_SIO_TAG));
device_start_apollo_sio2(machine().device(APOLLO_SIO2_TAG));

View File

@ -255,7 +255,7 @@ void apollo_kbd_device::mouse::read_mouse()
{
if (m_tx_pending > 0)
{
m_tx_pending -= 5;
m_tx_pending -= 5; // we will be called every 5ms
}
else
{
@ -263,6 +263,13 @@ void apollo_kbd_device::mouse::read_mouse()
int x = m_device->m_io_mouse2->read();
int y = m_device->m_io_mouse3->read();
/* sign extend values < 0 */
if (x & 0x800)
x |= 0xfffff000;
if (y & 0x800)
y |= 0xfffff000;
y = -y;
if (m_last_b < 0)
{
m_last_b = b;
@ -271,19 +278,24 @@ void apollo_kbd_device::mouse::read_mouse()
}
else if (b != m_last_b || x != m_last_x || y != m_last_y)
{
int dx = x - m_last_x;
int dy = y - m_last_y;
UINT8 mouse_data[4];
int mouse_data_size;
LOG2(("read_mouse: b=%02x x=%04x y=%04x dx=%d dy=%d", b, x, y, dx, dy));
int dx = x - m_last_x;
int dy = y - m_last_y;
// slow down huge mouse movements
dx = dx > 50 ? 50 : dx < -50 ? -50 : dx;
dy = dy > 50 ? 50 : dy < -50 ? -50 : dy;
LOG2(("read_mouse: b=%02x x=%d y=%d dx=%d dy=%d", b, x, y, dx, dy));
if (m_device->m_mode == KBD_MODE_0_COMPATIBILITY)
{
mouse_data[0] = 0xdf;
mouse_data[1] = 0xf0 ^ b;
mouse_data[2] = dx;
mouse_data[3] = -dy;
mouse_data[3] = dy;
mouse_data_size = 4;
}
else
@ -295,7 +307,7 @@ void apollo_kbd_device::mouse::read_mouse()
mouse_data[0] = 0xf0 ^ b;
mouse_data[1] = dx;
mouse_data[2] = -dy;
mouse_data[2] = dy;
mouse_data_size = 3;
}
@ -303,10 +315,10 @@ void apollo_kbd_device::mouse::read_mouse()
{
// mouse data submitted; update current mouse state
m_last_b = b;
m_last_x = x;
m_last_y = y;
m_last_x += dx;
m_last_y += dy;
}
m_tx_pending = 100; // mouse data packet will take 50 ms
m_tx_pending = 100; // mouse data packet will take 40 ms
}
}
}
@ -862,7 +874,7 @@ void apollo_kbd_device::poll_callback()
}
scan_keyboard();
// Note: we omit extra traffic while keyboard is in Compatibitlit mode
// Note: we omit extra traffic while keyboard is in Compatibility mode
if (m_device->m_mode != KBD_MODE_0_COMPATIBILITY)
{
m_mouse.read_mouse();
@ -1185,9 +1197,9 @@ INPUT_PORTS_START( apollo_kbd )
PORT_BIT( 0x00000040, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Center mouse button") PORT_CODE(MOUSECODE_BUTTON2)
PORT_START("mouse2") // X-axis
PORT_BIT( 0xfff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1)
PORT_BIT( 0xfff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(200) PORT_KEYDELTA(1) PORT_PLAYER(1)
PORT_START("mouse3") // Y-axis
PORT_BIT( 0xfff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1)
PORT_BIT( 0xfff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(200) PORT_KEYDELTA(1) PORT_PLAYER(1)
INPUT_PORTS_END

View File

@ -850,7 +850,7 @@ int apollo_netserver_receive(device_t *device, const UINT8 rx_data_buffer[],
}
else if (current_rx_data_length > 0)
{
LOG(("!!!! apollo_netserver_receive: busy - skipped data with length %02x",rx_data_length));
LOG1(("apollo_netserver_receive: busy - skipped data with length %02x",rx_data_length));
return 0;
}
else
@ -859,7 +859,7 @@ int apollo_netserver_receive(device_t *device, const UINT8 rx_data_buffer[],
current_rx_data_length = rx_data_length;
// delay response to multicast requests
int ms = is_apollo_multicast_address(rx_data_buffer) ? 100 : 1;
int ms = is_apollo_multicast_address(rx_data_buffer) ? 1000 : 1;
device->machine().scheduler().timer_set(attotime::from_msec(ms), FUNC(receive_interrupt), 0, device);
return 1;
}