Last active
December 31, 2018 12:52
-
-
Save spotlightishere/9a4d1d60e7bdee01b1d64113542cd779 to your computer and use it in GitHub Desktop.
Romeo patches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- romeo-orig/types.h 2001-03-16 19:28:08.000000000 -0600 | |
+++ romeo-0.5.0/types.h 2017-05-07 14:33:18.000000000 -0500 | |
@@ -4,7 +4,7 @@ | |
/******************************************************************** | |
* Elementary data types | |
********************************************************************/ | |
-#include <endian.h> | |
+#include <machine/endian.h> | |
#define CPU_ENDIAN_LITTLE __LITTLE_ENDIAN | |
#define CPU_ENDIAN_BIG __BIG_ENDIAN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- romeo-0.5.0.orig/MemoryPrv.h | |
+++ romeo-0.5.0/MemoryPrv.h | |
@@ -311,6 +311,11 @@ | |
#define memUHeapSize(p,ver) \ | |
(ver>2 ? ((MemHeapHeaderPtr)p)->size : (ver>1 ? ((Mem2HeapHeaderPtr)p)->size : ((Mem1HeapHeaderPtr)p)->size)) | |
+#define memUHeapSizeSet(p,ver,Size) \ | |
+ if (ver>2) ((MemHeapHeaderPtr )p)->size = Size; \ | |
+ else if (ver>1) ((Mem2HeapHeaderPtr)p)->size = Size; \ | |
+ else ((Mem1HeapHeaderPtr)p)->size = Size | |
+ | |
#define memUHeapFlags(p) \ | |
(((MemHeapHeaderPtr)p)->flags) | |
@@ -340,6 +345,10 @@ | |
#define memUChunkSize(p,ver) \ | |
(ver>1 ? ((MemChunkHeaderPtr)p)->size : ((Mem1ChunkHeaderPtr)p)->size) | |
+#define memUChunkSizeSet(p,ver,Size) \ | |
+ if (ver>1) ((MemChunkHeaderPtr)p)->size = Size; \ | |
+ else ((Mem1ChunkHeaderPtr)p)->size = Size | |
+ | |
#define memUChunkFlags(p,ver) \ | |
(ver>1 ? memChunkFlags(p) : ((Mem1ChunkHeaderPtr)p)->flags & 0xF0) | |
@@ -355,6 +364,10 @@ | |
#define memUChunkHOffset(p,ver) \ | |
(ver>1 ? ((MemChunkHeaderPtr)p)->hOffset : ((Mem1ChunkHeaderPtr)p)->hOffset) | |
+#define memUChunkHOffsetSet(p,ver,Offset) \ | |
+ if (ver>1) ((MemChunkHeaderPtr )p)->hOffset = Offset; \ | |
+ else ((Mem1ChunkHeaderPtr)p)->hOffset = Offset | |
+ | |
--- romeo-0.5.0.orig/assemble.c | |
+++ romeo-0.5.0/assemble.c | |
@@ -61,7 +61,7 @@ | |
// Initialize this entire heap to 0. | |
memset (hdr, 0, size); //memUSizeOfHeapHeader(ver)); | |
- memUHeapSize (hdr, ver) = size; | |
+ memUHeapSizeSet(hdr, ver, size); | |
memUHeapFlags(hdr) |= memHeapFlagReadOnly; | |
switch (ver) | |
@@ -87,7 +87,7 @@ | |
memUSizeOfHeapTerminator(ver)); | |
if (ver > 2) | |
{ | |
- memUChunkHOffset(pChunk, chunkVer) = memUChunkSize(pChunk, chunkVer) >> 1; | |
+ memUChunkHOffsetSet(pChunk, chunkVer, memUChunkSize(pChunk, chunkVer) >> 1); | |
} | |
} | |
@@ -556,8 +556,8 @@ | |
{ | |
// Only update the hOffset (pointer to next free chunk) if | |
// the hOffset of the old free chunk was set. | |
- memUChunkHOffset(newFree, ver) = memUChunkHOffset(oldFree, ver) - | |
- ((roundedSize + memUSizeOfChunkHeader(ver)) >>1); | |
+ memUChunkHOffsetSet(newFree, ver, memUChunkHOffset(oldFree, ver) - | |
+ ((roundedSize + memUSizeOfChunkHeader(ver)) >>1)); | |
} | |
@@ -576,9 +576,9 @@ | |
{ | |
// The previous free chunk now needs to point to the new free chunk. | |
if (newsize) | |
- memUChunkHOffset(prevFree, ver) = ((UInt32)newFree - (UInt32)prevFree) >> 1; | |
+ memUChunkHOffsetSet(prevFree, ver, ((UInt32)newFree - (UInt32)prevFree) >> 1); | |
else | |
- memUChunkHOffset(prevFree, ver) += memUChunkHOffset(oldFree,ver); | |
+ memUChunkHOffsetSet(prevFree, ver, memUChunkHOffset(prevFree, ver) + memUChunkHOffset(oldFree,ver)); | |
} | |
@@ -642,11 +642,11 @@ | |
{ | |
/* Free, contiguous and neither are terminators */ | |
if (memUChunkHOffset(pSecond,ver) != 0) | |
- memUChunkHOffset(pFirst,ver) += memUChunkHOffset(pSecond,ver); | |
+ memUChunkHOffsetSet(pFirst,ver, memUChunkHOffset(pFirst,ver) + memUChunkHOffset(pSecond,ver)); | |
else | |
- memUChunkHOffset(pFirst,ver) = 0; | |
+ memUChunkHOffsetSet(pFirst,ver, 0); | |
- memUChunkSize(pFirst,ver) += memUChunkSize(pSecond,ver); | |
+ memUChunkSizeSet(pFirst,ver,memUChunkSize(pFirst,ver) + memUChunkSize(pSecond,ver)); | |
return (1); | |
} | |
@@ -706,18 +706,18 @@ | |
{ | |
// This new free chunk will be the first one on the free list. | |
if (pFreeChunk) | |
- memUChunkHOffset(pChunk,chunkVer) = ((UInt32)pFreeChunk - (UInt32)pChunk) | |
- >> 1; | |
+ memUChunkHOffsetSet(pChunk,chunkVer,((UInt32)pFreeChunk - (UInt32)pChunk) | |
+ >> 1); | |
if (heapVer > 2) | |
{ | |
if (! pFreeChunk) | |
// In version 3 and above, the final free chunk points | |
// to the heap terminator. | |
- memUChunkHOffset(pChunk,chunkVer) = ((UInt32)pHeap + | |
+ memUChunkHOffsetSet(pChunk,chunkVer, ((UInt32)pHeap + | |
memUHeapSize(pHeap, heapVer) - | |
memUSizeOfHeapTerminator(chunkVer) - | |
- (UInt32)pChunk) >> 1; | |
+ (UInt32)pChunk) >> 1); | |
pHeap->header.ver3.firstFreeChunkOffset = ((UInt32)pChunk - (UInt32)pHeap)>>1; | |
} | |
@@ -741,8 +741,8 @@ | |
hOffset = ((UInt32)memUChunkNextFree(pFreeChunk,chunkVer) - (UInt32)pChunk) | |
>> 1; | |
- memUChunkHOffset(pChunk, chunkVer) = hOffset; | |
- memUChunkHOffset(pFreeChunk,chunkVer) = ((UInt32)pChunk - (UInt32)pFreeChunk)>>1; | |
+ memUChunkHOffsetSet(pChunk, chunkVer, hOffset); | |
+ memUChunkHOffsetSet(pFreeChunk,chunkVer, ((UInt32)pChunk - (UInt32)pFreeChunk)>>1); | |
} | |
MergeIfAdjacent(pChunk, memUChunkNextFree(pChunk,chunkVer), chunkVer); | |
--- romeo-0.5.0.orig/byte_swap.h | |
+++ romeo-0.5.0/byte_swap.h | |
@@ -37,7 +37,10 @@ | |
((((unsigned long) (n)) << 8) & 0x00FF0000) | \ | |
((((unsigned long) (n)) >> 8) & 0x0000FF00) | \ | |
(((unsigned long) (n)) >> 24)) | |
+#else | |
+# define BYTE_SWAP_16(n) ((unsigned short) (n)) | |
-#endif // CPU_ENDIAN == CPU_ENDIAN_LITTLE | |
+# define BYTE_SWAP_32(n) ((unsigned long) (n)) | |
+#endif | |
#endif // __BYTE_SWAP_H__ | |
--- romeo-0.5.0.orig/opts_parse.c | |
+++ romeo-0.5.0/opts_parse.c | |
@@ -23,6 +23,7 @@ | |
#include <string.h> | |
#include "opts_parse.h" | |
+#include "version.h" | |
/* | |
* opts_cols defines the column sizes for output | |
@@ -331,6 +332,11 @@ | |
__opts_error[0] = '\0'; | |
return __opts_error; | |
} | |
+ if (! strcmp(arg, "--version")) | |
+ { | |
+ printf( "romeo %s\n\n%s", ROMEO_VERSION, ROMEO_COPYRIGHT); | |
+ exit( 0); | |
+ } | |
/*******************************************************/ | |
/* Reset our argument consuming option */ | |
@@ -857,7 +863,7 @@ | |
cols[3] -= level*2; | |
} | |
} | |
- else if (fmt && args) | |
+ else if (fmt) | |
{ | |
vsprintf(opt_line, fmt, args); | |
write (hFile, opt_line, strlen(opt_line)); | |
@@ -946,12 +952,18 @@ | |
/* | |
* Output our help/usage option. | |
*/ | |
- sprintf(opt_line, "%*s%-*s%*s%-*s\n\n", | |
+ sprintf(opt_line, "%*s%-*s%*s%-*s\n", | |
cols[0], " ", | |
cols[1], "-?, --help", | |
cols[2], " ", | |
cols[3], "This help/usage message."); | |
write (hFile, opt_line, strlen(opt_line)); | |
+ sprintf(opt_line, "%*s%-*s%*s%-*s\n\n", | |
+ cols[0], " ", | |
+ cols[1], " --version", | |
+ cols[2], " ", | |
+ cols[3], "Show version information."); | |
+ write (hFile, opt_line, strlen(opt_line)); | |
} | |
} | |
--- romeo-0.5.0.orig/romeo.c | |
+++ romeo-0.5.0/romeo.c | |
@@ -349,24 +349,21 @@ | |
prog++; | |
if (stat && *stat) | |
- opts_fprintf(stderr, opts, | |
- "\nError: *** %s\n\nUsage: %s %s\n", | |
- stat, prog, rest); | |
- else | |
- opts_fprintf(stderr, opts, | |
- "\nUsage: %s %s\n", prog, rest); | |
+ fprintf(stderr, "\nError: *** %s\n", stat); | |
+ opts_fprintf(stdout, opts, | |
+ "\nUsage: %s %s\n", prog, rest); | |
- fprintf (stderr, " Available PalmOS versions are:\n "); | |
+ fprintf (stdout, " Available PalmOS versions are:\n "); | |
for (idex = 0; idex < sizeof(ROMVers)/sizeof(ROMVers[0]); idex++) | |
{ | |
UInt16 major = (ROMVers[idex].palmOSVer >> 8) & 0xFF; | |
UInt16 minor = ROMVers[idex].palmOSVer & 0xFF; | |
- fprintf (stderr, "%s%x.%x", (idex ? ", " : ""), major, minor); | |
+ fprintf (stdout, "%s%x.%x", (idex ? ", " : ""), major, minor); | |
} | |
- fprintf (stderr, "\n\n"); | |
+ fprintf (stdout, "\n\n"); | |
- fflush (stderr); | |
+ fflush (stdout); | |
} | |
int Assemble () | |
@@ -591,7 +588,7 @@ | |
if (! opt_files.optidex) | |
{ | |
- sprintf (error,"You must provided at least 1 file for processing."); | |
+ sprintf (error,"You must provide at least one file for processing."); | |
Usage(error); | |
return(1); | |
--- romeo-0.5.0.orig/debian/changelog | |
+++ romeo-0.5.0/debian/changelog | |
@@ -0,0 +1,66 @@ | |
+romeo (0.5.0-9) unstable; urgency=low | |
+ | |
+ * QA upload. | |
+ * debian/rules: | |
+ - Add binary-indep target. Closes: #395769. | |
+ - Add dh_testdir, dh_testroot. | |
+ * Conforms to Standards version 3.7.2. | |
+ | |
+ -- Matej Vela <vela@debian.org> Sat, 28 Oct 2006 15:13:32 +0200 | |
+ | |
+romeo (0.5.0-8) unstable; urgency=low | |
+ | |
+ * QA upload. | |
+ * Package is orphaned (#354628); set maintainer to Debian QA Group. | |
+ * debian/rules: Add support for DEB_BUILD_OPTIONS=noopt. | |
+ * debian/watch: Update upstream URL. | |
+ * Conforms to Standards version 3.6.2. | |
+ | |
+ -- Matej Vela <vela@debian.org> Sun, 9 Apr 2006 22:07:35 +0200 | |
+ | |
+romeo (0.5.0-7) unstable; urgency=low | |
+ | |
+ * Add binary-arch to rules (closes: #303132). | |
+ | |
+ -- Shaun Jackman <sjackman@debian.org> Mon, 4 Apr 2005 19:38:03 -0700 | |
+ | |
+romeo (0.5.0-6) unstable; urgency=low | |
+ | |
+ * Fix build on amd64 with gcc-4.0 (closes: #300945). | |
+ | |
+ -- Shaun Jackman <sjackman@debian.org> Sat, 2 Apr 2005 14:09:55 -0800 | |
+ | |
+romeo (0.5.0-5) unstable; urgency=low | |
+ | |
+ * Fix 'invalid operands to binary &&' on Alpha (closes: #265834). | |
+ | |
+ -- Shaun Jackman <sjackman@debian.org> Sun, 29 Aug 2004 12:12:43 -0700 | |
+ | |
+romeo (0.5.0-4) unstable; urgency=low | |
+ | |
+ * Update Standards-Version to 3.6.1.0. | |
+ * Add compat version 4. | |
+ * Update watch version 2. | |
+ * Use dh_install instead of patching Makefile. | |
+ | |
+ -- Shaun Jackman <sjackman@debian.org> Sat, 28 Aug 2004 15:21:04 -0700 | |
+ | |
+romeo (0.5.0-3) unstable; urgency=low | |
+ | |
+ * debian/control(Section): Change to otherosfs. | |
+ | |
+ -- Shaun Jackman <sjackman@debian.org> Fri, 17 Oct 2003 18:39:12 -0700 | |
+ | |
+romeo (0.5.0-2) unstable; urgency=low | |
+ | |
+ * Fix the build on big-endian systems (Closes: #167654). | |
+ Applied patch from Matt Kraai <kraai@alumni.cmu.edu>. | |
+ | |
+ -- Shaun Jackman <sjackman@debian.org> Fri, 17 Oct 2003 15:17:49 -0700 | |
+ | |
+romeo (0.5.0-1) unstable; urgency=low | |
+ | |
+ * Initial Release. | |
+ | |
+ -- Shaun Jackman <sjackman@shaw.ca> Thu, 30 May 2002 21:53:53 -0700 | |
+ | |
--- romeo-0.5.0.orig/debian/compat | |
+++ romeo-0.5.0/debian/compat | |
@@ -0,0 +1 @@ | |
+4 | |
--- romeo-0.5.0.orig/debian/watch | |
+++ romeo-0.5.0/debian/watch | |
@@ -0,0 +1,3 @@ | |
+# Homepage Pattern Version Action | |
+version=2 | |
+http://sf.net/romeo/ romeo-(.*)\.tgz debian uupdate | |
--- romeo-0.5.0.orig/debian/docs | |
+++ romeo-0.5.0/debian/docs | |
@@ -0,0 +1 @@ | |
+debian/index.html | |
--- romeo-0.5.0.orig/debian/manpages | |
+++ romeo-0.5.0/debian/manpages | |
@@ -0,0 +1 @@ | |
+debian/romeo.1 | |
--- romeo-0.5.0.orig/debian/romeo.1 | |
+++ romeo-0.5.0/debian/romeo.1 | |
@@ -0,0 +1,166 @@ | |
+.TH ROMEO "1" "May 2002" "romeo" "User Commands" | |
+.SH NAME | |
+romeo \- read and modify Palm ROMs | |
+.SH SYNOPSIS | |
+.B romeo | |
+[\fIOPTION\fR]... \fIIMAGE\fR | |
+.SH DESCRIPTION | |
+Read or modify the IMAGE Palm ROM. | |
+.SS "Modal Options:" | |
+.TP | |
+\fB\-a\fR, \fB\-\-assemble\fR <version>... | |
+Assemble a new ROM from the given set of PRC | |
+.TP | |
+\fB\-\-create\fR <version>... | |
+database files (specified using the \fB\-l\fR and/or | |
+\fB\-s\fR suboption). The ROM <version> may | |
+optionally be specified. | |
+.IP | |
+Non-Modal Suboptions for \fB\-a\fR|--assemble:create: | |
+.TP | |
+\fB\-R\fR, \fB\-\-rom\fR <file> | |
+Read in a rom and modify it instead of | |
+creating a new one | |
+.TP | |
+\fB\-s\fR, \fB\-\-small\fR <file>... | |
+Include a small ROM composed of the given | |
+PRC files. The size of the small ROM may be | |
+specified using the option modifier. e.g. | |
+\&'-l:<size>' or '--small:<size>'. | |
+.TP | |
+\fB\-l\fR, \fB\-\-large\fR <file>... | |
+Include a large ROM composed of the given | |
+PRC files. The size of the large ROM may be | |
+specified using the option modifier. e.g. | |
+\&'-l:<size>' or '--large:<size>'. | |
+.TP | |
+\fB\-f\fR, \fB\-\-format_small\fR <format> | |
+Generate the small ROM with the given format | |
+string | |
+.TP | |
+\fB\-F\fR, \fB\-\-format_big\fR <format> | |
+Generate the big ROM with the given format | |
+string | |
+.TP | |
+\fB\-o\fR, \fB\-\-output\fR <file> | |
+Output the generated ROM image to the given | |
+<file>. | |
+.TP | |
+\fB\-p\fR, \fB\-\-PRC\fR | |
+Read and interpret the given PRC/database | |
+image. | |
+.TP | |
+\fB\-r\fR, \fB\-\-RAM\fR | |
+Read and interpret the given RAM image (not | |
+fully implemented) | |
+.TP | |
+\fB\-v\fR, \fB\-\-view\fR | |
+View the given ROM image. | |
+.IP | |
+Non-Modal Suboptions for \fB\-v\fR|--view: | |
+.TP | |
+\fB\-l\fR, \fB\-\-large\fR | |
+View information about the large ROM. | |
+.TP | |
+\fB\-s\fR, \fB\-\-small\fR | |
+View information about the small ROM. | |
+.TP | |
+\fB\-x\fR, \fB\-\-extractPRCs\fR | |
+Extract all PRC/databases from the provided | |
+image <file>. | |
+.IP | |
+Non-Modal Suboptions for \fB\-x\fR|--extractPRCs: | |
+.TP | |
+\fB\-l\fR, \fB\-\-large\fR [<type.ctor>...] | |
+Extract PRC/databases from the large ROM. | |
+If 1 or more <type.ctor> is provided, only | |
+extract PRC/databases which have a | |
+<type.ctor> in the provided list | |
+.TP | |
+\fB\-s\fR, \fB\-\-small\fR [<type.ctor>...] | |
+Extract PRC/databases from the small ROM. | |
+If 1 or more <type.ctor> is provided, only | |
+extract PRC/databases which have a | |
+<type.ctor> in the provided list | |
+.SS "Global Options:" | |
+.TP | |
+\fB\-i\fR, \fB\-\-input\fR [<image>...] | |
+Image(s) to process | |
+.TP | |
+\fB\-c\fR, \fB\-\-showChunks\fR | |
+Show all memory chunks | |
+.TP | |
+\fB\-d\fR, \fB\-\-showPRC\fR | |
+List all PRC/databases within the image | |
+.TP | |
+\fB\-D\fR, \fB\-\-showPRCDetail\fR | |
+Show the details of all PRC/databases within | |
+the image. This option also accepts an option | |
+modifier which specifies the level of detail | |
+desired: | |
+.TP | |
+\fB\-D\fR:1 | |
+is the same as '-d', | |
+.TP | |
+\fB\-D\fR:2 | |
+will show the records/resources within | |
+a database, | |
+.TP | |
+\fB\-D\fR:3 | |
+will display records/resources | |
+interpret the records/resources which | |
+are currently understood, dumping all | |
+others as RAW bytes, | |
+.TP | |
+\fB\-D\fR:4 | |
+is the same as '-D:3' with a little | |
+more record/resource detail. | |
+.TP | |
+\fB\-D\fR:5 | |
+will dump all records/resources as RAW | |
+bytes. | |
+.IP | |
+The default is '-D:2'. | |
+.TP | |
+\fB\-h\fR, \fB\-\-showHeap\fR | |
+Show the heap list and all heap headers | |
+.TP | |
+\fB\-H\fR, \fB\-\-showHeadersOnly\fR | |
+Show the card and storage headers only | |
+.TP | |
+\fB\-\-headersOnly\fR | |
+\&... | |
+.TP | |
+\fB\-N\fR, \fB\-\-showNV\fR | |
+Show the System NV parameters (from the | |
+storage header) | |
+.TP | |
+\fB\-V\fR, \fB\-\-Verbose\fR | |
+Verbose output (equivalent to '-NDch') | |
+.TP | |
+-?, \fB\-\-help\fR | |
+This help/usage message. | |
+.TP | |
+\fB\-\-version\fR | |
+Show version information. | |
+.SS | |
+Available PalmOS versions are: | |
+.TP | |
+3.50, 3.30, 3.25, 3.10, 3.0, 2.0, 1.0 | |
+.SH AUTHOR | |
+Written by Monica Chew and Rob Johnson. | |
+ | |
+This manual page was written by Shaun Jackman | |
+<sjackman@debian.org> for the Debian system. | |
+ | |
+.SH REPORTING BUGS | |
+Report bugs to Monica Chew <mmc@cs.berkeley.edu>. | |
+ | |
+.SH COPYRIGHT | |
+Copyright 2001 Monica Chew and Rob Johnson | |
+ | |
+This is free software; see the source for copying conditions. There is NO | |
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
+ | |
+.SH SEE ALSO | |
+http://romeo.sf.net | |
--- romeo-0.5.0.orig/debian/control | |
+++ romeo-0.5.0/debian/control | |
@@ -0,0 +1,19 @@ | |
+Source: romeo | |
+Section: otherosfs | |
+Priority: extra | |
+Maintainer: Debian QA Group <packages@qa.debian.org> | |
+Build-Depends: debhelper (>> 4.0.0) | |
+Standards-Version: 3.7.2 | |
+ | |
+Package: romeo | |
+Architecture: any | |
+Depends: ${shlibs:Depends} | |
+Suggests: pose, osflash, pilot-link | |
+Description: Palm ROM Discombobulator | |
+ With Romeo, you can construct custom PalmOS ROM images with extra | |
+ applications of your choice and without any of the default | |
+ applications that you never use. This can be extremely useful if | |
+ your Palm doesn't have much RAM, or if you are deploying an | |
+ application to, say, a sales team and want to make it as user-proof | |
+ as possible. There's almost 600K of unused space on a typical Palm | |
+ ROM, and you can be taking advantage of it. | |
--- romeo-0.5.0.orig/debian/copyright | |
+++ romeo-0.5.0/debian/copyright | |
@@ -0,0 +1,26 @@ | |
+This package was debianized by Shaun Jackman <sjackman@debian.org> on | |
+Mon, 15 Apr 2002 19:47:37 -0700. | |
+ | |
+It was downloaded from http://romeo.sf.net | |
+ | |
+Upstream Authors: | |
+ Monica Chew <mmc@cs.berkeley.edu> | |
+ Rob Johnson <rtjohnso@cs.berkeley.edu> | |
+ | |
+Copyright: | |
+ | |
+Copyright (C) 2001 Monica Chew and Rob Johnson | |
+ | |
+This program is free software; you can redistribute it and/or modify | |
+it under the terms of the GNU General Public License as published by | |
+the Free Software Foundation; either version 2 of the License, or | |
+(at your option) any later version. | |
+ | |
+This program is distributed in the hope that it will be useful, | |
+but WITHOUT ANY WARRANTY; without even the implied warranty of | |
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
+GNU General Public License for more details. | |
+ | |
+On Debian systems, the complete text of the GNU General Public | |
+License can be found in /usr/share/common-licenses/GPL | |
+or obtained from the Free Software Foundation. | |
--- romeo-0.5.0.orig/debian/rules | |
+++ romeo-0.5.0/debian/rules | |
@@ -0,0 +1,44 @@ | |
+#!/usr/bin/make -f | |
+ | |
+CFLAGS = -Wall -g | |
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) | |
+ CFLAGS += -O0 | |
+else | |
+ CFLAGS += -O2 | |
+endif | |
+ | |
+build: | |
+ $(MAKE) CFLAGS="$(CFLAGS)" | |
+ | |
+clean: | |
+ dh_testdir | |
+ dh_testroot | |
+ $(MAKE) clean | |
+ dh_clean | |
+ | |
+install: build | |
+ dh_testdir | |
+ dh_testroot | |
+ dh_clean -k | |
+ dh_installdirs | |
+ dh_install | |
+ | |
+binary-indep: build install | |
+ | |
+binary-arch: build install | |
+ dh_testdir | |
+ dh_testroot | |
+ dh_installchangelogs | |
+ dh_installdocs | |
+ dh_installman | |
+ dh_strip | |
+ dh_compress | |
+ dh_fixperms | |
+ dh_installdeb | |
+ dh_shlibdeps | |
+ dh_gencontrol | |
+ dh_md5sums | |
+ dh_builddeb | |
+ | |
+binary: binary-indep binary-arch | |
+.PHONY: build clean binary-indep binary-arch binary install | |
--- romeo-0.5.0.orig/debian/index.html | |
+++ romeo-0.5.0/debian/index.html | |
@@ -0,0 +1,315 @@ | |
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> | |
+<html> | |
+<head> | |
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
+ <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.18 i686) [Netscape]"> | |
+ <meta name="Author" content="Rob Johnson, Monica Chew"> | |
+ <meta name="Keywords" content="Palm, Pilot, Palm OS, ROM"> | |
+ <title>Romeo: The Palm ROM Tool</title> | |
+</head> | |
+<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#59188E" alink="#FF0000"> | |
+ | |
+<center> | |
+<h1> | |
+Romeo: The Palm ROM Discombobulator</h1></center> | |
+ | |
+<center> | |
+<h4> | |
+By <a href=mailto:mmc@cs.berkeley.edu>Monica Chew</a> and <a href=mailto:rtjohnso@cs.berkeley.edu>Rob Johnson</a></h4></center> | |
+With Romeo, you can construct custom PalmOS ROM images with extra applications | |
+of your choice and without any of the default applications that you never | |
+use. This can be extremely useful if your Palm doesn't have much | |
+RAM, or if you are deploying an application to, say, a sales team and want | |
+to make it as user-proof as possible. There's almost 600K of unused | |
+space on a typical Palm ROM, and you can be taking advantage of it. | |
+<h4> | |
+News</h4> | |
+ | |
+<center><table BORDER=0 CELLSPACING=0 COLS=2 WIDTH="90%" BGCOLOR="#CCCCCC" NOSAVE > | |
+<tr BGCOLOR="#FFCCCC" NOSAVE> | |
+<td NOSAVE><a | |
+href="http://sourceforge.net/cvs/?group_id=22915">Patches | |
+for Non-EZ ROMs, old small ROMs, and Japanese ROMs | |
+Released</a></td> | |
+ | |
+<td ALIGN=RIGHT NOSAVE>May 29, 2001</td> | |
+</tr> | |
+ | |
+<tr BGCOLOR="#CCCCCC" NOSAVE> | |
+<td COLSPAN="2" NOSAVE> | |
+You may have noticed the bug that romeo doesn't set up boot pointers in the | |
+small ROM correctly. This patch fixes that problem. To use the fix, you will | |
+need to pass the correct card header version of the small ROM to romeo during | |
+the assembly stage. To check which card header version you have, run | |
+ | |
+<pre> romeo -h my.rom </pre> | |
+ | |
+and look for the line in the small ROM info that gives the card header version | |
+(not the same as Version). There is a new -S flag so you can specify which | |
+version you need (before, it defaulted to header version 4 when assembling | |
+PalmOS 3.5 and higher). | |
+ | |
+Another option that you might need is the -n option, for non-ez ROMs. | |
+Previously, reassembling non-ez Palms didn't work. To check if you have a non-ez | |
+Palm, just look at the flag information in the large ROM card header. | |
+ | |
+The last option is the -L "JP" option for Japanese ROMs. If you have a ROM | |
+which is not Japanese or US/English, please mail the output of romeo -N to | |
+<a href=mailto:mmc@cs.berkeley.edu>mmc@cs.berkeley.edu</a>. | |
+ | |
+In summary, try the following command if romeo hasn't been working for you: | |
+ | |
+<pre> romeo -a <PalmOS version> -l <large ROM prcs>/* -s <small ROM prcs>* -o new.rom [-n] [-S <version> ] [-L <"JP"|"US">] </pre> | |
+ | |
+</td> | |
+</tr> | |
+<tr BGCOLOR="#FFCCCC" NOSAVE> | |
+<td NOSAVE><a href="http://sourceforge.net/project/showfiles.php?group_id=22915&release_id=27561">Romeo | |
+0.5.0 Released</a></td> | |
+ | |
+<td ALIGN=RIGHT NOSAVE>March 17, 2001</td> | |
+</tr> | |
+ | |
+<tr BGCOLOR="#CCCCCC" NOSAVE> | |
+<td COLSPAN="2" NOSAVE>This is the intial release of Romeo. It now | |
+satisfies all the authors' basic needs, and seems quite stable. Although | |
+it is listed as alpha-quality, we believe it is in beta (we're just covering | |
+our behinds in case we're wrong). It currently supports all ROM and | |
+Palm versions we know of, and never crashes.</td> | |
+</tr> | |
+</table></center> | |
+ | |
+<h4> | |
+How Does it Work?</h4> | |
+To use Romeo, you'll need a ROM image to customize. The best way | |
+to get this is with <tt>pi-getrom</tt> from the <a href="http://www.gnu-designs.com/pilot-link/">pilot-link</a> | |
+toolset, which is included with most distributions. You'll also want | |
+to use <a href="http://www.palmos.com/dev/tech/tools/emulator/">Pose</a>, | |
+the PalmOS emulator, to test your new ROM before flashing it onto your | |
+Palm with <a href="http://bodotill.suburbia.com.au/osflash/osflash.html">osflash</a>. | |
+Pose can be found in most distributions, too, but you'll probably need | |
+to download and compile osflash yourself. <b>Note:</b> osflash 1.5 | |
+is not quite compatible with Romeo. The author has accepted patches | |
+fixing the incompatibility, but until he releases them, you need to use | |
+<a href="osflash_romeo.tgz">this | |
+patched version</a>. | |
+<p>Romeo can perform a myriad of actions. The following tutorial | |
+takes you through the process of building a custom ROM step-by-step. | |
+<br> | |
+<ol> | |
+<li> | |
+Backup your Palm. After flashing your new ROM onto your Palm, you | |
+will have to do a hard reset, which will erase everything on your Palm.</li> | |
+ | |
+<br> | |
+<li> | |
+<a href="http://sourceforge.net/projects/romeo/">Download Romeo</a> from | |
+the Sourceforge page and install it on your system (compile from source, | |
+or install an rpm or deb file).</li> | |
+ | |
+<br> | |
+<li> | |
+Get the ROM off your Palm using <tt>pi-getrom</tt>. Here's an example | |
+(assuming <tt>/dev/pilot</tt> is a link to the serial port your HotSync | |
+cable is connected to):</li> | |
+ | |
+<br> | |
+<p> | |
+<p><tt> % pi-getrom /dev/pilot | |
+pilot.rom</tt> | |
+<p>You should now have a file called <tt>pilot.rom</tt>. This is | |
+your ROM image. | |
+<br> | |
+<li> | |
+Romeo can generate a lot of files, so you might want to create some directories | |
+for its output:</li> | |
+ | |
+<br> | |
+<p> | |
+<p><tt> % mkdir prcs.small</tt> | |
+<br><tt> % mkdir prcs.big</tt> | |
+<br> | |
+<li> | |
+The Palm ROM is little more than a collection of PRC files. Romeo | |
+reads in the ROM and outputs all its constituent PRCs. Similarly, | |
+you can give Romeo a list of PRCs and it will contruct a ROM containing | |
+them. The ROM is also divided into two regions: the small ROM and | |
+the large ROM. You should never make any changes to the small ROM, | |
+but you need to take it apart and put it together again in order to create | |
+a ROM that osflash will accept. Hopefully, this inconvenience will | |
+be removed in the future. To take apart the small ROM:</li> | |
+ | |
+<br> | |
+<p> | |
+<p><tt> % cd prcs.small</tt> | |
+<br><tt> % romeo -xsi ../pilot.rom</tt> | |
+<p>The -xsi means "extract the PRCs in the small ROM from input file ../pilot.rom." | |
+To get the large ROM PRCs, | |
+<p><tt> % cd ../prcs.big</tt> | |
+<br><tt> % romeo -xli ../pilot.rom</tt> | |
+<p>I'll leave it to the reader to decipher "-xli." | |
+<br> | |
+<li> | |
+Now suppose you never use the Expense application and the built-in Calculator. | |
+We'll delete it and build a ROM without it.</li> | |
+ | |
+<br> | |
+<p> | |
+<p><tt> % rm Expense* Calculator*</tt> | |
+<br><tt> % cd ..</tt> | |
+<p>Suppose also that you'd like to never be without your favorite document | |
+reader, <a href="http://gutenpalm.sourceforge.net/index.php">GutenPalm</a>, | |
+which you have as GutenPalm.prc. You've also decided that <a href="http://easycalc.sourceforge.net/">EasyCalc</a> | |
+(which requires MathLib.prc) is just way better than the default Calculator, | |
+and GPLed to boot. To assemble a new ROM with these changes, type | |
+<p><tt> % romeo -a 3.50 -s prcs.small/* | |
+-l prcs.big/* GutenPalm.prc Easy*.prc MathLib.prc -o custom.rom</tt> | |
+<p>The -a option is for assembling new ROMs and takes an optional PalmOS | |
+version argument, which defaults to 3.50. The -s option tells Romeo | |
+to build a small ROM including the indicated files. The -l option | |
+adds a large ROM region to the assembled file, and includes the files listed | |
+afterwards. The -o gives the output image file name. | |
+<br> | |
+<li> | |
+Before flashing this new ROM onto your Palm, you should definitely check | |
+that it works under Pose. A ROM that doesn't boot or crashes Pose | |
+will definitely not work on your Palm. So go run pose with your new | |
+ROM right now. I'll wait.</li> | |
+ | |
+<br> | |
+<li> | |
+Now you need to flash this new ROM onto your Palm. First convert | |
+it to a PDB file using the <tt>os2pdb</tt> utility that comes with osflash</li> | |
+ | |
+<br> | |
+<p> | |
+<p><tt> % os2pdb custom.rom</tt> | |
+<p><b>If os2pdb gives you an error or warning, do not use the resulting | |
+pdb! It will break your palm.</b> Then transfer the resulting | |
+file, custom.pdb, to your pilot | |
+<p><tt> % pilot-xfer -i custom.pdb</tt> | |
+<p>Finally, use the OS Flash Palm utility to flash your new ROM onto your | |
+Palm. <b>Do not ignore any warnings that osflash gives you! | |
+Ignoring the warnings will break your Palm, guaranteed.</b> (We made | |
+this mistake, and wrote <a href="romrescue.html">this page</a> as a consequence). | |
+If you get a warning, send us email so we can sort out the incompatibility. | |
+When this is finished, you will definitely need to do a hard reset on your | |
+Palm, and restore all your old settings and applications.</ol> | |
+ | |
+<h4> | |
+Romeo's other features</h4> | |
+Romeo has lots of other features, too. You can modify ROMs in place, | |
+although this isn't as well supported. You can dump an incredible | |
+amount of information about your ROM, which is good for learning the structure | |
+of PalmOS ROMs. You can similarly dump heaps of info about PRC and | |
+PDB files. | |
+<h4> | |
+Frequently Asked Questions</h4> | |
+ | |
+<ul> | |
+<li> | |
+<b>Question:</b> Can this destroy my Palm?</li> | |
+ | |
+<li> | |
+<b>Answer:</b> Yes. Yes it can. Extracting the ROM and building | |
+the custom ROM image are safe, but flashing the new ROM onto your Palm | |
+can leave it unusable if the flashing operation stops early or if your | |
+ROM image is invalid. Fortunately, osflash does not flash the small | |
+ROM area on your Palm. If you discover that your Palm fails to work | |
+after flashing it, there is <a href="romrescue.html">a long, tedious way | |
+to recover</a>.</li> | |
+ | |
+<br> | |
+<li> | |
+<b>Question:</b> How many times can you flash a Palm ROM?</li> | |
+ | |
+<li> | |
+<b>Answe</b>r: Supposedly, hundreds of thousands of times. I've flashed | |
+mine twice as of this writing.</li> | |
+ | |
+<br> | |
+<li> | |
+<b>Question:</b> What versions of PalmOS does Romeo support?</li> | |
+ | |
+<li> | |
+<b>Answer:</b> All of them that we know of, 1.0 through 3.5. Romeo | |
+even supports ROMs that have been modified by FlashPro. Romeo builds | |
+cleaner ROMs than FlashPro and, in fact, FlashPro ROMs are broken!</li> | |
+ | |
+<br> | |
+<li> | |
+<b>Question:</b> What Palm hardware does Romeo support?</li> | |
+ | |
+<li> | |
+<b>Answer:</b> All that we know of. Of course, osflash must support | |
+your Palm for Romeo to be most useful.</li> | |
+ | |
+<br> | |
+<li> | |
+<b>Question:</b> What happens if I burn an application into my ROM and | |
+then a new version comes out?</li> | |
+ | |
+<li> | |
+<b>Answer:</b> If you install the new version as normal, it will be used | |
+instead of the ROM version, although it will take up RAM as usual.</li> | |
+ | |
+<br> | |
+<li> | |
+<b>Question:</b> How many of the default PalmOS PRCs can I leave out and | |
+still have a working ROM?</li> | |
+ | |
+<li> | |
+<b>Answer:</b> I'm not sure. You can leave out any of the standard | |
+applications (memo, todo, calendar, mail, address book, etc). The | |
+Palm VII comes with a whole host of wireless applications that you can | |
+remove if you don't use them. If you decide that you need them, you | |
+can always just install them later! Some PRCs are required though. | |
+As a general rule, if you don't know what it is, you should leave it in. | |
+There are some things worth mentioning specifically:</li> | |
+ | |
+<ul> | |
+<li> | |
+The Preferences program has several plugins: Buttons.prc, Digitizer.prc, | |
+etc. If you leave these out, the ROM will work in Pose. On | |
+my Palm, though, the Preferences program would not run without the Digitizer | |
+installed (and presumably any of the others). Even worse, it would | |
+hang during the initial setup trying to run the Digitizer Panel to calibrate | |
+itself. Since these are all pretty small, it may not be worth the | |
+risk of leaving them out. I would love to hear from anyone who does | |
+more experiments in this area.</li> | |
+ | |
+<li> | |
+My Palm comes with Cmd-nettrace.prc and Cmd-ping.prc. You can probably | |
+leave these out, but I haven't checked.</li> | |
+ | |
+<li> | |
+You might be able to leave out the various "NetIF" PRCs if you don't use | |
+networking, but I haven't checked, since I do use networking.</li> | |
+ | |
+<li> | |
+You have to leave in Setup.prc.</li> | |
+ | |
+<br> </ul> | |
+ | |
+<li> | |
+<b>Question:</b> Can I store PDBs in my ROM?</li> | |
+ | |
+<li> | |
+<b>Answer:</b> Yes, but they will be immutable. Sometimes this is | |
+fine. For example, some games store their graphics and sound files | |
+in a seperate PDB. You can safely put this file in your ROM. | |
+You probably don't want to put the game's high scores table in ROM, though.</li> | |
+ | |
+<br> | |
+<li> | |
+<b>Question:</b> Why don't my ROM applications show up in some lists (such | |
+as the beaming list)?</li> | |
+ | |
+<li> | |
+<b>Answer:</b> Good question.</li> | |
+</ul> | |
+ | |
+<hr WIDTH="100%"> | |
+<br><img SRC="http://sourceforge.net/sflogo.php?group_id=22915" ALT="SourceForge Logo" NOSAVE height=31 width=88 align=CENTER> | |
+</body> | |
+</html> | |
--- romeo-0.5.0.orig/debian/install | |
+++ romeo-0.5.0/debian/install | |
@@ -0,0 +1 @@ | |
+romeo usr/bin | |
--- romeo-0.5.0.orig/version.h | |
+++ romeo-0.5.0/version.h | |
@@ -0,0 +1,10 @@ | |
+#ifndef __version_h__ | |
+#define __version_h__ | |
+ | |
+#define ROMEO_VERSION "0.5.0" | |
+#define ROMEO_COPYRIGHT \ | |
+"Copyright (C) 2001 Monica Chew and Rob Johnson\n"\ | |
+"This is free software; see the source for copying conditions. There is NO\n"\ | |
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" | |
+ | |
+#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment