merge mappers from FCEU-mm
[fceu.git] / boards / 183.c
index 94cf072..8d4f79b 100644 (file)
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software\r
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
  *\r
- * Gimmick Bootleg\r
+ * Gimmick Bootleg (VRC4 mapper)\r
  */\r
 \r
 #include "mapinc.h"\r
@@ -32,8 +32,8 @@ static SFORMAT StateRegs[]=
 {\r
   {prg, 4, "PRG"},\r
   {chr, 8, "CHR"},\r
-  {&IRQCount, 1, "IRQCOUNT"},\r
-  {&IRQPre, 1, "IRQPRE"},\r
+  {&IRQCount, 1, "IRQC"},\r
+  {&IRQPre, 1, "IRQP"},\r
   {&IRQa, 1, "IRQA"},\r
   {0}\r
 };\r
@@ -64,7 +64,7 @@ static DECLFW(M183Write)
 {\r
   if(((A&0xF80C)>=0xB000)&&((A&0xF80C)<=0xE00C))\r
   {\r
-    uint8 index=(((A&0x7000)>>11)-6)|((A&8)>>3);\r
+    int index=(((A>>11)-6)|(A>>3))&7;\r
     chr[index]=(chr[index]&(0xF0>>(A&4)))|((V&0x0F)<<(A&4));\r
     SyncChr();\r
   }\r