MCPcopy Create free account
hub / github.com/TASEmulators/fceux / generateNLFilenameForBank

Function generateNLFilenameForBank

src/debugsymboltable.cpp:401–443  ·  view source on GitHub ↗

--------------------------------------------------------------

Source from the content-addressed store, hash-verified

399}
400//--------------------------------------------------------------
401static int generateNLFilenameForBank(int bank, std::string &NLfilename)
402{
403 int i;
404 const char *romFile;
405
406 romFile = getRomFile();
407
408 if ( romFile == nullptr )
409 {
410 return -1;
411 }
412 i=0;
413 while ( romFile[i] != 0 )
414 {
415
416 if ( romFile[i] == '|' )
417 {
418 NLfilename.push_back('.');
419 }
420 else
421 {
422 NLfilename.push_back(romFile[i]);
423 }
424 i++;
425 }
426
427 if (bank < 0)
428 {
429 // The NL file for the RAM addresses has the name nesrom.nes.ram.nl
430 NLfilename.append(".ram.nl");
431 }
432 else
433 {
434 char stmp[64];
435 #ifdef DW3_NL_0F_1F_HACK
436 if(bank == 0x0F)
437 bank = 0x1F;
438 #endif
439 sprintf( stmp, ".%X.nl", bank);
440 NLfilename.append( stmp );
441 }
442 return 0;
443}
444//--------------------------------------------------------------
445int generateNLFilenameForAddress(int address, std::string &NLfilename)
446{

Callers 2

loadFileNLMethod · 0.85

Calls 1

getRomFileFunction · 0.70

Tested by

no test coverage detected