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

Function GetCurrentValue

src/drivers/win/ramwatch.cpp:71–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69void RefreshWatchListSelectedCountControlStatus(HWND hDlg, int newComer = -1);
70
71unsigned int GetCurrentValue(AddressWatcher& watch)
72{
73 //TODO: A similar if for 4-byte just to be through, but there shouldn't be any reason to have 4-byte on the NES!
74 if (watch.Size == 'w') //Do little endian
75 {
76 unsigned int x = ReadValueAtHardwareAddress(watch.Address+1, 1) * 256;
77 x += ReadValueAtHardwareAddress(watch.Address, 1);
78 return x;
79 }
80 else
81 return ReadValueAtHardwareAddress(watch.Address, watch.Size == 'd' ? 4 : watch.Size == 'w' ? 2 : 1);
82}
83
84bool IsSameWatch(const AddressWatcher& l, const AddressWatcher& r)
85{

Callers 3

InsertWatchFunction · 0.85
Update_RAM_WatchFunction · 0.85
EditWatchFunction · 0.85

Calls 1

Tested by

no test coverage detected