X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=boards%2Fdream.c;h=d2a9cb8277993c6277e08d690010fe5efeccb158;hp=16214f761ff78796feb4ff7c87aac5d21e793667;hb=386f5371eb984fb9c2860c83e740890a75cd45c1;hpb=d97315ac0bca825d2d50a44453bc5652946e2c67 diff --git a/boards/dream.c b/boards/dream.c index 16214f7..d2a9cb8 100644 --- a/boards/dream.c +++ b/boards/dream.c @@ -15,42 +15,42 @@ * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "mapinc.h" -static uint8 latch; +static uint8 latche; -static void DoPRG(void) +static void Sync(void) { - setprg16(0x8000,latch); + setprg16(0x8000,latche); setprg16(0xC000,8); } static DECLFW(DREAMWrite) { - latch=V&7; - DoPRG(); + latche=V&7; + Sync(); } static void DREAMPower(void) { - latch=0; + latche=0; + Sync(); + setchr8(0); SetReadHandler(0x8000,0xFFFF,CartBR); SetWriteHandler(0x5020,0x5020,DREAMWrite); - setchr8(0); - DoPRG(); } static void Restore(int version) { - DoPRG(); + Sync(); } void DreamTech01_Init(CartInfo *info) { GameStateRestore=Restore; info->Power=DREAMPower; - AddExState(&latch, 1, 0, "LATCH"); + AddExState(&latche, 1, 0, "LATCH"); }