MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / protected_read

Function protected_read

core/misc.c:290–303  ·  view source on GitHub ↗

Read from the 0x9XXX range of ports */

Source from the content-addressed store, hash-verified

288
289/* Read from the 0x9XXX range of ports */
290static uint8_t protected_read(const uint16_t pio, bool peek) {
291 uint8_t value = 0;
292 if (peek || protected_ports_unlocked()) {
293 switch (pio) {
294 case 0xB00:
295 value = protect.led;
296 break;
297 default:
298 value = protect.ports[pio & 0xFF];
299 break;
300 }
301 }
302 return value;
303}
304
305/* Write to the 0x9XXX range of ports */
306static void protected_write(const uint16_t pio, const uint8_t byte, bool poke) {

Callers

nothing calls this directly

Calls 1

protected_ports_unlockedFunction · 0.85

Tested by

no test coverage detected