summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--www/codes_new.pngbin0 -> 2300 bytes
-rw-r--r--www/codes_old.pngbin0 -> 2460 bytes
-rw-r--r--www/docs/Makefile9
-rw-r--r--www/docs/index.t36
-rw-r--r--www/example/Makefile40
-rw-r--r--www/example/README7
-rw-r--r--www/example/app.lds23
-rw-r--r--www/example/main.c102
-rw-r--r--www/example/start.s23
-rwxr-xr-xwww/index.cgi41
-rw-r--r--www/rockbox100.pngbin0 -> 4908 bytes
-rw-r--r--www/rockbox400.pngbin0 -> 12261 bytes
-rw-r--r--www/schematics/6k_schematic.pdfbin0 -> 42784 bytes
-rw-r--r--www/schematics/Makefile9
-rw-r--r--www/schematics/PCB_composite_print.pdfbin0 -> 45180 bytes
-rw-r--r--www/schematics/PCB_final_print.pdfbin0 -> 48622 bytes
-rw-r--r--www/schematics/index.t13
-rw-r--r--www/schematics/rec_interface.pdfbin0 -> 30626 bytes
-rw-r--r--www/schematics/rec_main.pdfbin0 -> 91899 bytes
-rw-r--r--www/schematics/remoclone_schem.pdfbin0 -> 9712 bytes
-rw-r--r--www/sh-win/LCDv2Win.zipbin0 -> 64119 bytes
-rw-r--r--www/sh-win/Makefile9
-rw-r--r--www/sh-win/empty.zipbin0 -> 62684 bytes
-rw-r--r--www/sh-win/enviro.jpgbin0 -> 37913 bytes
-rw-r--r--www/sh-win/enviro2.jpgbin0 -> 36174 bytes
-rw-r--r--www/sh-win/enviro3.jpgbin0 -> 10242 bytes
-rw-r--r--www/sh-win/index.t280
27 files changed, 592 insertions, 0 deletions
diff --git a/www/codes_new.png b/www/codes_new.png
new file mode 100644
index 0000000000..03cb1deadb
--- /dev/null
+++ b/www/codes_new.png
Binary files differ
diff --git a/www/codes_old.png b/www/codes_old.png
new file mode 100644
index 0000000000..b30a155a32
--- /dev/null
+++ b/www/codes_old.png
Binary files differ
diff --git a/www/docs/Makefile b/www/docs/Makefile
new file mode 100644
index 0000000000..5ec9d50aa5
--- /dev/null
+++ b/www/docs/Makefile
@@ -0,0 +1,9 @@
+ACTION=@echo preprocessing $@; rm -f $@; fcpp -WWW -I.. -Uunix -H -C -V -LL >$@
+
+SRC := $(wildcard *.t)
+OBJS := $(SRC:%.t=%.html)
+
+all: $(OBJS)
+
+%.html : %.t
+ $(ACTION) $<
diff --git a/www/docs/index.t b/www/docs/index.t
new file mode 100644
index 0000000000..21ad679121
--- /dev/null
+++ b/www/docs/index.t
@@ -0,0 +1,36 @@
+#define _PAGE_ Useful data sheets
+#include "head.t"
+
+<p>All in PDF format.
+
+<h2>General docs</h2>
+
+<ul>
+<li><a href="cpu_sh1_pb.pdf">Hitachi SH-1 Product Brief</a> 120 kB
+<li><a href="sh1_2p.pdf">Hitachi SH-1 Programming Manual r4.0</a> 1600 kB
+<li><a href="sh7032h.pdf">Hitachi SH-1 Hardware Manual r5.0</a> 2300 kB
+<li><a href="flash_SST37VF512.pdf">SST SST37VF020 256kB Flash ROM</a> 172 kB
+</ul>
+
+<h2>Player specific</h2>
+<ul>
+<li><a href="SSD1801R0_4.pdf">Solomon SSD 1801 LCD controller</a> 584 kB (unconfirmed)
+<li><a href="dsp_mas3507d_3pd.pdf">Micronas MAS 3507D MPEG Audio Decoder</a> 872 kB
+<li><a href="dac_dac3550a_1ds.pdf">Micronas DAC 3550A Stereo Audio DAC</a> 592 kB
+<li><a href="dram_41c16105.pdf">ISSI IS41LV16105 Fast Page DRAM</a> 148 kB
+</ul>
+
+<h2>Recorder specific</h2>
+<ul>
+<li><a href="ssd1815r1_5.pdf">Solomon SSD 1815 LCD controller</a> 864 kB
+<li><a href="mas3587f_2pd.pdf">Micronas MAS 3587F MPEG Audio Encoder/Decoder</a> 1300 kB
+<li><a href="dram_k4e151612d.pdf">Samsung K4E151612D EDO DRAM</a> 400 kB
+</ul>
+<ul>
+<li><a href="dc2dc_LM2651.pdf">National LM2651 DC/DC converter</a> 200 kB
+<li><a href="dc2dc_MC34063A.pdf">Fairchild MC34064A DC/DC converter</a> 45 kB
+<li><a href="fet_FZT849.pdf">FZT824 High Current Transistor</a> 60 kB
+<li><a href="rtc_tm41st84w.pdf">ST M41ST84W Real Time Clock</a> 180 kB
+</ul>
+
+#include "foot.t"
diff --git a/www/example/Makefile b/www/example/Makefile
new file mode 100644
index 0000000000..7d8f2fdefd
--- /dev/null
+++ b/www/example/Makefile
@@ -0,0 +1,40 @@
+HPATH = /usr/local/sh-gcc/bin
+CC = $(HPATH)/sh-elf-gcc
+LD = $(HPATH)/sh-elf-ld
+AR = $(HPATH)/sh-elf-ar
+AS = $(HPATH)/sh-elf-as
+OC = $(HPATH)/sh-elf-objcopy
+
+INCLUDES=-I.
+
+CFLAGS = -Os -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES)
+AFLAGS += -small -relax
+
+OBJS= start.o main.o
+
+%.o: %.s
+ $(CC) -o $@ $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
+
+
+all : archos.mod # archos.asm
+
+main.o: main.c
+
+archos.elf : $(OBJS) app.lds
+ $(CC) -nostdlib -o archos.elf $(OBJS) -lgcc -Tapp.lds -Wl,-Map,archos.map
+
+archos.bin : archos.elf
+ $(OC) -O binary archos.elf archos.bin
+
+archos.asm: archos.bin
+ sh2d -sh1 archos.bin > archos.asm
+
+archos.mod : archos.bin
+ scramble archos.bin archos.mod
+
+dist:
+ tar czvf dist.tar.gz Makefile main.c start.s app.lds
+
+clean:
+ -rm -f *.x *.i *.o *.elf *.bin *.map *.mod *.bak *~
+
diff --git a/www/example/README b/www/example/README
new file mode 100644
index 0000000000..ca8ea36c37
--- /dev/null
+++ b/www/example/README
@@ -0,0 +1,7 @@
+Rockbox example build
+---------------------
+
+These files are meant to show how to build a simple program for the Archos.
+
+Note that the display code only works on older machines (<4.50) so don't
+look too hard on that.
diff --git a/www/example/app.lds b/www/example/app.lds
new file mode 100644
index 0000000000..03bd1b2b54
--- /dev/null
+++ b/www/example/app.lds
@@ -0,0 +1,23 @@
+ENTRY(_start)
+OUTPUT_FORMAT(elf32-sh)
+SECTIONS
+{
+ .vectors 0x09000000 :
+ {
+ *(.vectors);
+ . = ALIGN(0x200);
+ *(.text.start)
+ *(.text)
+ *(.rodata)
+ }
+
+ .bss :
+ {
+ _stack = . + 0x1000;
+ }
+
+ .pad 0x0900C800 :
+ {
+ LONG(0);
+ }
+ }
diff --git a/www/example/main.c b/www/example/main.c
new file mode 100644
index 0000000000..9188aaf640
--- /dev/null
+++ b/www/example/main.c
@@ -0,0 +1,102 @@
+#define PBDR (*((volatile unsigned short *)0x05FFFFC2))
+
+#define DC 1
+#define CS1 2
+#define SDA 4
+#define SCK 8
+
+static const unsigned char ascii2lcd[] = {
+ 0x00,0x01,0x02,0x03,0x00,0x84,0x85,0x89,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xec,0xe3,0xe2,0xe1,0xe0,0xdf,0x15,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x24,0x25,0x26,0x37,0x06,0x29,0x2a,0x2b,
+ 0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,
+ 0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,
+ 0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,
+ 0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,
+ 0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,
+ 0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,
+ 0x5c,0x5d,0x5e,0xa9,0x33,0xce,0x00,0x15,
+ 0x00,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,
+ 0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,
+ 0x7c,0x7d,0x7e,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x45,0x45,0x45,0x45,0x45,0x45,0x24,0x47,
+ 0x49,0x49,0x49,0x49,0x4d,0x4d,0x4d,0x4d,
+ 0x48,0x52,0x53,0x53,0x53,0x53,0x53,0x24,
+ 0x24,0x59,0x59,0x59,0x59,0x5d,0x24,0x24,
+ 0x65,0x65,0x65,0x65,0x65,0x65,0x24,0x67,
+ 0x69,0x69,0x69,0x69,0x6d,0x6d,0x6d,0x6d,
+ 0x73,0x72,0x73,0x73,0x73,0x73,0x73,0x24,
+ 0x24,0x79,0x79,0x79,0x79,0x7d,0x24,0x7d
+};
+
+void lcd_write(int byte, int data)
+{
+ int i;
+ char on,off;
+
+ PBDR &= ~CS1; /* enable lcd chip select */
+
+ if ( data ) {
+ on=~(SDA|SCK);
+ off=SCK|DC;
+ }
+ else {
+ on=~(SDA|SCK|DC);
+ off=SCK;
+ }
+ /* clock out each bit, MSB first */
+ for (i=0x80;i;i>>=1)
+ {
+ PBDR &= on;
+ if (i & byte)
+ PBDR |= SDA;
+ PBDR |= off;
+ }
+
+ PBDR |= CS1; /* disable lcd chip select */
+}
+
+void lcd_printxy( char x, char y, unsigned char* string, int len )
+{
+ int i;
+ lcd_write(0xb0+y*16+x,0);
+ for (i=0; string[i] && i<len; i++)
+ lcd_write(ascii2lcd[string[i]],1);
+}
+
+int main(void)
+{
+ lcd_printxy(0,0,"Open Source",11);
+
+ /* simple scroll */
+ while (1) {
+ int i,j;
+ char* string = " Jukebox Jukebox ";
+ for ( i=0; i<11; i++ ) {
+ lcd_printxy(0,1,string+i,11);
+ for (j=0; j<600000; j++);
+ PBDR ^= 0x40; /* toggle LED (PB6) */
+ }
+ }
+}
+
+extern const void stack(void);
+
+const void* vectors[] __attribute__ ((section (".vectors"))) =
+{
+ main, /* Power-on reset */
+ stack, /* Power-on reset (stack pointer) */
+ main, /* Manual reset */
+ stack /* Manual reset (stack pointer) */
+};
diff --git a/www/example/start.s b/www/example/start.s
new file mode 100644
index 0000000000..fd4669db56
--- /dev/null
+++ b/www/example/start.s
@@ -0,0 +1,23 @@
+! note: sh-1 has a "delay cycle" after every branch where you can
+! execute another instruction "for free".
+
+ .file "start.s"
+ .section .text.start
+ .extern _main
+ .extern _vectors
+ .extern _stack
+ .global _start
+ .align 2
+
+_start:
+ mov.l 1f, r1
+ mov.l 3f, r3
+ mov.l 2f, r15
+ jmp @r3
+ ldc r1, vbr
+ nop
+
+1: .long _vectors
+2: .long _stack
+3: .long _main
+ .type _start,@function
diff --git a/www/index.cgi b/www/index.cgi
new file mode 100755
index 0000000000..a340a2e5ac
--- /dev/null
+++ b/www/index.cgi
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+
+# A very simple load balancing script:
+# If more than $nlim hits in under $tlim seconds, redirect to $mirror.
+#
+# 2002-01-24 Björn Stenberg <bjorn@haxx.se>
+
+# redirect is triggered by more than:
+$nlim = 10; # accesses in...
+$tlim = 10; # seconds
+$mirror = "http://rockbox.sourceforge.net/bjorn.haxx.se/rockbox/";
+
+open FILE, "+<.load" or die "Can't open .load: $!";
+flock FILE, LOCK_EX;
+@a = <FILE>;
+if ( scalar @a > $nlim ) {
+ $first = shift @a;
+}
+else {
+ $first = $a[0];
+}
+$now = time();
+@a = ( @a, "$now\n" );
+truncate FILE, 0;
+seek FILE, 0, 0;
+for ( @a ) {
+ print FILE $_;
+}
+flock FILE, LOCK_UN;
+close FILE;
+
+$diff = $now - $first;
+if ( $diff < $tlim ) {
+ print "Location: $mirror\n\n";
+}
+else {
+ print "Content-Type: text/html\n\n";
+ open FILE, "<main.html" or die "Can't open main.html: $!\n";
+ print <FILE>;
+ close FILE;
+}
diff --git a/www/rockbox100.png b/www/rockbox100.png
new file mode 100644
index 0000000000..4c7cdcb426
--- /dev/null
+++ b/www/rockbox100.png
Binary files differ
diff --git a/www/rockbox400.png b/www/rockbox400.png
new file mode 100644
index 0000000000..84d940abe9
--- /dev/null
+++ b/www/rockbox400.png
Binary files differ
diff --git a/www/schematics/6k_schematic.pdf b/www/schematics/6k_schematic.pdf
new file mode 100644
index 0000000000..611e501faf
--- /dev/null
+++ b/www/schematics/6k_schematic.pdf
Binary files differ
diff --git a/www/schematics/Makefile b/www/schematics/Makefile
new file mode 100644
index 0000000000..5ec9d50aa5
--- /dev/null
+++ b/www/schematics/Makefile
@@ -0,0 +1,9 @@
+ACTION=@echo preprocessing $@; rm -f $@; fcpp -WWW -I.. -Uunix -H -C -V -LL >$@
+
+SRC := $(wildcard *.t)
+OBJS := $(SRC:%.t=%.html)
+
+all: $(OBJS)
+
+%.html : %.t
+ $(ACTION) $<
diff --git a/www/schematics/PCB_composite_print.pdf b/www/schematics/PCB_composite_print.pdf
new file mode 100644
index 0000000000..a3deddf6f2
--- /dev/null
+++ b/www/schematics/PCB_composite_print.pdf
Binary files differ
diff --git a/www/schematics/PCB_final_print.pdf b/www/schematics/PCB_final_print.pdf
new file mode 100644
index 0000000000..69cfd88c47
--- /dev/null
+++ b/www/schematics/PCB_final_print.pdf
Binary files differ
diff --git a/www/schematics/index.t b/www/schematics/index.t
new file mode 100644
index 0000000000..68e7a2e72f
--- /dev/null
+++ b/www/schematics/index.t
@@ -0,0 +1,13 @@
+#define _PAGE_ Schematics
+#include "head.t"
+
+<p><a href="6k_schematic.pdf">Jukebox 6000</a> R3
+
+<p><a href="rec_main.pdf">Jukebox Recorder</a> main board, rev2
+<br><a href="rec_interface.pdf">Jukebox Recorder</a> interface board, rev2.1
+
+<p><a href="remoclone_schem.pdf">Remoclone schematics</a>
+<br><a href="PCB_composite_print.pdf">Remoclone PCB composite print</a>
+<br><a href="PCB_final_print.pdf">Remoclone PCB final print</a>
+
+#include "foot.t"
diff --git a/www/schematics/rec_interface.pdf b/www/schematics/rec_interface.pdf
new file mode 100644
index 0000000000..803e3521b2
--- /dev/null
+++ b/www/schematics/rec_interface.pdf
Binary files differ
diff --git a/www/schematics/rec_main.pdf b/www/schematics/rec_main.pdf
new file mode 100644
index 0000000000..5c3fb290a6
--- /dev/null
+++ b/www/schematics/rec_main.pdf
Binary files differ
diff --git a/www/schematics/remoclone_schem.pdf b/www/schematics/remoclone_schem.pdf
new file mode 100644
index 0000000000..b2620ce476
--- /dev/null
+++ b/www/schematics/remoclone_schem.pdf
Binary files differ
diff --git a/www/sh-win/LCDv2Win.zip b/www/sh-win/LCDv2Win.zip
new file mode 100644
index 0000000000..33e7872be9
--- /dev/null
+++ b/www/sh-win/LCDv2Win.zip
Binary files differ
diff --git a/www/sh-win/Makefile b/www/sh-win/Makefile
new file mode 100644
index 0000000000..5ec9d50aa5
--- /dev/null
+++ b/www/sh-win/Makefile
@@ -0,0 +1,9 @@
+ACTION=@echo preprocessing $@; rm -f $@; fcpp -WWW -I.. -Uunix -H -C -V -LL >$@
+
+SRC := $(wildcard *.t)
+OBJS := $(SRC:%.t=%.html)
+
+all: $(OBJS)
+
+%.html : %.t
+ $(ACTION) $<
diff --git a/www/sh-win/empty.zip b/www/sh-win/empty.zip
new file mode 100644
index 0000000000..a1b354fbf7
--- /dev/null
+++ b/www/sh-win/empty.zip
Binary files differ
diff --git a/www/sh-win/enviro.jpg b/www/sh-win/enviro.jpg
new file mode 100644
index 0000000000..eb90f6d47e
--- /dev/null
+++ b/www/sh-win/enviro.jpg
Binary files differ
diff --git a/www/sh-win/enviro2.jpg b/www/sh-win/enviro2.jpg
new file mode 100644
index 0000000000..706adaff4f
--- /dev/null
+++ b/www/sh-win/enviro2.jpg
Binary files differ
diff --git a/www/sh-win/enviro3.jpg b/www/sh-win/enviro3.jpg
new file mode 100644
index 0000000000..1eb15f8b8b
--- /dev/null
+++ b/www/sh-win/enviro3.jpg
Binary files differ
diff --git a/www/sh-win/index.t b/www/sh-win/index.t
new file mode 100644
index 0000000000..e3923c498a
--- /dev/null
+++ b/www/sh-win/index.t
@@ -0,0 +1,280 @@
+#define _PAGE_ Setting up an SH-1 compiler for Windows
+#include "head.t"
+<P>
+by <A href="mailto:edx@codeforce.d2g.com">Felix Arends</A>, 1/8/2002
+<BR>
+
+<P>
+NOTE: THIS COMPILER DOES NOT YET WORK WITH WINDOWS XP!!!
+
+<P>
+I have spent a long time figuring out how to compile SH1 code in windows (using
+the sh-elf-gcc compiler) and when I finally compiled the first OS for my
+Jukebox I decided to write a little tutorial explaining the setup process.
+
+<H2>
+The GNU-SH Tool Chain for Windows
+</H2>
+<P>
+This is actually all you need to download. It includes the binutils, gcc and
+newlib. The complete GNUSH Tool Chain (currently v0101) is 117MB but for you it
+is enough to download the GNUSH Tool Chain for ELF format (45 MB).
+
+<P>
+The GNUSH website can be found at <a href="http://www.kpit.com/download/downloadgnu.htm">
+http://www.kpit.com/download/downloadgnu.htm</a> (source code is also
+available there) and the direct link to the file you need is <a href="http://www.kpit.com/download/elf.zip">
+http://www.kpit.com/download/elf.zip</a>. It uses the cygwin dll to emulate
+a linux layer but you do not have to care about that.
+
+<H2>
+Setting up&nbsp;the Compiler
+</H2>
+<P>
+Install the GNUSH Tool Chain (nothing you really have to care about during the
+installation process). After that you should add some paths to your PATH system
+environment variable. If you have Windows 95/98/Me you can do that by modifying
+your autoexec.bat:
+
+<P>
+Add the following line to your autoexec.bat:
+
+<P>
+<TABLE cellSpacing="1" cellPadding="1" width="100%" border="1">
+<TBODY>
+<TR>
+<TD bgcolor="#a0d6e8">
+<code>SET PATH=%PATH%;C:\Programs\kpit\GNU-SH v0101
+[ELF]\Sh-elf\bin\;C:\Programs\kpit\GNU-SH v0101
+[ELF]\Sh-elf\lib\gcc-lib\sh-elf\2.9-GNU-SH-v0101\;C:\Programs\kpit\GNU-SH v0101
+[ELF]\Other Utilities</code>
+</TD>
+</TR>
+</TBODY>
+</TABLE>
+
+<P>
+</CODE>(Note: This is just one single line)
+
+<P>
+Replace the beginning of the paths with the path-name you chose to installt the
+tools in. Reboot.
+
+<P>
+In Windows 2000 it is a bit different. You can find the PATH-environment
+variable if you right-click the "My Computer" icon on your desktop and choose
+"Properties" in the popup-menu. Go to the "Advanced" tab and click
+"Environment-Variables":
+
+<P align="center">
+<IMG src="enviro.jpg"> <IMG src="enviro2.jpg"> <IMG src="enviro3.jpg">
+
+<P>
+(Note: There is also a PATH-variable in the "System variables" list, it does
+not matter which one you edit)
+
+<P>
+To the value the PATH-variable already has, add:
+
+<P>
+<TABLE cellSpacing="1" cellPadding="1" width="100%" border="1">
+<TR>
+<TD bgcolor="#a0d6e8">
+<code>;C:\Programs\kpit\GNU-SH v0101 [ELF]\Sh-elf\bin\;C:\Programs\kpit\GNU-SH
+v0101 [ELF]\Sh-elf\lib\gcc-lib\sh-elf\2.9-GNU-SH-v0101\;C:\Programs\kpit\GNU-SH
+v0101 [ELF]\Other Utilities</code>
+</TD>
+</TR>
+</TABLE>
+
+<P>
+Replace the program path with the path you chose for the program. You do not
+have to reboot.
+
+<H2>
+An "empty" System
+</H2>
+<P>
+First of all, I'll explain what to do to compile an "empty" system. It just
+initializes and calls the <EM>main</EM> function, but does not do anything
+else. You can add some code to the <EM>main</EM> function and simply recompile.
+It is actually like this: You don't have to care about any of those files,
+because you won't have to change much of them (except the main.cpp of
+course!!).
+
+<P>
+<STRONG>main.cpp:
+<BR>
+</STRONG>
+<TABLE cellSpacing="1" cellPadding="1" width="550" border="1">
+<TR>
+<TD bgcolor="#a0d6e8">
+<P>
+<code><font color="#0000ff">int</font> __main(<font color="#0000ff">void</font>){}
+<BR>
+<BR>
+<font color="#0000ff">int</font> main(<font color="#0000ff">void</font>)
+<BR>
+{
+<BR>
+<font color="#009000">&nbsp;&nbsp;&nbsp; // add code here</font>
+<BR>
+}
+<BR>
+<BR>
+<FONT color="#0000ff">extern</FONT> <FONT color="#0000ff">const</FONT> <FONT color="#0000ff">
+void</FONT> stack(<FONT color="#0000ff">void</FONT>);
+<br>
+<br>
+<FONT color="#0000ff">const</FONT> <FONT color="#0000ff">void</FONT>* vectors[]
+__attribute__ ((section (".vectors"))) =
+<br>
+{
+<br>
+&nbsp;&nbsp;&nbsp; main, <FONT color="#009000">/* Power-on reset */</FONT>
+<br>
+&nbsp;&nbsp;&nbsp; stack, <FONT color="#009000">/* Power-on reset (stack pointer)
+*/</FONT>
+<br>
+&nbsp;&nbsp;&nbsp; main, <FONT color="#009000">/* Manual reset */</FONT>
+<br>
+&nbsp;&nbsp;&nbsp; stack <FONT color="#009000">/* Manual reset (stack pointer) */</FONT>
+<br>
+};
+<br>
+</code>
+
+</TD>
+</TR>
+</TABLE>
+
+<P>
+We need a start-up assembler code:
+
+<P>
+<STRONG>start.asm
+<br>
+</STRONG>
+<TABLE cellSpacing="1" cellPadding="1" width="550" border="1">
+<TR>
+<TD bgcolor="#a0d6e8">
+<code>
+<pre>! note: sh-1 has a "delay cycle" after every branch where you can
+! execute another instruction "for free".
+
+.file"start.asm"
+.section.text.start
+.extern_main
+.extern _vectors
+.extern _stack
+.global _start
+.align 2
+
+_start:
+mov.l1f, r1
+mov.l3f, r3
+mov.l2f, r15
+jmp@r3
+ldcr1, vbr
+nop
+
+1:.long_vectors
+2:.long_stack
+3:.long_main
+.type_start,@function</pre>
+</code>
+</TD>
+</TR>
+</TABLE>
+
+<P>
+(I took this code from Björn's LCDv2 source)
+
+<P>
+Then we need a linker configuration file:
+
+<P>
+<STRONG>linker.cfg</STRONG>
+<BR>
+<TABLE cellSpacing="1" cellPadding="1" width="550" border="1">
+<TR>
+<TD bgcolor="#a0d6e8">
+<P>
+<code>
+<pre>ENTRY(_start)
+OUTPUT_FORMAT(elf32-sh)
+SECTIONS
+{
+ .vectors 0x09000000 :
+ {
+ *(.vectors);
+ . = ALIGN(0x200);
+ *(.text.start)
+ *(.text)
+ *(.rodata)
+ }
+
+ .bss :
+ {
+ _stack = . + 0x1000;
+ }
+
+ .pad 0x0900C800 :
+ {
+ LONG(0);
+ }
+ }</pre>
+</code>
+</TD>
+</TR>
+</TABLE>
+
+<P>
+(This code comes from Börn's LCDv2 as well)
+
+<P>
+Last but not least, we need a batch file to link all this and output a usable
+.mod file (you don't really need a batch file if you want to enter all the
+commands over and over angain :])
+
+<P>
+<STRONG>make.bat</STRONG>
+<BR>
+<TABLE cellSpacing="1" cellPadding="1" width="550" border="1">
+<TR>
+<TD bgcolor="#a0d6e8">
+<P>
+<code>
+<pre>SET INCLUDES=
+SET SOURCEFILES=main.c
+SET OBJECTS=main.o start.o
+
+sh-elf-as start.asm -o start.o -L -a
+sh-elf-gcc -O2 -m1 -o main.o -c -nostdlib %INCLUDES% %SOURCEFILES%
+sh-elf-ld -o main.out %OBJECTS% -Tlinker.cfg
+padit main.out
+scramble main.out archos.mod
+
+PAUSE</pre>
+</code>
+</TD>
+</TR>
+</TABLE>
+
+<P>
+And that's it! I have prepared all those files in a .zip archive for you so you
+don't have to copy'n'paste that much :). I have also prepared a package with
+the LCDv2 code Björn wrote (ready to compile with Windows).
+
+<P>
+<a href="LCDv2Win.zip">empty.zip</a>
+<BR>
+<a href="LCDv2Win.zip">LCDv2Win.zip</a>
+
+<P>
+I hope this tutorial helped you to compile an Archos firmware with windows. If
+you have any questions, comments or corrections, please mail to <A href="mailto:edx@codeforce.d2g.com">
+edx@codeforce.d2g.com</A>
+
+#include "foot.t"
+