From dff396a1c207cbb048657ed7044ffa3d2a70f22d Mon Sep 17 00:00:00 2001 From: paul eeepc Date: Fri, 9 Dec 2016 01:58:34 -0600 Subject: [PATCH] Successful detection of UNROM512 mapper30 PRG-ROM flash Processing input args to create rom file when dumping Adding create_rom function in file.c working but need to add check if file already exists Listing out number of mappers which planning to support --- firmware/source/.nes.c.swp | Bin 16384 -> 0 bytes host/source/cartridge.c | 100 +++++++++++++++++++++---------------- host/source/enums.h | 26 ++++++++++ host/source/file.c | 39 ++++++++++++--- host/source/file.h | 9 +++- host/source/inlprog.c | 37 +++++++++++--- host/source/memory.c | 2 + host/source/memory.h | 2 + host/source/nes.c | 82 ++++++++++++++++++++++++++++++ host/source/nes.h | 3 +- 10 files changed, 241 insertions(+), 59 deletions(-) delete mode 100644 firmware/source/.nes.c.swp diff --git a/firmware/source/.nes.c.swp b/firmware/source/.nes.c.swp deleted file mode 100644 index c1af4da995179ad7f5cbd0a0528ea7947cd56191..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 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 diff --git a/host/source/cartridge.c b/host/source/cartridge.c index 73ae234..2a2319f 100644 --- a/host/source/cartridge.c +++ b/host/source/cartridge.c @@ -158,7 +158,7 @@ int detect_mirroring( cartridge *cart, USBtransfer *transfer ) //detecting mapper and memories ends up being one big operation int detect_map_mem( cartridge *cart, USBtransfer *transfer, int oper ) { - debug("detecting mapping"); + //debug("detecting mapping"); //always start with resetting i/o io_reset( transfer ); @@ -176,7 +176,7 @@ int detect_map_mem( cartridge *cart, USBtransfer *transfer, int oper ) case FC_CART: case NES_CART: nes_init(transfer); - debug("NES cart mapping"); + //debug("NES cart mapping"); //gather other helpful info //result of chr-ram test @@ -184,57 +184,69 @@ int detect_map_mem( cartridge *cart, USBtransfer *transfer, int oper ) debug("CHR-RAM detected @ PPU $0000"); cart->sec_rom->manf = SRAM; cart->sec_rom->part = SRAM; - } else - //check for CHR-ROM flash + } + + //perform WRAM test without corrupting results + //TODO store result in save_mem + +//mapper select switch<<<<------------------------------------------------------------- +switch (cart->mirroring) { + case MIR_MMC1: + break; + case MIR_MMC3: + break; + case MIR_FIXED: + //check for CHR-ROM flash + if ( cart->sec_rom->part != SRAM ) { if ( read_flashID_chrrom_8K( transfer, cart->sec_rom ) == SUCCESS ) { //8KB bank with no banking operations debug("8K CHR-ROM flash detected"); cart->sec_rom->size = 8 * KBYTE; } - - //perform WRAM test without corrupting results - //TODO store result in save_mem + } + //exp0 pullup test passes on many INL boards + if ( exp0_pullup_test(transfer) == SUCCESS) { + debug("EXP0 pullup cart mapping"); + //if passed exp0 test try 16/32KB bank flash check - //exp0 pullup test passes on many INL boards - if ( exp0_pullup_test(transfer) == SUCCESS) { - debug("EXP0 pullup cart mapping"); - //if passed exp0 test try 16/32KB bank flash check - - //if 16KB banks writing 0xFF to mapper reg should set A14 bit - //That will cause flash detection to fail. - //TODO handle bus conflicts...? - dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0x8000, 0xFF, + //if 16KB banks writing 0xFF to mapper reg should set A14 bit + //That will cause flash detection to fail. + //TODO handle bus conflicts...? + dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0x8000, 0xFF, + USB_IN, NULL, 1); + //if ID check passes, the should be 32KB PRG-ROM banking + if ( read_flashID_prgrom_exp0( transfer, cart->pri_rom ) == SUCCESS ) { + //32KB bank with EXP0->WE PRG-ROM sensed + debug("32KB banking NES EXP0 enabled flash"); + cart->pri_rom->bank_size = 32 * KBYTE; + } else { + //set mapper reg to 0 if present which sets A14 low when needed if 16KB banks + dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0x8000, 0x00, USB_IN, NULL, 1); - //if ID check passes, the should be 32KB PRG-ROM banking - if ( read_flashID_prgrom_exp0( transfer, cart->pri_rom ) == SUCCESS ) { - //32KB bank with EXP0->WE PRG-ROM sensed - debug("32KB banking NES EXP0 enabled flash"); - cart->pri_rom->bank_size = 32 * KBYTE; - } else { - //set mapper reg to 0 if present which sets A14 low when needed if 16KB banks - dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0x8000, 0x00, - USB_IN, NULL, 1); - if ( read_flashID_prgrom_exp0( transfer, cart->pri_rom ) == SUCCESS ){ - //16KB bank with EXP0->WE PRG-ROM sensed - debug("16KB banking NES EXP0 enabled flash"); - cart->pri_rom->bank_size = 16 * KBYTE; - } + if ( read_flashID_prgrom_exp0( transfer, cart->pri_rom ) == SUCCESS ){ + //16KB bank with EXP0->WE PRG-ROM sensed + debug("16KB banking NES EXP0 enabled flash"); + cart->pri_rom->bank_size = 16 * KBYTE; + cart->mapper = UxROM; } - //TODO determine how many banks are present - //best to do this by writing last bank, then see if - //blank banks can be found - } - - switch (cart->mirroring) { - case MIR_MMC1: - break; - case MIR_MMC3: - break; - case MIR_FIXED: - break; - default: - sentinel("Problem with mapper detect mirroring switch statement."); } + //TODO determine how many banks are present + //best to do this by writing last bank, then see if + //blank banks can be found + } + //check for mapper 30 controlled PRG-ROM writes + if ( read_flashID_prgrom_map30( transfer, cart->pri_rom ) == SUCCESS ){ + debug("16KB mapper30 flash writes enabled"); + cart->pri_rom->bank_size = 16 * KBYTE; + cart->mapper = UNROM512; + } + //TODO check for mapper 31 EZ-NSF + debug("PRG-ROM manfID: %x, prodID: %x", cart->pri_rom->manf, cart->pri_rom->part); + break; + default: + sentinel("Problem with mapper detect mirroring switch statement."); +} +//mapper select switch<<<<------------------------------------------------------------- break; //================ // SNES diff --git a/host/source/enums.h b/host/source/enums.h index 4b132a0..5b629be 100644 --- a/host/source/enums.h +++ b/host/source/enums.h @@ -12,8 +12,34 @@ #define SNES_CART 'S' #define BKWD_CART 'B' +//NES mappers +#define NROM 0 +#define MMC1 1 +#define CNROM 2 +#define UxROM 3 +#define MMC3 4 +#define MMC5 5 +#define AxROM 7 +#define MMC2 9 +#define MMC4 10 +#define CDREAMS 11 +#define A53 28 +#define UNROM512 30 +#define EZNSF 31 +#define BxROM 34 +#define RAMBO 64 +#define H3001 65 //IREM mapper +#define GxROM 66 +#define SUN3 67 +#define SUN4 68 +#define FME7 69 //SUNSOFT-5 with synth +#define HDIVER 78 +#define DxROM 205 + enum mirroring { MIR_FIXED = 10, + MIR_VERT, + MIR_HORIZ, MIR_ANROM, MIR_MMC1, MIR_MMC3 diff --git a/host/source/file.c b/host/source/file.c index fab6976..277f88f 100644 --- a/host/source/file.c +++ b/host/source/file.c @@ -1,19 +1,33 @@ #include "file.h" -#define SIZE_NES_HEADER 16 -#define SIZE_PRG_BANK 16384 -#define SIZE_CHR_BANK 8192 +void init_rom_elements( rom_image *rom ) +{ + rom->console = UNKNOWN; + rom->mapper = UNKNOWN; + rom->submap = UNKNOWN; + rom->mapvariant = UNKNOWN; + rom->prg_size = UNKNOWN; + rom->chr_size = UNKNOWN; + rom->ram_size = UNKNOWN; + rom->battery = UNKNOWN; + rom->mirroring = UNKNOWN; + rom->fileptr = NULL; + +} //Need to pass in pointer to a filepointer to properly pass by reference //the OS/stdio creates a FILE struct and returns the address of that struct //so when this function opens a file it's setting the value of a pointer //for the calling function. To set a pointer we must have a pointer to that pointer.. -int open_file( FILE **fptr, char *filename ) +//int open_file( FILE **fptr, char *filename ) +int open_rom( rom_image *rom, char *filename ) { //first open file - *fptr = fopen( filename, "rb"); + //*fptr = fopen( filename, "rb"); + rom->fileptr = fopen( filename, "rb"); //returns file ptr on success, NULL on fail - check( *fptr, "Unable to open file: %s in read binary mode", filename); + //check( *fptr, "Unable to open file: %s in read binary mode", filename); + check( rom->fileptr, "Unable to open file: %s in read binary mode", filename); return SUCCESS; error: @@ -78,3 +92,16 @@ int detect_file( rom_image *rom ) error: return -1; } + + +int create_file( rom_image *rom, char *filename ) +{ + //TODO check if file already exists, if so prompt if user would like to overwrite + + rom->fileptr = fopen( filename, "wb+"); + check( rom->fileptr, "Unable to create file: %s in read/write binary mode", filename); + + return SUCCESS; +error: + return -1; +} diff --git a/host/source/file.h b/host/source/file.h index 4d9ca7c..bd7abae 100644 --- a/host/source/file.h +++ b/host/source/file.h @@ -15,6 +15,11 @@ //TODO put defintions in separate project wide .h file #include "cartridge.h" +#include "enums.h" + +#define SIZE_NES_HEADER 16 +#define SIZE_PRG_BANK 16384 +#define SIZE_CHR_BANK 8192 //cartridge object/struct typedef struct rom_image{ @@ -30,7 +35,9 @@ typedef struct rom_image{ FILE *fileptr; } rom_image; -int open_file( FILE **fptr, char *filename ); +void init_rom_elements(rom_image *rom); +int open_rom( rom_image *rom, char *filename ); int detect_file( rom_image *rom ); +int create_file( rom_image *rom, char *filename ); #endif diff --git a/host/source/inlprog.c b/host/source/inlprog.c index 17239d8..068011e 100644 --- a/host/source/inlprog.c +++ b/host/source/inlprog.c @@ -170,10 +170,10 @@ int main(int argc, char *argv[]) //create file object/struct rom_image *rom = malloc( sizeof(rom_image)); - rom->fileptr = NULL; check_mem(transfer); check_mem(rom); + init_rom_elements(rom); //command line arg L_value to set different LIBUSB debugging options @@ -232,14 +232,37 @@ int main(int argc, char *argv[]) //read in user files/args that glean info about expected board - //for now just assume user file/args are correct - if ( p_value != NULL ) { - //program file provided at commandline - check( !open_file( &rom->fileptr, p_value ), "Problem opening file %s", p_value); - detect_file( rom ); + //compare detections to user args and get permission to continue if there are discrepencies + + //just dump based on input args for now + if ( d_value ) { + //TODO input arg checking + if ( c_value ) { + if ( strcmp( "NES", c_value ) == 0 ) rom->console = NES_CART; + if ( strcmp( "FC", c_value ) == 0 ) rom->console = FC_CART; + if ( strcmp( "SNES", c_value ) == 0 ) rom->console = SNES_CART; + } + debug("console is: %c", rom->console); + + if ( m_value ) rom->mapper = atoi(m_value); + debug("mapper is: %d", rom->mapper); + + if ( rom->mapper == NROM ) { + rom->prg_size = 32 * KBYTE; + rom->chr_size = 8 * KBYTE; + //TODO function to check mirroring + rom->mirroring = MIR_VERT; + } + + //TODO check if enough input args were provided or can be detected + check( !create_file( rom, d_value ), "Unable to create file %s", d_value); } - //compare detections to user args and get permission to continue if there are discrepencies + if ( p_value ) { + //program file provided at commandline + check( !open_rom( rom, p_value ), "Problem opening file %s", p_value); + detect_file( rom ); + } //if flashing, determine if erasures are necessary and where diff --git a/host/source/memory.c b/host/source/memory.c index 14df669..cf21ed0 100644 --- a/host/source/memory.c +++ b/host/source/memory.c @@ -7,6 +7,8 @@ void init_memory_elements( memory *mem ) mem->volatility = UNKNOWN; mem->size = UNKNOWN; mem->bank_size = UNKNOWN; + mem->wr_dict = UNKNOWN; + mem->wr_opcode = UNKNOWN; mem->width = UNKNOWN; mem->protocol = UNKNOWN; mem->sector_size = UNKNOWN; diff --git a/host/source/memory.h b/host/source/memory.h index 121b758..e4957f4 100644 --- a/host/source/memory.h +++ b/host/source/memory.h @@ -39,6 +39,8 @@ typedef struct memory{ int volatility; //sram no batt vs batt, mask rom, erasability, etc int size; //size of the max addressable memory grounding addr pins lowers this value int bank_size; //size of banks/pages of memory created by mapper banking + int wr_dict; //dictionary used to write to rom + int wr_opcode; //opcode used to write to rom int width; //width of data bus as configured int protocol; //parallel, SPI, I2C, JTAG, custom etc. int sector_size; //minimum eraseable size in bytes diff --git a/host/source/nes.c b/host/source/nes.c index 1f75835..c2daa38 100644 --- a/host/source/nes.c +++ b/host/source/nes.c @@ -179,6 +179,7 @@ int famicom_sound( USBtransfer *transfer ) * if ROM A14 is mapper controlled it must be low when CPU A14 is low * controlling A14 outside of this function acts as a means of bank size detection * Post:memory manf/prod ID set to read values if passed + * memory wr_dict and wr_opcode set if successful * Software mode exited if entered successfully * Rtn: SUCCESS if flash sensed, GEN_FAIL if not, neg if error */ @@ -218,6 +219,8 @@ int read_flashID_prgrom_exp0( USBtransfer *transfer, memory *flash ) { //found expected manf and prod ID flash->manf = SST_MANF_ID; flash->part = rv[RV_DATA0_IDX]; + flash->wr_dict = DICT_NES; + flash->wr_opcode = DISCRETE_EXP0_PRGROM_WR; } //exit software @@ -233,6 +236,82 @@ int read_flashID_prgrom_exp0( USBtransfer *transfer, memory *flash ) { } +/* Desc:PRG-ROM flash manf/prod ID sense test + * Using mapper 30 defined PRG-ROM flash writes + * Only senses SST flash ID's + * Assumes that isn't getting tricked by having manf/prodID at $8000/8001 + * could add check and increment read address to ensure doesn't get tricked.. + * Pre: nes_init() been called to setup i/o + * Post:memory manf/prod ID set to read values if passed + * memory wr_dict and wr_opcode set if successful + * Software mode exited if entered successfully + * Rtn: SUCCESS if flash sensed, GEN_FAIL if not, neg if error + */ +int read_flashID_prgrom_map30( USBtransfer *transfer, memory *flash ) { + + uint8_t rv[RV_DATA0_IDX]; + + //enter software mode + //$8000-BFFF writes to flash + //$C000-FFFF writes to mapper + // 15 14 13 12 + // 0x5 = 0b 0 1 0 1 -> $9555 + // 0x2 = 0b 0 0 1 0 -> $2AAA + //set A14 in mapper reg for $5555 command + dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0xC000, 0x01, + USB_IN, NULL, 1); + //write $5555 0xAA + dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0x9555, 0xAA, + USB_IN, NULL, 1); + //clear A14 in mapper reg for $2AAA command + dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0xC000, 0x00, + USB_IN, NULL, 1); + //write $2AAA 0x55 + dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0xAAAA, 0x55, + USB_IN, NULL, 1); + //set A14 in mapper reg for $5555 command + dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0xC000, 0x01, + USB_IN, NULL, 1); + //write $5555 0x90 for software mode + dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0x9555, 0x90, + USB_IN, NULL, 1); + + //read manf ID + dictionary_call( transfer, DICT_NES, NES_CPU_RD, 0x8000, NILL, + USB_IN, rv, RV_DATA0_IDX+1); + debug("manf id: %x", rv[RV_DATA0_IDX]); + if ( rv[RV_DATA0_IDX] != SST_MANF_ID ) { + return GEN_FAIL; + //no need for software exit since failed to enter + } + + //read prod ID + dictionary_call( transfer, DICT_NES, NES_CPU_RD, 0x8001, NILL, + USB_IN, rv, RV_DATA0_IDX+1); + debug("prod id: %x", rv[RV_DATA0_IDX]); + if ( (rv[RV_DATA0_IDX] == SST_PROD_128) + || (rv[RV_DATA0_IDX] == SST_PROD_256) + || (rv[RV_DATA0_IDX] == SST_PROD_512) ) { + //found expected manf and prod ID + flash->manf = SST_MANF_ID; + flash->part = rv[RV_DATA0_IDX]; + flash->wr_dict = DICT_NES; + flash->wr_opcode = NES_CPU_WR; + } + + //exit software + dictionary_call( transfer, DICT_NES, NES_CPU_WR, 0x8000, 0xF0, + USB_IN, NULL, 1); + + //verify exited + dictionary_call( transfer, DICT_NES, NES_CPU_RD, 0x8000, NILL, + USB_IN, rv, RV_DATA0_IDX+1); + debug("prod id: %x", rv[RV_DATA0_IDX]); + + return SUCCESS; +} + + /* Desc:CHR-ROM flash manf/prod ID sense test * Only senses SST flash ID's * Does not make CHR bank writes so A14-A13 must be made valid outside of this funciton @@ -242,6 +321,7 @@ int read_flashID_prgrom_exp0( USBtransfer *transfer, memory *flash ) { * could add check and increment read address to ensure doesn't get tricked.. * Pre: nes_init() been called to setup i/o * Post:memory manf/prod ID set to read values if passed + * memory wr_dict and wr_opcode set if successful * Software mode exited if entered successfully * Rtn: SUCCESS if flash sensed, GEN_FAIL if not, neg if error */ @@ -281,6 +361,8 @@ int read_flashID_chrrom_8K( USBtransfer *transfer, memory *flash ) { //found expected manf and prod ID flash->manf = SST_MANF_ID; flash->part = rv[RV_DATA0_IDX]; + flash->wr_dict = DICT_NES; + flash->wr_opcode = NES_PPU_WR; } //exit software diff --git a/host/source/nes.h b/host/source/nes.h index 52f461b..73615ea 100644 --- a/host/source/nes.h +++ b/host/source/nes.h @@ -9,7 +9,7 @@ //include prior to other file includes //that way DEBUG can be turned on/off for this file alone //uncomment to DEBUG this file alone -#define DEBUG +//#define DEBUG //"make debug" to get DEBUG msgs on entire program #include "dbg.h" @@ -24,6 +24,7 @@ int jumper_ciramce_ppuA13n( USBtransfer *transfer ); int ciramce_inv_ppuA13( USBtransfer *transfer ); int famicom_sound( USBtransfer *transfer ); int read_flashID_prgrom_exp0( USBtransfer *transfer, memory *flash ); +int read_flashID_prgrom_map30( USBtransfer *transfer, memory *flash ); int read_flashID_chrrom_8K( USBtransfer *transfer, memory *flash ); int ppu_ram_sense( USBtransfer *transfer, uint16_t addr );