summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-11-15 16:04:27 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-11-15 16:04:27 (GMT)
commitaee5707fed8541410816c0a1ce1f0aa17108b462 (patch)
treef2546786adb04fac0b9d9f3999bc27378fcd751d /Graphic_Equalizer
parent1db17be5a3ba68ffb5b9b23af6ac52a1b29e89ed (diff)
downloadTASS-aee5707fed8541410816c0a1ce1f0aa17108b462.zip
TASS-aee5707fed8541410816c0a1ce1f0aa17108b462.tar.gz
TASS-aee5707fed8541410816c0a1ce1f0aa17108b462.tar.bz2
Added display of active buttons.
Added equalizer preset storage.
Diffstat (limited to 'Graphic_Equalizer')
-rw-r--r--Graphic_Equalizer/Graphic_Equalizer.hw1
-rw-r--r--Graphic_Equalizer/Graphic_Equalizer.pref48
-rw-r--r--Graphic_Equalizer/include/audio.hch14
-rw-r--r--Graphic_Equalizer/include/configuration.hch2
-rw-r--r--Graphic_Equalizer/include/display.hch2
-rw-r--r--Graphic_Equalizer/include/display_shared.hch18
-rw-r--r--Graphic_Equalizer/include/eventhandler.hch2
-rw-r--r--Graphic_Equalizer/include/eventhandler_shared.hch4
-rw-r--r--Graphic_Equalizer/src/display.hcc43
-rw-r--r--Graphic_Equalizer/src/eventhandler.hcc69
-rw-r--r--Graphic_Equalizer/src/main.hcc16
-rw-r--r--Graphic_Equalizer/src/mouse.hcc8
-rw-r--r--Graphic_Equalizer/src/smartmedia.hcc8
13 files changed, 161 insertions, 74 deletions
diff --git a/Graphic_Equalizer/Graphic_Equalizer.hw b/Graphic_Equalizer/Graphic_Equalizer.hw
index 59b9054..49dfb39 100644
--- a/Graphic_Equalizer/Graphic_Equalizer.hw
+++ b/Graphic_Equalizer/Graphic_Equalizer.hw
@@ -1,2 +1,3 @@
#@hw
project graphic_equalizer.hp
+project ..\\fft_test\\fft_test.hp
diff --git a/Graphic_Equalizer/Graphic_Equalizer.pref b/Graphic_Equalizer/Graphic_Equalizer.pref
index 66251fb..0bdcac0 100644
--- a/Graphic_Equalizer/Graphic_Equalizer.pref
+++ b/Graphic_Equalizer/Graphic_Equalizer.pref
@@ -38,30 +38,6 @@ DocumentString=
DocTemplateIndex=5
WindowPlacement=MCAAAAAAAAAAAAAABAAAAAAAPPPPPPPPPPPPPPPPMPPPPPPPJOPPPPPPCEAAAAAACEAAAAAAPNCAAAAAFCBAAAAA
IsActiveChildFrame=False
-[WorkState_v1_2.Frames.ChildFrames.Document-0]
-ptn_Child1=ViewFrame-0
-[WorkState_v1_2.Frames.ChildFrames.Document-0.ViewFrame-0]
-DocPathName=C:\Project_CVS\Graphic_Equalizer\src\display.hcc
-DocumentString=
-DocTemplateIndex=4
-WindowPlacement=MCAAAAAAAAAAAAAABAAAAAAAPPPPPPPPPPPPPPPPMPPPPPPPJOPPPPPPAAAAAAAAAAAAAAAAAOCAAAAAEEBAAAAA
-IsActiveChildFrame=False
-[WorkState_v1_2.Frames.ChildFrames.Document-1]
-ptn_Child1=ViewFrame-0
-[WorkState_v1_2.Frames.ChildFrames.Document-1.ViewFrame-0]
-DocPathName=C:\Project_CVS\Graphic_Equalizer\src\eventhandler.hcc
-DocumentString=
-DocTemplateIndex=4
-WindowPlacement=MCAAAAAAAAAAAAAABAAAAAAAPPPPPPPPPPPPPPPPMPPPPPPPJOPPPPPPIFAAAAAAIFAAAAAAJMCAAAAAPGBAAAAA
-IsActiveChildFrame=False
-[WorkState_v1_2.Frames.ChildFrames.Document-2]
-ptn_Child1=ViewFrame-0
-[WorkState_v1_2.Frames.ChildFrames.Document-2.ViewFrame-0]
-DocPathName=C:\Project_CVS\Graphic_Equalizer\src\mouse.hcc
-DocumentString=
-DocTemplateIndex=4
-WindowPlacement=MCAAAAAAAAAAAAAABAAAAAAAPPPPPPPPPPPPPPPPMPPPPPPPJOPPPPPPAAAAAAAAAAAAAAAABHCAAAAAHBBAAAAA
-IsActiveChildFrame=False
[WorkState_v1_2.Frames.ChildFrames.Document-3]
ptn_Child1=ViewFrame-0
[WorkState_v1_2.Frames.ChildFrames.Document-3.ViewFrame-0]
@@ -102,6 +78,30 @@ DocumentString=
DocTemplateIndex=5
WindowPlacement=MCAAAAAAAAAAAAAABAAAAAAAPPPPPPPPPPPPPPPPMPPPPPPPJOPPPPPPAAAAAAAAAAAAAAAABHCAAAAAHBBAAAAA
IsActiveChildFrame=False
+[WorkState_v1_2.Frames.ChildFrames.Document-1]
+ptn_Child1=ViewFrame-0
+[WorkState_v1_2.Frames.ChildFrames.Document-1.ViewFrame-0]
+DocPathName=C:\project_cvs\graphic_equalizer\src\display.hcc
+DocumentString=
+DocTemplateIndex=4
+WindowPlacement=MCAAAAAACAAAAAAADAAAAAAAPPPPPPPPPPPPPPPPMPPPPPPPJOPPPPPPGBAAAAAAGBAAAAAABICAAAAAMCBAAAAA
+IsActiveChildFrame=True
+[WorkState_v1_2.Frames.ChildFrames.Document-2]
+ptn_Child1=ViewFrame-0
+[WorkState_v1_2.Frames.ChildFrames.Document-2.ViewFrame-0]
+DocPathName=C:\Project_CVS\Graphic_Equalizer\include\audio.hch
+DocumentString=
+DocTemplateIndex=5
+WindowPlacement=MCAAAAAAAAAAAAAABAAAAAAAPPPPPPPPPPPPPPPPMPPPPPPPJOPPPPPPEIAAAAAAEIAAAAAALOCAAAAAGJBAAAAA
+IsActiveChildFrame=False
+[WorkState_v1_2.Frames.ChildFrames.Document-0]
+ptn_Child1=ViewFrame-0
+[WorkState_v1_2.Frames.ChildFrames.Document-0.ViewFrame-0]
+DocPathName=C:\Project_CVS\Graphic_Equalizer\src\eventhandler.hcc
+DocumentString=
+DocTemplateIndex=4
+WindowPlacement=MCAAAAAACAAAAAAADAAAAAAAPPPPPPPPPPPPPPPPMPPPPPPPJOPPPPPPOGAAAAAAOGAAAAAAFNCAAAAAAIBAAAAA
+IsActiveChildFrame=True
[WorkState_v1_2]
ptn_Child1=Frames
ptn_Child2=DK Design Suite Preferences
diff --git a/Graphic_Equalizer/include/audio.hch b/Graphic_Equalizer/include/audio.hch
index 39fa52d..43666ed 100644
--- a/Graphic_Equalizer/include/audio.hch
+++ b/Graphic_Equalizer/include/audio.hch
@@ -19,15 +19,17 @@
#ifndef _AUDIO_HCH
#define _AUDIO_HCH 1
-
-
/*
* Type definition of the shared memory to be used in various processes
*/
-mpram equalizer_levels_t {
- ram unsigned 4 write[768];
- rom unsigned 4 read[768];
-};
+typedef struct {
+ mpram {
+ ram unsigned 4 write[768];
+ rom unsigned 4 read[768];
+ } equalizer_levels;
+ unsigned 10 active_preset;
+ unsigned 1 log;
+} audiodata_t;
diff --git a/Graphic_Equalizer/include/configuration.hch b/Graphic_Equalizer/include/configuration.hch
index 6cc644b..3984404 100644
--- a/Graphic_Equalizer/include/configuration.hch
+++ b/Graphic_Equalizer/include/configuration.hch
@@ -97,7 +97,7 @@
/*
* Set the color for various items that will be drawn on screen.
*/
-#define PIXEL_VOLUME_YAXIS (0x00ff00)
+#define PIXEL_VOLUME_YAXIS (0x0000ff)
#define PIXEL_EQUALIZER (0xff0000)
#else
diff --git a/Graphic_Equalizer/include/display.hch b/Graphic_Equalizer/include/display.hch
index 4568b98..c69bf26 100644
--- a/Graphic_Equalizer/include/display.hch
+++ b/Graphic_Equalizer/include/display.hch
@@ -35,7 +35,7 @@
* informs events what the current mask is. To optain the current mask we need
* the X and Y coordinates from our mousedata pointer.
*/
-macro proc display_main(events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0);
+macro proc display_main(audiodata, events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0);
#else
#error "ERROR file display.hch multiple times included"
diff --git a/Graphic_Equalizer/include/display_shared.hch b/Graphic_Equalizer/include/display_shared.hch
index a3f2cb1..de2e760 100644
--- a/Graphic_Equalizer/include/display_shared.hch
+++ b/Graphic_Equalizer/include/display_shared.hch
@@ -28,7 +28,25 @@
#define AREA_VOLUME_YAXIS 0x02
#define AREA_SPECTRUM_ANALYZER 0x03
+#define BUTTON_LOG 0x04
+#define BUTTON_DEMO 0x05
+#define BUTTON_RESET 0x06
+
+#define BUTTON_PRESET_1 0x07
+#define BUTTON_PRESET_2 0x08
+#define BUTTON_PRESET_3 0x09
+#define BUTTON_PRESET_4 0x0a
+#define BUTTON_PRESET_5 0x0b
+#define BUTTON_PRESET_6 0x0c
+
+#define BUTTON_1 0x0d
+#define BUTTON_2 0x0e
+#define BUTTON_3 0x0f
+#define BUTTON_4 0x10
+#define BUTTON_5 0x11
+
#define BUTTON_HELP 0x12
+#define BUTTON_MODE 0x13
#define AREA_EQUALIZER_MIN 0x80
#define AREA_EQUALIZER_MAX 0xff
diff --git a/Graphic_Equalizer/include/eventhandler.hch b/Graphic_Equalizer/include/eventhandler.hch
index 1ee9099..772e686 100644
--- a/Graphic_Equalizer/include/eventhandler.hch
+++ b/Graphic_Equalizer/include/eventhandler.hch
@@ -27,7 +27,7 @@
* to store actions to be performed and a mousedata pointer so that we know on
* what mousestate to respond. We never returns!
*/
-macro proc eventhandler_main(equalizer_levels, events, mousedata);
+void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mousedata);
#else
#error "ERROR file eventhandler.hch multiple times included"
diff --git a/Graphic_Equalizer/include/eventhandler_shared.hch b/Graphic_Equalizer/include/eventhandler_shared.hch
index 90922fb..4711356 100644
--- a/Graphic_Equalizer/include/eventhandler_shared.hch
+++ b/Graphic_Equalizer/include/eventhandler_shared.hch
@@ -30,6 +30,7 @@ typedef struct {
unsigned 10 volume_position;
unsigned ram 9 equalizer_position[128];
unsigned 8 mask;
+ unsigned 3 equalizer_mode;
unsigned 1 help;
} events_t;
@@ -43,11 +44,12 @@ typedef struct {
extern unsigned 5 volumecontrol_table[46];
/*
- * Equalizer lookuptabe.
+ * Equalizer lookup tables.
* TODO: This table is now hardcoded. To ensure full skinability this table
* should be dynamically loaded.
*/
extern unsigned 4 equalizer_table[66];
+extern unsigned 9 equalizer_table_inv[16];
diff --git a/Graphic_Equalizer/src/display.hcc b/Graphic_Equalizer/src/display.hcc
index 79cf4b2..9625506 100644
--- a/Graphic_Equalizer/src/display.hcc
+++ b/Graphic_Equalizer/src/display.hcc
@@ -42,7 +42,7 @@ chan unsigned 1 maskupdate_notification;
-/*! \fn void display_main(equalizer_levels_t *equalizer_levels, events_t *events,
+/*! \fn void display_main(audiodata_t *audiodata, equalizer_levels_t *equalizer_levels, events_t *events,
* mousedata_t *mousedata, ClockRate, RAM_BANK0);
*
* \brief This routine handles all drawing of pixels. It never returns!
@@ -54,7 +54,7 @@ chan unsigned 1 maskupdate_notification;
* \return Never Returns.
* \retval void
*/
-macro proc display_main(events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0) {
+macro proc display_main(audiodata, events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0) {
/*
* Setup macro's RAM/Video handles and to coordinate pixel writing.
*/
@@ -80,6 +80,18 @@ macro proc display_main(events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0) {
#else
#define PIXEL (pixeldata <- 24)
#endif
+
+ /*
+ *
+ */
+ macro proc draw_button(button) {
+ if (button == pixeldata[31:24]) {
+ PalVideoOutWrite(VIDEOOUT, ~PIXEL);
+ } else {
+ PalVideoOutWrite(VIDEOOUT, PIXEL);
+ }
+ }
+
/*
* Prime Rendering Pipeline to start where the skin starts.
*/
@@ -110,12 +122,35 @@ macro proc display_main(events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0) {
PalVideoOutWrite(VIDEOOUT, PIXEL);
}
break;
+
+ case BUTTON_PRESET_1:
+ case BUTTON_PRESET_2:
+ case BUTTON_PRESET_3:
+ case BUTTON_PRESET_4:
+ case BUTTON_PRESET_5:
+ case BUTTON_PRESET_6:
+ draw_button((audiodata.active_preset +BUTTON_PRESET_1) <- 8);
+ break;
+
+ case BUTTON_1:
+ case BUTTON_2:
+ case BUTTON_3:
+ case BUTTON_4:
+ case BUTTON_5:
+ draw_button((0 @ events.equalizer_mode) +BUTTON_1);
+ break;
+
+ case BUTTON_LOG:
+ draw_button((0 @ audiodata.log) +BUTTON_LOG);
+ break;
+
default:
- if ((AREA_EQUALIZER_MIN <= pixeldata[31:24]) && (pixeldata[31:24] <= AREA_EQUALIZER_MAX) && ((SCANY -382) == 0 @ events.equalizer_position[(pixeldata[31:24] -0x80) <- 7])) {
+ if ((AREA_EQUALIZER_MIN <= pixeldata[31:24]) && (pixeldata[31:24] <= AREA_EQUALIZER_MAX) && (SCANY == 0 @ events.equalizer_position[(pixeldata[31:24] -0x80) <- 7])) {
PalVideoOutWrite(VIDEOOUT, PIXEL_EQUALIZER);
} else {
PalVideoOutWrite(VIDEOOUT, PIXEL);
}
+
break;
}
@@ -179,4 +214,4 @@ macro proc display_main(events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0) {
}
}
}
-} /* --- display_main() --- */
+} /* --- display_main() --- */ \ No newline at end of file
diff --git a/Graphic_Equalizer/src/eventhandler.hcc b/Graphic_Equalizer/src/eventhandler.hcc
index f0583aa..1ec8468 100644
--- a/Graphic_Equalizer/src/eventhandler.hcc
+++ b/Graphic_Equalizer/src/eventhandler.hcc
@@ -25,6 +25,7 @@
/******** Application Includes ********/
#include "configuration.hch"
+#include "audio.hch"
#include "mouse_shared.hch"
#include "display_shared.hch"
#include "eventhandler_shared.hch"
@@ -36,7 +37,7 @@
extern chan unsigned 1 maskupdate_notification;
-/*! \fn void eventhandler_main(equalizer_levels_t *equalizer_levels, events_t *events, mousedata_t *mousedata);
+/*! \fn void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mousedata);
* \brief
*
* \param events_t *events pointer to struct with all events.
@@ -45,66 +46,93 @@ extern chan unsigned 1 maskupdate_notification;
* \return Never Returns.
* \retval void
*/
-macro proc eventhandler_main(equalizer_levels, events, mousedata) {
+void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mousedata) {
+ unsigned 8 equalizer_bands;
unsigned 5 volume_left;
unsigned 1 newmaskupdate;
for (;;) {
maskupdate_notification ? newmaskupdate;
- print_string("Mask: ");print_hex_value(0 @ events.mask);print_eol();
- print_string("state: ");print_hex_value(0 @ mousedata.state);print_eol();
/*
* First we determine what mousestate we currently have. Then
* we check where we are to decide what to do.
*/
- switch (mousedata.state) {
+ switch (mousedata->state) {
case MOUSE_STATE_ON_PRESS:
/*
* If the current mask equals the help button
* we flip the help bit.
*/
- if (BUTTON_HELP == events.mask) {
- events.help = !events.help;
+ if (BUTTON_HELP == events->mask) {
+ events->help = !events->help;
} else {
delay;
}
+
+ if ((BUTTON_PRESET_1 <= events->mask) && (events->mask <= BUTTON_PRESET_6)) {
+ audiodata->active_preset = 0 @ (events->mask -BUTTON_PRESET_1);
+ for (equalizer_bands = 0; equalizer_bands != 128; equalizer_bands++) {
+ events->equalizer_position[equalizer_bands <- 7] = equalizer_table_inv[audiodata->equalizer_levels.write[(0 @ equalizer_bands) +(audiodata->active_preset << 7)]];
+ }
+ } else {
+ delay;
+ }
+
+ if ((BUTTON_1 <= events->mask) && (events->mask <= BUTTON_5)) {
+ events->equalizer_mode = (events->mask -BUTTON_1) <- 3;
+ } else {
+ delay;
+ }
+
+ if (BUTTON_LOG == events->mask) {
+ audiodata->log = !audiodata->log;
+ } else {
+ delay;
+ }
+
break;
+
case MOUSE_STATE_DOWN:
/*
* If we are in the volume area we update the
* volume level for both channels.
*/
- if (AREA_VOLUME_YAXIS == events.mask) {
+ if (AREA_VOLUME_YAXIS == events->mask) {
/*
* Copy the current Y cursor position
* to the events struct. This we then
* later use for drawing purposes.
*/
- events.volume_position = 0 @ mousedata.y;
+ events->volume_position = 0 @ mousedata->y;
/*
* Look the relative y-coordinate up in
- * the volumecontrol lookup table.
+ * the volumecontrol lookup table. We
+ * make a local copy here because the
+ * RC200 call doesn't behave nicely
+ * when passing anything else.
*/
- volume_left = volumecontrol_table[((mousedata.y) -65) <- 6];
+ volume_left = volumecontrol_table[((mousedata->y) -65) <- 6];
/*
* We feel that volume gets softer the
* closer it gets to the 0, and louder
* as it approaches 0x1f. The SetVolume
* RC200 call does this in an unnatural
- * reverse way. Therefor we reverse it.
+ * reverse way. Therefor we fix it.
*/
RC200AudioOutSetVolume(!volume_left, 0x1f -volume_left, 0x1f -volume_left);
} else {
delay;
}
- if ((AREA_EQUALIZER_MIN <= events.mask) && (events.mask <= AREA_EQUALIZER_MAX)) {
- print_string("Ypos for eq: ");print_hex_value(0 @ mousedata.y);print_eol();
+
+ if ((AREA_EQUALIZER_MIN <= events->mask) && (events->mask <= AREA_EQUALIZER_MAX)) {
/*
* Copy the current Y position into a
* store for the current equalizer bar.
+ * The index is determined by the mask
+ * minus the maskoffset.
*/
- events.equalizer_position[(events.mask -0x80) <- 7] = mousedata.y;
+ events->equalizer_position[(events->mask -AREA_EQUALIZER_MIN) <- 7] = mousedata->y;
/*
* We look our current possition up in
* the lookup table. We determin our
@@ -112,12 +140,14 @@ macro proc eventhandler_main(equalizer_levels, events, mousedata) {
* (minus an offset of course). We
* store the result in the array of
* equalizer levels. The index we get
- * from the current mask.
+ * from the current mask. We add the
+ * size of our equalizer bands times
+ * the active preset.
*
* TODO: lock equalizer store with a
* semaphore!
*/
- equalizer_levels.write[0 @ (events.mask -0x80) <- 7] = equalizer_table[((mousedata.y) -382) <- 7];
+ audiodata->equalizer_levels.write[(( 0 @ events->mask -AREA_EQUALIZER_MIN) +(audiodata->active_preset << 7))] = equalizer_table[((mousedata->y) -382) <- 7];
} else {
delay;
}
@@ -136,8 +166,9 @@ macro proc eventhandler_main(equalizer_levels, events, mousedata) {
rom unsigned 5 volumecontrol_table[46] = {31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, 0};
/*
- * Equalizer lookuptabe.
+ * Equalizer lookuptabes.
* TODO: This table is now hardcoded. To ensure full skinability this table
* should be dynamically loaded.
*/
-rom unsigned 4 equalizer_table[66] = {15, 15, 15, 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}; \ No newline at end of file
+rom unsigned 4 equalizer_table[66] = {15, 15, 15, 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0};
+rom unsigned 9 equalizer_table_inv[16] = {448, 444, 440, 436, 432, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 382}; \ No newline at end of file
diff --git a/Graphic_Equalizer/src/main.hcc b/Graphic_Equalizer/src/main.hcc
index 60eb71b..1afcd1d 100644
--- a/Graphic_Equalizer/src/main.hcc
+++ b/Graphic_Equalizer/src/main.hcc
@@ -1,3 +1,4 @@
+
/*! \file main.hcc
*
* \section generic Message build up information and more
@@ -26,14 +27,18 @@
/******** Application Includes ********/
#include "configuration.hch"
+#include "audio.hch"
#include "mouse_shared.hch"
#include "mouse.hch"
#include "eventhandler_shared.hch"
#include "eventhandler.hch"
-#include "audio.hch"
#include "display.hch"
#include "smartmedia.hch"
+#include "config.hch"
+#include "fft.hch"
+#include "runfft.hch"
+
#if HAVE_DEBUG
#include "debug.hch"
#endif
@@ -60,7 +65,7 @@ void main(void) {
mousedata_t mousedata;
events_t events;
- mpram equalizer_levels_t equalizer_levels;
+ audiodata_t audiodata;
unsigned 1 result;
/*
@@ -131,7 +136,7 @@ void main(void) {
* data folowed by our main program loop.
*/
result = smartmedia_init();
- if (!result) {
+ if (0 == result) {
#endif
#if HAVE_DEBUG
print_string("Loading Skin ...");
@@ -142,6 +147,7 @@ void main(void) {
print_string("Done Loading Skin ...");
print_eol();
print_string("Running Main Application.");
+ print_eol();
#endif
/*
@@ -154,8 +160,8 @@ void main(void) {
* should ever return.
*/
mouse_main(mousedata);
- display_main(events, mousedata, ClockRate, VideoOut, RAM_BANK0);
- eventhandler_main(equalizer_levels, events, mousedata);
+ display_main(audiodata, events, mousedata, ClockRate, VideoOut, RAM_BANK0);
+ eventhandler_main(&audiodata, &events, &mousedata);
audio_main(AudioIn, AudioOut);
}
#if HAVE_SMARTMEDIA
diff --git a/Graphic_Equalizer/src/mouse.hcc b/Graphic_Equalizer/src/mouse.hcc
index 4d28097..9212133 100644
--- a/Graphic_Equalizer/src/mouse.hcc
+++ b/Graphic_Equalizer/src/mouse.hcc
@@ -47,17 +47,17 @@
*/
macro proc mouse_main(mousedata)
{
- unsigned 14 touch_sampler;
+ unsigned 18 touch_sampler;
unsigned 10 x, oldx;
unsigned 9 y, oldy;
unsigned 3 mousestate, oldmousestate;
unsigned 1 touch, touched, oldtouched;
/*
- * We only check for mouse states once every 2^14 time. This to
+ * We only check for mouse states once every 2^18 time. This to
* overcome the sampling of the 'Touch' state of the RC200 libs. When
- * using newer libs this might be overkill, e.g. smaller values may due
- * or sampling all together will be redundant.
+ * using newer libs this might be overkill, e.g. smaller values may
+ * work or sampling all together will be redundant.
*/
for(touch_sampler = 1;; touch_sampler++) {
if (!touch_sampler) {
diff --git a/Graphic_Equalizer/src/smartmedia.hcc b/Graphic_Equalizer/src/smartmedia.hcc
index 86d6f44..fc9ff25 100644
--- a/Graphic_Equalizer/src/smartmedia.hcc
+++ b/Graphic_Equalizer/src/smartmedia.hcc
@@ -49,14 +49,6 @@ unsigned 1 smartmedia_init(void) {
RC200CPLDEnable();
RC200SmartMediaInit(&retval);
- /*
- * In the case of initialization failing, we try to reset the
- * SmartMedia.
- */
- if (retval) {
- RC200SmartMediaReset(&retval);
- }
-
return retval;
} /* --- smartmedia_init() --- */