X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=mappers%2F61.c;fp=mappers%2F245.c;h=4303932968a5999c45b6d6ade880844893702d47;hp=ae20c18f65ef0978f689caf3df8cbdd8011b9e82;hb=d97315ac0bca825d2d50a44453bc5652946e2c67;hpb=890e37ba2b8ea1c7593dc05926d7431e3bd00bfb diff --git a/mappers/245.c b/mappers/61.c similarity index 58% rename from mappers/245.c rename to mappers/61.c index ae20c18..4303932 100644 --- a/mappers/245.c +++ b/mappers/61.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 @@ -20,33 +20,35 @@ #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); } -