diff --git a/firmware/export/config-mrobe500.h b/firmware/export/config-mrobe500.h index 80961c93c1..ab5e37d20b 100644 --- a/firmware/export/config-mrobe500.h +++ b/firmware/export/config-mrobe500.h @@ -68,7 +68,17 @@ /* LCD dimensions */ #define CONFIG_LCD LCD_MROBE500 -#if 0 +/* These defines are used internal to this header */ +#define _LCD_RES_QVGA 1 +#define _LCD_RES_VGA 2 +#define _LCD_PORTRAIT 1 +#define _LCD_LANDSCAPE 2 + +/* Setup the resolution and orientation */ +#define _RESOLUTION _LCD_RES_VGA +#define _ORIENTATION _LCD_LANDSCAPE + +#if _RESOLUTION == _LCD_RES_VGA #define LCD_NATIVE_WIDTH 480 #define LCD_NATIVE_HEIGHT 640 #else @@ -77,7 +87,7 @@ #endif /* choose the lcd orientation. CONFIG_ORIENTATION defined in config.h */ -#if 0 +#if _ORIENTATION == _LCD_PORTRAIT /* This is the Portrait setup */ #define LCD_WIDTH LCD_NATIVE_WIDTH #define LCD_HEIGHT LCD_NATIVE_HEIGHT @@ -183,7 +193,7 @@ /* Define this if you have a Texas Instruments TSC2100 touch screen */ #define HAVE_TSC2100 -#ifndef SIMULATOR +#if !defined(SIMULATOR) /* M66591 register base */ #define M66591_BASE 0x60000000 diff --git a/firmware/target/arm/tms320dm320/app.lds b/firmware/target/arm/tms320dm320/app.lds index 2c74278142..fbaaff3e6c 100644 --- a/firmware/target/arm/tms320dm320/app.lds +++ b/firmware/target/arm/tms320dm320/app.lds @@ -65,8 +65,6 @@ SECTIONS { *(.rodata) /* problems without this, dunno why */ *(.rodata*) - *(.rodata.str1.1) - *(.rodata.str1.4) . = ALIGN(0x4); } > DRAM diff --git a/firmware/target/arm/tms320dm320/system-dm320.c b/firmware/target/arm/tms320dm320/system-dm320.c index 7f40831646..461028a349 100644 --- a/firmware/target/arm/tms320dm320/system-dm320.c +++ b/firmware/target/arm/tms320dm320/system-dm320.c @@ -272,7 +272,11 @@ void system_init(void) #ifdef CREATIVE_ZVx dma_init(); #endif - + +#define LCD_FUDGE LCD_NATIVE_WIDTH%32 +#define LCD_BUFFER_SIZE ((LCD_NATIVE_WIDTH+LCD_FUDGE)*LCD_NATIVE_HEIGHT*2) +#define LCD_TTB_AREA ((LCD_BUFFER_SIZE>>19)+1) + /* MMU initialization (Starts data and instruction cache) */ ttb_init(); /* Make sure everything is mapped on itself */ @@ -280,7 +284,7 @@ void system_init(void) /* Enable caching for RAM */ map_section(CONFIG_SDRAM_START, CONFIG_SDRAM_START, MEM, CACHE_ALL); /* enable buffered writing for the framebuffer */ - map_section((int)FRAME, (int)FRAME, 1, BUFFERED); + map_section((int)FRAME, (int)FRAME, LCD_TTB_AREA, BUFFERED); #ifdef CREATIVE_ZVx /* mimic OF */ map_section(0x00100000, 0x00100000, 4, CACHE_NONE);