From 64dee0eb9c38b40eee4a2b841e2160442b2d43df Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Tue, 31 Mar 2026 17:17:48 -0400 Subject: [PATCH] nestopia: all 5 MOADs CLEAN MOAD-0001 (CWE-407): Nestopia uses std::lower_bound (binary search, sorted array) for cheat code lookup in NstCheats.cpp -- already O(log N). Input mapping in fltkui/inputmanager.cpp uses hash maps (jbmap/jhmap/jamap keyed by port*100+inum) -- O(1). No linear scan inside any hot loop found. MOAD-0002: Subsystems communicate through typed API layers (Cpu::Link, Cpu::Unlink, NES_PEEK_A/NES_POKE_AD macros). No shared god-object mutable global state coupling found. MOAD-0003: No ThreadLocal or thread-scoped identity carriers found. Single-threaded emulation core. MOAD-0004: No netplay or credential handling in core or fltkui. No logging of secrets found. MOAD-0005: No cache get+null+compute+put race patterns found. CLEAN.