forked from len0rd/rockbox
M:Robe 500: Fix up 256 color blitting when in portrait mode, fix a mistake in the plugin linker script, reduce the amount of memory used by overwriting IRAM with bss after program has started, clean up some tabs and formatting, resize the simulator when building for 640x480
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21280 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
414f6c558b
commit
4d41886caa
5 changed files with 168 additions and 159 deletions
|
@ -37,7 +37,14 @@ OUTPUT_FORMAT(elf32-littlemips)
|
||||||
|
|
||||||
#if CONFIG_CPU==DM320 || CONFIG_CPU==IMX31L
|
#if CONFIG_CPU==DM320 || CONFIG_CPU==IMX31L
|
||||||
/* Give this 1 meg to allow it to align to the MMU boundary */
|
/* Give this 1 meg to allow it to align to the MMU boundary */
|
||||||
|
#if CONFIG_CPU==DM320
|
||||||
|
#define LCD_FUDGE LCD_NATIVE_WIDTH%32
|
||||||
|
#define LCD_BUFFER_SIZE ((LCD_NATIVE_WIDTH+LCD_FUDGE)*LCD_NATIVE_HEIGHT*2)
|
||||||
|
#define LCD_TTB_AREA 0x100000*((LCD_BUFFER_SIZE>>19)+1)
|
||||||
|
#else
|
||||||
#define LCD_TTB_AREA 0x100000
|
#define LCD_TTB_AREA 0x100000
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_TTB_AREA
|
#define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_TTB_AREA
|
||||||
|
|
||||||
#elif CONFIG_CPU==S3C2440
|
#elif CONFIG_CPU==S3C2440
|
||||||
|
|
|
@ -423,29 +423,29 @@ void USB_DEVICE(void) {
|
||||||
M66591_INTSTAT_NRDY, M66591_INTSTAT_EMP);
|
M66591_INTSTAT_NRDY, M66591_INTSTAT_EMP);
|
||||||
|
|
||||||
/* VBUS (connected) interrupt */
|
/* VBUS (connected) interrupt */
|
||||||
while ( M66591_INTSTAT_MAIN & (1<<15) ) {
|
while ( M66591_INTSTAT_MAIN & (1<<15) ) {
|
||||||
M66591_INTSTAT_MAIN &= ~(1<<15);
|
M66591_INTSTAT_MAIN &= ~(1<<15);
|
||||||
|
|
||||||
/* If device is not clocked, interrupt flag must be set manually */
|
/* If device is not clocked, interrupt flag must be set manually */
|
||||||
if ( !(M66591_TRN_CTRL & (1<<10)) ) {
|
if ( !(M66591_TRN_CTRL & (1<<10)) ) {
|
||||||
M66591_INTSTAT_MAIN |= (1<<15);
|
M66591_INTSTAT_MAIN |= (1<<15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Resume interrupt: This is not used. Extra logic needs to be added similar
|
/* Resume interrupt: This is not used. Extra logic needs to be added similar
|
||||||
* to the VBUS interrupt incase the PHY clock is not running.
|
* to the VBUS interrupt incase the PHY clock is not running.
|
||||||
*/
|
*/
|
||||||
if(M66591_INTSTAT_MAIN & (1<<14)) {
|
if(M66591_INTSTAT_MAIN & (1<<14)) {
|
||||||
M66591_INTSTAT_MAIN &= ~(1<<14);
|
M66591_INTSTAT_MAIN &= ~(1<<14);
|
||||||
logf("mxx: RESUME");
|
logf("mxx: RESUME");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Device state transition interrupt: Not used, but useful for debugging */
|
/* Device state transition interrupt: Not used, but useful for debugging */
|
||||||
if(M66591_INTSTAT_MAIN & (1<<12)) {
|
if(M66591_INTSTAT_MAIN & (1<<12)) {
|
||||||
M66591_INTSTAT_MAIN &= ~(1<<12);
|
M66591_INTSTAT_MAIN &= ~(1<<12);
|
||||||
logf("mxx: DEV state CHANGE=%d",
|
logf("mxx: DEV state CHANGE=%d",
|
||||||
((M66591_INTSTAT_MAIN & (0x07<<4)) >> 4) );
|
((M66591_INTSTAT_MAIN & (0x07<<4)) >> 4) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Control transfer stage interrupt */
|
/* Control transfer stage interrupt */
|
||||||
if(M66591_INTSTAT_MAIN & (1<<11)) {
|
if(M66591_INTSTAT_MAIN & (1<<11)) {
|
||||||
|
@ -721,30 +721,30 @@ void usb_drv_exit(void) {
|
||||||
* Reference Manual Rev 1.00, p. 78.
|
* Reference Manual Rev 1.00, p. 78.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Detach notification to PC (disable D+ pull-up) */
|
/* Detach notification to PC (disable D+ pull-up) */
|
||||||
M66591_TRN_CTRL &= ~(1<<4);
|
M66591_TRN_CTRL &= ~(1<<4);
|
||||||
|
|
||||||
/* Software reset */
|
/* Software reset */
|
||||||
M66591_TRN_CTRL &= ~0x01;
|
M66591_TRN_CTRL &= ~0x01;
|
||||||
|
|
||||||
/* Disable internal clock supply */
|
/* Disable internal clock supply */
|
||||||
M66591_TRN_CTRL &= ~(1<<10);
|
M66591_TRN_CTRL &= ~(1<<10);
|
||||||
udelay(3);
|
udelay(3);
|
||||||
|
|
||||||
/* Disable PLL */
|
/* Disable PLL */
|
||||||
M66591_TRN_CTRL &= ~(1<<11);
|
M66591_TRN_CTRL &= ~(1<<11);
|
||||||
udelay(3);
|
udelay(3);
|
||||||
|
|
||||||
/* Disable internal reference clock */
|
/* Disable internal reference clock */
|
||||||
M66591_TRN_CTRL &= ~(1<<12);
|
M66591_TRN_CTRL &= ~(1<<12);
|
||||||
udelay(3);
|
udelay(3);
|
||||||
|
|
||||||
/* Disable oscillation buffer, reenable USB operation */
|
/* Disable oscillation buffer, reenable USB operation */
|
||||||
M66591_TRN_CTRL &= ~(1<<13);
|
M66591_TRN_CTRL &= ~(1<<13);
|
||||||
|
|
||||||
M66591_TRN_CTRL |= 0x01;
|
|
||||||
|
|
||||||
logf("mxx: detached");
|
M66591_TRN_CTRL |= 0x01;
|
||||||
|
|
||||||
|
logf("mxx: detached");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function begins a transmit (on an IN endpoint), it should not block
|
/* This function begins a transmit (on an IN endpoint), it should not block
|
||||||
|
|
|
@ -118,44 +118,38 @@ SECTIONS
|
||||||
stackend = .;
|
stackend = .;
|
||||||
} > IRAM
|
} > IRAM
|
||||||
|
|
||||||
/* This could probably be shortened so that the audio buffer overwrites
|
/* This overwrites the iram (in ram), so make sure that the iram is copied
|
||||||
* at the IRAM stuff (assuming that it is copied first in crt0.S), but
|
* out in crt0.s before the bss section and the rest are used.
|
||||||
* leave it for now since the space is not critical at the moment.
|
|
||||||
*/
|
*/
|
||||||
.bss (NOLOAD) :
|
.bss (NOLOAD) :
|
||||||
{
|
{
|
||||||
. = ADDR(.data) + SIZEOF(.data) + SIZEOF(.vectors) + SIZEOF(.iram);
|
. = ADDR(.data) + SIZEOF(.data);
|
||||||
_edata = .;
|
_edata = .;
|
||||||
*(.bss*)
|
*(.bss*)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
. = ALIGN(0x4);
|
. = ALIGN(0x4);
|
||||||
_end = .;
|
_end = .;
|
||||||
} > DRAM
|
} > DRAM
|
||||||
|
|
||||||
|
|
||||||
.audiobuf (NOLOAD) :
|
.audiobuf (NOLOAD) :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_audiobuffer = .;
|
|
||||||
audiobuffer = .;
|
audiobuffer = .;
|
||||||
} > DRAM
|
} > DRAM
|
||||||
|
|
||||||
.audiobufend ENDAUDIOADDR (NOLOAD) :
|
.audiobufend ENDAUDIOADDR (NOLOAD) :
|
||||||
{
|
{
|
||||||
audiobufend = .;
|
audiobufend = .;
|
||||||
_audiobufend = .;
|
|
||||||
} > DRAM
|
} > DRAM
|
||||||
|
|
||||||
.codec ENDAUDIOADDR (NOLOAD) :
|
.codec ENDAUDIOADDR (NOLOAD) :
|
||||||
{
|
{
|
||||||
codecbuf = .;
|
codecbuf = .;
|
||||||
_codecbuf = .;
|
|
||||||
. += CODEC_SIZE;
|
. += CODEC_SIZE;
|
||||||
} > DRAM
|
} > DRAM
|
||||||
|
|
||||||
.plugin (NOLOAD) :
|
.plugin (NOLOAD) :
|
||||||
{
|
{
|
||||||
_pluginbuf = .;
|
|
||||||
pluginbuf = .;
|
pluginbuf = .;
|
||||||
. += PLUGIN_BUFFER_SIZE;
|
. += PLUGIN_BUFFER_SIZE;
|
||||||
} > DRAM
|
} > DRAM
|
||||||
|
|
|
@ -63,10 +63,8 @@ void lcd_sleep()
|
||||||
memset16(FRAME, 0xFFFF, LCD_WIDTH*LCD_HEIGHT);
|
memset16(FRAME, 0xFFFF, LCD_WIDTH*LCD_HEIGHT);
|
||||||
sleep(HZ/5);
|
sleep(HZ/5);
|
||||||
/* Disabling these saves another ~15mA */
|
/* Disabling these saves another ~15mA */
|
||||||
IO_OSD_OSDWINMD0&= ~(0x01);
|
IO_OSD_OSDWINMD0 &= ~(0x01);
|
||||||
IO_VID_ENC_VMOD &= ~(0x01);
|
IO_VID_ENC_VMOD &= ~(0x01);
|
||||||
|
|
||||||
// IO_CLK_MOD1 &= ~(0x0018);
|
|
||||||
|
|
||||||
/* Disabling the LCD saves ~50mA */
|
/* Disabling the LCD saves ~50mA */
|
||||||
IO_GIO_BITCLR2=1<<4;
|
IO_GIO_BITCLR2=1<<4;
|
||||||
|
@ -79,13 +77,11 @@ void lcd_awake(void)
|
||||||
if (!lcd_on)
|
if (!lcd_on)
|
||||||
{
|
{
|
||||||
lcd_on=true;
|
lcd_on=true;
|
||||||
|
IO_OSD_OSDWINMD0 |= 0x01;
|
||||||
// IO_CLK_MOD1 |= 0x0018;
|
IO_VID_ENC_VMOD |= 0x01;
|
||||||
IO_OSD_OSDWINMD0|= 0x01;
|
|
||||||
IO_VID_ENC_VMOD |= 0x01;
|
|
||||||
|
|
||||||
sleep(2);
|
sleep(2);
|
||||||
IO_GIO_BITSET2=1<<4;
|
IO_GIO_BITSET2 = 1<<4;
|
||||||
|
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
||||||
|
@ -113,121 +109,121 @@ void lcd_init_device(void)
|
||||||
/* Clear the Frame */
|
/* Clear the Frame */
|
||||||
memset16(FRAME, 0x0000, LCD_WIDTH*LCD_HEIGHT);
|
memset16(FRAME, 0x0000, LCD_WIDTH*LCD_HEIGHT);
|
||||||
|
|
||||||
IO_OSD_OSDWINMD0&=~(0x0001);
|
IO_OSD_OSDWINMD0 &= ~(0x0001);
|
||||||
IO_OSD_VIDWINMD&=~(0x0001);
|
IO_OSD_VIDWINMD &= ~(0x0001);
|
||||||
|
|
||||||
/* Setup the LCD controller */
|
/* Setup the LCD controller */
|
||||||
IO_VID_ENC_VMOD=0x2014;
|
IO_VID_ENC_VMOD = 0x2014;
|
||||||
IO_VID_ENC_VDCTL=0x2000;
|
IO_VID_ENC_VDCTL = 0x2000;
|
||||||
IO_VID_ENC_VDPRO=0x0000;
|
IO_VID_ENC_VDPRO = 0x0000;
|
||||||
IO_VID_ENC_SYNCTL=0x100E;
|
IO_VID_ENC_SYNCTL = 0x100E;
|
||||||
IO_VID_ENC_HSPLS=1; /* HSYNC pulse width */
|
IO_VID_ENC_HSPLS = 1; /* HSYNC pulse width */
|
||||||
IO_VID_ENC_VSPLS=1; /* VSYNC pulse width */
|
IO_VID_ENC_VSPLS = 1; /* VSYNC pulse width */
|
||||||
|
|
||||||
/* These calculations support 640x480 and 320x240 (based on OF) */
|
/* These calculations support 640x480 and 320x240 (based on OF) */
|
||||||
IO_VID_ENC_HINT=LCD_NATIVE_WIDTH+LCD_NATIVE_WIDTH/3;
|
IO_VID_ENC_HINT = LCD_NATIVE_WIDTH+LCD_NATIVE_WIDTH/3;
|
||||||
IO_VID_ENC_HSTART=LCD_NATIVE_WIDTH/6; /* Front porch */
|
IO_VID_ENC_HSTART = LCD_NATIVE_WIDTH/6; /* Back porch */
|
||||||
IO_VID_ENC_HVALID=LCD_NATIVE_WIDTH; /* Data valid */
|
IO_VID_ENC_HVALID = LCD_NATIVE_WIDTH; /* Data valid */
|
||||||
IO_VID_ENC_VINT=LCD_NATIVE_HEIGHT+7;
|
IO_VID_ENC_VINT = LCD_NATIVE_HEIGHT+8;
|
||||||
IO_VID_ENC_VSTART=3;
|
IO_VID_ENC_VSTART = 2;
|
||||||
IO_VID_ENC_VVALID=LCD_NATIVE_HEIGHT;
|
IO_VID_ENC_VVALID = LCD_NATIVE_HEIGHT;
|
||||||
|
|
||||||
IO_VID_ENC_HSDLY=0x0000;
|
IO_VID_ENC_HSDLY = 0x0000;
|
||||||
IO_VID_ENC_VSDLY=0x0000;
|
IO_VID_ENC_VSDLY = 0x0000;
|
||||||
IO_VID_ENC_YCCTL=0x0000;
|
IO_VID_ENC_YCCTL = 0x0000;
|
||||||
IO_VID_ENC_RGBCTL=0x0000;
|
IO_VID_ENC_RGBCTL = 0x0000;
|
||||||
IO_VID_ENC_RGBCLP=0xFF00;
|
IO_VID_ENC_RGBCLP = 0xFF00;
|
||||||
IO_VID_ENC_LNECTL=0x0000;
|
IO_VID_ENC_LNECTL = 0x0000;
|
||||||
IO_VID_ENC_CULLLNE=0x0000;
|
IO_VID_ENC_CULLLNE = 0x0000;
|
||||||
IO_VID_ENC_LCDOUT=0x0000;
|
IO_VID_ENC_LCDOUT = 0x0000;
|
||||||
IO_VID_ENC_BRTS=0x0000;
|
IO_VID_ENC_BRTS = 0x0000;
|
||||||
IO_VID_ENC_BRTW=0x0000;
|
IO_VID_ENC_BRTW = 0x0000;
|
||||||
IO_VID_ENC_ACCTL=0x0000;
|
IO_VID_ENC_ACCTL = 0x0000;
|
||||||
IO_VID_ENC_PWMP=0x0000;
|
IO_VID_ENC_PWMP = 0x0000;
|
||||||
IO_VID_ENC_PWMW=0x0000;
|
IO_VID_ENC_PWMW = 0x0000;
|
||||||
|
|
||||||
IO_VID_ENC_DCLKPTN0=0x0001;
|
IO_VID_ENC_DCLKPTN0 = 0x0001;
|
||||||
|
|
||||||
/* Setup the display */
|
/* Setup the display */
|
||||||
IO_OSD_MODE=0x00ff;
|
IO_OSD_MODE = 0x00ff;
|
||||||
|
|
||||||
IO_OSD_ATRMD=0x0000;
|
IO_OSD_ATRMD = 0x0000;
|
||||||
IO_OSD_RECTCUR=0x0000;
|
IO_OSD_RECTCUR = 0x0000;
|
||||||
|
|
||||||
IO_OSD_BASEPX=IO_VID_ENC_HSTART;
|
IO_OSD_BASEPX = IO_VID_ENC_HSTART;
|
||||||
IO_OSD_BASEPY=IO_VID_ENC_VSTART;
|
IO_OSD_BASEPY = IO_VID_ENC_VSTART;
|
||||||
|
|
||||||
addr = ((int)FRAME-CONFIG_SDRAM_START) / 32;
|
addr = ((int)FRAME-CONFIG_SDRAM_START) / 32;
|
||||||
|
|
||||||
/* Setup the OSD windows */
|
/* Setup the OSD windows */
|
||||||
|
|
||||||
/* Used for 565 RGB */
|
/* Used for 565 RGB */
|
||||||
IO_OSD_OSDWINMD0=0x30C0;
|
IO_OSD_OSDWINMD0 = 0x30C0;
|
||||||
|
|
||||||
IO_OSD_OSDWIN0OFST=LCD_NATIVE_WIDTH / 16;
|
IO_OSD_OSDWIN0OFST = LCD_NATIVE_WIDTH / 16;
|
||||||
|
|
||||||
IO_OSD_OSDWINADH=addr >> 16;
|
IO_OSD_OSDWINADH = addr >> 16;
|
||||||
IO_OSD_OSDWIN0ADL=addr & 0xFFFF;
|
IO_OSD_OSDWIN0ADL = addr & 0xFFFF;
|
||||||
|
|
||||||
IO_OSD_OSDWIN0XP=0;
|
IO_OSD_OSDWIN0XP = 0;
|
||||||
IO_OSD_OSDWIN0YP=0;
|
IO_OSD_OSDWIN0YP = 0;
|
||||||
|
|
||||||
/* read from OF */
|
/* read from OF */
|
||||||
IO_OSD_OSDWIN0XL=LCD_NATIVE_WIDTH;
|
IO_OSD_OSDWIN0XL = LCD_NATIVE_WIDTH;
|
||||||
IO_OSD_OSDWIN0YL=LCD_NATIVE_HEIGHT;
|
IO_OSD_OSDWIN0YL = LCD_NATIVE_HEIGHT;
|
||||||
|
|
||||||
/* Unused */
|
/* Unused */
|
||||||
IO_OSD_OSDWINMD1=0x10C0;
|
IO_OSD_OSDWINMD1 = 0x10C0;
|
||||||
|
|
||||||
#if LCD_NATIVE_WIDTH%32!=0
|
#if LCD_NATIVE_WIDTH%32!=0
|
||||||
IO_OSD_OSDWIN1OFST=LCD_NATIVE_WIDTH / 32+1;
|
IO_OSD_OSDWIN1OFST = LCD_NATIVE_WIDTH / 32+1;
|
||||||
#else
|
#else
|
||||||
IO_OSD_OSDWIN1OFST=LCD_NATIVE_WIDTH / 32;
|
IO_OSD_OSDWIN1OFST = LCD_NATIVE_WIDTH / 32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IO_OSD_OSDWIN1ADL=addr & 0xFFFF;
|
IO_OSD_OSDWIN1ADL = addr & 0xFFFF;
|
||||||
|
|
||||||
IO_OSD_OSDWIN1XP=0;
|
IO_OSD_OSDWIN1XP = 0;
|
||||||
IO_OSD_OSDWIN1YP=0;
|
IO_OSD_OSDWIN1YP = 0;
|
||||||
|
|
||||||
IO_OSD_OSDWIN1XL=LCD_NATIVE_WIDTH;
|
IO_OSD_OSDWIN1XL = LCD_NATIVE_WIDTH;
|
||||||
IO_OSD_OSDWIN1YL=LCD_NATIVE_HEIGHT;
|
IO_OSD_OSDWIN1YL = LCD_NATIVE_HEIGHT;
|
||||||
|
|
||||||
IO_OSD_VIDWINMD=0x0002;
|
IO_OSD_VIDWINMD = 0x0002;
|
||||||
|
|
||||||
addr = ((int)FRAME2-CONFIG_SDRAM_START) / 32;
|
addr = ((int)FRAME2-CONFIG_SDRAM_START) / 32;
|
||||||
|
|
||||||
/* This is a bit messy, the LCD transfers appear to happen in chunks of 32
|
/* This is a bit messy, the LCD transfers appear to happen in chunks of 32
|
||||||
* pixels. (based on OF)
|
* pixels. (based on OF)
|
||||||
*/
|
*/
|
||||||
#if LCD_NATIVE_WIDTH%32!=0
|
#if LCD_NATIVE_WIDTH%32!=0
|
||||||
IO_OSD_VIDWIN0OFST=LCD_NATIVE_WIDTH / 32+1;
|
IO_OSD_VIDWIN0OFST = LCD_NATIVE_WIDTH / 32+1;
|
||||||
#else
|
#else
|
||||||
IO_OSD_VIDWIN0OFST=LCD_NATIVE_WIDTH / 32;
|
IO_OSD_VIDWIN0OFST = LCD_NATIVE_WIDTH / 32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IO_OSD_VIDWINADH=addr >> 16;
|
IO_OSD_VIDWINADH = addr >> 16;
|
||||||
IO_OSD_VIDWIN0ADL=addr & 0xFFFF;
|
IO_OSD_VIDWIN0ADL = addr & 0xFFFF;
|
||||||
|
|
||||||
IO_OSD_VIDWIN0XP=0;
|
IO_OSD_VIDWIN0XP = 0;
|
||||||
IO_OSD_VIDWIN0YP=0;
|
IO_OSD_VIDWIN0YP = 0;
|
||||||
|
|
||||||
IO_OSD_VIDWIN0XL=LCD_NATIVE_WIDTH;
|
IO_OSD_VIDWIN0XL = LCD_NATIVE_WIDTH;
|
||||||
IO_OSD_VIDWIN0YL=LCD_NATIVE_HEIGHT;
|
IO_OSD_VIDWIN0YL = LCD_NATIVE_HEIGHT;
|
||||||
|
|
||||||
/* Set pin 36 and 35 (LCD POWER and LCD RESOLUTION) to an output */
|
/* Set pin 36 and 35 (LCD POWER and LCD RESOLUTION) to an output */
|
||||||
IO_GIO_DIR2&=!(3<<3);
|
IO_GIO_DIR2 &= ~(3<<3);
|
||||||
|
|
||||||
#if LCD_NATIVE_HEIGHT > 320
|
#if LCD_NATIVE_HEIGHT > 320
|
||||||
/* Set LCD resolution to VGA */
|
/* Set LCD resolution to VGA */
|
||||||
IO_GIO_BITSET2=1<<3;
|
IO_GIO_BITSET2 = 1<<3;
|
||||||
#else
|
#else
|
||||||
/* Set LCD resolution to QVGA */
|
/* Set LCD resolution to QVGA */
|
||||||
IO_GIO_BITCLR2=1<<3;
|
IO_GIO_BITCLR2 = 1<<3;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IO_OSD_OSDWINMD0|=0x01;
|
IO_OSD_OSDWINMD0 |= 0x01;
|
||||||
IO_VID_ENC_VMOD|=0x01;
|
IO_VID_ENC_VMOD |= 0x01;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_LCD_MODES)
|
#if defined(HAVE_LCD_MODES)
|
||||||
|
@ -236,30 +232,30 @@ void lcd_set_mode(int mode)
|
||||||
if(mode==LCD_MODE_YUV)
|
if(mode==LCD_MODE_YUV)
|
||||||
{
|
{
|
||||||
/* Turn off the RGB buffer and enable the YUV buffer */
|
/* Turn off the RGB buffer and enable the YUV buffer */
|
||||||
IO_OSD_OSDWINMD0 |=0x04;
|
IO_OSD_OSDWINMD0 |= 0x04;
|
||||||
IO_OSD_VIDWINMD |=0x01;
|
IO_OSD_VIDWINMD |= 0x01;
|
||||||
memset16(FRAME2, 0x0080, LCD_NATIVE_HEIGHT*(LCD_NATIVE_WIDTH+LCD_FUDGE));
|
memset16(FRAME2, 0x0080, LCD_NATIVE_HEIGHT*(LCD_NATIVE_WIDTH+LCD_FUDGE));
|
||||||
}
|
}
|
||||||
else if(mode==LCD_MODE_RGB565)
|
else if(mode==LCD_MODE_RGB565)
|
||||||
{
|
{
|
||||||
/* Turn on the RGB window, set it to 16 bit and turn YUV window off */
|
/* Turn on the RGB window, set it to 16 bit and turn YUV window off */
|
||||||
IO_OSD_VIDWINMD &=~(0x01);
|
IO_OSD_VIDWINMD &= ~(0x01);
|
||||||
IO_OSD_OSDWIN0OFST=LCD_NATIVE_WIDTH / 16;
|
IO_OSD_OSDWIN0OFST = LCD_NATIVE_WIDTH / 16;
|
||||||
IO_OSD_OSDWINMD0 |=(1<<13);
|
IO_OSD_OSDWINMD0 |= (1<<13);
|
||||||
IO_OSD_OSDWINMD0 &=~0x04;
|
IO_OSD_OSDWINMD0 &= ~0x04;
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
}
|
}
|
||||||
else if(mode==LCD_MODE_PAL256)
|
else if(mode==LCD_MODE_PAL256)
|
||||||
{
|
{
|
||||||
#if LCD_NATIVE_WIDTH%32!=0
|
#if LCD_NATIVE_WIDTH%32!=0
|
||||||
IO_OSD_OSDWIN0OFST=LCD_NATIVE_WIDTH / 32+1;
|
IO_OSD_OSDWIN0OFST = LCD_NATIVE_WIDTH / 32+1;
|
||||||
#else
|
#else
|
||||||
IO_OSD_OSDWIN0OFST=LCD_NATIVE_WIDTH / 32;
|
IO_OSD_OSDWIN0OFST = LCD_NATIVE_WIDTH / 32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IO_OSD_VIDWINMD &=~(0x01);
|
IO_OSD_VIDWINMD &= ~(0x01);
|
||||||
IO_OSD_OSDWINMD0 &=~(1<<13);
|
IO_OSD_OSDWINMD0 &= ~(1<<13);
|
||||||
IO_OSD_OSDWINMD0 |=0x01;
|
IO_OSD_OSDWINMD0 |= 0x01;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -346,35 +342,36 @@ void lcd_blit_pal256(unsigned char *src, int src_x, int src_y, int x, int y,
|
||||||
#if CONFIG_ORIENTATION == SCREEN_PORTRAIT
|
#if CONFIG_ORIENTATION == SCREEN_PORTRAIT
|
||||||
char *dst=(char *)FRAME+x+y*(LCD_NATIVE_WIDTH+LCD_FUDGE);
|
char *dst=(char *)FRAME+x+y*(LCD_NATIVE_WIDTH+LCD_FUDGE);
|
||||||
|
|
||||||
src=src+src_x+src_y*LCD_NATIVE_WIDTH;
|
src = src+src_x+src_y*LCD_WIDTH;
|
||||||
while(height--);
|
while(height--)
|
||||||
{
|
{
|
||||||
memcpy ( dst, src, width);
|
memcpy(dst, src, width);
|
||||||
|
|
||||||
dst=dst+(LCD_NATIVE_WIDTH-x+LCD_FUDGE);
|
dst = dst + ((LCD_WIDTH -x +LCD_FUDGE));
|
||||||
src+=width;
|
src = src + (LCD_WIDTH - x);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
char *dst=(char *)FRAME
|
char *dst=(char *)FRAME
|
||||||
+ (LCD_NATIVE_WIDTH+LCD_FUDGE)*(LCD_NATIVE_HEIGHT-1)
|
+ (LCD_NATIVE_WIDTH+LCD_FUDGE)*(LCD_NATIVE_HEIGHT-1)
|
||||||
- (LCD_NATIVE_WIDTH+LCD_FUDGE)*x + y;
|
- (LCD_NATIVE_WIDTH+LCD_FUDGE)*x + y;
|
||||||
|
|
||||||
src=src+src_x+src_y*LCD_WIDTH;
|
src=src+src_x+src_y*LCD_WIDTH;
|
||||||
while(height--)
|
|
||||||
{
|
while(height--)
|
||||||
register char *c_dst=dst;
|
{
|
||||||
register int c_width=width;
|
register char *c_dst=dst;
|
||||||
|
register int c_width=width;
|
||||||
while (c_width--)
|
|
||||||
{
|
while (c_width--)
|
||||||
*c_dst=*src++;
|
{
|
||||||
c_dst=c_dst-(LCD_NATIVE_WIDTH+LCD_FUDGE);
|
*c_dst = *src++;
|
||||||
}
|
c_dst -= (LCD_NATIVE_WIDTH+LCD_FUDGE);
|
||||||
|
}
|
||||||
dst++;
|
|
||||||
src+=LCD_WIDTH-width;
|
dst++;
|
||||||
}
|
src+=LCD_WIDTH-width;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
/* colour definitions are R, G, B */
|
/* colour definitions are R, G, B */
|
||||||
|
|
||||||
|
@ -162,6 +163,7 @@
|
||||||
#define UI_LCD_POSY 90 /* y position of lcd */
|
#define UI_LCD_POSY 90 /* y position of lcd */
|
||||||
|
|
||||||
#elif defined(MROBE_500)
|
#elif defined(MROBE_500)
|
||||||
|
#if LCD_WIDHT==320
|
||||||
#define UI_TITLE "Olympus M:Robe 500"
|
#define UI_TITLE "Olympus M:Robe 500"
|
||||||
#define UI_WIDTH 450 /* width of GUI window */
|
#define UI_WIDTH 450 /* width of GUI window */
|
||||||
#define UI_HEIGHT 350 /* height of GUI window */
|
#define UI_HEIGHT 350 /* height of GUI window */
|
||||||
|
@ -169,6 +171,15 @@
|
||||||
#define UI_LCD_POSY 30 /* y position of lcd */
|
#define UI_LCD_POSY 30 /* y position of lcd */
|
||||||
#define UI_REMOTE_POSX 50 /* x position of remote lcd */
|
#define UI_REMOTE_POSX 50 /* x position of remote lcd */
|
||||||
#define UI_REMOTE_POSY 325 /* y position of remote lcd */
|
#define UI_REMOTE_POSY 325 /* y position of remote lcd */
|
||||||
|
#else
|
||||||
|
#define UI_TITLE "Olympus M:Robe 500"
|
||||||
|
#define UI_WIDTH 900 /* width of GUI window */
|
||||||
|
#define UI_HEIGHT 748 /* height of GUI window */
|
||||||
|
#define UI_LCD_POSX 131 /* x position of lcd */
|
||||||
|
#define UI_LCD_POSY 59 /* y position of lcd */
|
||||||
|
#define UI_REMOTE_POSX 165 /* x position of remote lcd */
|
||||||
|
#define UI_REMOTE_POSY 718 /* y position of remote lcd */
|
||||||
|
#endif
|
||||||
|
|
||||||
#elif defined(IRIVER_H10)
|
#elif defined(IRIVER_H10)
|
||||||
#define UI_TITLE "iriver H10 20Gb"
|
#define UI_TITLE "iriver H10 20Gb"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue