bentley
367abd8396
remove psion2 compatibility; i doubt anyone uses it
2010-01-15 12:35:11 -07:00
bentley
97b9e822aa
xlink: fix usage
2010-01-15 12:15:19 -07:00
bentley
1202c6b459
minor: fix implicit declaration warning
2010-01-15 11:04:00 -07:00
bentley
755572c111
replace linkfile functionality with command-line options
...
Instead of running:
$ xlink linkfile.txt
where the linkfile looks like:
---
[Objects]
foo.o
bar.o
[Libraries]
foo.l
bar.l
[Output]
baz.gb
---
we now do:
$ xlink -o baz.gb -l foo.l -l bar.l foo.o bar.o
2010-01-15 10:52:38 -07:00
bentley
b223905e67
xlink: use some proper return values
2010-01-15 00:33:46 -07:00
bentley
157fda2bc8
xlink: fix usage printing to match new options (and rgbfix format)
2010-01-15 00:29:10 -07:00
bentley
c5ce3ae178
xlink: use getopt(3) instead of hand-rolled flag parsing
2010-01-15 00:23:59 -07:00
bentley
0017a93a13
minor: finish removing unused var temptext
2010-01-14 23:47:10 -07:00
bentley
0b08fca9f2
xlink: replace awkward fatalerror() with standard errx(3)
...
fatalerror() prints a given string to stdout and exits(5). It
cannot format text, so there was a string temptext used with
sprintf() to format text and pass it to fatalerror().
errx() can format text, and it prints to stderr.
As a bonus, this fixes the linking warnings from use of sprintf().
2010-01-14 23:17:22 -07:00
bentley
bb85782faa
this is a bourne script, bash is not needed
...
Don't use /bin/bash ! Many systems do not have bash there (they
might have it at /usr/local/bin/bash, for example). Don't specify
bash unless you specifically need bash features -- many systems
do not have bash installed by default.
2010-01-14 22:16:59 -07:00
bentley
b69cd0c345
-v doesn't need to modify ROM size; -p can do that
2010-01-13 11:22:56 -07:00
bentley
2da63e2f7d
cosmetic change: rearrange getopt() switch for easier reading
...
cases are put in alphabetical order, to match the getopt string.
2010-01-13 10:08:23 -07:00
bentley
0b647c5a25
move color only flag to -c, color compatible flag to -C
2010-01-13 10:04:42 -07:00
bentley
2d5c193e6d
move MBC option from -b to -m
2010-01-13 09:50:02 -07:00
bentley
cd52e3c56c
move ramsize option from -m to -r
2010-01-13 09:48:13 -07:00
bentley
5931973029
fix compile error on Linux
2010-01-13 08:26:48 -07:00
bentley
a913dc01b5
remove unused variable argn (no longer needed due to getopt(3) usage)
2010-01-13 07:33:02 -07:00
bentley
9da8db3ce1
fix cast warnings
2010-01-13 07:31:34 -07:00
bentley
cdb90cea29
remove archaic 512KiB error, replace with 8MiB warning
2010-01-12 22:46:53 -07:00
bentley
d0a03bc99b
pad option now changes the ROM size at 0x148
2010-01-12 22:40:37 -07:00
bentley
cba8933c11
remove unneeded carttype checking in -v
...
To simplify the code, remove the carttype work in the -v option.
Because the MBC option already alters it, this one is superfluous.
2010-01-12 21:21:48 -07:00
bentley
b2a4f54f59
rename PrintUsage() to usage(), and return EX_USAGE
2010-01-12 19:52:42 -07:00
bentley
5fe2bcbeed
use errx(3) and warnx(3) instead of rolling our own error functions
2010-01-12 19:44:21 -07:00
bentley
fd9901a280
remove the -r (truncate) option
...
I can't think of a single use case for the -r (truncate) option.
It has been removed to make the code simpler.
If you do use it and have good reason to do so, let me know and I
will consider putting it back in.
2010-01-12 19:05:23 -07:00
bentley
f617078fda
finish minor consistency output changes
2010-01-12 18:42:32 -07:00
anthony
198fcfaab3
minor text output changes
...
- Put quotes around string arguments
- Be consistent with spacing and colons
- Use 0xnn instead of 0Xnn
2010-01-12 18:17:31 -07:00
anthony
ac5b311005
use SI units (KiB) instead of the ambiguous kB
2010-01-12 18:04:42 -07:00
anthony
c3fa922c2f
fix quiet mode oversight
...
A line never printed because it checks for the wrong flag instead
of OPTF_QUIET. This fixes it.
2010-01-12 17:55:07 -07:00
anthony
b23c5ab4ba
rewrite usage to match new getopt() option format
2010-01-12 17:33:08 -07:00
anthony
16c7a49ffa
use getopt(3) instead of our hand-rolled flag parsing
...
Simplify and standardize the code by using the standard getopt()
function for parsing command-line flags.
This is a backwards-incompatible change.
2010-01-12 14:25:54 -07:00
anthony
8f5e767615
list new default init values in usage information (rgbasm, xlink)
2010-01-05 14:21:42 -07:00
anthony
8614871e68
change unitialized byte values in xlink to 0
2010-01-05 14:17:24 -07:00
anthony
b864431a14
add yacc output to the clean target
2010-01-05 14:11:54 -07:00
anthony
f9e443b10c
get rid of a strcpy() warning on OpenBSD
2010-01-05 14:08:18 -07:00
anthony
ed3e35e628
set default fillchar for rgbasm to 0, not random
2010-01-05 14:01:32 -07:00
anthony
290c65e9b2
minor spacing changes in output
2010-01-04 20:11:52 -07:00
anthony
8f1ad7f9fc
the -k flag wrote to the wrong location. fixing the bug
2010-01-04 20:09:05 -07:00
anthony
f0361ee025
many of the flags did not respect -d (debug) flag. this fixes them.
2010-01-04 20:04:25 -07:00
anthony
3649cec52d
add -k option to set new licensee code
2010-01-04 20:00:34 -07:00
anthony
fb81793d9f
add -s flag for SGB mode
2010-01-04 19:50:24 -07:00
anthony
6752b10204
add -j option for setting 0x14A (region flag)
2010-01-04 19:40:01 -07:00
anthony
2d72b12eb8
error out if both -o and -c are specified
2009-12-30 19:47:44 -07:00
anthony
77bbbba9f3
give warning if -c/-o overwrites last character of new title
2009-12-30 18:58:48 -07:00
anthony
8e9672c1dd
add -c/-o flags to set GBC flag (lmod)
2009-12-30 18:39:27 -07:00
anthony
317c2662ba
add -b option to the usage (lmod)
2009-12-30 16:54:24 -07:00
anthony
3397810e8d
when changing MBC, print the name of the MBC (lmod)
2009-12-30 16:52:37 -07:00
anthony
2afdc060d0
add -b option to change MBC type (lmod)
2009-12-30 16:32:28 -07:00
anthony
7e4104cabe
add option to change memory size (from lmod)
2009-12-30 15:55:00 -07:00
anthony
ecae948371
remove some tabs to make usage information easier to read on a terminal
2009-12-30 14:10:29 -07:00
anthony
dd16f2d59c
add new info on -p to usage information
2009-12-30 14:05:56 -07:00