From 9326265fabe4dc8e41a85f01b835b26177b96bd0 Mon Sep 17 00:00:00 2001 From: mightymax Date: Sat, 13 Jan 2007 10:17:16 +0000 Subject: [PATCH] included wifi.c/h into builds --- desmume/src/MMU.c | 17 +++++++++++++---- desmume/src/Makefile.am | 1 + desmume/src/windows/DeSmuME.dev | 26 +++++++++++++++++++++++--- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/desmume/src/MMU.c b/desmume/src/MMU.c index c65cd150e..61058bc40 100644 --- a/desmume/src/MMU.c +++ b/desmume/src/MMU.c @@ -29,6 +29,7 @@ #include "NDSSystem.h" #include "cflash.h" #include "cp15.h" +#include "wifi.h" #include "registers.h" @@ -634,6 +635,10 @@ u16 FASTCALL MMU_read16(u32 proc, u32 adr) if ((adr>=0x08800000)&&(adr<0x09900000)) return (unsigned short)cflash_read(adr); + /* wifi mac access */ + if ((proc==ARMCPU_ARM7) && (adr>=0x04800000)&&(adr<0x05000000)) + return WIFI_read16(&wifiMac,adr) ; + adr &= 0x0FFFFFFF; if((adr>>24)==4) @@ -848,10 +853,10 @@ void FASTCALL MMU_write8(u32 proc, u32 adr, u8 val) case REG_VRAMCNTD: if(proc == ARMCPU_ARM9) { - MMU_VRAMWriteBackToLCD(REG_VRAMCNTA) ; - MMU_VRAMWriteBackToLCD(REG_VRAMCNTB) ; - MMU_VRAMWriteBackToLCD(REG_VRAMCNTC) ; - MMU_VRAMWriteBackToLCD(REG_VRAMCNTD) ; + MMU_VRAMWriteBackToLCD(0) ; + MMU_VRAMWriteBackToLCD(1) ; + MMU_VRAMWriteBackToLCD(2) ; + MMU_VRAMWriteBackToLCD(3) ; switch(val & 0x1F) { case 1 : @@ -1143,6 +1148,10 @@ void FASTCALL MMU_write16(u32 proc, u32 adr, u16 val) return; } + /* wifi mac access */ + if ((proc==ARMCPU_ARM7) && (adr>=0x04800000)&&(adr<0x05000000)) + WIFI_write16(&wifiMac,adr,val) ; + adr &= 0x0FFFFFFF; // This is bad, remove it diff --git a/desmume/src/Makefile.am b/desmume/src/Makefile.am index 62786f7ff..e22603e97 100644 --- a/desmume/src/Makefile.am +++ b/desmume/src/Makefile.am @@ -10,6 +10,7 @@ libdesmume_a_SOURCES = \ FIFO.c FIFO.h \ GPU.c GPU.h \ mc.c mc.h \ + wifi.c wifi.h \ MMU.c MMU.h NDSSystem.c NDSSystem.h registers.h \ ROMReader.c ROMReader.h \ saves.c saves.h \ diff --git a/desmume/src/windows/DeSmuME.dev b/desmume/src/windows/DeSmuME.dev index 9de115ae4..5f78d798e 100644 --- a/desmume/src/windows/DeSmuME.dev +++ b/desmume/src/windows/DeSmuME.dev @@ -1,7 +1,7 @@ [Project] FileName=DeSmuME.dev Name=DeSmuME -UnitCount=68 +UnitCount=70 Type=0 Ver=1 ObjFiles= @@ -10,7 +10,7 @@ Libs= PrivateResource=yopyop_private.rc ResourceIncludes= MakeIncludes= -Compiler=-DVERSION=\"0.5\"_@@_ +Compiler=-DVERSION=\"0.5\" _@@_ CppCompiler=_@@_ Linker=-ldxguid -ldxerr8 -ldsound_@@_ IsCpp=1 @@ -27,7 +27,7 @@ CustomMakefile= IncludeVersionInfo=1 SupportXPThemes=1 CompilerSet=0 -CompilerSettings=0000000001001000000100 +CompilerSettings=00000000010010010000ib [Unit1] FileName=..\ROMReader.c @@ -726,3 +726,23 @@ Priority=1000 OverrideBuildCmd=0 BuildCmd= +[Unit69] +FileName=..\wifi.h +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit70] +FileName=..\wifi.c +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= +