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

Function InitCDLog

src/drivers/Qt/CodeDataLogger.cpp:778–810  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

776}
777//----------------------------------------------------
778void InitCDLog(void)
779{
780 int rom_sel = 0;
781
782 FCEU_WRAPPER_LOCK();
783 if (GameInfo->type == GIT_FDS)
784 {
785 rom_sel = 1;
786 }
787 cdloggerdataSize = PRGsize[rom_sel];
788 cdloggerdata = (unsigned char *)malloc(cdloggerdataSize);
789 if (!CHRram[0] || (CHRptr[0] == PRGptr[0]))
790 { // Some kind of workaround for my OneBus VRAM hack, will remove it if I find another solution for that
791 cdloggerVideoDataSize = CHRsize[0];
792 if (cdloggerVideoDataSize > 0)
793 {
794 cdloggervdata = (unsigned char *)malloc(cdloggerVideoDataSize);
795 }
796 else
797 {
798 cdloggervdata = nullptr;
799 }
800 }
801 else
802 {
803 if (GameInfo->type != GIT_NSF)
804 {
805 cdloggerVideoDataSize = 0;
806 cdloggervdata = (unsigned char *)malloc(8192);
807 }
808 }
809 FCEU_WRAPPER_UNLOCK();
810}
811//----------------------------------------------------
812void ResetCDLog(void)
813{

Callers 1

CDLoggerROMChangedFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected