Browse code

Removed portmidi temporarily

neauoire authored on 21/05/2021 15:58:10
Showing 4 changed files
... ...
@@ -4,7 +4,7 @@ An [8-bit stack-based computer](https://wiki.xxiivv.com/site/uxn.html), written
4 4
 
5 5
 ## Build
6 6
 
7
-To build the Uxn emulator on Linux, you must have [SDL2](https://wiki.libsdl.org/) and [Portmidi](http://portmedia.sourceforge.net/portmidi/).
7
+To build the Uxn emulator on Linux, you must have [SDL2](https://wiki.libsdl.org/).
8 8
 
9 9
 ```sh
10 10
 ./build.sh 
... ...
@@ -25,12 +25,12 @@ if [ "${1}" = '--debug' ];
25 25
 then
26 26
 	echo "[debug]"
27 27
     cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined src/assembler.c -o bin/uxnasm
28
-	cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined src/uxn.c src/devices/ppu.c src/devices/apu.c src/devices/mpu.c src/emulator.c -L/usr/local/lib -lSDL2 -lportmidi -o bin/uxnemu
28
+	cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined src/uxn.c src/devices/ppu.c src/devices/apu.c src/devices/mpu.c src/emulator.c -L/usr/local/lib -lSDL2 -o bin/uxnemu
29 29
     cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined src/uxn.c src/debugger.c -o bin/debugger
30 30
 else
31 31
 	cc src/assembler.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -o bin/uxnasm
32 32
 	cc src/uxn.c src/debugger.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -o bin/debugger
33
-	cc src/uxn.c src/devices/ppu.c src/devices/apu.c src/devices/mpu.c src/emulator.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -L/usr/local/lib -lSDL2 -lportmidi -o bin/uxnemu
33
+	cc src/uxn.c src/devices/ppu.c src/devices/apu.c src/devices/mpu.c src/emulator.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -L/usr/local/lib -lSDL2 -o bin/uxnemu
34 34
 fi
35 35
 
36 36
 echo "Installing.."
... ...
@@ -42,7 +42,7 @@ then
42 42
 fi
43 43
 
44 44
 echo "Assembling.."
45
-./bin/uxnasm projects/examples/devices/screen.usm bin/boot.rom
45
+./bin/uxnasm projects/examples/devices/controller.buttons.usm bin/boot.rom
46 46
 
47 47
 echo "Running.."
48 48
 if [ "${2}" = '--cli' ]; 
... ...
@@ -15,6 +15,7 @@ WITH REGARD TO THIS SOFTWARE.
15 15
 int
16 16
 initmpu(Mpu *m, Uint8 device)
17 17
 {
18
+	/*
18 19
 	int i;
19 20
 	Pm_Initialize();
20 21
 	for(i = 0; i < Pm_CountDevices(); ++i)
... ...
@@ -25,12 +26,14 @@ initmpu(Mpu *m, Uint8 device)
25 26
 	Pm_OpenInput(&m->midi, device, NULL, 128, 0, NULL);
26 27
 	m->queue = 0;
27 28
 	m->error = pmNoError;
29
+	*/
28 30
 	return 1;
29 31
 }
30 32
 
31 33
 void
32 34
 listenmpu(Mpu *m)
33 35
 {
36
+	/*
34 37
 	const int result = Pm_Read(m->midi, m->events, 32);
35 38
 	if(result < 0) {
36 39
 		m->error = (PmError)result;
... ...
@@ -38,4 +41,5 @@ listenmpu(Mpu *m)
38 41
 		return;
39 42
 	}
40 43
 	m->queue = result;
44
+	*/
41 45
 }
... ...
@@ -1,6 +1,6 @@
1 1
 #include <stdio.h>
2 2
 #include <stdlib.h>
3
-#include <portmidi.h>
3
+/* #include <portmidi.h> */
4 4
 
5 5
 /*
6 6
 Copyright (c) 2021 Devine Lu Linvega
... ...
@@ -16,11 +16,17 @@ WITH REGARD TO THIS SOFTWARE.
16 16
 
17 17
 typedef unsigned char Uint8;
18 18
 
19
+typedef struct {
20
+	int message;
21
+} PmEvent;
22
+
19 23
 typedef struct {
20 24
 	Uint8 queue;
21
-	PmStream *midi;
22 25
 	PmEvent events[32];
26
+	/*
27
+	PmStream *midi;
23 28
 	PmError error;
29
+	*/
24 30
 } Mpu;
25 31
 
26 32
 int initmpu(Mpu *m, Uint8 device);