shithub: riscv

Download patch

ref: 04c4a9ca8b06e34a203f7ddacc2263cf2077e1aa
parent: be8cbcc8524cee8328bce97200f5d7e22abbb3da
parent: 8ce18a6338b52a419841237e8f9b42847bdacba6
author: cinap_lenrek <[email protected]>
date: Sun Feb 2 15:33:40 EST 2020

merge

--- a/sys/man/1/atari
+++ b/sys/man/1/atari
@@ -16,8 +16,22 @@
 It exectues the romfile given as an argument,
 and controls as if using a regular 4-direction 1-button joystick,
 using \fBspace\fR button and directional keys.
-The \fBq\fR, \fBw\fR, \fBe\fR, \fBr\fR keys correspond respectively to the reset, select, player 1 difficulty and color mode switches.
+The \fBq\fR, \fBw\fR, \fBe\fR and \fBr\fR keys correspond respectively to the reset, select, player 1 difficulty and color mode switches.
 Other keys:
+.TP
+F1
+Pause the emulator. If already paused it will step one video frame.
+.TP
+F12
+Toggle the emulator's speedometer.  It shows in the upper left,
+off-viewport corner, the ratio between the expected and observed time it
+took to draw 60 frames.
+.TP
+t
+Toggle tracing of the emulator.
+.TP
+`
+It uncaps the 60fps frame rate and lets emulation go as fast as possible.
 .TP
 Esc
 Pause the emulator.
--- a/sys/man/1/nintendo
+++ b/sys/man/1/nintendo
@@ -4,7 +4,7 @@
 .SH SYNOPSIS
 .B games/gb
 [
-.B -acdT
+.B -acd
 ]
 [
 .B -C
@@ -17,7 +17,7 @@
 .br
 .B games/gba
 [
-.B -aT
+.B -a
 ] [
 .B -b
 .I biosfile
@@ -41,7 +41,7 @@
 .br
 .B games/snes
 [
-.B -ahmsT
+.B -ahms
 ] [
 .B -x
 .I scale
@@ -55,14 +55,28 @@
 .I snes
 are emulators for the Nintendo Game Boy and Game Boy Color (GB and GBC), Nintendo Game Boy Advance (GBA), Nintendo Entertainment System (NES), and Super Nintendo Entertainment System (SNES).
 They execute the romfile given as an argument.
-The \fBz\fR, \fBx\fR, \fBa\fR, \fBs\fR, \fBq\fR, \fBw\fRreturn and shift keys correspond to B, A, Y, X, L1, L2, Start and Select, respectively.
+The \fBz\fR, \fBx\fR, \fBa\fR, \fBs\fR, \fBq\fR, \fBw, \fRreturn and shift keys correspond to B, A, Y, X, L1, L2, Start and Select, respectively.
 Other keys:
 .TP
+F1
+Pause the emulator. If already paused it will step one video frame.
+.TP
 F5
 Save the current state in \fBgb.save\fR / \fBgba.save\fR / \fBnes.save\fR / \fBsnes.save\fR.
 .TP
 F6
 Load the current state from \fBgb.save\fR / \fBgba.save\fR / \fBnes.save\fR / \fBsnes.save\fR.
+.TP
+F12
+Toggle the emulator's speedometer.  It shows in the upper left,
+off-viewport corner, the ratio between the expected and observed time it
+took to draw 60 frames.
+.TP
+t
+Toggle tracing of the emulator.
+.TP
+`
+It uncaps the 60fps frame rate and lets emulation go as fast as possible.
 .TP
 Esc
 Pause the emulator.
--- a/sys/man/1/sega
+++ b/sys/man/1/sega
@@ -17,6 +17,20 @@
 The \fBz\fR, \fBx\fR, \fBa\fR, return and shift keys correspond to A, B, C, Start and Select, respectively.
 Other keys:
 .TP
+F1
+Pause the emulator. If already paused it will step one video frame.
+.TP
+F12
+Toggle the emulator's speedometer.  It shows in the upper left,
+off-viewport corner, the ratio between the expected and observed time it
+took to draw 60 frames.
+.TP
+t
+Toggle tracing of the emulator.
+.TP
+`
+It uncaps the 60fps frame rate and lets emulation go as fast as possible.
+.TP
 Esc
 Pause the emulator.
 .TP
--- a/sys/man/1/walk
+++ b/sys/man/1/walk
@@ -10,7 +10,7 @@
 .I mind,maxd
 ] [
 .B -e
-.I ststr
+.I statfmt
 ] [
 .I name ...
 ]
@@ -18,7 +18,7 @@
 .I Walk
 recursively descends any directory arguments,
 printing the name of each file on a separate line.
-When no arguments are given, the current directory
+When no arguments are given, the working directory
 is assumed.
 Non-directory arguments are checked for existence,
 then printed, if so.
@@ -50,7 +50,7 @@
 .TP
 .B -e statfmt
 Setting the statfmt string allows specifying the data
-.B walk
+.I walk
 should print.
 It takes a string of characters, each corresponding
 to some piece of information about the file being
@@ -89,6 +89,12 @@
 .TP
 .B x
 permissions
+.TP
+.B D
+server device
+.TP
+.B T
+server type (kernel device rune)
 .PD
 .PP
 The default statfmt is simply,
--- a/sys/src/cmd/acme/acme.c
+++ b/sys/src/cmd/acme/acme.c
@@ -316,7 +316,6 @@
 		buf[n] = '\0';
 		s = estrdup(buf);
 		sendp(cerr, s);
-		free(s);
 	}
 	free(buf);
 }
--- a/sys/src/cmd/walk.c
+++ b/sys/src/cmd/walk.c
@@ -71,6 +71,10 @@
 		case 'q': Bprint(bout, "%ullx.%uld.%.2uhhx", f->qid.path, f->qid.vers, f->qid.type); break;
 		case 's': Bprint(bout, "%lld", f->length); break;
 		case 'x': Bprint(bout, "%ulo", f->mode); break;
+
+		/* These two  are slightly different, as they tell us about the fileserver instead of the file */
+		case 'D': Bprint(bout, "%ud", f->dev); break;
+		case 'T': Bprint(bout, "%C", f->type); break;
 		default:
 			abort();
 		}
@@ -238,9 +242,9 @@
 		if((stfmt = s_reset(stfmt)) == nil)
 			sysfatal("s_reset: %r");
 		s_append(stfmt, EARGF(usage()));
-		i = strspn(s_to_c(stfmt), "UGMamnpqsx");
+		i = strspn(s_to_c(stfmt), "UGMamnpqsxDT");
 		if(i != s_len(stfmt))
-			sysfatal("bad stfmt: %s\n", s_to_c(stfmt));
+			sysfatal("bad stfmt: %s", s_to_c(stfmt));
 		break;
 	default:
 		usage();