X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=ines.c;h=2f5fbebce2091ed02b5e5146254ccae9511db220;hp=6665a1311e261aecddbcbd1c489156ae86d71c2a;hb=87e3eef5be4a5de92f97ee211ae4035d8d4b6494;hpb=e2d0dd92bfad989cce4270fc0ac5a712476c7c50 diff --git a/ines.c b/ines.c index 6665a13..2f5fbeb 100644 --- a/ines.c +++ b/ines.c @@ -80,7 +80,7 @@ static DECLFR(TrainerRead) return(trainerpoo[A&0x1FF]); } -static void iNESGI(int h) +static void iNESGI(int h, void *param) { switch(h) { @@ -119,9 +119,19 @@ static void iNESGI(int h) if(VROM) {free(VROM);VROM=0;} if(MapClose) MapClose(); if(trainerpoo) {FCEU_gfree(trainerpoo);trainerpoo=0;} + ResetExState(0,0); } break; - } + case GI_INFOSTRING: + { + int MapperNo; + MapperNo = (head.ROM_type>>4); + MapperNo|=(head.ROM_type2&0xF0); + sprintf(param, "iNES, %s, Mapper: %d%s%s", PAL?"PAL":"NTSC", + MapperNo, (head.ROM_type&2)?", BB":"", (head.ROM_type&4)?", T":""); + } + break; + } } uint32 iNESGameCRC32=0; @@ -916,6 +926,10 @@ static void iNESPower(void) setprg8r(1,0x6000,0); SetReadHandler(0x6000,0x7FFF,AWRAM); +#ifdef ASM_6502 + // asm code needs pages to be set again.. + Page[12]=Page[13]=Page[14]=Page[15]=WRAM-0x6000; +#endif SetWriteHandler(0x6000,0x7FFF,BWRAM); FCEU_CheatAddRAM(8,0x6000,WRAM); @@ -1106,8 +1120,3 @@ static int NewiNES_Init(int num) return(0); } -iNES_HEADER *iNESGetHead(void) -{ - return &head; -} -