X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=boards%2Fnovel.c;h=1918abf690d77e5e0cf04f5d0bb060b235c52094;hb=386f5371eb984fb9c2860c83e740890a75cd45c1;hp=fe3a37cb9ffd26ca532906229b8370276318a4d2;hpb=c0bf6f9f02a2b6afb961a7e9195e2168d7e9cecf;p=fceu.git diff --git a/boards/novel.c b/boards/novel.c index fe3a37c..1918abf 100644 --- a/boards/novel.c +++ b/boards/novel.c @@ -1,7 +1,7 @@ /* FCE Ultra - NES/Famicom Emulator * * Copyright notice for this file: - * Copyright (C) 2002 Ben Parnell + * Copyright (C) 2002 Xodnizel * * 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 @@ -15,40 +15,41 @@ * * 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 void DoNovel(void) { - setprg32(0x8000,GameMemBlock[0]&3); - setchr8(GameMemBlock[0]&7); - X6502_Rebase(); + setprg32(0x8000,latch&3); + setchr8(latch&7); } static DECLFW(NovelWrite) { - GameMemBlock[0]=A&0xFF; - DoNovel(); + latch=A&0xFF; + DoNovel(); } static void NovelReset(void) { SetWriteHandler(0x8000,0xFFFF,NovelWrite); - SetReadHandler(0x8000,0xFFFF,CartBR); + SetReadHandler(0x8000,0xFFFF,CartBR); setprg32(0x8000,0); setchr8(0); } static void NovelRestore(int version) { - DoNovel(); + DoNovel(); } -void Novel_Init(void) +void Novel_Init(CartInfo *info) { - AddExState(&GameMemBlock[0], 1, 0,"L1"); - BoardPower=NovelReset; + AddExState(&latch, 1, 0,"L1"); + info->Power=NovelReset; GameStateRestore=NovelRestore; }