--- tme/machine/sun2/sun2-mainbus.c 2018/04/24 16:40:09 1.1.1.3 +++ tme/machine/sun2/sun2-mainbus.c 2018/04/24 16:45:20 1.1.1.6 @@ -1,4 +1,4 @@ -/* $Id: sun2-mainbus.c,v 1.1.1.3 2018/04/24 16:40:09 root Exp $ */ +/* $Id: sun2-mainbus.c,v 1.1.1.6 2018/04/24 16:45:20 root Exp $ */ /* machine/sun2/sun2-mainbus.c - implementation of Sun 2 emulation: */ @@ -34,7 +34,7 @@ */ #include -_TME_RCSID("$Id: sun2-mainbus.c,v 1.1.1.3 2018/04/24 16:40:09 root Exp $"); +_TME_RCSID("$Id: sun2-mainbus.c,v 1.1.1.6 2018/04/24 16:45:20 root Exp $"); /* includes: */ #include "sun2-impl.h" @@ -278,9 +278,6 @@ _tme_sun2_command(struct tme_element *el if (do_reset) { - /* reset the MMU: */ - _tme_sun2_mmu_reset(sun2); - /* reset the CPU: */ (*sun2->tme_sun2_m68k->tme_m68k_bus_connection.tme_bus_signal) (&sun2->tme_sun2_m68k->tme_m68k_bus_connection, @@ -347,7 +344,7 @@ _tme_sun2_connection_score(struct tme_co /* this must be an m68k chip, and not another bus: */ case TME_CONNECTION_BUS_M68K: - if (conn_bus->tme_bus_tlb_set_allocate == NULL + if (conn_bus->tme_bus_tlb_set_add == NULL && conn_m68k->tme_m68k_bus_tlb_fill == NULL) { score = 10; } @@ -355,7 +352,7 @@ _tme_sun2_connection_score(struct tme_co /* this must be a bus, and not a chip: */ case TME_CONNECTION_BUS_GENERIC: - if (conn_bus->tme_bus_tlb_set_allocate != NULL + if (conn_bus->tme_bus_tlb_set_add != NULL && conn_bus->tme_bus_tlb_fill != NULL && sun2->tme_sun2_buses[conn_sun2->tme_sun2_bus_connection_which] == NULL) { score = 1; @@ -443,7 +440,7 @@ _tme_sun2_connections_new(struct tme_ele /* fill in the generic bus connection: */ conn_bus->tme_bus_signal = _tme_sun2_bus_signal; conn_bus->tme_bus_intack = _tme_sun2_bus_intack; - conn_bus->tme_bus_tlb_set_allocate = _tme_sun2_mmu_tlb_set_allocate; + conn_bus->tme_bus_tlb_set_add = _tme_sun2_mmu_tlb_set_add; /* full in the m68k bus connection: */ conn_m68k->tme_m68k_bus_tlb_fill = _tme_sun2_m68k_tlb_fill; @@ -551,7 +548,7 @@ _tme_sun2_connections_new(struct tme_ele } conn_bus->tme_bus_signal = _tme_sun2_bus_signal; conn_bus->tme_bus_intack = NULL; - conn_bus->tme_bus_tlb_set_allocate = _tme_sun2_mmu_tlb_set_allocate; + conn_bus->tme_bus_tlb_set_add = _tme_sun2_mmu_tlb_set_add; conn_bus->tme_bus_tlb_fill = _tme_sun2_bus_tlb_fill; /* fill in the sun2 connection: */ @@ -619,11 +616,11 @@ TME_ELEMENT_NEW_DECL(tme_machine_sun2) { /* try to read in the IDPROM: */ idprom_fp = fopen(idprom_filename, "r"); if (idprom_fp == NULL) { - tme_output_append_error(_output, idprom_filename); + tme_output_append_error(_output, "%s", idprom_filename); return (errno); } if (fread(idprom, sizeof(tme_uint8_t), sizeof(idprom), idprom_fp) != sizeof(idprom)) { - tme_output_append_error(_output, idprom_filename); + tme_output_append_error(_output, "%s", idprom_filename); fclose(idprom_fp); return (ENOEXEC); } @@ -662,8 +659,8 @@ TME_ELEMENT_NEW_DECL(tme_machine_sun2) { sun2->tme_sun2_mbmem = NULL; sun2->tme_sun2_vmebus = NULL; - /* we don't have the CPU's reset TLBs yet: */ - sun2->tme_sun2_reset_tlbs = NULL; + /* we don't have the CPU's bus context register yet: */ + sun2->tme_sun2_m68k_bus_context = NULL; /* fill the element: */ element->tme_element_private = sun2; @@ -732,6 +729,9 @@ TME_ELEMENT_SUB_NEW_DECL(tme_machine_sun /* override the least lane in the z8530 socket: */ socket.tme_z8530_socket_port_least_lane = 1; /* D15-D8 */ + /* override the socket flags: */ + socket.tme_z8530_socket_flags |= TME_Z8530_SOCKET_FLAG_IEI_TIED_LOW; + /* create the z8530: */ sub_args[0] = "tme/ic/z8530"; sub_args[1] = NULL;