*\r
* You should have received a copy of the GNU General Public License\r
* along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\r
*/\r
\r
#include "mapinc.h"\r
\r
static uint16 cmdreg;\r
+static uint8 invalid_data;\r
static SFORMAT StateRegs[]=\r
{\r
+ {&invalid_data, 1, "INVD"}, \r
{&cmdreg, 2, "CMDREG"},\r
{0}\r
};\r
\r
static DECLFR(UNL8157Read)\r
{\r
- if(cmdreg&0x100)\r
+ if(invalid_data&&cmdreg&0x100)\r
return 0xFF;\r
else\r
return CartBR(A);\r
setchr8(0);\r
SetWriteHandler(0x8000,0xFFFF,UNL8157Write);\r
SetReadHandler(0x8000,0xFFFF,UNL8157Read);\r
- cmdreg=0;\r
+ cmdreg=0x200;\r
+ invalid_data=1;\r
Sync();\r
}\r
\r
static void UNL8157Reset(void)\r
{\r
cmdreg=0;\r
+ invalid_data^=1;\r
Sync();\r
}\r
\r