Skip to content

Commit

Permalink
Version 3.2 - Reverted to Arm7 SoundLib.
Browse files Browse the repository at this point in the history
  • Loading branch information
wavemotion-dave committed Dec 12, 2021
1 parent b04d761 commit 83a7193
Show file tree
Hide file tree
Showing 11 changed files with 204 additions and 251 deletions.
Binary file modified A5200DS.nds
Binary file not shown.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ include $(DEVKITARM)/ds_rules
export TARGET := A5200DS
export TOPDIR := $(CURDIR)

VERSION=3.1

VERSION=3.2

ICON := -b $(CURDIR)/logo.bmp "A5200DS $(VERSION);wavemotion-dave;http://https://github.com/wavemotion-dave/A5200DS"

Expand Down
4 changes: 2 additions & 2 deletions arm7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -fno-rtti
ASFLAGS := -g $(ARCH)
LDFLAGS = -specs=ds_arm7.specs -g $(ARCH) -Wl,-Map,$(notdir $*).map

#LIBS := -ldswifi7 -lmm7 -lnds7 -lmm7
LIBS := -ldswifi7 -lnds7 -lmm7
#LIBS := -ldswifi7 -lmm7 -lnds7
LIBS := -ldswifi7 -lnds7

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
Expand Down
9 changes: 3 additions & 6 deletions arm7/source/emusoundfifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ typedef enum {
} FifoMesType;

//---------------------------------------------------------------------------------
void soundEmuDataHandler(int bytes, void *user_data)
{
void soundEmuDataHandler(int bytes, void *user_data) {
int channel = -1;

FifoMessage msg;
Expand Down Expand Up @@ -41,8 +40,7 @@ void soundEmuCommandHandler(u32 command, void* userdata) {
int data = command & 0xFFFF;
int channel = (command >> 16) & 0xF;

switch(cmd)
{
switch(cmd) {

case SOUND_SET_VOLUME:
SCHANNEL_CR(channel) &= ~0xFF;
Expand Down Expand Up @@ -77,8 +75,7 @@ void soundEmuCommandHandler(u32 command, void* userdata) {
}

//---------------------------------------------------------------------------------
void installSoundEmuFIFO(void)
{
void installSoundEmuFIFO(void) {
fifoSetDatamsgHandler(FIFO_USER_01, soundEmuDataHandler, 0);
fifoSetValue32Handler(FIFO_USER_01, soundEmuCommandHandler, 0);
}
99 changes: 48 additions & 51 deletions arm7/source/main.c
Original file line number Diff line number Diff line change
@@ -1,98 +1,95 @@
/*---------------------------------------------------------------------------------
default ARM7 core
default ARM7 core
Copyright (C) 2005 - 2010
Michael Noland (joat)
Jason Rogers (dovoto)
Dave Murphy (WinterMute)
Copyright (C) 2005 - 2010
Michael Noland (joat)
Jason Rogers (dovoto)
Dave Murphy (WinterMute)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you use
this software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you use
this software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
3. This notice may not be removed or altered from any source
distribution.
---------------------------------------------------------------------------------*/
#include <nds.h>
#include <dswifi7.h>
#include <maxmod7.h>
//#include <maxmod7.h>

extern void installSoundEmuFIFO(void);
extern void mmInstall( int fifo_channel );

//---------------------------------------------------------------------------------
void VblankHandler(void) {
//---------------------------------------------------------------------------------
Wifi_Update();
Wifi_Update();
}


//---------------------------------------------------------------------------------
void VcountHandler() {
//---------------------------------------------------------------------------------
inputGetAndSend();
inputGetAndSend();
}

volatile bool exitflag = false;

//---------------------------------------------------------------------------------
void powerButtonCB() {
//---------------------------------------------------------------------------------
exitflag = true;
exitflag = true;
}

void mmInstall(int);

//---------------------------------------------------------------------------------
int main() {
//---------------------------------------------------------------------------------
readUserSettings();
readUserSettings();

irqInit();
// Start the RTC tracking IRQ
initClockIRQ();
touchInit();
fifoInit();
irqInit();
// Start the RTC tracking IRQ
initClockIRQ();
touchInit();
fifoInit();

mmInstall( FIFO_MAXMOD );
//mmInstall(FIFO_MAXMOD);

SetYtrigger(80);
SetYtrigger(80);

installWifiFIFO();
installSoundFIFO();
installWifiFIFO();
installSoundFIFO();

installSystemFIFO();
installSystemFIFO();

installSoundEmuFIFO();
installSoundEmuFIFO();

irqSet(IRQ_VCOUNT, VcountHandler);
irqSet(IRQ_VBLANK, VblankHandler);
irqSet(IRQ_VCOUNT, VcountHandler);
irqSet(IRQ_VBLANK, VblankHandler);

irqEnable( IRQ_VBLANK | IRQ_VCOUNT | IRQ_NETWORK);
setPowerButtonCB(powerButtonCB);
irqEnable( IRQ_VBLANK | IRQ_VCOUNT | IRQ_NETWORK);
setPowerButtonCB(powerButtonCB);

// Keep the ARM7 mostly idle
while (!exitflag) {
if ( 0 == (REG_KEYINPUT & (KEY_SELECT | KEY_START | KEY_L | KEY_R))) {
exitflag = true;
}
// Keep the ARM7 mostly idle
while (!exitflag) {
if ( 0 == (REG_KEYINPUT & (KEY_SELECT | KEY_START | KEY_L | KEY_R))) {
exitflag = true;
}

swiWaitForVBlank();
}
return 0;
swiWaitForVBlank();
}
return 0;
}
Binary file modified arm9/gfx/pdev_bg0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 83a7193

Please sign in to comment.