summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-09-16 23:29:50 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2017-09-17 00:03:45 +0200
commita0fca0c7bf3bd1c121667a1e66614646a6b96752 (patch)
treee5e53563357dd75a057531cad5f293f99c26fa57 /firmware
parentac57f96838b53e574477d13bf41bc54711a70c21 (diff)
downloadrockbox-a0fca0c7bf3bd1c121667a1e66614646a6b96752.tar.gz
rockbox-a0fca0c7bf3bd1c121667a1e66614646a6b96752.tar.bz2
rockbox-a0fca0c7bf3bd1c121667a1e66614646a6b96752.zip
Add simulator support for the A860
This requires a few changes unrelated to the A860 because configure unsets APPLICATION but the NWZ is an application! Change-Id: Id91aa23193383ac95886b281653da5286edd9caf
Diffstat (limited to 'firmware')
-rw-r--r--firmware/SOURCES4
-rw-r--r--firmware/export/config/sonynwzlinux.h12
-rw-r--r--firmware/export/hostfs.h3
-rw-r--r--firmware/target/hosted/sdl/sim-ui-defines.h7
4 files changed, 21 insertions, 5 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 8ec17f7ec6..c29b5318d5 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -95,12 +95,11 @@ target/hosted/samsungypr/radio-ypr.c
#endif
#endif
-#ifdef SONY_NWZ_LINUX
+#if defined(SONY_NWZ_LINUX) && !defined(SIMULATOR)
target/hosted/backtrace-glibc.c
target/hosted/kernel-unix.c
target/hosted/filesystem-unix.c
target/hosted/lc-unix.c
-target/hosted/pcm-alsa.c
target/hosted/sonynwz/lcd-nwz.c
target/hosted/sonynwz/button-nwz.c
target/hosted/sonynwz/system-nwz.c
@@ -467,6 +466,7 @@ target/hosted/pcm-alsa.c
#elif defined(HAVE_NWZ_LINUX_CODEC)
drivers/audio/nwzlinux-codec.c
target/hosted/alsa-controls.c
+target/hosted/pcm-alsa.c
#elif defined(HAVE_SDL_AUDIO)
drivers/audio/sdl.c
#if CONFIG_CODEC == SWCODEC
diff --git a/firmware/export/config/sonynwzlinux.h b/firmware/export/config/sonynwzlinux.h
index 4c66651e6b..4d95ef9cdd 100644
--- a/firmware/export/config/sonynwzlinux.h
+++ b/firmware/export/config/sonynwzlinux.h
@@ -2,7 +2,9 @@
* This config file is for the Sony NWZ Linux based targets
*/
+#ifndef SIMULATOR
#define CONFIG_PLATFORM (PLATFORM_HOSTED)
+#endif
/* define this if you have a bitmap LCD display */
#define HAVE_LCD_BITMAP
@@ -64,10 +66,17 @@
#define CONFIG_KEYPAD SONY_NWZ_PAD
#define HAS_BUTTON_HOLD
+/** Non-simulator section **/
+#ifndef SIMULATOR
/* We have usb power and can detect usb but it is handled by Linux */
#define HAVE_USB_POWER
#define USB_NONE
+/* Audio codec */
+#define HAVE_NWZ_LINUX_CODEC
+
+#endif /* SIMULATOR */
+
#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
/* Linux controlls charging, we can monitor */
@@ -92,9 +101,6 @@
/* Battery */
#define BATTERY_TYPES_COUNT 1
-/* Audio codec */
-#define HAVE_NWZ_LINUX_CODEC
-
/* special define to be use in various places */
#define SONY_NWZ_LINUX
diff --git a/firmware/export/hostfs.h b/firmware/export/hostfs.h
index a24d009ca9..fa916870f3 100644
--- a/firmware/export/hostfs.h
+++ b/firmware/export/hostfs.h
@@ -60,6 +60,9 @@ extern int hostfs_driver_type(int drive);
# define hostfs_driver_type(drive) (STORAGE_NAND_NUM)
# elif (CONFIG_STORAGE & STORAGE_RAMDISK)
# define hostfs_driver_type(drive) (STORAGE_RAMDISK_NUM)
+/* we may have hostfs without application when building sims for applications! */
+# elif (CONFIG_STORAGE & STORAGE_HOSTFS)
+# define hostfs_driver_type(drive) (STORAGE_HOSTFS_NUM)
# else
# error Unknown storage driver
# endif /* CONFIG_STORAGE */
diff --git a/firmware/target/hosted/sdl/sim-ui-defines.h b/firmware/target/hosted/sdl/sim-ui-defines.h
index 8f2a112cf9..d14f70bf99 100644
--- a/firmware/target/hosted/sdl/sim-ui-defines.h
+++ b/firmware/target/hosted/sdl/sim-ui-defines.h
@@ -508,6 +508,13 @@
#define UI_LCD_POSX 46
#define UI_LCD_POSY 40
+#elif defined(SONY_NWZA860)
+#define UI_TITLE "Sony NWZ-A860 Series"
+#define UI_WIDTH 390 /* width of GUI window */
+#define UI_HEIGHT 690/* height of GUI window */
+#define UI_LCD_POSX 78
+#define UI_LCD_POSY 92
+
#elif defined(SIMULATOR)
#error no UI defines
#endif