-.SH ATARI 1
+.TH ATARI 1
.SH NAME
2600 \- emulator
.SH SYNOPSIS
.B games/2600
[
.B -a
+] [
+.B -x
+.I scale
]
.I romfile
.SH DESCRIPTION
.TP
.B -a
Enable audio output.
+.TP
+.B -x
+Scale the screen to a given factor regardless of the window's size.
.SH SOURCE
.B /sys/src/games/2600
.SH BUGS
[
.B -C
.I ...
+] [
+.B -x
+.I scale
]
.I romfile
.br
] [
.B -s
.I savetype
+] [
+.B -x
+.I scale
]
.I romfile
.br
.B games/nes
[
.B -aos
+] [
+.B -x
+.I scale
]
.I romfile
.br
.B games/snes
[
.B -ahmsT
+] [
+.B -x
+.I scale
]
.I romfile
.SH DESCRIPTION
.TP
.B -a
Enable audio output.
+.TP
+.B -x
+Scale the screen to a given factor regardless of the window's size.
.PP
.B gb
options:
.B games/md
[
.B -a
+] [
+.B -x
+.I scale
]
.I romfile
.SH DESCRIPTION
.TP
.B -a
Enable audio output.
+.TP
+.B -x
+Scale the screen to a given factor regardless of the window's size.
.SH SOURCE
.B /sys/src/games/md
.SH BUGS
close(fd);
}
+void
+usage(void)
+{
+ fprint(2, "usage: %s [-a] [-x scale] rom\n", argv0);
+ exits("usage");
+}
+
void
threadmain(int argc, char **argv)
{
case 'a':
initaudio();
break;
+ case 'x':
+ fixscale = strtol(EARGF(usage()), nil, 0);
+ break;
default:
- goto usage;
+ usage();
} ARGEND;
- if(argc != 1){
- usage:
- fprint(2, "usage: %s [ -23a ] rom\n", argv0);
- exits("usage");
- }
+ if(argc != 1)
+ usage();
loadrom(argv[0]);
initemu(PICW, PICH, 4, XRGB32, 1, nil);
regkey("a", ' ', 1<<4);
static void
usage(void)
{
- fprint(2, "usage: %s [ -23a ] [ rom ]\n", argv0);
+ fprint(2, "usage: %s [-Nap] [-c cart] [-t tape] [-d bindir] [-x scale] rom\n", argv0);
exits("usage");
}
case 'd':
bindir = strdup(EARGF(usage()));
break;
+ case 'x':
+ fixscale = strtol(EARGF(usage()), nil, 0);
+ break;
default:
usage();
} ARGEND;
int trace, paused;
int savereq, loadreq;
QLock pauselock;
-int scale, warp10;
+int scale, fixscale, warp10;
uchar *pic;
Rectangle picr;
Mousectl *mc;
{
Point p;
- scale = Dx(screen->r) / vwdx;
- if(scale <= 0)
- scale = 1;
- else if(scale > 16)
- scale = 16;
+ if(!fixscale){
+ scale = Dx(screen->r) / vwdx;
+ if(Dy(screen->r) / vwdy < scale)
+ scale = Dy(screen->r) / vwdy;
+ if(scale <= 0)
+ scale = 1;
+ else if(scale > 16)
+ scale = 16;
+ }
p = divpt(addpt(screen->r.min, screen->r.max), 2);
picr = Rpt(subpt(p, Pt(scale * vwdx/2, scale * vwdy/2)),
addpt(p, Pt(scale * vwdx/2, scale * vwdy/2)));
if(kproc == nil)
proccreate(joyproc, nil, mainstacksize);
bg = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0xCCCCCCFF);
+ scale = fixscale;
screeninit();
}
extern int trace, paused;
extern int savereq, loadreq;
extern QLock pauselock;
-extern int scale, warp10;
+extern int scale, fixscale, warp10;
extern uchar *pic;
void* emalloc(ulong);
void
usage(void)
{
- fprint(2, "usage: %s [-23aTcd] [-C col0,col1,col2,col3] rom\n", argv0);
+ fprint(2, "usage: %s [-aTcd] [-C col0,col1,col2,col3] [-x scale] rom\n", argv0);
exits("usage");
}
case 'C':
colparse(EARGF(usage()));
break;
+ case 'x':
+ fixscale = strtol(EARGF(usage()), nil, 0);
+ break;
default:
usage();
} ARGEND;
void
usage(void)
{
- fprint(2, "usage: %s [-aT] [-s savetype] [-b biosfile] rom\n", argv0);
+ fprint(2, "usage: %s [-a] [-s savetype] [-b biosfile] [-x scale] rom\n", argv0);
exits("usage");
}
case 'b':
biosfile = strdup(EARGF(usage()));
break;
+ case 'x':
+ fixscale = strtol(EARGF(usage()), nil, 0);
+ break;
default:
usage();
} ARGEND;
}
}
+void
+usage(void)
+{
+ fprint(2, "usage: %s [-a] [-x scale] rom\n", argv0);
+ exits("usage");
+}
+
void
threadmain(int argc, char **argv)
{
case 'a':
initaudio();
break;
+ case 'x':
+ fixscale = strtol(EARGF(usage()), nil, 0);
+ break;
default:
- ;
+ usage();
} ARGEND;
-
- if(argc != 1){
- fprint(2, "usage: %s [-23a] rom\n", argv0);
- threadexitsall("usage");
- }
+ if(argc < 1)
+ usage();
loadrom(*argv);
initemu(320, 224, 4, XRGB32, 1, nil);
regkey("a", 'c', 1<<5);
mapper[map](INIT, 0);
}
+void
+usage(void)
+{
+ fprint(2, "usage: %s [-aos] [-x scale] rom\n", argv0);
+ exits("usage");
+}
+
void
threadmain(int argc, char **argv)
{
case 's':
sflag = 1;
break;
+ case 'x':
+ fixscale = strtol(EARGF(usage()), nil, 0);
+ break;
default:
- goto usage;
+ usage();
} ARGEND;
-
- if(argc != 1){
- usage:
- fprint(2, "usage: %s [-23aos] rom\n", argv0);
- threadexitsall("usage");
- }
+ if(argc < 1)
+ usage();
loadrom(argv[0], sflag);
initemu(256, 240 - oflag * 16, 4, XRGB32, 1, nil);
regkey("b", 'z', 1<<1);
}
}
+void
+usage(void)
+{
+ fprint(2, "usage: %s [-23ahmsT] [-x scale] rom\n", argv0);
+ exits("usage");
+}
+
void
threadmain(int argc, char **argv)
{
case 'h':
hirom++;
break;
+ case 'x':
+ fixscale = strtol(EARGF(usage()), nil, 0);
+ break;
default:
- goto usage;
+ usage();
} ARGEND;
-
- if(argc != 1){
-usage:
- fprint(2, "usage: %s [-23ahmsT] rom\n", argv0);
- threadexitsall("usage");
- }
+ if(argc < 1)
+ usage();
loadrom(argv[0]);
initemu(256, 239, 2, RGB15, !mouse, nil);
regkey("b", 'z', 1<<31);