Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
Commits on Dec 01, 2011
@wpwrak wpwrak softusb: accept everything but non-MIDI and system messages
This patch removes the limitation to control change messages. We can
now also have "piano" notes and so on.
58daf4c
Commits on Dec 02, 2011
Xiangfu Liu bios: make the LIBS as .PHONY
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
72005cf
Commits on Dec 03, 2011
@wpwrak wpwrak libfpvm: use C operator precedence
Placing each operator at its own precedence level subtly alters the
evaluation order for +, -, *, and /, which can produce unexpected
results where rounding errors are considered.

More significantly, the precendence of % differs from that used in
C (and various other languages). For example,

2 * 3.1 % 2  with C precedence would be
(2 * 3.1) % 2 = 6.2 % 2 = 0.2   (unlike C's %, our % if really fmod)

By giving % higher precedence than *, we get
2 * (3.1 % 2) = 2 * 1.1 = 2.2  instead.

I don't know if this difference is intentional, e.g., required for
compatibility with Milkdrop. But it does at least look suspicious.

- Werner
36b1e07
View
5 softusb-input/main.c
@@ -497,7 +497,10 @@ static char process_midi(unsigned char *buf, unsigned char len)
*/
for(i = 0; i != end; i += 4) {
- if((buf[i+1] & 0xf0) != 0xb0) /* not a control change */
+ unsigned char type = buf[i+1] & 0xf0;
+
+ /* ignore non-MIDI and all system messages */
+ if(type < 0x80 || type == 0xf0)
continue;
m = COMLOC_MIDI_PRODUCE;
for(j = 0; j != 4; j++)
View
2  software/bios/Makefile
@@ -33,7 +33,7 @@ $(MMDIR)/software/libhal/libhal.a:
$(MMDIR)/software/libnet/libnet.a:
make -C $(MMDIR)/software/libnet/
-.PHONY: clean depend
+.PHONY: clean depend $(LIBS)
depend:
makedepend -Y -- $(CFLAGS) -- *.c
View
7 software/libfpvm/parser.y
@@ -53,11 +53,8 @@ node(N) ::= TOK_IDENT(I). {
N->contents.branches.c = NULL;
}
-%left TOK_PLUS.
-%left TOK_MINUS.
-%left TOK_MULTIPLY.
-%left TOK_DIVIDE.
-%left TOK_PERCENT.
+%left TOK_PLUS TOK_MINUS.
+%left TOK_MULTIPLY TOK_DIVIDE TOK_PERCENT.
%left TOK_NOT.
node(N) ::= node(A) TOK_PLUS node(B). {

No commit comments for this range

Something went wrong with that request. Please try again.