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

Function NSFGI

src/nsf.cpp:132–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130static uint8 *ExWRAM=0;
131
132void NSFGI(GI h)
133{
134 switch(h)
135 {
136 case GI_CLOSE:
137 if(NSFDATA) {free(NSFDATA);NSFDATA=0;}
138 if(ExWRAM) {free(ExWRAM);ExWRAM=0;}
139 if(NSFHeader.SoundChip&1) {
140 // NSFVRC6_Init();
141 } else if(NSFHeader.SoundChip&2) {
142 // NSFVRC7_Init();
143 } else if(NSFHeader.SoundChip&4) {
144 // FDSSoundReset();
145 } else if(NSFHeader.SoundChip&8) {
146 NSFMMC5_Close();
147 } else if(NSFHeader.SoundChip&0x10) {
148 // NSFN106_Init();
149 } else if(NSFHeader.SoundChip&0x20) {
150 // NSFAY_Init();
151 }
152 break;
153 case GI_RESETM2:
154 case GI_POWER:
155 NSF_init();
156 break;
157 default:
158 //Unhandled cases
159 break;
160 }
161}
162
163// First 32KB is reserved for sound chip emulation in the iNES mapper code.
164

Callers

nothing calls this directly

Calls 2

NSFMMC5_CloseFunction · 0.85
NSF_initFunction · 0.85

Tested by

no test coverage detected