Updated GB_write_memory (markdown)

Lior Halphon 2024-11-30 20:50:00 +02:00
parent b0e6947f23
commit b68d8bbf92
1 changed files with 13 additions and 1 deletions

@ -6,8 +6,20 @@ In `memory.h`
## Description
TBD
Performs an 8-bit memory write on a 16-bit address on the emulator instance, as if it was performed by the SM83 CPU
## Thread Safety
`GB_write_memory` must not be called if the instance is being run in another thread, but may be called from the current one (via a callback).
## Notes
The ROM is not writable, as the CPU is unable to perform a ROM write. Attempting to write to the ROM will perform an MBC register write, just like as if the write was performed by the CPU. To dynamically modify the ROM, use [[GB_get_direct_access]].
To write data outside of a currently mapped bank, or to write to a memory region that might not be currently writeable (e.g. VRAM during mode 3), you can use [[GB_get_direct_access]].
## See Also
* [[GB_read_memory]]
* [[GB_safe_read_memory]]
* [[GB_get_direct_access]]