Removed portmidi temporarily
This commit is contained in:
parent
9abcca773b
commit
99721ecc55
|
@ -4,7 +4,7 @@ An [8-bit stack-based computer](https://wiki.xxiivv.com/site/uxn.html), written
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
To build the Uxn emulator on Linux, you must have [SDL2](https://wiki.libsdl.org/) and [Portmidi](http://portmedia.sourceforge.net/portmidi/).
|
To build the Uxn emulator on Linux, you must have [SDL2](https://wiki.libsdl.org/).
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./build.sh
|
./build.sh
|
||||||
|
|
6
build.sh
6
build.sh
|
@ -25,12 +25,12 @@ if [ "${1}" = '--debug' ];
|
||||||
then
|
then
|
||||||
echo "[debug]"
|
echo "[debug]"
|
||||||
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
|
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
|
||||||
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
|
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
|
||||||
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
|
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
|
||||||
else
|
else
|
||||||
cc src/assembler.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -o bin/uxnasm
|
cc src/assembler.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -o bin/uxnasm
|
||||||
cc src/uxn.c src/debugger.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -o bin/debugger
|
cc src/uxn.c src/debugger.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -o bin/debugger
|
||||||
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
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing.."
|
echo "Installing.."
|
||||||
|
@ -42,7 +42,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Assembling.."
|
echo "Assembling.."
|
||||||
./bin/uxnasm projects/examples/devices/screen.usm bin/boot.rom
|
./bin/uxnasm projects/examples/devices/controller.buttons.usm bin/boot.rom
|
||||||
|
|
||||||
echo "Running.."
|
echo "Running.."
|
||||||
if [ "${2}" = '--cli' ];
|
if [ "${2}" = '--cli' ];
|
||||||
|
|
|
@ -15,6 +15,7 @@ WITH REGARD TO THIS SOFTWARE.
|
||||||
int
|
int
|
||||||
initmpu(Mpu *m, Uint8 device)
|
initmpu(Mpu *m, Uint8 device)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
int i;
|
int i;
|
||||||
Pm_Initialize();
|
Pm_Initialize();
|
||||||
for(i = 0; i < Pm_CountDevices(); ++i)
|
for(i = 0; i < Pm_CountDevices(); ++i)
|
||||||
|
@ -25,12 +26,14 @@ initmpu(Mpu *m, Uint8 device)
|
||||||
Pm_OpenInput(&m->midi, device, NULL, 128, 0, NULL);
|
Pm_OpenInput(&m->midi, device, NULL, 128, 0, NULL);
|
||||||
m->queue = 0;
|
m->queue = 0;
|
||||||
m->error = pmNoError;
|
m->error = pmNoError;
|
||||||
|
*/
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
listenmpu(Mpu *m)
|
listenmpu(Mpu *m)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
const int result = Pm_Read(m->midi, m->events, 32);
|
const int result = Pm_Read(m->midi, m->events, 32);
|
||||||
if(result < 0) {
|
if(result < 0) {
|
||||||
m->error = (PmError)result;
|
m->error = (PmError)result;
|
||||||
|
@ -38,4 +41,5 @@ listenmpu(Mpu *m)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m->queue = result;
|
m->queue = result;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <portmidi.h>
|
/* #include <portmidi.h> */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2021 Devine Lu Linvega
|
Copyright (c) 2021 Devine Lu Linvega
|
||||||
|
@ -16,11 +16,17 @@ WITH REGARD TO THIS SOFTWARE.
|
||||||
|
|
||||||
typedef unsigned char Uint8;
|
typedef unsigned char Uint8;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int message;
|
||||||
|
} PmEvent;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Uint8 queue;
|
Uint8 queue;
|
||||||
PmStream *midi;
|
|
||||||
PmEvent events[32];
|
PmEvent events[32];
|
||||||
|
/*
|
||||||
|
PmStream *midi;
|
||||||
PmError error;
|
PmError error;
|
||||||
|
*/
|
||||||
} Mpu;
|
} Mpu;
|
||||||
|
|
||||||
int initmpu(Mpu *m, Uint8 device);
|
int initmpu(Mpu *m, Uint8 device);
|
||||||
|
|
Loading…
Reference in New Issue