mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-22 22:05:11 +00:00
Removed portmidi temporarily
This commit is contained in:
parent
9abcca773b
commit
99721ecc55
4 changed files with 16 additions and 6 deletions
|
@ -4,7 +4,7 @@ An [8-bit stack-based computer](https://wiki.xxiivv.com/site/uxn.html), written
|
|||
|
||||
## 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
|
||||
./build.sh
|
||||
|
|
6
build.sh
6
build.sh
|
@ -25,12 +25,12 @@ if [ "${1}" = '--debug' ];
|
|||
then
|
||||
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/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
|
||||
else
|
||||
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/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
|
||||
|
||||
echo "Installing.."
|
||||
|
@ -42,7 +42,7 @@ then
|
|||
fi
|
||||
|
||||
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.."
|
||||
if [ "${2}" = '--cli' ];
|
||||
|
|
|
@ -15,6 +15,7 @@ WITH REGARD TO THIS SOFTWARE.
|
|||
int
|
||||
initmpu(Mpu *m, Uint8 device)
|
||||
{
|
||||
/*
|
||||
int i;
|
||||
Pm_Initialize();
|
||||
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);
|
||||
m->queue = 0;
|
||||
m->error = pmNoError;
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
listenmpu(Mpu *m)
|
||||
{
|
||||
/*
|
||||
const int result = Pm_Read(m->midi, m->events, 32);
|
||||
if(result < 0) {
|
||||
m->error = (PmError)result;
|
||||
|
@ -38,4 +41,5 @@ listenmpu(Mpu *m)
|
|||
return;
|
||||
}
|
||||
m->queue = result;
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <portmidi.h>
|
||||
/* #include <portmidi.h> */
|
||||
|
||||
/*
|
||||
Copyright (c) 2021 Devine Lu Linvega
|
||||
|
@ -16,11 +16,17 @@ WITH REGARD TO THIS SOFTWARE.
|
|||
|
||||
typedef unsigned char Uint8;
|
||||
|
||||
typedef struct {
|
||||
int message;
|
||||
} PmEvent;
|
||||
|
||||
typedef struct {
|
||||
Uint8 queue;
|
||||
PmStream *midi;
|
||||
PmEvent events[32];
|
||||
/*
|
||||
PmStream *midi;
|
||||
PmError error;
|
||||
*/
|
||||
} Mpu;
|
||||
|
||||
int initmpu(Mpu *m, Uint8 device);
|
||||
|
|
Loading…
Reference in a new issue