MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / writeb

Method writeb

source/emulation/softmmu/soft_code_page.cpp:37–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void CodePage::writeb(MMU* mmu, U32 address, U8 value) {
38 if (!RWPage::canWriteRam(mmu)) {
39 KThread::currentThread()->seg_access(address, false, true);
40 }
41 if (value != this->readb(mmu, address)) {
42 KThread* thread = KThread::currentThread();
43 KMemory* memory = thread->memory;
44 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(memory->mutex);
45 U8 currentValue = this->readb(mmu, address);
46 if (currentValue == value) {
47 return;
48 }
49 onDemmand(mmu, address >> K_PAGE_SHIFT);
50 Page::getRWPage()->writeb(mmu, address, value);
51 memory->removeCode(thread, address, 1, true);
52 }
53}
54
55void CodePage::writew(MMU* mmu, U32 address, U16 value) {
56 if (!RWPage::canWriteRam(mmu)) {

Callers

nothing calls this directly

Calls 3

seg_accessMethod · 0.80
removeCodeMethod · 0.80
readbMethod · 0.45

Tested by

no test coverage detected