summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/src/display/display.hcc
diff options
context:
space:
mode:
Diffstat (limited to 'Graphic_Equalizer/src/display/display.hcc')
-rw-r--r--Graphic_Equalizer/src/display/display.hcc109
1 files changed, 0 insertions, 109 deletions
diff --git a/Graphic_Equalizer/src/display/display.hcc b/Graphic_Equalizer/src/display/display.hcc
deleted file mode 100644
index 2dfc669..0000000
--- a/Graphic_Equalizer/src/display/display.hcc
+++ /dev/null
@@ -1,109 +0,0 @@
-/*! \file display.hcc
- *
- * \section generic Message build up information and more
- *
- * \section project Project information.
- * Project Graphic Equalizer\n
- * \author O.M. Schinagl
- * \date 20041011
- * \version 0.1
- *
- * \section copyright Copyright
- * Copyright ©2004 Koninklijke Philips Electronics N.V. All rights reserved
- *
- * \section history Change history
- * 20041011: O.M. Schinagl\n Initial version
- *
- ********************************************************************/
-
-/******** System Includes *************/
-#include <stdlib.hch>
-
-#include "pal_master.hch"
-
-/******** Application Includes ********/
-#include "display.hch"
-
-
-
-/*! \fn void display_main(RAM_BANK0, RAM_BANK1);
- * \brief This routine handles all drawing of pixels. It never returns!
- *
- * \param PL2RAM RAM_BANK0 Handle to the first rambank.
- * \param PL2RAM RAM_BANK1 Handle to the second rambank.
- *
- * \return Never Returns.
- * \retval void
- */
-macro void display_main(RAM_BANK0, RAM_BANK1) {
- /*
- * Setup macro's to coordinate pixel writing.
- */
- macro expr VideoOut = PalVideoOutOptimalCT(ClockRate);
- macro expr VisibleX = PalVideoOutGetVisibleX (VideoOut, ClockRate);
- macro expr TotalX = PalVideoOutGetTotalX (VideoOut, ClockRate);
- macro expr TotalY = PalVideoOutGetTotalY (VideoOut);
- macro expr X = PalVideoOutGetX (VideoOut);
- macro expr Y = PalVideoOutGetY (VideoOut);
-
- unsigned 32 pixeldata;
- unsigned AW nextaddr;
- unsigned DW pixeldata;
- unsigned 1 SwitchData, help;
-
- /*
- * Prime Rendering Pipeline to start at bank 0 address 0.
- */
- PalPL2RAMSetReadAddress(RAM_BANK0, 0);
-
- /*
- * Run the following tasks indefinatly and in parallel
- */
- par (;;) {
- /*
- * We write only the last 24 bits of pixeldata as it also
- * contains information about the mask.
- */
- PalVideoOutWrite(VideoOut, pixeldata <- 24);
-
- /* FIXME this needs to be replaced by a global state array */
- PalSwitchRead(PalSwitchCT(0), &help);
- /*
- * When 'help' is activated, we display data from rambank 1
- * otherwise we draw from rambank 0.
- */
- if (help) {
- PalPL2RAMRead(RAM_BANK1, &Data);
- PalPL2RAMSetReadAddress(RAM_BANK1, nextaddr);
- } else {
- PalPL2RAMRead(PL2RAM_BANK0, &Data);
- PalPL2RAMSetReadAddress(RAM_BANK0, nextaddr);
- }
-
- /*
- * The current position of the screen can lay in an area called
- * the blanking area. We don't have data for this area as it is
- * not drawn. We therefor have to determin wether we are beyond
- * the visible area of the screen, but before the end of the
- * total width of the screen.
- * Our pipeline consists of 5 total stages. Therefor we have to
- * substract 5 pixels.
- */
- if ((X > (VisibleX - 5)) && (X <= (TotalX - 5))) {
- /*
- * 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 (Y == (TotalY -1)) {
- nextaddr = 0;
- }
- } else {
- /*
- * Increase the memory counter for each pixel drawn
- * thus keeping the memory location in sync with
- * the current pixel position.
- */
- nextaddr++;
- }
-} /* --- display_main() --- */