1
0
Fork 0
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:
Karl Kurbjun 2009-06-13 20:59:03 +00:00
parent 414f6c558b
commit 4d41886caa
5 changed files with 168 additions and 159 deletions

View file

@ -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

View file

@ -118,13 +118,12 @@ 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)
@ -132,30 +131,25 @@ SECTIONS
_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

View file

@ -66,8 +66,6 @@ void lcd_sleep()
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,8 +77,6 @@ void lcd_awake(void)
if (!lcd_on) if (!lcd_on)
{ {
lcd_on=true; lcd_on=true;
// IO_CLK_MOD1 |= 0x0018;
IO_OSD_OSDWINMD0 |= 0x01; IO_OSD_OSDWINMD0 |= 0x01;
IO_VID_ENC_VMOD |= 0x01; IO_VID_ENC_VMOD |= 0x01;
@ -126,10 +122,10 @@ void lcd_init_device(void)
/* 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;
@ -216,7 +212,7 @@ void lcd_init_device(void)
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 */
@ -346,13 +342,13 @@ 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
@ -361,6 +357,7 @@ void lcd_blit_pal256(unsigned char *src, int src_x, int src_y, int x, int y,
- (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 char *c_dst=dst;
@ -369,7 +366,7 @@ void lcd_blit_pal256(unsigned char *src, int src_x, int src_y, int x, int y,
while (c_width--) while (c_width--)
{ {
*c_dst = *src++; *c_dst = *src++;
c_dst=c_dst-(LCD_NATIVE_WIDTH+LCD_FUDGE); c_dst -= (LCD_NATIVE_WIDTH+LCD_FUDGE);
} }
dst++; dst++;

View file

@ -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"