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

Function FCEUI_Initialize

src/fceu.cpp:615–646  ·  view source on GitHub ↗

Return: Flag that indicates whether the function was succesful or not.

Source from the content-addressed store, hash-verified

613
614//Return: Flag that indicates whether the function was succesful or not.
615bool FCEUI_Initialize() {
616 srand(time(0));
617
618 if (!FCEU_InitVirtualVideo()) {
619 return false;
620 }
621
622 AllocBuffers();
623
624 // Initialize some parts of the settings structure
625 //mbg 5/7/08 - I changed the ntsc settings to match pal.
626 //this is more for precision emulation, instead of entertainment, which is what fceux is all about nowadays
627 memset(&FSettings, 0, sizeof(FSettings));
628 //FSettings.UsrFirstSLine[0]=8;
629 FSettings.UsrFirstSLine[0] = 0;
630 FSettings.UsrFirstSLine[1] = 0;
631 //FSettings.UsrLastSLine[0]=231;
632 FSettings.UsrLastSLine[0] = 239;
633 FSettings.UsrLastSLine[1] = 239;
634 FSettings.SoundVolume = 150; //0-150 scale
635 FSettings.TriangleVolume = 256; //0-256 scale (256 is max volume)
636 FSettings.Square1Volume = 256; //0-256 scale (256 is max volume)
637 FSettings.Square2Volume = 256; //0-256 scale (256 is max volume)
638 FSettings.NoiseVolume = 256; //0-256 scale (256 is max volume)
639 FSettings.PCMVolume = 256; //0-256 scale (256 is max volume)
640
641 FCEUPPU_Init();
642
643 X6502_Init();
644
645 return true;
646}
647
648void FCEUI_Kill(void) {
649 #ifdef _S9XLUA_H

Callers 4

mainFunction · 0.85
fceuWrapperInitFunction · 0.85
mainFunction · 0.85
CLImainFunction · 0.85

Calls 4

FCEU_InitVirtualVideoFunction · 0.85
AllocBuffersFunction · 0.85
FCEUPPU_InitFunction · 0.85
X6502_InitFunction · 0.85

Tested by

no test coverage detected