X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=boards%2Fn625092.c;h=34c4c9c3c942e635d142eb82538a993b48c281aa;hb=43725da7349c85fa13e828fdbf20cc7ac8d298d6;hp=30d829855f4abdf9976a947fb50bdfff0e9597c3;hpb=386f5371eb984fb9c2860c83e740890a75cd45c1;p=fceu.git diff --git a/boards/n625092.c b/boards/n625092.c index 30d8298..34c4c9c 100644 --- a/boards/n625092.c +++ b/boards/n625092.c @@ -15,8 +15,10 @@ * * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * * 700in1 and 400in1 carts + * */ @@ -39,26 +41,36 @@ static void Sync(void) { if(cmd&0x100) { - setprg16(0x8000,((cmd&0xe0)>>2)|bank); - setprg16(0xC000,((cmd&0xe0)>>2)|7); + setprg16(0x8000,((cmd&0xfc)>>2)|bank); + setprg16(0xC000,((cmd&0xfc)>>2)|7); } else { - setprg16(0x8000,((cmd&0xe0)>>2)|(bank&6)); - setprg16(0xC000,((cmd&0xe0)>>2)|((bank&6)|1)); + setprg16(0x8000,((cmd&0xfc)>>2)|(bank&6)); + setprg16(0xC000,((cmd&0xfc)>>2)|((bank&6)|1)); } } else { - setprg16(0x8000,((cmd&0xe0)>>2)|bank); - setprg16(0xC000,((cmd&0xe0)>>2)|bank); + setprg16(0x8000,((cmd&0xfc)>>2)|bank); + setprg16(0xC000,((cmd&0xfc)>>2)|bank); } } +static uint16 ass = 0; + static DECLFW(UNLN625092WriteCommand) { cmd=A; - Sync(); + if(A==0x80F8) + { + setprg16(0x8000,ass); + setprg16(0xC000,ass); + } + else + { + Sync(); + } } static DECLFW(UNLN625092WriteBank) @@ -81,6 +93,8 @@ static void UNLN625092Reset(void) { cmd=0; bank=0; + ass++; + FCEU_printf("%04x\n",ass); } static void StateRestore(int version)