updated bords/mappers/stuff to 0.98.15, lots of them got broken, asmcore support...
[fceu.git] / mappers / 61.c
similarity index 58%
rename from mappers/245.c
rename to mappers/61.c
index ae20c18..4303932 100644 (file)
@@ -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
 
 #include "mapinc.h"
 
-static void Synco(void)
-{
- ROM_BANK8(0x8000,mapbyte2[0]);
- ROM_BANK8(0xA000,mapbyte2[1]);
- ROM_BANK8(0xc000,0x3e);
- ROM_BANK8(0xe000,0x3f);
- X6502_Rebase();
-}
-static DECLFW(Mapper245_write)
+
+static DECLFW(Mapper61_write)
 {
- switch(A&0xe001)
+// printf("$%04x:$%02x\n",A,V);
+ switch(A&0x30)
  {
-  case 0xa000:mapbyte1[1]=V;Synco();break;
-  case 0x8000:mapbyte1[0]=V;break;
-  case 0x8001:switch(mapbyte1[0]&7)
-               {
-//              default:printf("ark\n");break;
-                case 6:mapbyte2[0]=V;Synco();break;
-                case 7:mapbyte2[1]=V;Synco();break;
-               }break;
-  //case 0xa001:MIRROR_SET2(V>>7);break;
+  case 0x00:
+  case 0x30:
+          ROM_BANK32(A&0xF);
+          break;
+  case 0x20:
+  case 0x10:
+          ROM_BANK16(0x8000,((A&0xF)<<1)| (((A&0x20)>>4)) );
+          ROM_BANK16(0xC000,((A&0xF)<<1)| (((A&0x20)>>4)) );
+          break;
  }
-// printf("$%04x:$%02x\n",A,V);
+ #ifdef moo
+ if(!(A&0x10))
+  ROM_BANK32(A&0xF);
+ else
+ {
+  ROM_BANK16(0x8000,((A&0xF)<<1)| (((A&0x10)>>4)^1) );
+  ROM_BANK16(0xC000,((A&0xF)<<1)| (((A&0x10)>>4)^1) );
+ }
+ #endif
+ MIRROR_SET((A&0x80)>>7);
 }
 
-void Mapper245_init(void)
+void Mapper61_init(void)
 {
 SetWriteHandler(0x8000,0xffff,Mapper245_write);
SetWriteHandler(0x8000,0xffff,Mapper61_write);
 }
-