From 84bea32766bf8f10910c60328ba11ceebdfe8339 Mon Sep 17 00:00:00 2001 From: Oliver Schinagl Date: Thu, 6 Jan 2005 09:07:36 +0000 Subject: Added input gain along the Y-axis. Fixed bug in memory counter where two statements where executed in one clock cycle. Renamed GRAPHMASK to GRAPH. --- Graphic_Equalizer/src/display.hcc | 80 ++++++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/Graphic_Equalizer/src/display.hcc b/Graphic_Equalizer/src/display.hcc index 27da54d..5a84d77 100644 --- a/Graphic_Equalizer/src/display.hcc +++ b/Graphic_Equalizer/src/display.hcc @@ -54,7 +54,7 @@ chan unsigned 1 maskupdate_notification; static rom unsigned 20 address_offsets[32] = { ADDRESS_SKIN_START, ADDRESS_HELP_START, - ADDRESS_GRAPHMASK_START, + ADDRESS_GRAPH_START, ADDRESS_ABOUT_TOP_FONTYS_START, ADDRESS_ABOUT_TOP_TASS_START, ADDRESS_ABOUT_TOP_TRANSFER_START, @@ -150,6 +150,8 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events address_offset = address_offsets[OFFSET_ADDRESS_HELP]; break; case MODE_ABOUT_BUSY: + address_offset = address_offsets[events->address_offset_index]; + break; default: delay; break; @@ -158,16 +160,16 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events if (MODE_GRAPH == events->mode) { par { switch (addresses[MASK_AREA_BACKGROUND] <- 2) { - case 0: + case 3: visual_graph_color = ((unsigned 8)(0 @ audiodata->fft_info.read[MASK]) << 1) @ ((unsigned 8)(0 @ audiodata->fft_info.read[MASK]) << -1) @ ((unsigned 8)(0 @ audiodata->fft_info.read[MASK]) << 0); break; - case 1: + case 0: visual_graph_color = ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[23:16]]) << 1) @ ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[23:16]]) << -1) @ ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[23:16]]) << 0); break; - case 2: + case 1: visual_graph_color = ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[15:8]]) << 1) @ ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[15:8]]) << -1) @ ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[15:8]]) << 0); break; - case 3: + case 2: visual_graph_color = ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[7:0]]) << 1) @ ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[7:0]]) << -1) @ ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[7:0]]) << 0); break; default: @@ -210,6 +212,22 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events PalVideoOutWrite(VIDEOOUT, PIXEL); } break; + + /* + * Volume control over the Y-axis. + */ + case AREA_INPUTGAIN_YAXIS: + /* + * The volume_position stores the + * highest point of our bar. Every + * pixel after this point is drawn. + */ + if (SCANY >= 0 @ events->inputgain_position) { + PalVideoOutWrite(VIDEOOUT, skindata->inputgain.color_primary); + } else { + PalVideoOutWrite(VIDEOOUT, PIXEL); + } + break; /* * Spectrum Analyzer @@ -304,7 +322,7 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events par { events->mode = MODE_ABOUT_BUSY; address_index = MASK_AREA_ABOUT_BOTTOM; - address_offset = address_offsets[OFFSET_ADDRESS_ABOUT_TOP_CELOXICA /* OFFSET_ADDRESS_ABOUT_BOTTON */]; + address_offset = address_offsets[OFFSET_ADDRESS_ABOUT_TOP_CELOXICA /* OFFSET_ADDRESS_ABOUT_BOTTOM */]; PalVideoOutWrite(VIDEOOUT, PIXEL); } } else { @@ -382,34 +400,36 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events * Therefor we have to substract 5 pixels. */ if ((SCANX > (VISIBLEX - 5)) && (SCANX <= (TOTALX - 5))) { - if (SCANY == (VISIBLEY +1)) { - par { - address_index++; - addresses[address_index] = 0; + par { + if (SCANY == (VISIBLEY +1)) { + par { + address_index++; + addresses[address_index] = 0; + } + } else { + delay; } - } else { - delay; - } - /* - * We are in the blanking area of the screen. - * If we are on the last line, and thus last - * pixel we reset our address counter. - */ - if (SCANY == (TOTALY -1)) { /* - * Reset our draw address counter to 0. + * We are in the blanking area of the screen. + * If we are on the last line, and thus last + * pixel we reset our address counter. */ - par { - address_index = 0; - addresses[MASK_AREA_BACKGROUND] = 0; + if (SCANY == (TOTALY -1)) { + /* + * Reset our draw address counter to 0. + */ + par { + address_index = 0; + addresses[MASK_AREA_BACKGROUND] = 0; + } + } else { + /* + * We have reached the end of the + * visible line, but not the end of + * the screen. Therefore do nothing. + */ + delay; } - } else { - /* - * We have reached the end of the - * visible line, but not the end of - * the screen. Therefore do nothing. - */ - delay; } } else { /* -- cgit v0.12