From 5dbeff38e1120dad7dc62699633c835143cc8048 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Fri, 9 Sep 2016 07:59:43 +0200 Subject: [PATCH] Cleanups --- src/ines.c | 32 ++++++++++++++++---------------- src/nsf.c | 2 +- src/unif.c | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/ines.c b/src/ines.c index f78b9c1..50910c3 100644 --- a/src/ines.c +++ b/src/ines.c @@ -474,7 +474,7 @@ static BMAPPINGLocal bmap[] = { {"TAITO X1-005 Rev. A", 80, Mapper80_Init}, // {"", 81, Mapper81_Init}, {"TAITO X1-017", 82, Mapper82_Init}, - {"YOKO VRC Rev. B", 83, Mapper83_Init}, + {(uint8_t*)"YOKO VRC Rev. B", 83, Mapper83_Init}, // {"", 84, Mapper84_Init}, {"KONAMI VRC7", 85, Mapper85_Init}, {"JALECO JF-13", 86, Mapper86_Init}, @@ -634,20 +634,20 @@ static BMAPPINGLocal bmap[] = { {"", 240, Mapper240_Init}, {"", 241, Mapper241_Init}, {"", 242, Mapper242_Init}, - {"S74LS374NA", 243, S74LS374NA_Init}, - {"DECATHLON", 244, Mapper244_Init}, - {"", 245, Mapper245_Init}, - {"FONG SHEN BANG", 246, Mapper246_Init}, -// {"", 247, Mapper247_Init}, -// {"", 248, Mapper248_Init}, - {"", 249, Mapper249_Init}, - {"", 250, Mapper250_Init}, -// {"", 251, Mapper251_Init}, // No good dumps for this mapper, use UNIF version - {"SAN GUO ZHI PIRATE", 252, Mapper252_Init}, - {"DRAGON BALL PIRATE", 253, Mapper253_Init}, - {"", 254, Mapper254_Init}, -// {"", 255, Mapper255_Init}, // No good dumps for this mapper - {"", 0, NULL} + {(uint8_t*)"S74LS374NA", 243, S74LS374NA_Init}, + {(uint8_t*)"DECATHLON", 244, Mapper244_Init}, + {(uint8_t*)"", 245, Mapper245_Init}, + {(uint8_t*)"FONG SHEN BANG", 246, Mapper246_Init}, +// {(uint8_t*)"", 247, Mapper247_Init}, +// {(uint8_t*)"", 248, Mapper248_Init}, + {(uint8_t*)"", 249, Mapper249_Init}, + {(uint8_t*)"", 250, Mapper250_Init}, +// {(uint8_t*)"", 251, Mapper251_Init}, // No good dumps for this mapper, use UNIF version + {(uint8_t*)"SAN GUO ZHI PIRATE", 252, Mapper252_Init}, + {(uint8_t*)"DRAGON BALL PIRATE", 253, Mapper253_Init}, + {(uint8_t*)"", 254, Mapper254_Init}, +// {(uint8_t*)"", 255, Mapper255_Init}, // No good dumps for this mapper + {(uint8_t*)"", 0, NULL} }; int iNESLoad(const char *name, FCEUFILE *fp) { @@ -746,7 +746,7 @@ int iNESLoad(const char *name, FCEUFILE *fp) { for (mappertest = 0; mappertest < (sizeof bmap / sizeof bmap[0]) - 1; mappertest++) { if (bmap[mappertest].number == MapperNo) { - mappername = bmap[mappertest].name; + mappername = (char*)bmap[mappertest].name; break; } } diff --git a/src/nsf.c b/src/nsf.c index 5c54535..8e3cbec 100644 --- a/src/nsf.c +++ b/src/nsf.c @@ -514,6 +514,6 @@ int FCEUI_NSFChange(int amount) { int FCEUI_NSFGetInfo(uint8 *name, uint8 *artist, uint8 *copyright, int maxlen) { strncpy(name, NSFHeader.SongName, maxlen); strncpy(artist, NSFHeader.Artist, maxlen); - strncpy(copyright, NSFHeader.Copyright, maxlen); + strncpy((char*)copyright, NSFHeader.Copyright, maxlen); return(NSFHeader.TotalSongs); } diff --git a/src/unif.c b/src/unif.c index 99d5e49..aec3f7f 100644 --- a/src/unif.c +++ b/src/unif.c @@ -163,7 +163,7 @@ static int NAME(FCEUFILE *fp) { if (!GameInfo->name) { GameInfo->name = malloc(strlen(namebuf) + 1); - strcpy(GameInfo->name, namebuf); + strcpy((char*)GameInfo->name, namebuf); } return(1); } @@ -613,7 +613,7 @@ int CopyFamiLoad() { ResetCartMapping(); ResetExState(0, 0); - sboardname = "COPYFAMI"; + sboardname = (uint8_t*)"COPYFAMI"; if (!InitializeBoard()) goto aborto;