start new makefile, migrate to libpicofe
[picodrive.git] / cpu / Cyclone / epoc / readme.txt
CommitLineData
cc68a136 1*update*\r
2Use the "compress jumtable" Cyclone config.h option to fix this issue\r
3(no patcher will be needed then).\r
4\r
5\r
6There is a problem with Cyclone on symbian platform:\r
7GNU as generates COFF object files, which allow max of 0xFFFF (65535) relocation\r
8entries. Cyclone uses a jumptable of 0x10000 (65536, 1 for every opcode-word)\r
9antries. When the executable is loaded, all jumptable entries must be relocated\r
10to point to right code location. Because of this limitation, Cyclone's jumptable is\r
11incomplete (misses 2 entries), and if M68k opcodes 0xFFFE or 0xFFFF are ever\r
12encoundered when emulating, your emulator will crash.\r
13\r
14I have written a little patcher to fix that. It writes those two missing entries and\r
15marks them as relocatable. Placeholders must not be deleted just after the jumttable\r
16in the Cyclone source code.\r
17\r
18This version works with intermediate PE executable, which is used both for APPs and EXEs,\r
19and is produced by gcc toolkit just before running petran. So it's best to insert\r
20this in your makefile, in the rule which builds your APP/EXE, just after last 'ld'\r
21statement, for example:\r
22\r
23$(EPOCTRGUREL)\PICODRIVEN.APP : $(EPOCBLDUREL)\PICODRIVEN.in $(EPOCSTATLINKUREL)\EDLL.LIB $(LIBSUREL)\r
24 ...\r
25 ld -s -e _E32Dll -u _E32Dll --dll \\r
26 "$(EPOCBLDUREL)\PICODRIVEN.exp" \\r
27 -Map "$(EPOCTRGUREL)\PICODRIVEN.APP.map" -o "$(EPOCBLDUREL)\PICODRIVEN.APP" \\r
28 "$(EPOCSTATLINKUREL)\EDLL.LIB" --whole-archive "$(EPOCBLDUREL)\PICODRIVEN.in" \\r
29 --no-whole-archive $(LIBSUREL) $(USERLDFLAGS)\r
30 -$(ERASE) "$(EPOCBLDUREL)\PICODRIVEN.exp"\r
31 \r
32 patchtable_symb2 "$(EPOCBLDUREL)\PICODRIVEN.APP"\r
33\r
34 petran "$(EPOCBLDUREL)\PICODRIVEN.APP" "$@" \\r
35 -nocall -uid1 0x10000079 -uid2 0x100039ce -uid3 0x1000c193\r
36 -$(ERASE) "$(EPOCBLDUREL)\PICODRIVEN.APP"\r
37 perl -S ecopyfile.pl "$@" "PICODRIVEN.APP"\r
38\r
39\r
40This is also compatible with ECompXL.\r
41\r
42To test if this thing worked, you can load crash_cyclone.bin in your emulator.\r