From b9d2b3adaedbd2c633e7b38bccb9be8c57b02372 Mon Sep 17 00:00:00 2001 From: CaH4e3 Date: Thu, 28 Jan 2016 14:49:30 +0000 Subject: [PATCH] UNIF RT-01 - new dump "Test Ver. 1.01 Dlya Proverki TV Pristavok (RT-01, by SS aka Snake)(Unl)[U][!]" --- trunk/src/boards/rt-01.cpp | 53 +++++++++++++++++++++++++++++ trunk/src/unif.cpp | 1 + trunk/src/unif.h | 1 + trunk/vc/vc10_fceux.vcxproj | 1 + trunk/vc/vc10_fceux.vcxproj.filters | 3 ++ 5 files changed, 59 insertions(+) create mode 100644 trunk/src/boards/rt-01.cpp diff --git a/trunk/src/boards/rt-01.cpp b/trunk/src/boards/rt-01.cpp new file mode 100644 index 00000000..2c0591c0 --- /dev/null +++ b/trunk/src/boards/rt-01.cpp @@ -0,0 +1,53 @@ +/* FCE Ultra - NES/Famicom Emulator + * + * Copyright notice for this file: + * Copyright (C) 2016 CaH4e3 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Test Ver. 1.01 Dlya Proverki TV Pristavok (RT-01, by SS aka Snake) + * A simple board with 16K PRG ROM + 2K CHR ROM with no mapper, hardwired mirroring + * PRG EPROM has copy protected areas with "weak bits", which is tested at some + * points of the program. Trying to simalate "weak bits" behaviour + * + */ + +#include "mapinc.h" + +static DECLFR(UNLRT01Read) { +// u16 i, prot_areas[2][2] = { +// { 0x8E80, 0x8EFF }, +// { 0xFE80, 0xFEFF }, +// }; + if(((A >= 0xCE80) && (A < 0xCF00)) || + ((A >= 0xFE80) && (A < 0xFF00))) { + return 0xF2 | (rand() & 0x0D); + } else + return CartBR(A); +} + +static void UNLRT01Power(void) { + setprg16(0x8000, 0); + setprg16(0xC000, 0); + setchr2(0x0000,0); + setchr2(0x0800,0); + setchr2(0x1000,0); + setchr2(0x1800,0); + SetReadHandler(0x8000, 0xFFFF, UNLRT01Read); +} + +void UNLRT01_Init(CartInfo *info) { + info->Power = UNLRT01Power; +} diff --git a/trunk/src/unif.cpp b/trunk/src/unif.cpp index 46db143d..6a36508f 100644 --- a/trunk/src/unif.cpp +++ b/trunk/src/unif.cpp @@ -464,6 +464,7 @@ static BMAPPING bmap[] = { { "EH8813A", UNLEH8813A_Init, 0 }, { "HP898F", BMCHP898F_Init, 0 }, { "F-15", BMCF15_Init, 0 }, + { "RT-01", UNLRT01_Init, 0 }, { 0, 0, 0 } }; diff --git a/trunk/src/unif.h b/trunk/src/unif.h index 6f9aaee9..432c00c2 100644 --- a/trunk/src/unif.h +++ b/trunk/src/unif.h @@ -152,6 +152,7 @@ void UNLBMW8544_Init(CartInfo *info); void UNLEH8813A_Init(CartInfo *info); void BMCHP898F_Init(CartInfo *info); void BMCF15_Init(CartInfo *info); +void UNLRT01_Init(CartInfo *info); extern uint8 *UNIFchrrama; // Meh. So I can stop CHR RAM // bank switcherooing with certain boards... diff --git a/trunk/vc/vc10_fceux.vcxproj b/trunk/vc/vc10_fceux.vcxproj index cbe24ac5..2fe5014d 100644 --- a/trunk/vc/vc10_fceux.vcxproj +++ b/trunk/vc/vc10_fceux.vcxproj @@ -338,6 +338,7 @@ + diff --git a/trunk/vc/vc10_fceux.vcxproj.filters b/trunk/vc/vc10_fceux.vcxproj.filters index 2fff849b..ac1dd439 100644 --- a/trunk/vc/vc10_fceux.vcxproj.filters +++ b/trunk/vc/vc10_fceux.vcxproj.filters @@ -1066,6 +1066,9 @@ boards + + boards +