summaryrefslogtreecommitdiff
path: root/uisimulator/win32
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/win32')
-rw-r--r--uisimulator/win32/Makefile69
-rw-r--r--uisimulator/win32/Makefile.vc6101
-rw-r--r--uisimulator/win32/SOURCES12
-rw-r--r--uisimulator/win32/UI-fmrecorder.bmpbin236864 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-gmini120.bmpbin195416 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-h100.bmpbin194120 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-h120.bmpbin194120 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-h300.bmpbin168408 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-ipod4g.bmpbin217604 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-ipodcolor.bmpbin131232 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-ipodnano.bmpbin85280 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-ondiofm.bmpbin104264 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-ondiosp.bmpbin104264 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-player.bmpbin238616 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-recorder.bmpbin219296 -> 0 bytes
-rw-r--r--uisimulator/win32/UI-recorderv2.bmpbin236864 -> 0 bytes
-rw-r--r--uisimulator/win32/atoi.h20
-rw-r--r--uisimulator/win32/button.c286
-rw-r--r--uisimulator/win32/debug-win32.c66
-rw-r--r--uisimulator/win32/dir-win32.c91
-rw-r--r--uisimulator/win32/dir-win32.h46
-rw-r--r--uisimulator/win32/kernel.c167
-rw-r--r--uisimulator/win32/lcd-win32.c326
-rw-r--r--uisimulator/win32/lcd-win32.h47
-rw-r--r--uisimulator/win32/panic-win32.c43
-rw-r--r--uisimulator/win32/plugin-win32.h48
-rwxr-xr-xuisimulator/win32/plugin.def2
-rw-r--r--uisimulator/win32/resource.h19
-rw-r--r--uisimulator/win32/rockbox.dsp626
-rw-r--r--uisimulator/win32/rockbox.icobin3638 -> 0 bytes
-rw-r--r--uisimulator/win32/sound.c201
-rw-r--r--uisimulator/win32/sound.h22
-rw-r--r--uisimulator/win32/sprintf.h36
-rw-r--r--uisimulator/win32/stdbool.h46
-rw-r--r--uisimulator/win32/string-win32.c34
-rw-r--r--uisimulator/win32/thread-win32.c80
-rw-r--r--uisimulator/win32/thread-win32.h23
-rw-r--r--uisimulator/win32/timefuncs.h8
-rw-r--r--uisimulator/win32/uisw32.c344
-rw-r--r--uisimulator/win32/uisw32.h168
-rw-r--r--uisimulator/win32/uisw32.rc76
-rw-r--r--uisimulator/win32/uisw32.sln21
-rw-r--r--uisimulator/win32/uisw32.suobin13312 -> 0 bytes
-rw-r--r--uisimulator/win32/uisw32.vcproj280
44 files changed, 0 insertions, 3308 deletions
diff --git a/uisimulator/win32/Makefile b/uisimulator/win32/Makefile
deleted file mode 100644
index 160924a0f3..0000000000
--- a/uisimulator/win32/Makefile
+++ /dev/null
@@ -1,69 +0,0 @@
1############################################################################
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8# $Id$
9#
10# Copyright (C) 2002 by Daniel Stenberg <daniel@haxx.se>
11#
12# All files in this archive are subject to the GNU General Public License.
13# See the file COPYING in the source tree root for full license agreement.
14#
15# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16# KIND, either express or implied.
17#
18############################################################################
19
20SIMCOMMON = ../common
21
22DEPFILE = $(OBJDIR)/dep-simwin
23
24RM = rm -f
25DEBUG = -g
26
27INCLUDES = -I. -I$(SIMCOMMON) -I$(OBJDIR) -I$(FIRMDIR)/export -I$(APPSDIR) \
28 -I$(BUILDDIR)
29
30DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
31$(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES)
32
33# This sets up 'SRC' based on the files mentioned in SOURCES
34include $(TOOLSDIR)/makesrc.inc
35
36OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
37
38SOURCES = $(SRC)
39DIRS = .
40
41CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) -W -Wall -mno-cygwin
42
43OUTFILE = $(BUILDDIR)/libsim.a
44
45all: $(OUTFILE)
46
47$(OUTFILE): $(OBJS) $(OBJDIR)/UI256.bmp $(OBJDIR)/uisw32-res.o
48 @echo "AR+RANLIB $@"
49 @$(AR) ruv $@ $(OBJS) $(OBJDIR)/uisw32-res.o >/dev/null 2>&1
50 @$(RANLIB) $@
51
52clean:
53 @echo "cleaning simwin"
54 @$(RM) $(OBJS) *~ core $(OUTFILE) $(OBJDIR)/uisw32-res.o \
55 $(OBJDIR)/UI256.bmp $(DEPFILE)
56 @$(MAKE) -C $(SIMCOMMON) clean
57
58################## Specific dependencies ##################
59$(OBJDIR)/UI256.bmp: UI-$(ARCHOS).bmp
60 @echo UI
61 @cp $< $@
62
63$(OBJDIR)/uisw32-res.o: uisw32.rc $(OBJDIR)/UI256.bmp
64 @echo "WINDRES"
65 @$(WINDRES) --include-dir $(OBJDIR) -i $< -o $@
66
67include $(TOOLSDIR)/make.inc
68
69-include $(DEPFILE)
diff --git a/uisimulator/win32/Makefile.vc6 b/uisimulator/win32/Makefile.vc6
deleted file mode 100644
index d92f18d86d..0000000000
--- a/uisimulator/win32/Makefile.vc6
+++ /dev/null
@@ -1,101 +0,0 @@
1############################################################################
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8# $Id$
9#
10# Copyright (C) 2002 by Felix Arends
11#
12# All files in this archive are subject to the GNU General Public License.
13# See the file COPYING in the source tree root for full license agreement.
14#
15# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16# KIND, either express or implied.
17#
18############################################################################
19
20
21#CHANGE THIS FIELD TO SPECIFY RECORDER OR PLAYER (Player does not work very well atm)
22TARGET = RECORDER
23
24FIRMWAREDIR = ../../firmware
25DRIVERS = $(FIRMWAREDIR)/drivers
26COMMON = $(FIRMWAREDIR)/common
27APPSCOMMON = ../common
28TOOLSDIR = ..\..\tools
29SIMDIR = ../win32/
30APPDIR = ../../apps/
31PLAYERDIR = $(APPDIR)player/
32RECDIR = $(APPDIR)recorder/
33RM = del
34LANGUAGE = english
35FONT = $(FIRMWAREDIR)/fonts/clR6x8.bdf
36
37!IF ("$(TARGET)" == "RECORDER")
38DISPLAY = -DHAVE_LCD_BITMAP
39KEYPAD = -DHAVE_RECORDER_KEYPAD
40MODEL_SPECIFIC_DIR = $(RECDIR)
41!ELSE
42DISPLAY = -DHAVE_LCD_CHARCELLS
43KEYPAD = -DHAVE_PLAYER_KEYPAD
44MODEL_SPECIFIC_DIR = $(PLAYERDIR)
45!ENDIF
46
47CC = cl
48RC = rc
49LINK = link
50DEFINES = $(DEFINES) -DWIN32 -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR $(KEYPAD) $(DISPLAY) -DAPPSVERSION=\"WIN32SIM\"
51LDFLAGS = /OUT:uisw32.exe /SUBSYSTEM:windows /NOLOGO /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib
52INCLUDES = -I$(FIRMWAREDIR)/export -I$(DRIVERS) -I$(COMMON) -I$(APPSCOMMON) -I$(SIMDIR) -I$(APPDIR) -I$(MODEL_SPECIFIC_DIR)
53LIBS = /DEFAULTLIB:gdi32.lib /DEFAULTLIB:user32.lib /NODEFAULTLIB:libc.lib
54
55CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) /MD /Fd"Release/vc70.pdb" /c
56
57SRCS = *.c \
58 $(DRIVERS)/power.c \
59 $(APPDIR)*.c \
60 $(APPSCOMMON)/lcd-common.c $(APPSCOMMON)/mpegplay.c $(APPSCOMMON)/sim_icons.c $(APPSCOMMON)/stubs.c \
61 $(FIRMWAREDIR)/mpeg.c $(FIRMWAREDIR)/id3.c $(FIRMWAREDIR)/usb.c $(FIRMWAREDIR)/mpeg.c $(FIRMWAREDIR)/font.c $(FIRMWAREDIR)/powermgmt.c \
62 $(COMMON)/sprintf.c $(COMMON)/strtok.c $(COMMON)/errno.c
63
64!IF ("$(DISPLAY)" == "-DHAVE_LCD_BITMAP")
65SRCS = $(SRCS) $(RECDIR)/bmp.c $(RECDIR)/bounce.c $(RECDIR)/cube.c $(RECDIR)/icons.c $(RECDIR)/keyboard.c $(RECDIR)/peakmeter.c \
66 $(RECDIR)/snow.c $(RECDIR)/sokoban.c $(RECDIR)/tetris.c $(RECDIR)/widgets.c $(RECDIR)/wormlet.c $(DRIVERS)/lcd-recorder.c
67!ELSE
68SRCS = $(SRCS) $(APPSCOMMON)/lcd-playersim.c $(DRIVERS)/lcd-player.c $(PLAYERDIR)*.c
69!ENDIF
70
71OBJS = lang.obj $(SRCS:.c=.obj) uisw32.res
72
73all : uisw32.exe
74
75$(APPDIR)credits.raw:
76 perl $(APPDIR)credits.pl < ../../docs/CREDITS > $(APPDIR)credits.raw
77
78kernel.obj:
79 $(CC) $(CFLAGS) *.c
80
81sysfont.c: $(FONT)
82 $(TOOLSDIR)\convbdf -c -o sysfont.c $(FONT)
83
84sysfont.obj: sysfont.c
85 $(CC) $(CFLAGS) sysfont.c
86
87uisw32.exe: $(APPDIR)credits.raw $(OBJS) sysfont.obj kernel.obj
88 $(LINK) $(LIBS) $(LDFLAGS) *.obj uisw32.res
89
90uisw32.res:
91 $(RC) /r uisw32.rc
92
93build.lang: $(APPDIR)/lang/$(LANGUAGE).lang
94 perl $(TOOLSDIR)/uplang $(APPDIR)/lang/english.lang $(APPDIR)/lang/$(LANGUAGE).lang > build.lang
95
96lang.obj: build.lang
97 perl -s $(TOOLSDIR)/genlang -p=lang build.lang
98 $(CC) $(CFLAGS) -c lang.c -o lang.obj
99
100clean:
101 $(RM) *.obj ..\..\apps\lang.c ..\..\apps\lang.h ..\..\apps\credits.raw lang.build uisw32.res uisw32.exe
diff --git a/uisimulator/win32/SOURCES b/uisimulator/win32/SOURCES
deleted file mode 100644
index 29710fd82c..0000000000
--- a/uisimulator/win32/SOURCES
+++ /dev/null
@@ -1,12 +0,0 @@
1button.c
2debug-win32.c
3#if 0 /* this is only for non-cygwin simulator builds */
4dir-win32.c
5#endif
6kernel.c
7lcd-win32.c
8panic-win32.c
9string-win32.c
10thread-win32.c
11uisw32.c
12sound.c
diff --git a/uisimulator/win32/UI-fmrecorder.bmp b/uisimulator/win32/UI-fmrecorder.bmp
deleted file mode 100644
index 53f705b9ef..0000000000
--- a/uisimulator/win32/UI-fmrecorder.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-gmini120.bmp b/uisimulator/win32/UI-gmini120.bmp
deleted file mode 100644
index afeaf74801..0000000000
--- a/uisimulator/win32/UI-gmini120.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-h100.bmp b/uisimulator/win32/UI-h100.bmp
deleted file mode 100644
index caeb81bc4b..0000000000
--- a/uisimulator/win32/UI-h100.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-h120.bmp b/uisimulator/win32/UI-h120.bmp
deleted file mode 100644
index caeb81bc4b..0000000000
--- a/uisimulator/win32/UI-h120.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-h300.bmp b/uisimulator/win32/UI-h300.bmp
deleted file mode 100644
index 5f099b717a..0000000000
--- a/uisimulator/win32/UI-h300.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-ipod4g.bmp b/uisimulator/win32/UI-ipod4g.bmp
deleted file mode 100644
index 85af574d7c..0000000000
--- a/uisimulator/win32/UI-ipod4g.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-ipodcolor.bmp b/uisimulator/win32/UI-ipodcolor.bmp
deleted file mode 100644
index de5dad4ffe..0000000000
--- a/uisimulator/win32/UI-ipodcolor.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-ipodnano.bmp b/uisimulator/win32/UI-ipodnano.bmp
deleted file mode 100644
index e33f7e81da..0000000000
--- a/uisimulator/win32/UI-ipodnano.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-ondiofm.bmp b/uisimulator/win32/UI-ondiofm.bmp
deleted file mode 100644
index e258720d28..0000000000
--- a/uisimulator/win32/UI-ondiofm.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-ondiosp.bmp b/uisimulator/win32/UI-ondiosp.bmp
deleted file mode 100644
index c62c2334a3..0000000000
--- a/uisimulator/win32/UI-ondiosp.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-player.bmp b/uisimulator/win32/UI-player.bmp
deleted file mode 100644
index db4003b120..0000000000
--- a/uisimulator/win32/UI-player.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-recorder.bmp b/uisimulator/win32/UI-recorder.bmp
deleted file mode 100644
index 98937fea2d..0000000000
--- a/uisimulator/win32/UI-recorder.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/UI-recorderv2.bmp b/uisimulator/win32/UI-recorderv2.bmp
deleted file mode 100644
index 53f705b9ef..0000000000
--- a/uisimulator/win32/UI-recorderv2.bmp
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/atoi.h b/uisimulator/win32/atoi.h
deleted file mode 100644
index c95cfca64f..0000000000
--- a/uisimulator/win32/atoi.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Daniel Stenberg <daniel@haxx.se>
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20int atoi(const char *);
diff --git a/uisimulator/win32/button.c b/uisimulator/win32/button.c
deleted file mode 100644
index 8f21fe4396..0000000000
--- a/uisimulator/win32/button.c
+++ /dev/null
@@ -1,286 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <windows.h>
21#include "uisw32.h"
22#include "config.h"
23#include "button.h"
24#include "kernel.h"
25#include "backlight.h"
26#include "misc.h"
27
28/* how long until repeat kicks in */
29#define REPEAT_START 6
30
31/* the speed repeat starts at */
32#define REPEAT_INTERVAL_START 4
33
34/* speed repeat finishes at */
35#define REPEAT_INTERVAL_FINISH 2
36
37struct event_queue button_queue;
38
39static int btn = 0; /* Hopefully keeps track of currently pressed keys... */
40
41void button_event(int key, bool pressed)
42{
43 int new_btn = 0;
44 int diff = 0;
45 static int count = 0;
46 static int lastbtn;
47 static int repeat_speed = REPEAT_INTERVAL_START;
48 static int repeat_count = 0;
49 static bool repeat = false;
50 static bool post = false;
51
52 switch (key)
53 {
54 case VK_NUMPAD4:
55 case VK_LEFT:
56 new_btn = BUTTON_LEFT;
57 break;
58 case VK_NUMPAD6:
59 case VK_RIGHT:
60 new_btn = BUTTON_RIGHT;
61 break;
62
63 case VK_NUMPAD8:
64 case VK_UP:
65#ifdef BUTTON_UP
66 new_btn = BUTTON_UP;
67#elif defined BUTTON_SCROLL_FWD
68 new_btn = BUTTON_SCROLL_FWD;
69#elif defined BUTTON_PLAY
70 new_btn = BUTTON_PLAY;
71#endif
72 break;
73
74 case VK_NUMPAD2:
75 case VK_DOWN:
76#ifdef BUTTON_DOWN
77 new_btn = BUTTON_DOWN;
78#elif defined BUTTON_SCROLL_BACK
79 new_btn = BUTTON_SCROLL_BACK;
80#elif defined BUTTON_STOP
81 new_btn = BUTTON_STOP;
82#endif
83 break;
84
85 case VK_ADD:
86#ifdef BUTTON_ON
87 new_btn = BUTTON_ON;
88#elif defined(BUTTON_SELECT) && defined(BUTTON_PLAY)
89 new_btn = BUTTON_PLAY;
90#endif
91 break;
92
93#ifdef BUTTON_OFF
94 case VK_RETURN:
95 new_btn = BUTTON_OFF;
96 break;
97#endif
98
99#ifdef BUTTON_F1
100 case VK_DIVIDE:
101 case VK_F1:
102 new_btn = BUTTON_F1;
103 break;
104 case VK_MULTIPLY:
105 case VK_F2:
106 new_btn = BUTTON_F2;
107 break;
108 case VK_SUBTRACT:
109 case VK_F3:
110 new_btn = BUTTON_F3;
111 break;
112#elif defined(BUTTON_REC)
113 case VK_DIVIDE:
114 case VK_F1:
115 new_btn = BUTTON_REC;
116 break;
117#endif
118
119 case VK_NUMPAD5:
120 case VK_SPACE:
121#if defined(BUTTON_PLAY) && !defined(BUTTON_SELECT)
122 new_btn = BUTTON_PLAY;
123#elif defined(BUTTON_SELECT)
124 new_btn = BUTTON_SELECT;
125#endif
126 break;
127
128#ifdef HAVE_LCD_BITMAP
129 case VK_NUMPAD0:
130 case VK_F5:
131 if(pressed)
132 {
133 screen_dump();
134 return;
135 }
136 break;
137#endif
138
139 case VK_DECIMAL:
140 case VK_INSERT:
141#ifdef BUTTON_MENU
142 new_btn = BUTTON_MENU;
143#elif defined(BUTTON_MODE)
144 new_btn = BUTTON_MODE;
145#endif
146 break;
147 }
148
149 if (pressed)
150 btn |= new_btn;
151 else
152 btn &= ~new_btn;
153
154 /* Lots of stuff copied from real button.c. Not good, I think... */
155
156 /* Find out if a key has been released */
157 diff = btn ^ lastbtn;
158
159 if(diff && (btn & diff) == 0)
160 {
161 queue_post(&button_queue, BUTTON_REL | diff, NULL);
162 }
163 else
164 {
165 if ( btn )
166 {
167 /* normal keypress */
168 if ( btn != lastbtn )
169 {
170 post = true;
171 repeat = false;
172 repeat_speed = REPEAT_INTERVAL_START;
173
174 }
175 else /* repeat? */
176 {
177 if ( repeat )
178 {
179 if (!post)
180 count--;
181 if (count == 0)
182 {
183 post = true;
184 /* yes we have repeat */
185 repeat_speed--;
186 if (repeat_speed < REPEAT_INTERVAL_FINISH)
187 repeat_speed = REPEAT_INTERVAL_FINISH;
188 count = repeat_speed;
189
190 repeat_count++;
191 }
192 }
193 else
194 {
195 if (count++ > REPEAT_START)
196 {
197 post = true;
198 repeat = true;
199 repeat_count = 0;
200 /* initial repeat */
201 count = REPEAT_INTERVAL_START;
202 }
203 }
204 }
205 if ( post )
206 {
207 if(repeat)
208 {
209 if (queue_empty(&button_queue))
210 {
211 queue_post(&button_queue, BUTTON_REPEAT | btn, NULL);
212 post = false;
213 }
214 }
215 else
216 {
217 queue_post(&button_queue, btn, NULL);
218 post = false;
219 }
220
221#ifdef HAVE_REMOTE_LCD
222 if(btn & BUTTON_REMOTE)
223 remote_backlight_on();
224 else
225#endif
226 backlight_on();
227
228 }
229 }
230 else
231 {
232 repeat = false;
233 count = 0;
234 }
235 }
236 lastbtn = btn & ~(BUTTON_REL | BUTTON_REPEAT);
237}
238
239/* Again copied from real button.c... */
240
241long button_get(bool block)
242{
243 struct event ev;
244
245 if ( block || !queue_empty(&button_queue) ) {
246 queue_wait(&button_queue, &ev);
247 return ev.id;
248 }
249 return BUTTON_NONE;
250}
251
252long button_get_w_tmo(int ticks)
253{
254 struct event ev;
255 queue_wait_w_tmo(&button_queue, &ev, ticks);
256 return (ev.id != SYS_TIMEOUT)? ev.id: BUTTON_NONE;
257}
258
259void button_init(void)
260{
261}
262
263int button_status(void)
264{
265 return btn;
266}
267
268void button_clear_queue(void)
269{
270 queue_clear(&button_queue);
271}
272
273#ifdef HAS_BUTTON_HOLD
274bool button_hold(void) {
275 /* temp fix for hold button on irivers */
276 return false;
277}
278#endif
279
280#ifdef HAS_REMOTE_BUTTON_HOLD
281bool remote_button_hold(void) {
282 /* temp fix for hold button on irivers */
283 return false;
284}
285#endif
286
diff --git a/uisimulator/win32/debug-win32.c b/uisimulator/win32/debug-win32.c
deleted file mode 100644
index dbc0f10e85..0000000000
--- a/uisimulator/win32/debug-win32.c
+++ /dev/null
@@ -1,66 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <windows.h>
21#include <stdio.h>
22
23char debugmembuf[200];
24
25void debug( const char *message )
26{
27 static int debugger = -1;
28
29 if (debugger == -1)
30 {
31 HINSTANCE hInst = LoadLibrary("kernel32.dll");
32 debugger = 0;
33
34 if (hInst != NULL)
35 {
36 FARPROC pIsDebuggerPresent = GetProcAddress(hInst, "IsDebuggerPresent");
37 if (pIsDebuggerPresent != NULL)
38 debugger = pIsDebuggerPresent();
39 }
40 }
41
42 if (debugger)
43 OutputDebugString (message);
44 else
45 printf("%s", message);
46}
47
48void debugf(const char *fmt, ...)
49{
50 va_list ap;
51
52 va_start( ap, fmt );
53 wvsprintf( debugmembuf, fmt, ap );
54 va_end( ap );
55 debug ( debugmembuf );
56}
57
58void Logf(char *fmt, ...)
59{
60 va_list ap;
61
62 va_start( ap, fmt );
63 wvsprintf( debugmembuf, fmt, ap );
64 va_end( ap );
65 debug ( debugmembuf );
66}
diff --git a/uisimulator/win32/dir-win32.c b/uisimulator/win32/dir-win32.c
deleted file mode 100644
index 6f14e798be..0000000000
--- a/uisimulator/win32/dir-win32.c
+++ /dev/null
@@ -1,91 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <io.h>
21#include <windows.h>
22#include <malloc.h>
23#include "dir-win32.h"
24
25// Directory operations
26//
27
28// opendir
29// open directory for scanning
30DIR *opendir (
31 const char *dirname // directory name
32 )
33{
34 DIR *p = (DIR*)malloc(sizeof(DIR));
35 struct _finddata_t fd;
36 unsigned int i;
37 char *s = (char*)malloc(strlen(dirname) + 5);
38 wsprintf (s, "%s", dirname);
39
40 for (i = 0; i < strlen(s); i++)
41 if (s[i] == '/')
42 s[i] = '\\';
43
44 if (s[i - 1] != '\\')
45 {
46 s[i] = '\\';
47 s[++i] = '\0';
48 }
49
50 OutputDebugString (s);
51
52 wsprintf (s, "%s*.*", s);
53
54 if ((p->handle = _findfirst (s, &fd)) == -1)
55 {
56 free (s);
57 free (p);
58 return 0;
59 }
60 free (s);
61 return p;
62}
63
64// closedir
65// close directory
66int closedir (
67 DIR *dir // previously opened dir search
68 )
69{
70 free(dir);
71 return 0;
72}
73
74// read dir
75// read next entry in directory
76struct dirent *readdir (
77 DIR *dir
78 )
79{
80 struct _finddata_t fd;
81 if (_findnext (dir->handle, &fd) == -1)
82 return 0;
83 memcpy (dir->fd.d_name, fd.name, 256);
84
85 dir->fd.attribute = fd.attrib & 0x3f;
86 dir->fd.size = fd.size;
87 dir->fd.startcluster = 0 ;
88
89
90 return &dir->fd;
91}
diff --git a/uisimulator/win32/dir-win32.h b/uisimulator/win32/dir-win32.h
deleted file mode 100644
index 95ce326e9f..0000000000
--- a/uisimulator/win32/dir-win32.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Björn Stenberg
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef _DIR_WIN32_H_
20#define _DIR_WIN32_H_
21
22#include <stdbool.h>
23
24struct dirent {
25 unsigned char d_name[MAX_PATH];
26 int attribute;
27 int size;
28 int startcluster;
29};
30
31typedef struct
32{
33 struct dirent fd;
34 int handle;
35} DIR;
36
37extern DIR* opendir(const char* name);
38extern int closedir(DIR* dir);
39extern int mkdir(const char* name);
40extern int rmdir(const char* name);
41
42extern struct dirent* readdir(DIR* dir);
43
44#define S_ISDIR(x) (((x) & _S_IFDIR) == _S_IFDIR)
45
46#endif
diff --git a/uisimulator/win32/kernel.c b/uisimulator/win32/kernel.c
deleted file mode 100644
index 34100a234e..0000000000
--- a/uisimulator/win32/kernel.c
+++ /dev/null
@@ -1,167 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <windows.h>
21#include "uisw32.h"
22#include "kernel.h"
23#include "thread-win32.h"
24#include "thread.h"
25#include "debug.h"
26
27static void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
28
29int set_irq_level (int level)
30{
31 static int _lv = 0;
32 return (_lv = level);
33}
34
35void queue_init(struct event_queue *q)
36{
37 q->read = 0;
38 q->write = 0;
39}
40
41void queue_delete(struct event_queue *q)
42{
43 (void)q;
44}
45
46void queue_wait(struct event_queue *q, struct event *ev)
47{
48 while(q->read == q->write)
49 {
50 switch_thread();
51 }
52
53 *ev = q->events[(q->read++) & QUEUE_LENGTH_MASK];
54}
55
56void queue_wait_w_tmo(struct event_queue *q, struct event *ev, int ticks)
57{
58 unsigned int timeout = current_tick + ticks;
59
60 while(q->read == q->write && TIME_BEFORE( current_tick, timeout ))
61 {
62 sleep(1);
63 }
64
65 if(q->read != q->write)
66 {
67 *ev = q->events[(q->read++) & QUEUE_LENGTH_MASK];
68 }
69 else
70 {
71 ev->id = SYS_TIMEOUT;
72 }
73}
74
75void queue_post(struct event_queue *q, long id, void *data)
76{
77 int wr;
78 int oldlevel;
79
80 oldlevel = set_irq_level(15<<4);
81 wr = (q->write++) & QUEUE_LENGTH_MASK;
82
83 q->events[wr].id = id;
84 q->events[wr].data = data;
85 set_irq_level(oldlevel);
86}
87
88bool queue_empty(const struct event_queue* q)
89{
90 return ( q->read == q->write );
91}
92
93void queue_clear(struct event_queue* q)
94{
95 /* fixme: This is potentially unsafe in case we do interrupt-like processing */
96 q->read = 0;
97 q->write = 0;
98}
99
100void switch_thread (void)
101{
102 yield ();
103}
104
105void sim_tick_tasks(void)
106{
107 int i;
108
109 /* Run through the list of tick tasks */
110 for(i = 0;i < MAX_NUM_TICK_TASKS;i++)
111 {
112 if(tick_funcs[i])
113 {
114 tick_funcs[i]();
115 }
116 }
117}
118
119int tick_add_task(void (*f)(void))
120{
121 int i;
122
123 /* Add a task if there is room */
124 for(i = 0;i < MAX_NUM_TICK_TASKS;i++)
125 {
126 if(tick_funcs[i] == NULL)
127 {
128 tick_funcs[i] = f;
129 return 0;
130 }
131 }
132 DEBUGF("Error! tick_add_task(): out of tasks");
133 return -1;
134}
135
136int tick_remove_task(void (*f)(void))
137{
138 int i;
139
140 /* Remove a task if it is there */
141 for(i = 0;i < MAX_NUM_TICK_TASKS;i++)
142 {
143 if(tick_funcs[i] == f)
144 {
145 tick_funcs[i] = NULL;
146 return 0;
147 }
148 }
149
150 return -1;
151}
152
153/* TODO: Implement mutexes for win32 */
154void mutex_init(struct mutex *m)
155{
156 (void)m;
157}
158
159void mutex_lock(struct mutex *m)
160{
161 (void)m;
162}
163
164void mutex_unlock(struct mutex *m)
165{
166 (void)m;
167}
diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c
deleted file mode 100644
index 8afd025a16..0000000000
--- a/uisimulator/win32/lcd-win32.c
+++ /dev/null
@@ -1,326 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <windows.h>
21#include <process.h>
22#include "uisw32.h"
23#include "lcd.h"
24#include "lcd-playersim.h"
25#include "debug.h"
26
27#if LCD_DEPTH == 16
28unsigned short bitmap[LCD_HEIGHT][LCD_WIDTH]; /* the ui display */
29
30BITMAPINFO256 bmi =
31{
32 {sizeof (BITMAPINFOHEADER),
33 LCD_WIDTH, -LCD_HEIGHT, 1, 16,
34 BI_BITFIELDS, 0, 0, 0, 3, 3,
35 }, /* bitfield masks (RGB565) */
36 {{0x00, 0xf8, 0, 0}, {0xe0, 0x07, 0, 0}, {0x1f, 0x00, 0, 0}}
37}; /* bitmap information */
38#else
39unsigned char bitmap[LCD_HEIGHT][LCD_WIDTH]; /* the ui display */
40RGBQUAD color_zero = {UI_LCD_BGCOLORLIGHT, 0};
41RGBQUAD color_max = {0, 0, 0, 0};
42
43BITMAPINFO256 bmi =
44{
45 {sizeof (BITMAPINFOHEADER),
46 LCD_WIDTH, -LCD_HEIGHT, 1, 8,
47 BI_RGB, 0, 0, 0, 2, 2,
48 },
49 {} /* colour lookup table gets filled later */
50}; /* bitmap information */
51#endif
52
53#ifdef HAVE_LCD_BITMAP
54
55#ifdef HAVE_REMOTE_LCD
56unsigned char remote_bitmap[LCD_REMOTE_HEIGHT][LCD_REMOTE_WIDTH];
57RGBQUAD remote_color_zero = {UI_REMOTE_BGCOLORLIGHT, 0};
58RGBQUAD remote_color_max = {0, 0, 0, 0};
59
60BITMAPINFO256 remote_bmi =
61{
62 {sizeof (BITMAPINFOHEADER),
63 LCD_REMOTE_WIDTH, -LCD_REMOTE_HEIGHT, 1, 8,
64 BI_RGB, 0, 0, 0, 2, 2,
65 },
66 {} /* colour lookup table gets filled later */
67};
68#endif
69
70void lcd_update(void)
71{
72 lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
73}
74
75void lcd_update_rect(int x_start, int y_start,
76 int width, int height)
77{
78 int x, y;
79 int xmax, ymax;
80 RECT r;
81
82 ymax = y_start + height;
83 xmax = x_start + width;
84
85 if (hGUIWnd == NULL)
86 _endthread ();
87
88 if(xmax > LCD_WIDTH)
89 xmax = LCD_WIDTH;
90 if(ymax >= LCD_HEIGHT)
91 ymax = LCD_HEIGHT;
92
93 for (x = x_start; x < xmax; x++)
94 for (y = y_start; y < ymax; y++)
95 {
96#if LCD_DEPTH == 1
97 bitmap[y][x] = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1);
98#elif LCD_DEPTH == 2
99#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
100 bitmap[y][x] = ((lcd_framebuffer[y][x/4] >> (2 * (x & 3))) & 3);
101#else
102 bitmap[y][x] = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3);
103#endif
104#elif LCD_DEPTH == 16
105#if LCD_PIXELFORMAT == RGB565SWAPPED
106 unsigned bits = lcd_framebuffer[y][x];
107 bitmap[y][x] = (bits >> 8) | (bits << 8);
108#else
109 bitmap[y][x] = lcd_framebuffer[y][x];
110#endif
111#endif
112 }
113
114 /* Invalidate only the window part that actually did change */
115 GetClientRect (hGUIWnd, &r);
116 r.left = (UI_LCD_POSX + (UI_LCD_WIDTH * x_start / LCD_WIDTH))
117 * r.right / UI_WIDTH;
118 r.top = (UI_LCD_POSY + (UI_LCD_HEIGHT * y_start / LCD_HEIGHT))
119 * r.bottom / UI_HEIGHT;
120 r.right = (UI_LCD_POSX + (UI_LCD_WIDTH * xmax / LCD_WIDTH))
121 * r.right / UI_WIDTH;
122 r.bottom = (UI_LCD_POSY + (UI_LCD_HEIGHT * ymax / LCD_HEIGHT))
123 * r.bottom / UI_HEIGHT;
124 InvalidateRect (hGUIWnd, &r, FALSE);
125}
126
127#ifdef HAVE_REMOTE_LCD
128
129extern unsigned char lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH];
130
131void lcd_remote_update (void)
132{
133 lcd_remote_update_rect(0, 0, LCD_REMOTE_WIDTH, LCD_REMOTE_HEIGHT);
134}
135
136void lcd_remote_update_rect(int x_start, int y_start,
137 int width, int height)
138{
139 int x, y;
140 int xmax, ymax;
141 RECT r;
142
143 ymax = y_start + height;
144 xmax = x_start + width;
145
146 if (hGUIWnd == NULL)
147 _endthread ();
148
149 if(xmax > LCD_REMOTE_WIDTH)
150 xmax = LCD_REMOTE_WIDTH;
151 if(ymax >= LCD_REMOTE_HEIGHT)
152 ymax = LCD_REMOTE_HEIGHT;
153
154 for (x = x_start; x < xmax; x++)
155 for (y = y_start; y < ymax; y++)
156 remote_bitmap[y][x] = ((lcd_remote_framebuffer[y/8][x] >> (y & 7)) & 1);
157
158 /* Invalidate only the window part that actually did change */
159 GetClientRect (hGUIWnd, &r);
160 r.left = (UI_REMOTE_POSX + (UI_REMOTE_WIDTH * x_start / LCD_REMOTE_WIDTH))
161 * r.right / UI_WIDTH;
162 r.top = (UI_REMOTE_POSY + (UI_REMOTE_HEIGHT * y_start / LCD_REMOTE_HEIGHT))
163 * r.bottom / UI_HEIGHT;
164 r.right = (UI_REMOTE_POSX + (UI_REMOTE_WIDTH * xmax / LCD_REMOTE_WIDTH))
165 * r.right / UI_WIDTH;
166 r.bottom = (UI_REMOTE_POSY + (UI_REMOTE_HEIGHT * ymax / LCD_REMOTE_HEIGHT))
167 * r.bottom / UI_HEIGHT;
168 InvalidateRect (hGUIWnd, &r, FALSE);
169}
170
171#endif /* HAVE_REMOTE_LCD */
172#endif /* HAVE_LCD_BITMAP */
173
174#ifdef HAVE_LCD_CHARCELLS
175/* Defined in lcd-playersim.c */
176extern void lcd_print_char(int x, int y);
177extern bool lcd_display_redraw;
178extern unsigned char hardware_buffer_lcd[11][2];
179static unsigned char lcd_buffer_copy[11][2];
180
181void lcd_update(void)
182{
183 int x, y;
184 bool changed = false;
185 RECT r;
186
187 if (hGUIWnd == NULL)
188 _endthread ();
189
190 for (y = 0; y < 2; y++)
191 {
192 for (x = 0; x < 11; x++)
193 {
194 if (lcd_display_redraw ||
195 lcd_buffer_copy[x][y] != hardware_buffer_lcd[x][y])
196 {
197 lcd_buffer_copy[x][y] = hardware_buffer_lcd[x][y];
198 lcd_print_char(x, y);
199 changed = true;
200 }
201 }
202 }
203 if (changed)
204 {
205 /* Invalidate only the window part that actually did change */
206 GetClientRect (hGUIWnd, &r);
207 r.left = UI_LCD_POSX * r.right / UI_WIDTH;
208 r.top = UI_LCD_POSY * r.bottom / UI_HEIGHT;
209 r.right = (UI_LCD_POSX + UI_LCD_WIDTH) * r.right / UI_WIDTH;
210 r.bottom = (UI_LCD_POSY + UI_LCD_HEIGHT) * r.bottom / UI_HEIGHT;
211 InvalidateRect (hGUIWnd, &r, FALSE);
212 }
213 lcd_display_redraw = false;
214}
215
216void drawdots(int color, struct coordinate *points, int count)
217{
218 while (count--)
219 {
220 bitmap[points[count].y][points[count].x] = color;
221 }
222}
223
224void drawrectangles(int color, struct rectangle *points, int count)
225{
226 while (count--)
227 {
228 int x;
229 int y;
230 int ix;
231 int iy;
232
233 for (x = points[count].x, ix = 0; ix < points[count].width; x++, ix++)
234 {
235 for (y = points[count].y, iy = 0; iy < points[count].height; y++, iy++)
236 {
237 bitmap[y][x] = color;
238 }
239 }
240 }
241}
242#endif /* HAVE_LCD_CHARCELLS */
243
244#if 0
245/* set backlight state of lcd */
246void lcd_backlight (bool on)
247{
248 if (on)
249 color_zero = {UI_LCD_BGCOLORLIGHT, 0};
250 else
251 color_zero = {UI_LCD_BGCOLOR, 0};
252
253 lcdcolors(0, (1<<LCD_DEPTH), &color_zero, &color_max);
254 InvalidateRect (hGUIWnd, NULL, FALSE);
255}
256#endif
257
258#if LCD_DEPTH <= 8
259/* set a range of bitmap indices to a gradient from startcolour to endcolour */
260void lcdcolors(int index, int count, RGBQUAD *start, RGBQUAD *end)
261{
262 int i;
263
264 bmi.bmiHeader.biClrUsed = index + count;
265 bmi.bmiHeader.biClrImportant = index + count;
266
267 count--;
268 for (i = 0; i <= count; i++)
269 {
270 bmi.bmiColors[i+index].rgbRed = start->rgbRed
271 + (end->rgbRed - start->rgbRed) * i / count;
272 bmi.bmiColors[i+index].rgbGreen = start->rgbGreen
273 + (end->rgbGreen - start->rgbGreen) * i / count;
274 bmi.bmiColors[i+index].rgbBlue = start->rgbBlue
275 + (end->rgbBlue - start->rgbBlue) * i / count;
276 }
277}
278#endif
279
280#ifdef HAVE_REMOTE_LCD
281/* set a range of bitmap indices to a gradient from startcolour to endcolour */
282void lcdremotecolors(int index, int count, RGBQUAD *start, RGBQUAD *end)
283{
284 int i;
285
286 remote_bmi.bmiHeader.biClrUsed = index + count;
287 remote_bmi.bmiHeader.biClrImportant = index + count;
288
289 count--;
290 for (i = 0; i <= count; i++)
291 {
292 remote_bmi.bmiColors[i+index].rgbRed = start->rgbRed
293 + (end->rgbRed - start->rgbRed) * i / count;
294 remote_bmi.bmiColors[i+index].rgbGreen = start->rgbGreen
295 + (end->rgbGreen - start->rgbGreen) * i / count;
296 remote_bmi.bmiColors[i+index].rgbBlue = start->rgbBlue
297 + (end->rgbBlue - start->rgbBlue) * i / count;
298 }
299}
300#endif
301
302/* initialise simulator lcd driver */
303void simlcdinit(void)
304{
305#if LCD_DEPTH <= 8
306 lcdcolors(0, (1<<LCD_DEPTH), &color_zero, &color_max);
307#endif
308#ifdef HAVE_REMOTE_LCD
309 lcdremotecolors(0, (1<<LCD_REMOTE_DEPTH), &remote_color_zero, &remote_color_max);
310#endif
311}
312
313#ifdef CONFIG_BACKLIGHT
314void sim_backlight(int value)
315{
316 DEBUGF("backlight: %s\n", (value > 0) ? "on" : "off");
317}
318#endif
319
320#ifdef HAVE_REMOTE_LCD
321void sim_remote_backlight(int value)
322{
323 DEBUGF("remote backlight: %s\n", (value > 0) ? "on" : "off");
324}
325#endif
326
diff --git a/uisimulator/win32/lcd-win32.h b/uisimulator/win32/lcd-win32.h
deleted file mode 100644
index b3533ad0cb..0000000000
--- a/uisimulator/win32/lcd-win32.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef __LCDWIN32_H__
21#define __LCDWIN32_H__
22
23#include "uisw32.h"
24#include "lcd.h"
25
26// BITMAPINFO256
27typedef struct
28{
29 BITMAPINFOHEADER bmiHeader;
30 RGBQUAD bmiColors[256];
31} BITMAPINFO256;
32
33#if LCD_DEPTH <= 8
34extern unsigned char bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display
35#elif LCD_DEPTH <= 16
36extern unsigned short bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display
37#endif
38extern BITMAPINFO256 bmi; // bitmap information
39
40#ifdef HAVE_REMOTE_LCD
41extern unsigned char remote_bitmap[LCD_REMOTE_HEIGHT][LCD_REMOTE_WIDTH];
42extern BITMAPINFO256 remote_bmi; // bitmap information
43#endif
44
45void simlcdinit(void);
46
47#endif // #ifndef __LCDWIN32_H__
diff --git a/uisimulator/win32/panic-win32.c b/uisimulator/win32/panic-win32.c
deleted file mode 100644
index 614510f3a8..0000000000
--- a/uisimulator/win32/panic-win32.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <windows.h>
21#include "debug.h"
22
23char panic_buf[128];
24
25// panic
26// whatever it says ;)
27void panic( char *message )
28{
29 debugf ( message );
30 PostQuitMessage (-1);
31}
32
33
34// panicf
35// formatted panic
36void panicf( char *fmt, ...)
37{
38 va_list ap;
39 va_start( ap, fmt );
40 wsprintf( panic_buf, fmt, ap );
41 va_end( ap );
42 panic( panic_buf );
43}
diff --git a/uisimulator/win32/plugin-win32.h b/uisimulator/win32/plugin-win32.h
deleted file mode 100644
index dd1c79080b..0000000000
--- a/uisimulator/win32/plugin-win32.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 Björn Stenberg
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef _PLUGIN_WIN32_H_
21#define _PLUGIN_WIN32_H_
22
23#define BOOL win32_BOOL /* Avoid conflicts with BOOL/INT defined as */
24#define INT win32_INT /* enum values in settings.h */
25
26#include <windows.h>
27#include "plugin.h"
28#include "file.h"
29
30#define RTLD_NOW 0
31
32#undef filesize
33#define filesize win32_filesize
34
35#undef ftruncate
36#define ftruncate NULL
37
38typedef enum plugin_status (*plugin_fn)(struct plugin_api* api, void* param);
39
40#define dlopen(_x_, _y_) LoadLibrary(_x_)
41#define dlsym(_x_, _y_) (plugin_fn)GetProcAddress(_x_, _y_)
42#define dlclose(_x_) FreeLibrary(_x_)
43#define dlerror() "Unknown"
44
45int strcasecmp (const char *a, const char *b);
46int strncasecmp (const char *a, const char *b, size_t n);
47
48#endif
diff --git a/uisimulator/win32/plugin.def b/uisimulator/win32/plugin.def
deleted file mode 100755
index e37ce20d8f..0000000000
--- a/uisimulator/win32/plugin.def
+++ /dev/null
@@ -1,2 +0,0 @@
1EXPORTS
2 __header
diff --git a/uisimulator/win32/resource.h b/uisimulator/win32/resource.h
deleted file mode 100644
index dc8a238d78..0000000000
--- a/uisimulator/win32/resource.h
+++ /dev/null
@@ -1,19 +0,0 @@
1//{{NO_DEPENDENCIES}}
2// Microsoft Visual C++ generated include file.
3// Used by uisw32.rc
4//
5#define IDB_BITMAP1 102
6#define IDR_JPG1 103
7#define IDB_BITMAP2 104
8#define IDB_UI 104
9
10// Next default values for new objects
11//
12#ifdef APSTUDIO_INVOKED
13#ifndef APSTUDIO_READONLY_SYMBOLS
14#define _APS_NEXT_RESOURCE_VALUE 105
15#define _APS_NEXT_COMMAND_VALUE 40001
16#define _APS_NEXT_CONTROL_VALUE 1001
17#define _APS_NEXT_SYMED_VALUE 101
18#endif
19#endif
diff --git a/uisimulator/win32/rockbox.dsp b/uisimulator/win32/rockbox.dsp
deleted file mode 100644
index ae43fdf7bb..0000000000
--- a/uisimulator/win32/rockbox.dsp
+++ /dev/null
@@ -1,626 +0,0 @@
1# Microsoft Developer Studio Project File - Name="rockbox" - Package Owner=<4>
2# Microsoft Developer Studio Generated Build File, Format Version 6.00
3# ** DO NOT EDIT **
4
5# TARGTYPE "Win32 (x86) Application" 0x0101
6
7CFG=rockbox - Win32 Player
8!MESSAGE This is not a valid makefile. To build this project using NMAKE,
9!MESSAGE use the Export Makefile command and run
10!MESSAGE
11!MESSAGE NMAKE /f "rockbox.mak".
12!MESSAGE
13!MESSAGE You can specify a configuration when running NMAKE
14!MESSAGE by defining the macro CFG on the command line. For example:
15!MESSAGE
16!MESSAGE NMAKE /f "rockbox.mak" CFG="rockbox - Win32 Player"
17!MESSAGE
18!MESSAGE Possible choices for configuration are:
19!MESSAGE
20!MESSAGE "rockbox - Win32 Recorder" (based on "Win32 (x86) Application")
21!MESSAGE "rockbox - Win32 Player" (based on "Win32 (x86) Application")
22!MESSAGE
23
24# Begin Project
25# PROP AllowPerConfigDependencies 0
26# PROP Scc_ProjName ""
27# PROP Scc_LocalPath ""
28CPP=cl.exe
29MTL=midl.exe
30RSC=rc.exe
31
32!IF "$(CFG)" == "rockbox - Win32 Recorder"
33
34# PROP BASE Use_MFC 0
35# PROP BASE Use_Debug_Libraries 1
36# PROP BASE Output_Dir "rockbox___Win32_Recorder"
37# PROP BASE Intermediate_Dir "rockbox___Win32_Recorder"
38# PROP BASE Target_Dir ""
39# PROP Use_MFC 0
40# PROP Use_Debug_Libraries 1
41# PROP Output_Dir "rockbox___Win32_Recorder"
42# PROP Intermediate_Dir "rockbox___Win32_Recorder"
43# PROP Ignore_Export_Lib 0
44# PROP Target_Dir ""
45# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
46# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../win32" /I "../../apps/recorder" /I "../../firmware/export" /I "../../firmware/drivers" /I "../../firmware/common" /I "../common" /I "../../apps" /D "ARCHOS_RECORDER" /D "HAVE_LCD_BITMAP" /D "HAVE_RECORDER_KEYPAD" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "HAVE_CONFIG_H" /D "GETTIMEOFDAY_TWO_ARGS" /D "SIMULATOR" /D "HAVE_RTC" /D APPSVERSION=\"WIN32SIM\" /FR /YX /FD /GZ /c
47# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
48# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
49# ADD BASE RSC /l 0x407 /d "_DEBUG"
50# ADD RSC /l 0x407 /d "_DEBUG"
51BSC32=bscmake.exe
52# ADD BASE BSC32 /nologo
53# ADD BSC32 /nologo
54LINK32=link.exe
55# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
56# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libcmtd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /pdbtype:sept
57
58!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
59
60# PROP BASE Use_MFC 0
61# PROP BASE Use_Debug_Libraries 1
62# PROP BASE Output_Dir "rockbox___Win32_Player"
63# PROP BASE Intermediate_Dir "rockbox___Win32_Player"
64# PROP BASE Target_Dir ""
65# PROP Use_MFC 0
66# PROP Use_Debug_Libraries 1
67# PROP Output_Dir "rockbox___Win32_Player"
68# PROP Intermediate_Dir "rockbox___Win32_Player"
69# PROP Ignore_Export_Lib 0
70# PROP Target_Dir ""
71# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
72# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../win32" /I "../../apps/player" /I "../../firmware/export" /I "../../firmware/drivers" /I "../../firmware/common" /I "../common" /I "../../apps" /D "ARCHOS_PLAYER" /D "HAVE_LCD_CHARCELLS" /D "HAVE_PLAYER_KEYPAD" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "HAVE_CONFIG_H" /D "GETTIMEOFDAY_TWO_ARGS" /D "SIMULATOR" /D APPSVERSION=\"WIN32SIM\" /FR /YX /FD /GZ /c
73# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
74# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
75# ADD BASE RSC /l 0x407 /d "_DEBUG"
76# ADD RSC /l 0x407 /d "_DEBUG"
77BSC32=bscmake.exe
78# ADD BASE BSC32 /nologo
79# ADD BSC32 /nologo
80LINK32=link.exe
81# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
82# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libcmtd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /pdbtype:sept
83
84!ENDIF
85
86# Begin Target
87
88# Name "rockbox - Win32 Recorder"
89# Name "rockbox - Win32 Player"
90# Begin Group "Firmware"
91
92# PROP Default_Filter ""
93# Begin Source File
94
95SOURCE=..\..\firmware\buffer.c
96# End Source File
97# Begin Source File
98
99SOURCE=..\..\firmware\font.c
100
101!IF "$(CFG)" == "rockbox - Win32 Recorder"
102
103!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
104
105# PROP Exclude_From_Build 1
106
107!ENDIF
108
109# End Source File
110# Begin Source File
111
112SOURCE=..\..\firmware\id3.c
113# End Source File
114# Begin Source File
115
116SOURCE=..\..\firmware\mp3_playback.c
117# End Source File
118# Begin Source File
119
120SOURCE=..\..\firmware\mp3data.c
121# End Source File
122# Begin Source File
123
124SOURCE=..\..\firmware\mpeg.c
125# End Source File
126# Begin Source File
127
128SOURCE=..\..\firmware\powermgmt.c
129# End Source File
130# Begin Source File
131
132SOURCE=..\..\firmware\usb.c
133# End Source File
134# End Group
135# Begin Group "Drivers"
136
137# PROP Default_Filter ""
138# Begin Source File
139
140SOURCE="..\..\firmware\drivers\lcd-player-charset.c"
141
142!IF "$(CFG)" == "rockbox - Win32 Recorder"
143
144# PROP Exclude_From_Build 1
145
146!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
147
148!ENDIF
149
150# End Source File
151# Begin Source File
152
153SOURCE="..\..\firmware\drivers\lcd-player.c"
154
155!IF "$(CFG)" == "rockbox - Win32 Recorder"
156
157# PROP Exclude_From_Build 1
158
159!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
160
161!ENDIF
162
163# End Source File
164# Begin Source File
165
166SOURCE="..\common\lcd-playersim.c"
167
168!IF "$(CFG)" == "rockbox - Win32 Recorder"
169
170# PROP Exclude_From_Build 1
171
172!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
173
174!ENDIF
175
176# End Source File
177# Begin Source File
178
179SOURCE="..\..\firmware\drivers\lcd-recorder.c"
180
181!IF "$(CFG)" == "rockbox - Win32 Recorder"
182
183!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
184
185# PROP Exclude_From_Build 1
186
187!ENDIF
188
189# End Source File
190# Begin Source File
191
192SOURCE=..\..\firmware\drivers\power.c
193# End Source File
194# End Group
195# Begin Group "Common"
196
197# PROP Default_Filter ""
198# Begin Source File
199
200SOURCE=..\..\firmware\common\errno.c
201# End Source File
202# Begin Source File
203
204SOURCE=..\..\firmware\common\random.c
205# End Source File
206# Begin Source File
207
208SOURCE=..\..\firmware\common\sprintf.c
209# End Source File
210# Begin Source File
211
212SOURCE=..\..\firmware\common\strtok.c
213# End Source File
214# Begin Source File
215
216SOURCE=..\..\firmware\common\timefuncs.c
217# End Source File
218# End Group
219# Begin Group "Apps"
220
221# PROP Default_Filter ""
222# Begin Group "Player"
223
224# PROP Default_Filter ""
225# Begin Source File
226
227SOURCE=..\..\apps\player\icons.c
228
229!IF "$(CFG)" == "rockbox - Win32 Recorder"
230
231# PROP Exclude_From_Build 1
232
233!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
234
235!ENDIF
236
237# End Source File
238# Begin Source File
239
240SOURCE=..\..\apps\player\icons.h
241
242!IF "$(CFG)" == "rockbox - Win32 Recorder"
243
244# PROP Exclude_From_Build 1
245
246!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
247
248!ENDIF
249
250# End Source File
251# Begin Source File
252
253SOURCE=..\..\apps\player\keyboard.c
254
255!IF "$(CFG)" == "rockbox - Win32 Recorder"
256
257# PROP Exclude_From_Build 1
258
259!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
260
261!ENDIF
262
263# End Source File
264# End Group
265# Begin Group "Recorder"
266
267# PROP Default_Filter ""
268# Begin Source File
269
270SOURCE=..\..\apps\recorder\bmp.c
271
272!IF "$(CFG)" == "rockbox - Win32 Recorder"
273
274!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
275
276# PROP Exclude_From_Build 1
277
278!ENDIF
279
280# End Source File
281# Begin Source File
282
283SOURCE=..\..\apps\recorder\icons.c
284
285!IF "$(CFG)" == "rockbox - Win32 Recorder"
286
287!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
288
289# PROP Exclude_From_Build 1
290
291!ENDIF
292
293# End Source File
294# Begin Source File
295
296SOURCE=..\..\apps\recorder\keyboard.c
297
298!IF "$(CFG)" == "rockbox - Win32 Recorder"
299
300!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
301
302# PROP Exclude_From_Build 1
303
304!ENDIF
305
306# End Source File
307# Begin Source File
308
309SOURCE=..\..\apps\recorder\peakmeter.c
310
311!IF "$(CFG)" == "rockbox - Win32 Recorder"
312
313!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
314
315# PROP Exclude_From_Build 1
316
317!ENDIF
318
319# End Source File
320# Begin Source File
321
322SOURCE=..\..\apps\recorder\widgets.c
323
324!IF "$(CFG)" == "rockbox - Win32 Recorder"
325
326!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
327
328# PROP Exclude_From_Build 1
329
330!ENDIF
331
332# End Source File
333# End Group
334# Begin Source File
335
336SOURCE=..\..\apps\alarm_menu.c
337# End Source File
338# Begin Source File
339
340SOURCE=..\..\apps\bookmark.c
341# End Source File
342# Begin Source File
343
344SOURCE=..\..\apps\credits.c
345# End Source File
346# Begin Source File
347
348SOURCE=..\..\apps\debug_menu.c
349# End Source File
350# Begin Source File
351
352SOURCE=..\..\apps\filetypes.c
353# End Source File
354# Begin Source File
355
356SOURCE=..\..\apps\language.c
357# End Source File
358# Begin Source File
359
360SOURCE=..\..\apps\main.c
361# End Source File
362# Begin Source File
363
364SOURCE=..\..\apps\main_menu.c
365# End Source File
366# Begin Source File
367
368SOURCE=..\..\apps\menu.c
369# End Source File
370# Begin Source File
371
372SOURCE=..\..\apps\misc.c
373# End Source File
374# Begin Source File
375
376SOURCE=..\..\apps\onplay.c
377# End Source File
378# Begin Source File
379
380SOURCE=..\..\apps\playlist.c
381# End Source File
382# Begin Source File
383
384SOURCE=..\..\apps\playlist_menu.c
385# End Source File
386# Begin Source File
387
388SOURCE=..\..\apps\playlist_viewer.c
389# End Source File
390# Begin Source File
391
392SOURCE=..\..\apps\plugin.c
393# End Source File
394# Begin Source File
395
396SOURCE=..\..\apps\screens.c
397# End Source File
398# Begin Source File
399
400SOURCE=..\..\apps\settings.c
401# End Source File
402# Begin Source File
403
404SOURCE=..\..\apps\settings_menu.c
405# End Source File
406# Begin Source File
407
408SOURCE=..\..\apps\sleeptimer.c
409# End Source File
410# Begin Source File
411
412SOURCE=..\..\apps\sound_menu.c
413# End Source File
414# Begin Source File
415
416SOURCE=..\..\apps\status.c
417# End Source File
418# Begin Source File
419
420SOURCE=..\..\apps\tree.c
421# End Source File
422# Begin Source File
423
424SOURCE="..\..\apps\wps-display.c"
425# End Source File
426# Begin Source File
427
428SOURCE=..\..\apps\wps.c
429# End Source File
430# End Group
431# Begin Group "Win32"
432
433# PROP Default_Filter ""
434# Begin Group "AppsCommon"
435
436# PROP Default_Filter ""
437# Begin Source File
438
439SOURCE="..\common\lcd-common.c"
440# End Source File
441# Begin Source File
442
443SOURCE=..\common\mpegplay.c
444# End Source File
445# Begin Source File
446
447SOURCE=..\common\sim_icons.c
448# End Source File
449# Begin Source File
450
451SOURCE=..\common\stubs.c
452# End Source File
453# End Group
454# Begin Source File
455
456SOURCE=.\button.c
457# End Source File
458# Begin Source File
459
460SOURCE=".\debug-win32.c"
461# End Source File
462# Begin Source File
463
464SOURCE=".\dir-win32.c"
465# End Source File
466# Begin Source File
467
468SOURCE="..\common\font-player.c"
469
470!IF "$(CFG)" == "rockbox - Win32 Recorder"
471
472# PROP Exclude_From_Build 1
473
474!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
475
476!ENDIF
477
478# End Source File
479# Begin Source File
480
481SOURCE=..\common\io.c
482# End Source File
483# Begin Source File
484
485SOURCE=.\kernel.c
486# End Source File
487# Begin Source File
488
489SOURCE=.\lang.c
490# End Source File
491# Begin Source File
492
493SOURCE=".\lcd-win32.c"
494# End Source File
495# Begin Source File
496
497SOURCE=".\mpeg-win32.c"
498# End Source File
499# Begin Source File
500
501SOURCE=".\panic-win32.c"
502# End Source File
503# Begin Source File
504
505SOURCE=".\string-win32.c"
506# End Source File
507# Begin Source File
508
509SOURCE=.\sysfont.c
510# End Source File
511# Begin Source File
512
513SOURCE=".\thread-win32.c"
514# End Source File
515# Begin Source File
516
517SOURCE=.\uisw32.c
518# End Source File
519# End Group
520# Begin Group "Resource Files"
521
522# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
523# Begin Source File
524
525SOURCE=.\uisw32.rc
526# End Source File
527# End Group
528# Begin Group "Script inputs"
529
530# PROP Default_Filter ""
531# Begin Source File
532
533SOURCE=..\..\firmware\fonts\clR6x8.bdf
534
535!IF "$(CFG)" == "rockbox - Win32 Recorder"
536
537# Begin Custom Build - Creating font from $(InputPath)
538InputPath=..\..\firmware\fonts\clR6x8.bdf
539
540"sysfont.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
541 ..\..\tools\convbdf -c -o sysfont.c $(InputPath)
542
543# End Custom Build
544
545!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
546
547# Begin Custom Build - Creating font from $(InputPath)
548InputPath=..\..\firmware\fonts\clR6x8.bdf
549
550"sysfont.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
551 ..\..\tools\convbdf -c -o sysfont.c $(InputPath)
552
553# End Custom Build
554
555!ENDIF
556
557# End Source File
558# Begin Source File
559
560SOURCE=..\..\docs\CREDITS
561
562!IF "$(CFG)" == "rockbox - Win32 Recorder"
563
564# PROP Ignore_Default_Tool 1
565# Begin Custom Build - Creating credits from $(InputPath)
566InputPath=..\..\docs\CREDITS
567
568"../../apps/credits.raw" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
569 perl ../../apps/credits.pl < $(InputPath) > ../../apps/credits.raw
570
571# End Custom Build
572
573!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
574
575# PROP Ignore_Default_Tool 1
576# Begin Custom Build - Creating credits from $(InputPath)
577InputPath=..\..\docs\CREDITS
578
579"../../apps/credits.raw" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
580 perl ../../apps/credits.pl < $(InputPath) > ../../apps/credits.raw
581
582# End Custom Build
583
584!ENDIF
585
586# End Source File
587# Begin Source File
588
589SOURCE=..\..\apps\lang\english.lang
590
591!IF "$(CFG)" == "rockbox - Win32 Recorder"
592
593# Begin Custom Build - Creating language files from $(InputPath)
594InputPath=..\..\apps\lang\english.lang
595
596BuildCmds= \
597 perl -s ..\..\tools\genlang -p=lang $(InputPath)
598
599"lang.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
600 $(BuildCmds)
601
602"lang.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
603 $(BuildCmds)
604# End Custom Build
605
606!ELSEIF "$(CFG)" == "rockbox - Win32 Player"
607
608# Begin Custom Build - Creating language files from $(InputPath)
609InputPath=..\..\apps\lang\english.lang
610
611BuildCmds= \
612 perl -s ..\..\tools\genlang -p=lang $(InputPath)
613
614"lang.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
615 $(BuildCmds)
616
617"lang.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
618 $(BuildCmds)
619# End Custom Build
620
621!ENDIF
622
623# End Source File
624# End Group
625# End Target
626# End Project
diff --git a/uisimulator/win32/rockbox.ico b/uisimulator/win32/rockbox.ico
deleted file mode 100644
index 0769e6aec8..0000000000
--- a/uisimulator/win32/rockbox.ico
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/sound.c b/uisimulator/win32/sound.c
deleted file mode 100644
index 54140f59e4..0000000000
--- a/uisimulator/win32/sound.c
+++ /dev/null
@@ -1,201 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2005 by Magnus Holmgren
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include "autoconf.h"
21
22#ifdef ROCKBOX_HAS_SIMSOUND
23
24#define WINDOWS_LEAN_AND_MEAN
25#include <windows.h>
26
27#include <stdio.h>
28#include <stdlib.h>
29#include <stdbool.h>
30
31#include "sound.h"
32#include "kernel.h"
33#include "thread-win32.h"
34#include "debug.h"
35
36static bool playing = false;
37
38void pcm_play_stop(void);
39
40static void sound_play_chunk(HWAVEOUT wave_out, LPWAVEHDR header,
41 HANDLE event)
42{
43 unsigned char* buf;
44 long len;
45
46 if (!(header->dwFlags & WHDR_DONE) || !sound_get_pcm)
47 {
48 return;
49 }
50
51 EnterCriticalSection(&CriticalSection);
52 sound_get_pcm(&buf, &len);
53 LeaveCriticalSection(&CriticalSection);
54
55 if (len == 0)
56 {
57 DEBUGF("simulator got no pcm\n");
58 sound_get_pcm = NULL;
59 return;
60 }
61
62 header->lpData = buf;
63 header->dwBufferLength = len;
64 header->dwBytesRecorded = 0;
65 header->dwUser = 0;
66 header->dwFlags = 0;
67 header->dwLoops = 1;
68 header->lpNext = NULL;
69 header->reserved = 0;
70
71 if (MMSYSERR_NOERROR != waveOutPrepareHeader(wave_out, header,
72 sizeof(*header)))
73 {
74 return;
75 }
76
77 ResetEvent(event);
78
79 waveOutWrite(wave_out, header, sizeof(*header));
80}
81
82static int sound_init(LPHWAVEOUT wave_out, HANDLE event)
83{
84 static const WAVEFORMATEX format =
85 {
86 WAVE_FORMAT_PCM, /* Format */
87 2, /* Number of channels */
88 44100, /* Samples per second */
89 44100 * 4, /* Bytes per second */
90 4, /* Block align */
91 16, /* Bits per sample */
92 0 /* Extra size */
93 };
94
95 if (MMSYSERR_NOERROR != waveOutOpen(wave_out, WAVE_MAPPER, &format,
96 (DWORD_PTR) event, 0, CALLBACK_EVENT))
97 {
98 return -1;
99 }
100
101 /* Full volume on left and right */
102 waveOutSetVolume(*wave_out, 0xffffffff);
103
104 return 0;
105}
106
107void sound_playback_thread(void)
108{
109 /* To get smooth playback, two buffers are needed, which are queued for
110 * playback. (There can still be glitches though.)
111 */
112 HWAVEOUT wave_out;
113 WAVEHDR header1;
114 WAVEHDR header2;
115 HANDLE event;
116 int result = -1;
117
118 if ((event = CreateEvent(NULL, FALSE, FALSE, NULL)))
119 {
120 result = sound_init(&wave_out, event);
121 }
122
123 while(-1 == result || !event)
124 {
125 Sleep(100000); /* Wait forever, can't play sound! */
126 }
127
128 while (true)
129 {
130 while (!sound_get_pcm)
131 {
132 /* TODO: fix a fine thread-synch mechanism here */
133 Sleep(100);
134 }
135
136 DEBUGF("starting simulator playback\n");
137 header1.dwFlags = WHDR_DONE;
138 header2.dwFlags = WHDR_DONE;
139 sound_play_chunk(wave_out, &header1, event);
140 sound_play_chunk(wave_out, &header2, event);
141
142 while (sound_get_pcm
143 && (WAIT_FAILED != WaitForSingleObject(event, 1000)))
144 {
145 sound_play_chunk(wave_out, &header1, event);
146 sound_play_chunk(wave_out, &header2, event);
147 }
148
149 pcm_play_stop();
150
151 DEBUGF("stopping simulator playback\n");
152
153 waveOutReset(wave_out);
154 }
155}
156
157
158/* Stubs for PCM audio playback. */
159bool pcm_is_playing(void)
160{
161 return playing;
162}
163
164void pcm_mute(bool state)
165{
166 (void)state;
167}
168
169void pcm_play_pause(bool state)
170{
171 (void)state;
172}
173
174bool pcm_is_paused(void)
175{
176 return false;
177}
178
179void pcm_play_stop(void)
180{
181 playing = false;
182}
183
184void pcm_init(void)
185{
186}
187
188void (*sound_get_pcm)(unsigned char** start, long* size);
189void pcm_play_data(void (*get_more)(unsigned char** start, long* size))
190{
191 sound_get_pcm = get_more;
192 playing = true;
193}
194
195long pcm_get_bytes_waiting(void)
196{
197 return 0;
198}
199
200
201#endif /* ROCKBOX_HAS_SIMSOUND */
diff --git a/uisimulator/win32/sound.h b/uisimulator/win32/sound.h
deleted file mode 100644
index 87499cac8e..0000000000
--- a/uisimulator/win32/sound.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2005 by Daniel Stenberg <daniel@haxx.se>
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20void sound_playback_thread(void);
21
22extern void (*sound_get_pcm)(unsigned char** start, long* size);
diff --git a/uisimulator/win32/sprintf.h b/uisimulator/win32/sprintf.h
deleted file mode 100644
index 24e1d4e352..0000000000
--- a/uisimulator/win32/sprintf.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef __SPRINTF_H__
21#define __SPRINTF_H__
22
23#include <stddef.h>
24#include <stdarg.h>
25#include <stdio.h>
26
27int snprintf (char *buf, size_t size, const char *fmt, ...);
28char *strtok_r (char *, const char *, char **);
29
30int rockbox_fprintf (int fd, const char *fmt, ...);
31#define fprintf rockbox_fprintf
32
33int rockbox_vsnprintf (char *buf, int size, const char *fmt, va_list ap);
34#define vsnprintf rockbox_vsnprintf
35
36#endif /* __SPRINTF_H__ */
diff --git a/uisimulator/win32/stdbool.h b/uisimulator/win32/stdbool.h
deleted file mode 100644
index d91ef374b9..0000000000
--- a/uisimulator/win32/stdbool.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef __STDBOOL_H__
21#define __STDBOOL_H__ 1
22
23#ifndef __MINGW32__
24typedef unsigned int bool;
25#define __attribute__(s)
26
27#define true 1
28#define false 0
29#else
30
31typedef enum
32{
33 false = 0,
34 true = 1
35} bool;
36
37#define false false
38#define true true
39
40/* Signal that all the definitions are present. */
41#define __bool_true_false_are_defined 1
42
43#endif
44
45#endif /* __STDBOOL_H__ */
46
diff --git a/uisimulator/win32/string-win32.c b/uisimulator/win32/string-win32.c
deleted file mode 100644
index ced1a410ca..0000000000
--- a/uisimulator/win32/string-win32.c
+++ /dev/null
@@ -1,34 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef __MINGW32__
21
22#include <string.h>
23
24int strcasecmp (const char *a, const char *b)
25{
26 return stricmp (a, b);
27}
28
29int strncasecmp (const char *a, const char *b, size_t n)
30{
31 return _strnicmp (a, b, n);
32}
33
34#endif
diff --git a/uisimulator/win32/thread-win32.c b/uisimulator/win32/thread-win32.c
deleted file mode 100644
index 7c33017c7e..0000000000
--- a/uisimulator/win32/thread-win32.c
+++ /dev/null
@@ -1,80 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#define WINDOWS_LEAN_AND_MEAN
21#include <windows.h>
22#include <time.h>
23#include "thread-win32.h"
24#include "kernel.h"
25#include "debug.h"
26
27HANDLE lpThreads[256];
28int nThreads = 0,
29 nPos = 0;
30long current_tick = 0;
31CRITICAL_SECTION CriticalSection;
32
33
34void yield(void)
35{
36 LeaveCriticalSection(&CriticalSection);
37 Sleep(1);
38 EnterCriticalSection(&CriticalSection);
39}
40
41void sim_sleep(int ticks)
42{
43 LeaveCriticalSection(&CriticalSection);
44 Sleep((1000/HZ) * ticks);
45 EnterCriticalSection(&CriticalSection);
46}
47
48DWORD WINAPI runthread (LPVOID lpParameter)
49{
50 EnterCriticalSection(&CriticalSection);
51 ((void(*)())lpParameter) ();
52 LeaveCriticalSection(&CriticalSection);
53 return 0;
54}
55
56int create_thread(void (*fp)(void), void* sp, int stk_size)
57{
58 DWORD dwThreadID;
59
60 (void)sp;
61 (void)stk_size;
62
63 if (nThreads == 256)
64 return -1;
65
66 lpThreads[nThreads++] = CreateThread (NULL,
67 0,
68 runthread,
69 fp,
70 0,
71 &dwThreadID);
72
73 return 0;
74}
75
76void init_threads(void)
77{
78 InitializeCriticalSection(&CriticalSection);
79 EnterCriticalSection(&CriticalSection);
80}
diff --git a/uisimulator/win32/thread-win32.h b/uisimulator/win32/thread-win32.h
deleted file mode 100644
index 467c47ee39..0000000000
--- a/uisimulator/win32/thread-win32.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20extern HANDLE lpThreads[256];
21extern int nPos,
22 nThreads;
23extern CRITICAL_SECTION CriticalSection;
diff --git a/uisimulator/win32/timefuncs.h b/uisimulator/win32/timefuncs.h
deleted file mode 100644
index 8fbc5b1c85..0000000000
--- a/uisimulator/win32/timefuncs.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#include <stdio.h>
2#include <time.h>
3#include <stdbool.h>
4
5/* struct tm defined */
6struct tm *get_time(void);
7int set_time(const struct tm *tm);
8bool valid_time(const struct tm *tm);
diff --git a/uisimulator/win32/uisw32.c b/uisimulator/win32/uisw32.c
deleted file mode 100644
index 1b4dbbd410..0000000000
--- a/uisimulator/win32/uisw32.c
+++ /dev/null
@@ -1,344 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <windows.h>
21#include <process.h>
22#include <stdlib.h>
23#include <fcntl.h>
24#include "autoconf.h"
25#include "uisw32.h"
26#include "resource.h"
27#include "button.h"
28#include "thread.h"
29#include "thread-win32.h"
30#include "kernel.h"
31#include "sound.h"
32
33#ifndef LR_VGACOLOR /* Should be under MINGW32 builds? */
34#define LR_VGACOLOR LR_COLOR
35#endif
36
37// extern functions
38extern void app_main (void *); // mod entry point
39extern void new_key(int key);
40extern void sim_tick_tasks(void);
41
42void button_event(int key, bool pressed);
43
44// variables
45HWND hGUIWnd; // the GUI window handle
46unsigned int uThreadID; // id of mod thread
47PBYTE lpKeys;
48bool bActive; // window active?
49HANDLE hGUIThread; // thread for GUI
50#ifdef ROCKBOX_HAS_SIMSOUND
51HANDLE hSoundThread; // thread for sound
52#endif
53bool bIsWinNT; // Windows NT derivate?
54
55bool lcd_display_redraw=true; // Used for player simulator
56char having_new_lcd=true; // Used for player simulator
57
58// GUIWndProc
59// window proc for GUI simulator
60LRESULT CALLBACK GUIWndProc (
61 HWND hWnd,
62 UINT uMsg,
63 WPARAM wParam,
64 LPARAM lParam
65 )
66{
67 static HBITMAP hBkgnd;
68 static HDC hMemDc;
69
70 static LARGE_INTEGER persec, tick1, ticknow;
71 long new_tick;
72
73 switch (uMsg)
74 {
75 case WM_TIMER:
76 QueryPerformanceCounter(&ticknow);
77 new_tick = ((ticknow.QuadPart-tick1.QuadPart)*HZ)/persec.QuadPart;
78 if (new_tick != current_tick)
79 {
80 long i;
81 for (i = new_tick - current_tick; i > 0; i--)
82 sim_tick_tasks();
83 current_tick = new_tick;
84 }
85 return TRUE;
86 case WM_ACTIVATE:
87 if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE)
88 bActive = true;
89 else
90 bActive = false;
91 return TRUE;
92 case WM_CREATE:
93 QueryPerformanceFrequency(&persec);
94 QueryPerformanceCounter(&tick1);
95 SetTimer (hWnd, TIMER_EVENT, 1, NULL);
96
97 // load background image
98 hBkgnd = (HBITMAP)LoadImage (GetModuleHandle (NULL),
99 MAKEINTRESOURCE(IDB_UI), IMAGE_BITMAP, 0, 0, LR_VGACOLOR);
100 hMemDc = CreateCompatibleDC (GetDC (hWnd));
101 SelectObject (hMemDc, hBkgnd);
102 return TRUE;
103 case WM_SIZING:
104 {
105 LPRECT r = (LPRECT)lParam;
106 char s[256];
107 int v;
108 int h_add = GetSystemMetrics (SM_CXSIZEFRAME) * 2 + 4;
109 int v_add = GetSystemMetrics (SM_CYSIZEFRAME) * 2
110 + GetSystemMetrics (SM_CYCAPTION) + 4;
111
112 switch (wParam)
113 {
114 case WMSZ_BOTTOM:
115 v = (r->bottom - r->top) / (UI_HEIGHT / 5);
116 r->bottom = r->top + v * UI_HEIGHT / 5 + v_add;
117 r->right = r->left + v * UI_WIDTH / 5 + h_add;
118 break;
119 case WMSZ_RIGHT:
120 v = (r->right - r->left) / (UI_WIDTH / 5);
121 r->bottom = r->top + v * UI_HEIGHT / 5 + v_add;
122 r->right = r->left + v * UI_WIDTH / 5 + h_add;
123 break;
124 case WMSZ_TOP:
125 v = (r->bottom - r->top) / (UI_HEIGHT / 5);
126 r->top = r->bottom - v * UI_HEIGHT / 5 - v_add;
127 r->right = r->left + v * UI_WIDTH / 5 + h_add;
128 break;
129 case WMSZ_LEFT:
130 v = (r->right - r->left) / (UI_WIDTH / 5);
131 r->bottom = r->top + v * UI_HEIGHT / 5 + v_add;
132 r->left = r->right - v * UI_WIDTH / 5 - h_add;
133 break;
134 case WMSZ_BOTTOMRIGHT:
135 v = ((r->right - r->left) * UI_HEIGHT
136 +(r->bottom - r->top) * UI_WIDTH)
137 / (2 * UI_WIDTH * UI_HEIGHT / 5);
138 r->bottom = r->top + v * UI_HEIGHT / 5 + v_add;
139 r->right = r->left + v * UI_WIDTH / 5 + h_add;
140 break;
141 case WMSZ_BOTTOMLEFT:
142 v = ((r->right - r->left) * UI_HEIGHT
143 +(r->bottom - r->top) * UI_WIDTH)
144 / (2 * UI_WIDTH * UI_HEIGHT / 5);
145 r->bottom = r->top + v * UI_HEIGHT / 5 + v_add;
146 r->left = r->right - v * UI_WIDTH / 5 - h_add;
147 break;
148 case WMSZ_TOPRIGHT:
149 v = ((r->right - r->left) * UI_HEIGHT
150 +(r->bottom - r->top) * UI_WIDTH)
151 / (2 * UI_WIDTH * UI_HEIGHT / 5);
152 r->top = r->bottom - v * UI_HEIGHT / 5 - v_add;
153 r->right = r->left + v * UI_WIDTH / 5 + h_add;
154 break;
155 case WMSZ_TOPLEFT:
156 v = ((r->right - r->left) * UI_HEIGHT
157 +(r->bottom - r->top) * UI_WIDTH)
158 / (2 * UI_WIDTH * UI_HEIGHT / 5);
159 r->top = r->bottom - v * UI_HEIGHT / 5 - v_add;
160 r->left = r->right - v * UI_WIDTH / 5 - h_add;
161 break;
162 }
163
164 wsprintf (s, UI_TITLE " @%d%%",
165 (r->right - r->left - h_add + 1) * 100 / UI_WIDTH);
166 SetWindowText (hWnd, s);
167
168 return TRUE;
169 }
170 case WM_ERASEBKGND:
171 {
172 HDC hDc = (HDC) wParam;
173 RECT r;
174
175 GetClientRect (hWnd, &r);
176 // blit background image to screen
177 SetStretchBltMode(hDc, bIsWinNT ? HALFTONE : COLORONCOLOR);
178 StretchBlt (hDc, 0, 0, r.right, r.bottom,
179 hMemDc, 0, 0, UI_WIDTH, UI_HEIGHT, SRCCOPY);
180 return TRUE;
181 }
182 case WM_PAINT:
183 {
184 PAINTSTRUCT ps;
185 RECT r;
186 HDC hDc = BeginPaint (hWnd, &ps);
187
188 GetClientRect (hWnd, &r);
189 // draw lcd screen
190 SetStretchBltMode(hDc, bIsWinNT ? HALFTONE : COLORONCOLOR);
191 StretchDIBits (hDc,
192 UI_LCD_POSX * r.right / UI_WIDTH,
193 UI_LCD_POSY * r.bottom / UI_HEIGHT,
194 UI_LCD_WIDTH * r.right / UI_WIDTH,
195 UI_LCD_HEIGHT * r.bottom / UI_HEIGHT,
196 0, 0, LCD_WIDTH, LCD_HEIGHT,
197 bitmap, (BITMAPINFO *) &bmi, DIB_RGB_COLORS,
198 SRCCOPY);
199#ifdef HAVE_REMOTE_LCD
200 StretchDIBits (hDc,
201 UI_REMOTE_POSX * r.right / UI_WIDTH,
202 UI_REMOTE_POSY * r.bottom / UI_HEIGHT,
203 UI_REMOTE_WIDTH * r.right / UI_WIDTH,
204 UI_REMOTE_HEIGHT * r.bottom / UI_HEIGHT,
205 0, 0, LCD_REMOTE_WIDTH, LCD_REMOTE_HEIGHT,
206 remote_bitmap, (BITMAPINFO *) &remote_bmi,
207 DIB_RGB_COLORS, SRCCOPY);
208#endif
209 EndPaint (hWnd, &ps);
210 return TRUE;
211 }
212 case WM_CLOSE:
213 // close simulator
214 KillTimer (hWnd, TIMER_EVENT);
215 hGUIWnd = NULL;
216 PostQuitMessage (0);
217 break;
218 case WM_DESTROY:
219 // close simulator
220 hGUIWnd = NULL;
221 PostQuitMessage (0);
222 break;
223 case WM_KEYDOWN:
224 button_event(wParam, true);
225 break;
226 case WM_KEYUP:
227 button_event(wParam, false);
228 break;
229 }
230
231 return DefWindowProc (hWnd, uMsg, wParam, lParam);
232}
233
234// GUIStartup
235// register window class, show window, init GUI
236BOOL GUIStartup ()
237{
238 WNDCLASS wc;
239
240 // create window class
241 ZeroMemory (&wc, sizeof(wc));
242 wc.hbrBackground = GetSysColorBrush (COLOR_WINDOW);
243 wc.hCursor = LoadCursor (NULL, IDC_ARROW);
244 wc.hInstance = GetModuleHandle (NULL);
245 wc.lpfnWndProc = GUIWndProc;
246 wc.lpszClassName = "RockBoxUISimulator";
247 wc.style = CS_HREDRAW | CS_VREDRAW;
248
249 if (RegisterClass (&wc) == 0)
250 return FALSE;
251
252 // create window
253 hGUIWnd = CreateWindowEx (
254 WS_EX_OVERLAPPEDWINDOW,
255 "RockBoxUISimulator", UI_TITLE,
256 WS_VISIBLE | WS_SYSMENU | WS_OVERLAPPEDWINDOW,
257 CW_USEDEFAULT, CW_USEDEFAULT,
258 UI_WIDTH + GetSystemMetrics (SM_CXSIZEFRAME) * 2 +4,
259 UI_HEIGHT + GetSystemMetrics (SM_CYSIZEFRAME) * 2 +
260 GetSystemMetrics (SM_CYCAPTION) +4,
261 NULL, NULL, GetModuleHandle (NULL), NULL);
262
263 if (hGUIWnd == NULL)
264 return FALSE;
265
266 simlcdinit();
267
268 return TRUE;
269}
270
271// GUIDown
272// destroy window, unregister window class
273int GUIDown ()
274{
275 int i;
276
277 DestroyWindow (hGUIWnd);
278 CloseHandle (hGUIThread);
279#ifdef ROCKBOX_HAS_SIMSOUND
280 CloseHandle (hSoundThread);
281#endif
282
283 for (i = 0; i < nThreads; i++)
284 {
285 CloseHandle (lpThreads[i]);
286 }
287 return 0;
288}
289
290// GUIMessageLoop
291// standard message loop for GUI window
292void GUIMessageLoop ()
293{
294 MSG msg;
295 while (GetMessage (&msg, NULL, 0, 0))
296 {
297 TranslateMessage (&msg);
298 DispatchMessage (&msg);
299 }
300}
301
302
303// WinMain
304// program entry point
305int WINAPI WinMain (
306 HINSTANCE hInstance, // current instance
307 HINSTANCE hPrevInstance, // previous instance
308 LPSTR lpCmd, // command line
309 int nShowCmd // show command
310 )
311{
312 DWORD dwThreadID;
313
314 (void)hInstance;
315 (void)hPrevInstance;
316 (void)lpCmd;
317 (void)nShowCmd;
318
319 /* default file mode should be O_BINARY to be consistent with rockbox */
320 _fmode = _O_BINARY;
321
322 bIsWinNT = ((GetVersion() & 0x80000000) == 0);
323
324 if (!GUIStartup ())
325 return 0;
326
327 hGUIThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)app_main,
328 NULL, 0, &dwThreadID);
329
330 if (hGUIThread == NULL)
331 return MessageBox (NULL, "Error creating gui thread!", "Error", MB_OK);
332
333#ifdef ROCKBOX_HAS_SIMSOUND
334 hSoundThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)
335 sound_playback_thread, NULL, 0, &dwThreadID);
336
337 if (hSoundThread == NULL)
338 MessageBox (NULL, "Error creating sound thread!", "Warning", MB_OK);
339#endif
340
341 GUIMessageLoop ();
342
343 return GUIDown ();
344}
diff --git a/uisimulator/win32/uisw32.h b/uisimulator/win32/uisw32.h
deleted file mode 100644
index 22a9015196..0000000000
--- a/uisimulator/win32/uisw32.h
+++ /dev/null
@@ -1,168 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef __UISW32_H__
21#define __UISW32_H__
22
23#ifdef _MSC_VER
24typedef unsigned short wchar_t;
25#define _WCHAR_T_DEFINED
26#endif
27#include <windows.h>
28#include "lcd-win32.h"
29
30#if defined(ARCHOS_RECORDER)
31#define UI_TITLE "Jukebox Recorder"
32#define UI_WIDTH 270 // width of GUI window
33#define UI_HEIGHT 406 // height of GUI window
34#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight)
35#define UI_LCD_BGCOLORLIGHT 126, 229, 126 // bkgnd color of LCD (backlight)
36#define UI_LCD_BLACK 0, 0, 0 // black
37#define UI_LCD_POSX 80 // x position of lcd
38#define UI_LCD_POSY 104 // y position of lcd (96 for real aspect)
39#define UI_LCD_WIDTH 112
40#define UI_LCD_HEIGHT 64 // (80 for real aspect)
41
42#elif defined(ARCHOS_PLAYER)
43#define UI_TITLE "Jukebox Player"
44#define UI_WIDTH 284 // width of GUI window
45#define UI_HEIGHT 420 // height of GUI window
46#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight)
47#define UI_LCD_BGCOLORLIGHT 126, 229, 126 // bkgnd color of LCD (backlight)
48#define UI_LCD_BLACK 0, 0, 0 // black
49#define UI_LCD_POSX 75 // x position of lcd
50#define UI_LCD_POSY 116 // y position of lcd
51#define UI_LCD_WIDTH 132
52#define UI_LCD_HEIGHT 64
53
54#elif defined(ARCHOS_FMRECORDER) || defined(ARCHOS_RECORDERV2)
55#define UI_TITLE "Jukebox FM Recorder"
56#define UI_WIDTH 285 // width of GUI window
57#define UI_HEIGHT 414 // height of GUI window
58#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight)
59#define UI_LCD_BGCOLORLIGHT 126, 229, 126 // bkgnd color of LCD (backlight)
60#define UI_LCD_BLACK 0, 0, 0 // black
61#define UI_LCD_POSX 87 // x position of lcd
62#define UI_LCD_POSY 77 // y position of lcd (69 for real aspect)
63#define UI_LCD_WIDTH 112
64#define UI_LCD_HEIGHT 64 // (80 for real aspect)
65
66#elif defined(ARCHOS_ONDIOSP) || defined(ARCHOS_ONDIOFM)
67#define UI_TITLE "Ondio"
68#define UI_WIDTH 155 // width of GUI window
69#define UI_HEIGHT 334 // height of GUI window
70#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight)
71#define UI_LCD_BGCOLORLIGHT 90, 145, 90 // bkgnd color of LCD (backlight)
72#define UI_LCD_BLACK 0, 0, 0 // black
73#define UI_LCD_POSX 21 // x position of lcd
74#define UI_LCD_POSY 82 // y position of lcd (74 for real aspect)
75#define UI_LCD_WIDTH 112
76#define UI_LCD_HEIGHT 64 // (80 for real aspect)
77
78#elif defined(IRIVER_H100_SERIES)
79#define UI_TITLE "iriver H1x0"
80#define UI_WIDTH 379 // width of GUI window
81#define UI_HEIGHT 508 // height of GUI window
82#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight)
83#define UI_LCD_BGCOLORLIGHT 230, 216, 173 // bkgnd color of LCD (backlight)
84#define UI_LCD_BLACK 0, 0, 0 // black
85#define UI_LCD_POSX 109 // x position of lcd
86#define UI_LCD_POSY 23 // y position of lcd
87#define UI_LCD_WIDTH 160
88#define UI_LCD_HEIGHT 128
89#define UI_REMOTE_BGCOLOR 90, 145, 90 // bkgnd of remote lcd (no bklight)
90#define UI_REMOTE_BGCOLORLIGHT 250, 180, 130 // bkgnd of remote lcd (bklight)
91#define UI_REMOTE_POSX 50 // x position of remote lcd
92#define UI_REMOTE_POSY 403 // y position of remote lcd
93#define UI_REMOTE_WIDTH 128
94#define UI_REMOTE_HEIGHT 64
95
96#elif defined(IRIVER_H300_SERIES)
97#define UI_TITLE "iriver H300"
98#define UI_WIDTH 288 // width of GUI window
99#define UI_HEIGHT 581 // height of GUI window
100/* high-colour */
101#define UI_LCD_POSX 26 // x position of lcd
102#define UI_LCD_POSY 36 // y position of lcd
103#define UI_LCD_WIDTH 220
104#define UI_LCD_HEIGHT 176
105#define UI_REMOTE_BGCOLOR 90, 145, 90 // bkgnd of remote lcd (no bklight)
106#define UI_REMOTE_BGCOLORLIGHT 250, 180, 130 // bkgnd of remote lcd (bklight)
107#define UI_REMOTE_POSX 12 // x position of remote lcd
108#define UI_REMOTE_POSY 478 // y position of remote lcd
109#define UI_REMOTE_WIDTH 128
110#define UI_REMOTE_HEIGHT 64
111
112#elif defined(IPOD_4G)
113#define UI_TITLE "iPod 4G"
114#define UI_WIDTH 196 // width of GUI window
115#define UI_HEIGHT 370 // height of GUI window
116#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight)
117#define UI_LCD_BGCOLORLIGHT 173, 216, 230 // bkgnd color of LCD (backlight)
118#define UI_LCD_BLACK 0, 0, 0 // black
119#define UI_LCD_POSX 19 // x position of lcd
120#define UI_LCD_POSY 14 // y position of lcd
121#define UI_LCD_WIDTH 160
122#define UI_LCD_HEIGHT 128
123
124#elif defined(IPOD_COLOR)
125#define UI_TITLE "iPod Color"
126#define UI_WIDTH 261 // width of GUI window
127#define UI_HEIGHT 493 // height of GUI window
128/* high-colour */
129#define UI_LCD_POSX 21 // x position of lcd
130#define UI_LCD_POSY 16 // y position of lcd
131#define UI_LCD_WIDTH 220
132#define UI_LCD_HEIGHT 176
133
134#elif defined(IPOD_NANO)
135#define UI_TITLE "iPod Nano"
136#define UI_WIDTH 199 // width of GUI window
137#define UI_HEIGHT 421 // height of GUI window
138/* high-colour */
139#define UI_LCD_POSX 13 // x position of lcd
140#define UI_LCD_POSY 14 // y position of lcd
141#define UI_LCD_WIDTH 176
142#define UI_LCD_HEIGHT 132
143
144#elif defined(ARCHOS_GMINI120)
145#define UI_TITLE "Gmini 120"
146#define UI_WIDTH 370 // width of GUI window
147#define UI_HEIGHT 264 // height of GUI window
148#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight)
149#define UI_LCD_BGCOLORLIGHT 230, 160, 60 // bkgnd color of LCD (backlight)
150#define UI_LCD_BLACK 0, 0, 0 // black
151#define UI_LCD_POSX 85 // x position of lcd
152#define UI_LCD_POSY 61 // y position of lcd (74 for real aspect)
153#define UI_LCD_WIDTH 192 // * 1.5
154#define UI_LCD_HEIGHT 96 // * 1.5
155
156#endif
157
158#define TIMER_EVENT 0x34928340
159
160extern HWND hGUIWnd; // the GUI window handle
161extern unsigned int uThreadID; // id of mod thread
162extern bool bActive;
163
164// typedefs
165typedef unsigned char uchar;
166typedef unsigned int uint32;
167
168#endif // #ifndef __UISW32_H__
diff --git a/uisimulator/win32/uisw32.rc b/uisimulator/win32/uisw32.rc
deleted file mode 100644
index 379b76ecb1..0000000000
--- a/uisimulator/win32/uisw32.rc
+++ /dev/null
@@ -1,76 +0,0 @@
1// Microsoft Visual C++ generated resource script.
2//
3#include "resource.h"
4
5#define APSTUDIO_READONLY_SYMBOLS
6/////////////////////////////////////////////////////////////////////////////
7//
8// Generated from the TEXTINCLUDE 2 resource.
9//
10
11#ifndef __MINGW32__
12 #include "afxres.h"
13#endif
14
15/////////////////////////////////////////////////////////////////////////////
16#undef APSTUDIO_READONLY_SYMBOLS
17
18/////////////////////////////////////////////////////////////////////////////
19// English (U.S.) resources
20
21#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
22#ifdef _WIN32
23#ifndef __MINGW32__
24LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
25#endif
26#pragma code_page(1252)
27#endif //_WIN32
28
29#ifdef APSTUDIO_INVOKED
30/////////////////////////////////////////////////////////////////////////////
31//
32// TEXTINCLUDE
33//
34
351 TEXTINCLUDE
36BEGIN
37 "resource.h\0"
38END
39
402 TEXTINCLUDE
41BEGIN
42 "#include ""afxres.h""\r\n"
43 "\0"
44END
45
463 TEXTINCLUDE
47BEGIN
48 "\r\n"
49 "\0"
50END
51
52#endif // APSTUDIO_INVOKED
53
54
55/////////////////////////////////////////////////////////////////////////////
56//
57// Bitmap
58//
59
60IDB_UI BITMAP "UI256.bmp"
61IDI_ICON1 ICON DISCARDABLE "rockbox.ico"
62#endif // English (U.S.) resources
63/////////////////////////////////////////////////////////////////////////////
64
65
66
67#ifndef APSTUDIO_INVOKED
68/////////////////////////////////////////////////////////////////////////////
69//
70// Generated from the TEXTINCLUDE 3 resource.
71//
72
73
74/////////////////////////////////////////////////////////////////////////////
75#endif // not APSTUDIO_INVOKED
76
diff --git a/uisimulator/win32/uisw32.sln b/uisimulator/win32/uisw32.sln
deleted file mode 100644
index ada5e11e7c..0000000000
--- a/uisimulator/win32/uisw32.sln
+++ /dev/null
@@ -1,21 +0,0 @@
1Microsoft Visual Studio Solution File, Format Version 7.00
2Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uisw32", "uisw32.vcproj", "{A81A8EFA-647A-427A-BD04-F6B469752E7A}"
3EndProject
4Global
5 GlobalSection(SolutionConfiguration) = preSolution
6 ConfigName.0 = Debug
7 ConfigName.1 = Release
8 EndGlobalSection
9 GlobalSection(ProjectDependencies) = postSolution
10 EndGlobalSection
11 GlobalSection(ProjectConfiguration) = postSolution
12 {A81A8EFA-647A-427A-BD04-F6B469752E7A}.Debug.ActiveCfg = Debug|Win32
13 {A81A8EFA-647A-427A-BD04-F6B469752E7A}.Debug.Build.0 = Debug|Win32
14 {A81A8EFA-647A-427A-BD04-F6B469752E7A}.Release.ActiveCfg = Release|Win32
15 {A81A8EFA-647A-427A-BD04-F6B469752E7A}.Release.Build.0 = Release|Win32
16 EndGlobalSection
17 GlobalSection(ExtensibilityGlobals) = postSolution
18 EndGlobalSection
19 GlobalSection(ExtensibilityAddIns) = postSolution
20 EndGlobalSection
21EndGlobal
diff --git a/uisimulator/win32/uisw32.suo b/uisimulator/win32/uisw32.suo
deleted file mode 100644
index be68cf93f9..0000000000
--- a/uisimulator/win32/uisw32.suo
+++ /dev/null
Binary files differ
diff --git a/uisimulator/win32/uisw32.vcproj b/uisimulator/win32/uisw32.vcproj
deleted file mode 100644
index 449bb19adf..0000000000
--- a/uisimulator/win32/uisw32.vcproj
+++ /dev/null
@@ -1,280 +0,0 @@
1<?xml version="1.0" encoding = "Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="7.00"
5 Name="uisw32"
6 ProjectGUID="{A81A8EFA-647A-427A-BD04-F6B469752E7A}"
7 Keyword="Win32Proj">
8 <Platforms>
9 <Platform
10 Name="Win32"/>
11 </Platforms>
12 <Configurations>
13 <Configuration
14 Name="Debug|Win32"
15 OutputDirectory="Debug"
16 IntermediateDirectory="Debug"
17 ConfigurationType="1"
18 CharacterSet="2">
19 <Tool
20 Name="VCCLCompilerTool"
21 Optimization="0"
22 AdditionalIncludeDirectories="&quot;..\..\apps\recorder&quot;;&quot;..\..\apps&quot;;&quot;..\..\firmware&quot;;&quot;..\win32&quot;;&quot;..\..\firmware\drivers&quot;;&quot;..\..\firmware\common&quot;"
23 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_RECORDER_KEYPAD;HAVE_LCD_BITMAP;SIMULATOR;SIMULATOR;LCD_PROPFONTS;"
24 MinimalRebuild="TRUE"
25 BasicRuntimeChecks="3"
26 RuntimeLibrary="1"
27 UsePrecompiledHeader="0"
28 WarningLevel="3"
29 Detect64BitPortabilityProblems="FALSE"
30 DebugInformationFormat="4"
31 CompileAs="1"/>
32 <Tool
33 Name="VCCustomBuildTool"/>
34 <Tool
35 Name="VCLinkerTool"
36 OutputFile="$(OutDir)/uisw32.exe"
37 LinkIncremental="2"
38 GenerateDebugInformation="TRUE"
39 ProgramDatabaseFile="$(OutDir)/uisw32.pdb"
40 SubSystem="2"
41 TargetMachine="1"/>
42 <Tool
43 Name="VCMIDLTool"/>
44 <Tool
45 Name="VCPostBuildEventTool"/>
46 <Tool
47 Name="VCPreBuildEventTool"/>
48 <Tool
49 Name="VCPreLinkEventTool"/>
50 <Tool
51 Name="VCResourceCompilerTool"/>
52 <Tool
53 Name="VCWebServiceProxyGeneratorTool"/>
54 <Tool
55 Name="VCWebDeploymentTool"/>
56 </Configuration>
57 <Configuration
58 Name="Release|Win32"
59 OutputDirectory="Release"
60 IntermediateDirectory="Release"
61 ConfigurationType="1"
62 CharacterSet="2">
63 <Tool
64 Name="VCCLCompilerTool"
65 Optimization="2"
66 InlineFunctionExpansion="1"
67 OmitFramePointers="TRUE"
68 AdditionalIncludeDirectories="&quot;..\..\firmware\drivers&quot;;&quot;..\..\firmware&quot;;&quot;..\..\firmware\common&quot;"
69 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;ARCHOS_RECORDER;SIMULATOR;WIN32"
70 StringPooling="TRUE"
71 RuntimeLibrary="0"
72 EnableFunctionLevelLinking="TRUE"
73 UsePrecompiledHeader="0"
74 WarningLevel="3"
75 Detect64BitPortabilityProblems="FALSE"
76 DebugInformationFormat="3"
77 CompileAs="1"/>
78 <Tool
79 Name="VCCustomBuildTool"/>
80 <Tool
81 Name="VCLinkerTool"
82 OutputFile="$(OutDir)/uisw32.exe"
83 LinkIncremental="1"
84 GenerateDebugInformation="TRUE"
85 SubSystem="2"
86 OptimizeReferences="2"
87 EnableCOMDATFolding="2"
88 TargetMachine="1"/>
89 <Tool
90 Name="VCMIDLTool"/>
91 <Tool
92 Name="VCPostBuildEventTool"/>
93 <Tool
94 Name="VCPreBuildEventTool"/>
95 <Tool
96 Name="VCPreLinkEventTool"/>
97 <Tool
98 Name="VCResourceCompilerTool"/>
99 <Tool
100 Name="VCWebServiceProxyGeneratorTool"/>
101 <Tool
102 Name="VCWebDeploymentTool"/>
103 </Configuration>
104 </Configurations>
105 <Files>
106 <Filter
107 Name="Source Files"
108 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
109 <File
110 RelativePath="backlight-win32.c">
111 </File>
112 <File
113 RelativePath="..\..\apps\recorder\bmp.c">
114 </File>
115 <File
116 RelativePath="..\..\apps\recorder\bounce.c">
117 </File>
118 <File
119 RelativePath="..\..\apps\recorder\boxes.c">
120 </File>
121 <File
122 RelativePath="button.c">
123 </File>
124 <File
125 RelativePath="..\..\firmware\chartables.c">
126 </File>
127 <File
128 RelativePath="..\..\apps\credits.c">
129 </File>
130 <File
131 RelativePath="debug-win32.c">
132 </File>
133 <File
134 RelativePath="dir-win32.c">
135 </File>
136 <File
137 RelativePath="..\..\apps\games_menu.c">
138 </File>
139 <File
140 RelativePath="..\..\apps\recorder\icons.c">
141 </File>
142 <File
143 RelativePath="..\..\firmware\id3.c">
144 </File>
145 <File
146 RelativePath="kernel.c">
147 </File>
148 <File
149 RelativePath="lcd-win32.c">
150 </File>
151 <File
152 RelativePath="..\..\firmware\drivers\lcd.c">
153 </File>
154 <File
155 RelativePath="..\..\apps\main.c">
156 </File>
157 <File
158 RelativePath="..\..\apps\main_menu.c">
159 </File>
160 <File
161 RelativePath="..\..\apps\menu.c">
162 <FileConfiguration
163 Name="Debug|Win32">
164 <Tool
165 Name="VCCLCompilerTool"
166 ObjectFile="$(IntDir)/$(InputName)1.obj"/>
167 </FileConfiguration>
168 <FileConfiguration
169 Name="Release|Win32">
170 <Tool
171 Name="VCCLCompilerTool"
172 ObjectFile="$(IntDir)/$(InputName)1.obj"/>
173 </FileConfiguration>
174 </File>
175 <File
176 RelativePath="mpeg.c">
177 </File>
178 <File
179 RelativePath="panic-win32.c">
180 </File>
181 <File
182 RelativePath="..\..\apps\playlist.c">
183 </File>
184 <File
185 RelativePath="..\..\apps\screensavers_menu.c">
186 </File>
187 <File
188 RelativePath="..\..\apps\settings.c">
189 <FileConfiguration
190 Name="Debug|Win32">
191 <Tool
192 Name="VCCLCompilerTool"
193 ObjectFile="$(IntDir)/$(InputName)1.obj"/>
194 </FileConfiguration>
195 <FileConfiguration
196 Name="Release|Win32">
197 <Tool
198 Name="VCCLCompilerTool"
199 ObjectFile="$(IntDir)/$(InputName)1.obj"/>
200 </FileConfiguration>
201 </File>
202 <File
203 RelativePath="..\..\apps\settings_menu.c">
204 </File>
205 <File
206 RelativePath="..\..\apps\recorder\sokoban.c">
207 </File>
208 <File
209 RelativePath="..\..\apps\sound_menu.c">
210 </File>
211 <File
212 RelativePath="..\..\firmware\common\sprintf.c">
213 </File>
214 <File
215 RelativePath="string-win32.c">
216 </File>
217 <File
218 RelativePath="..\..\firmware\common\strtok.c">
219 </File>
220 <File
221 RelativePath="..\..\apps\recorder\tetris.c">
222 </File>
223 <File
224 RelativePath="thread-win32.c">
225 </File>
226 <File
227 RelativePath="..\..\apps\tree.c">
228 </File>
229 <File
230 RelativePath="uisw32.c">
231 </File>
232 <File
233 RelativePath="..\..\apps\wps.c">
234 </File>
235 </Filter>
236 <Filter
237 Name="Header Files"
238 Filter="h;hpp;hxx;hm;inl;inc">
239 <File
240 RelativePath="dir-win32.h">
241 </File>
242 <File
243 RelativePath="..\x11\dir.h">
244 </File>
245 <File
246 RelativePath="lcd-win32.h">
247 </File>
248 <File
249 RelativePath="..\play.h">
250 </File>
251 <File
252 RelativePath="resource.h">
253 </File>
254 <File
255 RelativePath="..\screensaver.h">
256 </File>
257 <File
258 RelativePath="thread-win32.h">
259 </File>
260 <File
261 RelativePath="..\tree.h">
262 </File>
263 <File
264 RelativePath="uisw32.h">
265 </File>
266 </Filter>
267 <Filter
268 Name="Resource Files"
269 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
270 <File
271 RelativePath="UI256.bmp">
272 </File>
273 <File
274 RelativePath="uisw32.rc">
275 </File>
276 </Filter>
277 </Files>
278 <Globals>
279 </Globals>
280</VisualStudioProject>