--- upstream/dynamips-0.2.6-RC2/nmc93c46.c 2007/10/06 16:05:34 3 +++ upstream/dynamips-0.2.7-RC1/nmc93c46.c 2007/10/06 16:23:47 7 @@ -1,5 +1,5 @@ /* - * Cisco 7200 (Predator) simulation platform. + * Cisco router simulation platform. * Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr) * * NMC93C46 Serial EEPROM. @@ -122,10 +122,8 @@ #if DEBUG_EEPROM if (g->state[group_id].dataout_pos == 0) - printf("nmc93c46: %s(%d): read addr = %x (%d), data=%4.4x, " - "val = %4.4x\n", - g->description,group_id, - addr,addr,g->def[group_id]->data[addr], + printf("nmc93c46: %s(%d): read addr=%x (%d), val = %4.4x\n", + g->description,group_id,addr,addr, g->state[group_id].cmd_val); #endif @@ -180,6 +178,9 @@ res = g->eeprom_reg; for(i=0;inr_eeprom;i++) { + if (!(g->eeprom_reg & (1 << g->def[i]->select_bit))) + continue; + if (g->state[i].dataout_val) res |= 1 << g->def[i]->dout_bit; else