summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMustapha Senhaji <moos@rockbox.org>2007-05-20 16:28:38 +0000
committerMustapha Senhaji <moos@rockbox.org>2007-05-20 16:28:38 +0000
commitc4da23ab0e52010a731c8ac67df78b901abec008 (patch)
treeecc92d8840f029d2b315abe9dde11709cc9c37e3 /apps
parentfd9d1401191d3bae99832b3b783a63e26dc706ca (diff)
downloadrockbox-c4da23ab0e52010a731c8ac67df78b901abec008.zip
rockbox-c4da23ab0e52010a731c8ac67df78b901abec008.tar.gz
rockbox-c4da23ab0e52010a731c8ac67df78b901abec008.tar.bz2
rockbox-c4da23ab0e52010a731c8ac67df78b901abec008.tar.xz
Update the francais language, plus some minor changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13446 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/francais.lang250
1 files changed, 206 insertions, 44 deletions
diff --git a/apps/lang/francais.lang b/apps/lang/francais.lang
index 7728d9f..51f115b 100644
--- a/apps/lang/francais.lang
+++ b/apps/lang/francais.lang
@@ -13,7 +13,8 @@
# Modifié par Manuel Dejonghe (lImbus) <lImbus AT users.soureforge.net> - February 2005
#
# Refonte totale du fichier par Mustapha Senhaji (Moos) <moos75 AT gmail.com>
-# Nov 2005, Avr 2006, Mai 2006, Juil 2006, Oct 2006, Dec 2006, Mars 2007
+# Nov 2005, Avr 2006, Mai 2006, Juil 2006, Oct 2006, Dec 2006, Mars 2007,
+# Mai 2007
#
<phrase>
id: LANG_SET_BOOL_YES
@@ -303,10 +304,10 @@
*: "Playlist"
</source>
<dest>
- *: "Options Listes de Lecture"
+ *: "Listes de Lecture"
</dest>
<voice>
- *: "Options listes de lecture"
+ *: "Listes de lecture"
</voice>
</phrase>
<phrase>
@@ -317,10 +318,10 @@
*: "Plugins"
</source>
<dest>
- *: "Liste des Modules d'Extension"
+ *: "Modules d'Extension"
</dest>
<voice>
- *: "Liste des modules d'extension"
+ *: "Modules d'extension"
</voice>
</phrase>
<phrase>
@@ -847,11 +848,12 @@
user:
<source>
*: "PLAY = Yes"
- h100,h120,h300: "NAVI = Oui"
- ipod*: "SELECT = Oui"
- x5: "SELECT = Oui"
- h10: "NEXT = Oui"
- gigabeat: "SELECT = Oui"
+ h100,h120,h300: "NAVI = Yes"
+ ipod*: "SELECT = Yes"
+ x5: "SELECT = Yes"
+ h10: "NEXT = Yes"
+ gigabeatf: "SELECT = Yes"
+ e200: "SELECT = Yes"
</source>
<dest>
*: "PLAY = Oui"
@@ -859,7 +861,8 @@
ipod*: "SELECT = Oui"
x5: "SELECT = Oui"
h10: "NEXT = Oui"
- gigabeat: "SELECT = Oui"
+ gigabeatf: "SELECT = Oui"
+ e200: "SELECT = Oui"
</dest>
<voice>
*: ""
@@ -996,13 +999,13 @@
desc: in the recording sub menu
user:
<source>
- *: "Recording Screen"
+ *: "Recording"
</source>
<dest>
- *: "Ecran d'Enregistrement"
+ *: "Enregistrement"
</dest>
<voice>
- *: "Ecran d'enregistrement"
+ *: "Enregistrement"
</voice>
</phrase>
<phrase>
@@ -1268,7 +1271,7 @@
*: "Voir la Liste Courante"
</dest>
<voice>
- *: "Voir liste de lecture courante"
+ *: "Voir la liste courante"
</voice>
</phrase>
<phrase>
@@ -1282,7 +1285,7 @@
*: "Enregistrer la Liste Courante"
</dest>
<voice>
- *: "Enregistrer liste de lecture courante"
+ *: "Enregistrer la liste courante"
</voice>
</phrase>
<phrase>
@@ -4717,16 +4720,18 @@
h100,h120,h300: "STOP = Exit"
ipod*: "PLAY/PAUSE = Exit"
x5: "RECORD = Exit"
- h10: "PREV = Exit"
- gigabeat: "A = Exit"
+ h10,h10_5gb: "PREV = Exit"
+ gigabeatf: "A = Exit"
+ e200: "POWER = Exit"
</source>
<dest>
*: "OFF = Quitter"
h100,h120,h300: "STOP = Quitter"
ipod*: "PLAY/PAUSE = Quitter"
x5: "RECORD = Quitter"
- h10: "PREV = Quitter"
+ h10,h10_5gb: "PREV = Quitter"
gigabeat: "A = Quitter"
+ e200: "POWER = Quitter"
</dest>
<voice>
*: ""
@@ -4783,16 +4788,18 @@
h100,h120,h300: "NAVI = Select"
ipod*: "SELECT = Select"
x5: "SELECT = Select"
- h10: "NEXT = Select"
- gigabeat: "SELECT = Select"
+ h10,h10_5gb: "SELECT = Select"
+ gigabeatf: "SELECT = Select"
+ e200: "SELECT = Select"
</source>
<dest>
*: "PLAY = Sélect."
h100,h120,h300: "NAVI = Sélect."
ipod*: "SELECT = Sélect."
x5: "SELECT = Sélect."
- h10: "NEXT = Sélect."
- gigabeat: "SELECT = Sélect."
+ h10,h10_5gb: "SELECT = Sélect."
+ gigabeatf: "SELECT = Sélect."
+ e200: "SELECT = Sélect."
</dest>
<voice>
*: ""
@@ -4807,16 +4814,18 @@
h100,h120,h300: "RECORD = Delete"
ipod*: "Long MENU = Delete"
x5: "Long RECORD = Delete"
- h10: "REWIND = Delete"
- gigabeat: "POWER = Delete"
+ h10,h10_5gb: "REWIND = Delete"
+ gigabeatf: "POWER = Delete"
+ e200: "PLAY = Delete"
</source>
<dest>
*: "ON+PLAY = Suppr."
h100,h120,h300: "RECORD = Suppr."
ipod*: "Long MENU = Suppr."
x5: "Long RECORD = Suppr."
- h10: "REWIND = Suppr."
- gigabeat: "POWER = Suppr."
+ h10,h10_5gb: "REWIND = Suppr."
+ gigabeatf: "POWER = Suppr."
+ e200: "PLAY = Suppr."
</dest>
<voice>
*: ""
@@ -4901,16 +4910,18 @@
h100,h120,h300: "NAVI = Set"
ipod*: "SELECT = Set"
x5: "SELECT = Set"
- h10: "NEXT = Set"
- gigabeat: "SELECT = Set"
+ h10,h10_5gb: "SELECT = Set"
+ gigabeatf: "SELECT = Set"
+ e200: "SELECT = Set"
</source>
<dest>
*: "ON = Valider"
h100,h120,h300: "NAVI = Valider"
ipod*: "SELECT = Valider"
x5: "SELECT = Valider"
- h10: "NEXT = Valider"
- gigabeat: "SELECT = Valider"
+ h10,h10_5gb: "SELECT = Valider"
+ gigabeatf: "SELECT = Valider"
+ e200: "SELECT = Valider"
</dest>
<voice>
*: ""
@@ -4925,16 +4936,18 @@
h100,h120,h300: "STOP = Revert"
ipod*: "MENU = Revert"
x5: "RECORD = Revert"
- h10: "PREV = Revert"
- gigabeat: "POWER = Revert"
+ h10,h10_5gb: "PREV = Revert"
+ gigabeatf: "POWER = Revert"
+ e200: "PREV = Revert"
</source>
<dest>
*: "OFF = Annuler"
h100,h120,h300: "STOP = Annuler"
ipod*: "MENU = Annuler"
x5: "RECORD = Annuler"
- h10: "PREV = Annuler"
- gigabeat: "POWER = Annuler"
+ h10,h10_5gb: "PREV = Annuler"
+ gigabeatf: "POWER = Annuler"
+ e200: "PREV = Annuler"
</dest>
<voice>
*: ""
@@ -7195,7 +7208,7 @@
*: ""
</dest>
<voice>
- *: "Firmware"
+ *: "Micrologiciel"
</voice>
</phrase>
<phrase>
@@ -7209,7 +7222,7 @@
*: ""
</dest>
<voice>
- *: "Fichier config. écran de lecture pour télécommande"
+ *: "Fichier config. écran de lecture télécommande"
</voice>
</phrase>
<phrase>
@@ -7270,13 +7283,13 @@
</phrase>
<phrase>
id: LANG_END_PLAYLIST_PLAYER
- desc: when playlist has finished
+ desc: DEPRECATED
user:
<source>
- *: "End of List"
+ *: ""
</source>
<dest>
- *: "Fin Liste de Lecture"
+ *: deprecated
</dest>
<voice>
*: ""
@@ -7288,9 +7301,11 @@
user:
<source>
*: "End of Song List"
+ player: "Fin Liste de Lecture"
</source>
<dest>
*: "Fin Liste de Lecture"
+ player: "Fin Liste de Lecture"
</dest>
<voice>
*: ""
@@ -7907,14 +7922,16 @@
h100,h120,h300: "STOP to abort"
ipod*: "PLAY/PAUSE to abort"
x5: "Long PLAY to abort"
- h10: "PREV to abort"
+ h10,h10_5gb: "PREV to abort"
+ e200: "PREV to abort"
</source>
<dest>
*: "OFF pour Annuler"
h100,h120,h300: "STOP pour Annuler"
ipod*: "PLAY/PAUSE pour Annuler"
x5: "Long PLAY pour Annuler"
- h10: "PREV pour Annuler"
+ h10,h10_5gb: "PREV pour Annuler"
+ e200: "PREV pour Annuler"
</dest>
<voice>
*: ""
@@ -10485,10 +10502,10 @@
*: "Charge During USB Connection"
</source>
<dest>
- *: "Charger Durant la Connection USB"
+ *: "Charger quand USB Connecté"
</dest>
<voice>
- *: "Charger durant la connection U S B"
+ *: "Charger quand U S B connecté"
</voice>
</phrase>
<phrase>
@@ -10687,3 +10704,148 @@
*: "Ecran d'alarme,réveil"
</voice>
</phrase>
+<phrase>
+ id: LANG_BUILDING_DATABASE
+ desc: splash database building progress
+ user:
+ <source>
+ *: "Building database... %d found (OFF to return)"
+ h100,h120,h300: "Building database... %d found (STOP to return)"
+ ipod*: "Building database... %d found (PLAY/PAUSE to return)"
+ x5: "Building database... %d found (Long PLAY to return)"
+ h10,h10_5gb: "Building database... %d found (PREV to return)"
+ e200: "Building database... %d found (PREV to return)"
+ </source>
+ <dest>
+ *: "Création base de données... %d trouvés (OFF pour retour)"
+ h100,h120,h300: "Création base de données... %d trouvés (STOP pour retour)"
+ ipod*: "Création base de données... %d trouvés (PLAY/PAUSE pour retour)"
+ x5: "Création base de données... %d trouvés (Long PLAY pour retour)"
+ h10,h10_5gb: "Création base de données... %d trouvés (PREV pour retour)"
+ e200: "Création base de données... %d trouvés (PREV pour retour)"
+ </dest>
+ <voice>
+ *: ""
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_ONPLAY_MENU_TITLE
+ desc: title for the onplay menus
+ user:
+ <source>
+ *: "Context Menu"
+ </source>
+ <dest>
+ *: "Menu contextuel"
+ </dest>
+ <voice>
+ *: "Menu contextuel"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_BUTTONLIGHT_TIMEOUT
+ desc: in settings_menu
+ user:
+ <source>
+ *: ""
+ e200: "Wheel Light Timeout"
+ gigabeatf: "Button Light Timeout"
+ </source>
+ <dest>
+ *: ""
+ e200: "Durée de l'éclairage de la molette"
+ gigabeatf: "Durée de l'éclairage des boutons"
+ </dest>
+ <voice>
+ *: ""
+ e200: "Durée de l'éclairage de la molette"
+ gigabeatf: "Durée de l'éclairage des boutons"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_BUTTONLIGHT_BRIGHTNESS
+ desc: in settings_menu
+ user:
+ <source>
+ *: ""
+ gigabeatf: "Button Light Brightness"
+ </source>
+ <dest>
+ *: ""
+ gigabeatf: "Luminosité de l'éclairage des touches"
+ </dest>
+ <voice>
+ *: ""
+ gigabeatf: "Luminosité de l'éclairage des touches"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_PLAYLISTVIEWER_SETTINGS
+ desc: title for the playlist viewer settings menus
+ user:
+ <source>
+ *: "Playlist Viewer Settings"
+ </source>
+ <dest>
+ *: "Options de la visionneuse liste de lecture"
+ </dest>
+ <voice>
+ *: "Options de la visionneuse de la liste de lecture"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_BROWSE_CUESHEET
+ desc:
+ user:
+ <source>
+ *: "Browse Cuesheet"
+ </source>
+ <dest>
+ *: "Visualiser le fichier Cuesheet"
+ </dest>
+ <voice>
+ *: "Visualiser le fichier Cuesheet"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_COPYING
+ desc:
+ user:
+ <source>
+ *: "Copying..."
+ </source>
+ <dest>
+ *: "Copie en cours..."
+ </dest>
+ <voice>
+ *: "Copie en cours"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_DELETING
+ desc:
+ user:
+ <source>
+ *: "Deleting..."
+ </source>
+ <dest>
+ *: "Supression en cours..."
+ </dest>
+ <voice>
+ *: "Supression en cours"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_MOVING
+ desc:
+ user:
+ <source>
+ *: "Moving..."
+ </source>
+ <dest>
+ *: "Déplacement en cours..."
+ </dest>
+ <voice>
+ *: "Déplacement en cours"
+ </voice>
+</phrase>
746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870
/***************************************************************************
*             __________               __   ___.
*   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
*   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
*   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
*   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
*                     \/            \/     \/    \/            \/
* $Id$
*
* Greyscale framework
* Core & miscellaneous functions
*
* This is a generic framework to use grayscale display within Rockbox
* plugins. It obviously does not work for the player.
*
* Copyright (C) 2004-2005 Jens Arnold
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/

#ifndef SIMULATOR /* not for simulator by now */
#include "plugin.h"

#ifdef HAVE_LCD_BITMAP /* and also not for the Player */
#include "gray.h"

/* Global variables */
struct plugin_api *_gray_rb = NULL; /* global api struct pointer */
struct _gray_info _gray_info;       /* global info structure */
short _gray_random_buffer;          /* buffer for random number generator */

/* Prototypes */
static void _timer_isr(void);
static void gray_screendump_hook(int fd);

/* Timer interrupt handler: display next bitplane */
static void _timer_isr(void)
{
    _gray_rb->lcd_blit(_gray_info.plane_data + MULU16(_gray_info.plane_size,
                       _gray_info.cur_plane), _gray_info.x, _gray_info.by,
                       _gray_info.width, _gray_info.bheight, _gray_info.width);

    if (++_gray_info.cur_plane >= _gray_info.depth)
        _gray_info.cur_plane = 0;

    if (_gray_info.flags & _GRAY_DEFERRED_UPDATE)  /* lcd_update() requested? */
    {
        int x1 = MAX(_gray_info.x, 0);
        int x2 = MIN(_gray_info.x + _gray_info.width, LCD_WIDTH);
        int y1 = MAX(_gray_info.by << _PBLOCK_EXP, 0);
        int y2 = MIN((_gray_info.by << _PBLOCK_EXP) + _gray_info.height, LCD_HEIGHT);

        if (y1 > 0)  /* refresh part above overlay, full width */
            _gray_rb->lcd_update_rect(0, 0, LCD_WIDTH, y1);

        if (y2 < LCD_HEIGHT) /* refresh part below overlay, full width */
            _gray_rb->lcd_update_rect(0, y2, LCD_WIDTH, LCD_HEIGHT - y2);

        if (x1 > 0) /* refresh part to the left of overlay */
            _gray_rb->lcd_update_rect(0, y1, x1, y2 - y1);

        if (x2 < LCD_WIDTH) /* refresh part to the right of overlay */
            _gray_rb->lcd_update_rect(x2, y1, LCD_WIDTH - x2, y2 - y1);

        _gray_info.flags &= ~_GRAY_DEFERRED_UPDATE; /* clear request */
    }
}

/* Initialise the framework and prepare the greyscale display buffer

 arguments:
   newrb     = pointer to plugin api
   gbuf      = pointer to the memory area to use (e.g. plugin buffer)
   gbuf_size = max usable size of the buffer
   buffered  = use chunky pixel buffering with delta buffer?
               This allows to use all drawing functions, but needs more
               memory. Unbuffered operation provides only a subset of
               drawing functions. (only gray_bitmap drawing and scrolling)
   width     = width in pixels  (1..LCD_WIDTH)
   bheight   = height in LCD pixel-block units (8 pixels) (1..LCD_HEIGHT/8)
   depth     = number of bitplanes to use (1..32).

 result:
   = depth  if there was enough memory
   < depth  if there wasn't enough memory. The number of displayable
            shades is smaller than desired, but it still works
   = 0      if there wasn't even enough memory for 1 bitplane

   You can request any depth in the allowed range, not just powers of 2. The
   routine performs "graceful degradation" if the memory is not sufficient for
   the desired depth. As long as there is at least enough memory for 1 bitplane,
   it creates as many bitplanes as fit into memory, although 1 bitplane won't
   deliver an enhancement over the native display.
 
   The number of displayable shades is calculated as follows:
   shades = depth + 1

   If you need info about the memory taken by the greyscale buffer, supply a
   long* as the last parameter. This long will then contain the number of bytes
   used. The total memory needed can be calculated as follows:
 total_mem =
     shades * sizeof(long)               (bitpatterns)
   + (width * bheight) * depth           (bitplane data)
   + buffered ?                          (chunky front- & backbuffer)
       (width * bheight * 8 * 2) : 0
   + 0..3                                (longword alignment) */
int gray_init(struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size,
              bool buffered, int width, int bheight, int depth, long *buf_taken)
{
    int possible_depth, i, j;
    long plane_size, buftaken;
    
    _gray_rb = newrb;

    if ((unsigned) width > LCD_WIDTH
        || (unsigned) bheight > (LCD_HEIGHT/_PBLOCK)
        || depth < 1)
        return 0;

    /* the buffer has to be long aligned */
    buftaken = (-(long)gbuf) & 3;
    gbuf += buftaken;

    /* chunky front- & backbuffer */
    if (buffered)  
    {
        plane_size = MULU16(width, bheight << _PBLOCK_EXP);
        buftaken += 2 * plane_size;
        if (buftaken > gbuf_size)
            return 0;

        _gray_info.cur_buffer = gbuf;
        gbuf += plane_size;
        /* set backbuffer to 0xFF to guarantee the initial full update */
        _gray_rb->memset(gbuf, 0xFF, plane_size);
        _gray_info.back_buffer = gbuf;
        gbuf += plane_size;
    }

    plane_size = MULU16(width, bheight);
    possible_depth = (gbuf_size - buftaken - sizeof(long))
                     / (plane_size + sizeof(long));

    if (possible_depth < 1)
        return 0;

    depth = MIN(depth, 32);
    depth = MIN(depth, possible_depth);

    _gray_info.x = 0;
    _gray_info.by = 0;
    _gray_info.width = width;
    _gray_info.height = bheight << _PBLOCK_EXP;
    _gray_info.bheight = bheight;
    _gray_info.plane_size = plane_size;
    _gray_info.depth = depth;
    _gray_info.cur_plane = 0;
    _gray_info.flags = 0;
    _gray_info.plane_data = gbuf;
    gbuf += depth * plane_size;
    _gray_info.bitpattern = (unsigned long *)gbuf;
    buftaken += depth * plane_size + (depth + 1) * sizeof(long);
              
    i = depth - 1;
    j = 8;
    while (i != 0)
    {
        i >>= 1;
        j--;
    }
    _gray_info.randmask = 0xFFu >> j;

    /* Precalculate the bit patterns for all possible pixel values */
    for (i = 0; i <= depth; i++)
    {
        unsigned long pattern = 0;
        int value = 0;

        for (j = 0; j < depth; j++)
        {
            pattern <<= 1;
            value += i;

            if (value >= depth)
                value -= depth;   /* "white" bit */
            else
                pattern |= 1;     /* "black" bit */
        }
        /* now the lower <depth> bits contain the pattern */

        _gray_info.bitpattern[i] = pattern;
    }

    _gray_info.fg_brightness = 0;
    _gray_info.bg_brightness = depth;
    _gray_info.drawmode = DRMODE_SOLID;
    _gray_info.curfont = FONT_SYSFIXED;

    if (buf_taken)  /* caller requested info about space taken */
        *buf_taken = buftaken;

    return depth;
}

/* Release the greyscale display buffer and the library
   DO CALL either this function or at least gray_show_display(false)
   before you exit, otherwise nasty things may happen. */
void gray_release(void)
{
    gray_show(false);
}

/* Switch the greyscale overlay on or off
   DO NOT call lcd_update() or any other api function that directly accesses
   the lcd while the greyscale overlay is running! If you need to do
   lcd_update() to update something outside the greyscale overlay area, use
   gray_deferred_update() instead.

 Other functions to avoid are:
   lcd_blit() (obviously), lcd_update_rect(), lcd_set_contrast(),
   lcd_set_invert_display(), lcd_set_flip(), lcd_roll() */
void gray_show(bool enable)
{
    if (enable && !(_gray_info.flags & _GRAY_RUNNING))
    {
        _gray_info.flags |= _GRAY_RUNNING;
#if CONFIG_LCD == LCD_SSD1815
        _gray_rb->timer_register(1, NULL, CPU_FREQ / 67, 1, _timer_isr);
#elif CONFIG_LCD == LCD_S1D15E06
        _gray_rb->timer_register(1, NULL, CPU_FREQ / 70, 1, _timer_isr);
#endif
        _gray_rb->screen_dump_set_hook(gray_screendump_hook);
    }
    else if (!enable && (_gray_info.flags & _GRAY_RUNNING))
    {
        _gray_rb->timer_unregister();
        _gray_info.flags &= ~_GRAY_RUNNING;
        _gray_rb->screen_dump_set_hook(NULL);
        _gray_rb->lcd_update(); /* restore whatever there was before */
    }
}

/* Update a rectangular area of the greyscale overlay */
void gray_update_rect(int x, int y, int width, int height)
{
    int ymax;
    long srcofs;
    unsigned char *dst;

    if (width <= 0)
        return; /* nothing to do */

    /* The Y coordinates have to work on whole pixel block rows */
    ymax = (y + height - 1) >> _PBLOCK_EXP;
    y >>= _PBLOCK_EXP;

    if (x + width > _gray_info.width)
        width = _gray_info.width - x;
    if (ymax >= _gray_info.bheight)
        ymax = _gray_info.bheight - 1;
        
    srcofs = (y << _PBLOCK_EXP) + MULU16(_gray_info.height, x);
    dst = _gray_info.plane_data + MULU16(_gray_info.width, y) + x;
    
    /* Copy specified rectange bitmap to hardware */
    for (; y <= ymax; y++)
    {
        long srcofs_row = srcofs;
        unsigned char *dst_row = dst;
        unsigned char *dst_end = dst_row + width;

        do
        {
#if (CONFIG_CPU == SH7034) && (LCD_DEPTH == 1)
            unsigned long pat_stack[8];
            unsigned long *pat_ptr;
            unsigned char *cbuf, *bbuf;
            unsigned change;

            cbuf = _gray_info.cur_buffer + srcofs_row;
            bbuf = _gray_info.back_buffer + srcofs_row;

            asm volatile (
                "mov.l   @%[cbuf]+,r1    \n"
                "mov.l   @%[bbuf]+,r2    \n"
                "xor     r1,r2           \n"
                "mov.l   @%[cbuf],r1     \n"
                "mov.l   @%[bbuf],%[chg] \n"
                "xor     r1,%[chg]       \n"
                "or      r2,%[chg]       \n"
                : /* outputs */
                [cbuf]"+r"(cbuf),
                [bbuf]"+r"(bbuf),
                [chg] "=r"(change)
                : /* inputs */
                : /* clobbers */
                 "r1", "r2"
            );

            if (change != 0)
            {
                unsigned char *addr, *end;
                unsigned mask, trash;

                pat_ptr = &pat_stack[8];
                cbuf = _gray_info.cur_buffer + srcofs_row;
                bbuf = _gray_info.back_buffer + srcofs_row;

                /* precalculate the bit patterns with random shifts
                 * for all 8 pixels and put them on an extra "stack" */
                asm volatile (
                    "mov     #8,r3       \n"  /* loop count in r3: 8 pixels */

                ".ur_pre_loop:           \n"
                    "mov.b   @%[cbuf]+,r0\n"  /* read current buffer */
                    "mov.b   @%[bbuf],r1 \n"  /* read back buffer */
                    "mov     #0,r2       \n"  /* preset for skipped pixel */
                    "mov.b   r0,@%[bbuf] \n"  /* update back buffer */
                    "add     #1,%[bbuf]  \n"
                    "cmp/eq  r0,r1       \n"  /* no change? */
                    "bt      .ur_skip    \n"  /* -> skip */

                    "shll2   r0          \n"  /* pixel value -> pattern offset */
                    "mov.l   @(r0,%[bpat]),r4\n"  /* r4 = bitpattern[byte]; */

                    "mov     #75,r0      \n"
                    "mulu    r0,%[rnd]   \n"  /* multiply by 75 */
                    "sts     macl,%[rnd] \n"
                    "add     #74,%[rnd]  \n"  /* add another 74 */
                    /* Since the lower bits are not very random: */
                    "swap.b  %[rnd],r1   \n"  /* get bits 8..15 (need max. 5) */
                    "and     %[rmsk],r1  \n"  /* mask out unneeded bits */

                    "cmp/hs  %[dpth],r1  \n"  /* random >= depth ? */
                    "bf      .ur_ntrim   \n"
                    "sub     %[dpth],r1  \n"  /* yes: random -= depth; */
                ".ur_ntrim:              \n"
                
                    "mov.l   .ashlsi3,r0 \n"  /** rotate pattern **/
                    "jsr     @r0         \n"  /* r4 -> r0, shift left by r5 */
                    "mov     r1,r5       \n"

                    "mov     %[dpth],r5  \n"
                    "sub     r1,r5       \n"  /* r5 = depth - r1 */
                    "mov.l   .lshrsi3,r1 \n"
                    "jsr     @r1         \n"  /* r4 -> r0, shift right by r5 */
                    "mov     r0,r2       \n"  /* store previous result in r2 */
                                         
                    "or      r0,r2       \n"  /* rotated_pattern = r2 | r0 */
                    "clrt                \n"  /* mask bit = 0 (replace) */

                ".ur_skip:               \n"  /* T == 1 if skipped */
                    "rotcr   %[mask]     \n"  /* get mask bit */
                    "mov.l   r2,@-%[patp]\n"  /* push on pattern stack */

                    "add     #-1,r3      \n"  /* decrease loop count */
                    "cmp/pl  r3          \n"  /* loop count > 0? */
                    "bt      .ur_pre_loop\n"  /* yes: loop */
                    "shlr8   %[mask]     \n"
                    "shlr16  %[mask]     \n"
                    : /* outputs */
                    [cbuf]"+r"(cbuf),
                    [bbuf]"+r"(bbuf),
                    [rnd] "+r"(_gray_random_buffer),
                    [patp]"+r"(pat_ptr),
                    [mask]"=&r"(mask)
                    : /* inputs */
                    [dpth]"r"(_gray_info.depth),
                    [bpat]"r"(_gray_info.bitpattern),
                    [rmsk]"r"(_gray_info.randmask)
                    : /* clobbers */
                    "r0", "r1", "r2", "r3", "r4", "r5", "macl", "pr"
                );

                addr = dst_row;
                end = addr + MULU16(_gray_info.depth, _gray_info.plane_size);

                /* set the bits for all 8 pixels in all bytes according to the
                 * precalculated patterns on the pattern stack */
                asm volatile (
                    "mov.l   @%[patp]+,r1\n"  /* pop all 8 patterns */
                    "mov.l   @%[patp]+,r2\n"
                    "mov.l   @%[patp]+,r3\n"
                    "mov.l   @%[patp]+,r6\n"
                    "mov.l   @%[patp]+,r7\n"
                    "mov.l   @%[patp]+,r8\n"
                    "mov.l   @%[patp]+,r9\n"
                    "mov.l   @%[patp],r10\n"

                    "tst     %[mask],%[mask] \n"  /* nothing to keep? */
                    "bt      .ur_sloop   \n"  /* yes: jump to short loop */

                ".ur_floop:              \n"  /** full loop (there are bits to keep)**/
                    "shlr    r1          \n"  /* rotate lsb of pattern 1 to t bit */
                    "rotcl   r0          \n"  /* rotate t bit into r0 */
                    "shlr    r2          \n"
                    "rotcl   r0          \n"
                    "shlr    r3          \n"
                    "rotcl   r0          \n"
                    "shlr    r6          \n"
                    "rotcl   r0          \n"
                    "shlr    r7          \n"
                    "rotcl   r0          \n"
                    "shlr    r8          \n"
                    "rotcl   r0          \n"
                    "shlr    r9          \n"
                    "rotcl   r0          \n"
                    "shlr    r10         \n"
                    "mov.b   @%[addr],%[rx]  \n"  /* read old value */
                    "rotcl   r0          \n"
                    "and     %[mask],%[rx]   \n"  /* mask out unneeded bits */
                    "or      %[rx],r0    \n"  /* set new bits */
                    "mov.b   r0,@%[addr] \n"  /* store value to bitplane */
                    "add     %[psiz],%[addr] \n"  /* advance to next bitplane */
                    "cmp/hi  %[addr],%[end]  \n"  /* last bitplane done? */
                    "bt      .ur_floop   \n"  /* no: loop */

                    "bra     .ur_end     \n"
                    "nop                 \n"

                ".ur_sloop:              \n"  /** short loop (nothing to keep) **/
                    "shlr    r1          \n"  /* rotate lsb of pattern 1 to t bit */
                    "rotcl   r0          \n"  /* rotate t bit into r0 */
                    "shlr    r2          \n"
                    "rotcl   r0          \n"
                    "shlr    r3          \n"
                    "rotcl   r0          \n"
                    "shlr    r6          \n"
                    "rotcl   r0          \n"
                    "shlr    r7          \n"
                    "rotcl   r0          \n"
                    "shlr    r8          \n"
                    "rotcl   r0          \n"
                    "shlr    r9          \n"
                    "rotcl   r0          \n"
                    "shlr    r10         \n"
                    "rotcl   r0          \n"
                    "mov.b   r0,@%[addr]     \n"  /* store byte to bitplane */
                    "add     %[psiz],%[addr] \n"  /* advance to next bitplane */
                    "cmp/hi  %[addr],%[end]  \n"  /* last bitplane done? */
                    "bt      .ur_sloop   \n"  /* no: loop */

                ".ur_end:                \n"
                    : /* outputs */
                    [addr]"+r"(addr),
                    [mask]"+r"(mask),
                    [rx]  "=&r"(trash)
                    : /* inputs */
                    [psiz]"r"(_gray_info.plane_size),
                    [end] "r"(end),
                    [patp]"[rx]"(pat_ptr)
                    : /* clobbers */
                    "r0", "r1", "r2", "r3", "r6", "r7", "r8", "r9", "r10"
                );
            }
#elif defined(CPU_COLDFIRE) && (LCD_DEPTH == 2)
            unsigned long pat_stack[8];
            unsigned long *pat_ptr;
            unsigned char *cbuf, *bbuf;
            unsigned change;

            cbuf = _gray_info.cur_buffer + srcofs_row;
            bbuf = _gray_info.back_buffer + srcofs_row;

            asm volatile (
                "move.l  (%[cbuf])+,%%d0 \n"
                "move.l  (%[bbuf])+,%%d1 \n"
                "eor.l   %%d0,%%d1       \n"
                "move.l  (%[cbuf]),%%d0  \n"
                "move.l  (%[bbuf]),%[chg]\n"
                "eor.l   %%d0,%[chg]     \n"
                "or.l    %%d1,%[chg]     \n"
                : /* outputs */
                [cbuf]"+a"(cbuf),
                [bbuf]"+a"(bbuf),
                [chg] "=&d"(change)
                : /* inputs */
                : /* clobbers */
                "d0", "d1"
            );

            if (change != 0)
            {
                unsigned char *addr, *end;
                unsigned mask, trash;

                pat_ptr = &pat_stack[8];
                cbuf = _gray_info.cur_buffer + srcofs_row;
                bbuf = _gray_info.back_buffer + srcofs_row;

                /* precalculate the bit patterns with random shifts
                 * for all 8 pixels and put them on an extra "stack" */