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

Function FreezeRam

src/drivers/win/memview.cpp:934–958  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

932}
933
934void FreezeRam(int address, int mode, int final){
935 // mode: -1 == Unfreeze; 0 == Toggle; 1 == Freeze
936 if(FrozenAddressCount <= 256 && (address < 0x2000) || ((address >= 0x6000) && (address <= 0x7FFF))){
937 //adelikat: added FrozenAddressCount check to if statement to prevent user from freezing more than 256 address (unfreezing when > 256 crashes)
938 addrtodelete = address;
939 cheatwasdeleted = 0;
940
941 if (mode == 0 || mode == -1)
942 {
943 //mbg merge 6/29/06 - added argument
944 FCEUI_ListCheats(DeleteCheatCallB, 0);
945 if(mode == 0 && cheatwasdeleted != -1)
946 FCEUI_AddCheat("", address, GetMem(address), -1, 1);
947 }
948 else
949 {
950 //mbg merge 6/29/06 - added argument
951 FCEUI_ListCheats(DeleteCheatCallB, 0);
952 FCEUI_AddCheat("", address, GetMem(address), -1, 1);
953 }
954
955 UpdateCheatsAdded();
956 UpdateCheatRelatedWindow();
957 }
958}
959
960//input is expected to be an ASCII string
961void InputData(char *input){

Callers 2

UnfreezeAllRamFunction · 0.85
MemViewCallBFunction · 0.85

Calls 5

FCEUI_ListCheatsFunction · 0.85
FCEUI_AddCheatFunction · 0.85
GetMemFunction · 0.85
UpdateCheatsAddedFunction · 0.85
UpdateCheatRelatedWindowFunction · 0.85

Tested by

no test coverage detected