all repos — mgba @ 77f74a831f0616f37f27c4675d259a7471a85d55

mGBA Game Boy Advance Emulator

DS Wi-Fi: Partially implement W_POWERFORCE
Vicki Pfau vi@endrift.com
Mon, 13 Mar 2017 12:55:15 -0700
commit

77f74a831f0616f37f27c4675d259a7471a85d55

parent

b73125e4a2489a6dbc0536fb3933b39ac5448f71

1 files changed, 15 insertions(+), 0 deletions(-)

jump to
M src/ds/wifi.csrc/ds/wifi.c

@@ -27,6 +27,20 @@ }

static void DSWifiWriteReg(struct DS* ds, uint32_t address, uint16_t value) { switch (address) { + case 0x040: + value &= 0x8001; + if (value & 0x8000) { + uint16_t state = ds->wifi.io[0x03C >> 1]; + if (value & 0x1) { + state |= 0x200; + state &= ~0x100; + } else { + mLOG(DS_WIFI, STUB, "Stub Wi-Fi I/O register write: %06X:%04X", address, value); + state &= ~0x200; + } + ds->wifi.io[0x03C >> 1] = state; + } + break; case 0x158: if (value & 0x1000) { DSWifiWriteBB(ds, value & 0xFF, ds->wifi.io[0x15A >> 1]);

@@ -46,6 +60,7 @@ }

static uint16_t DSWifiReadReg(struct DS* ds, uint32_t address) { switch (address) { + case 0x040: case 0x15C: break; default: