Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
0e4e3e8
FFmpeg Fix
Mar 14, 2014
1d5c2e1
FFmepg removed all deprecated - almost works -
Mar 14, 2014
9040191
FFmepg removed all deprecated - almost works -
Mar 16, 2014
f2f23fe
Video fix
invalid-email-address Mar 19, 2014
8ca2f95
Upgrade FFmpeg values
invalid-email-address Mar 19, 2014
77fb812
Put some debug to understand ...
Mar 19, 2014
5e3c0b4
Fix video - Ubuntu 13.10 no sound
invalid-email-address Mar 21, 2014
e04badf
Change git owner
fredbcode Mar 21, 2014
01a7fc2
Fix sound
Mar 23, 2014
7c7cb34
Clean
Mar 23, 2014
b0c0b48
Sound test
fredbcode Mar 24, 2014
46aeb6b
OK sound fixed - Ok video fixed
fredbcode Mar 29, 2014
ec98ae1
Add comment
fredbcode Mar 29, 2014
fab280b
New option video loop true/false
fredbcode Mar 30, 2014
58ffa0e
Delete video2.c
fredbcode Mar 30, 2014
b313618
clean
fredbcode Apr 1, 2014
09105bc
Clean code
fredbcode Apr 13, 2014
99b8d29
New function: Save state
fredbcode May 21, 2014
9beb39a
Update README
fredbcode May 21, 2014
95b722a
Update emulator.c
fredbcode May 22, 2014
26cbc44
Fix bad syntax mame -> name
May 27, 2014
9569c37
Video problem info
fredbcode May 31, 2014
fedcfb0
Update README.txt
fredbcode May 31, 2014
e635a76
Updated debian packaging, fix some lintian warnings/errors, debian pa…
sergiobenrocha2 Jun 7, 2014
e0c0289
Merge pull request #2 from sergiobenrocha2/master
fredbcode Jun 7, 2014
8798b71
fix *platform_catgeory to *platform_category in config.c and fix some…
sergiobenrocha2 Jun 7, 2014
f74d6e9
Merge pull request #3 from sergiobenrocha2/master
fredbcode Jun 7, 2014
a76be0a
Add new events
fredbcode Jun 21, 2014
55d3289
Add new events
fredbcode Jun 21, 2014
e88e624
Work in progress: New feature call a determinate list with a button E…
fredbcode Jun 22, 2014
c9a5d52
Add -Wextra
Aug 8, 2014
8032240
Fix memory leak
Aug 8, 2014
03c7ed5
Bux fixes and new features
Aug 8, 2014
f74f859
Remove compilation warning
Aug 10, 2014
e95d633
Fix libavcodec54: but no video sound ...
Aug 10, 2014
a843ccb
Include libavcodec53 and libavcodec54
Aug 11, 2014
9c7b1eb
Fix right
Aug 11, 2014
d8ce5d9
Update Readme
Aug 11, 2014
de2d936
Polish code
Aug 11, 2014
2083d1e
Fix sound problem with video mute and music theme
Aug 13, 2014
18c7d75
Fix sound memory leak
Aug 13, 2014
7686198
Livemamecab theme (lmc)
Aug 17, 2014
cfec205
Livemamecab theme (lmc)
Aug 17, 2014
3b3bf88
New option music volume <music-volume>50</music-volume>
Aug 18, 2014
c2deb51
New option: Quick switch to list
Aug 19, 2014
d7baa06
New options <hide-buttons>false/true</hide-buttons>
Aug 23, 2014
23421de
Fix bug: video with no sound stop music theme
Aug 23, 2014
308b22e
Fix bug: video with no sound stop music theme
Aug 23, 2014
ac019be
Fix debian packaging.
sergiobenrocha2 Aug 24, 2014
35e8561
Merge pull request #4 from sergiobenrocha2/master
fredbcode Aug 24, 2014
83be100
Update README
fredbcode Aug 24, 2014
98cf74a
Update README
fredbcode Oct 9, 2014
79c6b62
Fix libavcodec problem
Nov 21, 2014
da8a6b8
Fix libavcodec problem
Nov 21, 2014
a3912bd
Fix: Fix video freeze with special sound format : patch from F Dorin
Nov 22, 2014
b2bc50c
Improved handling of long game lists.
phulshof Jan 26, 2015
39998a8
Merge pull request #5 from phulshof/master
fredbcode Jan 28, 2015
590d6c8
Update README
fredbcode Jan 30, 2015
b11026a
Update README
fredbcode Jan 30, 2015
6eccaf5
Fixed memory leaks in XML configuration functions.
phulshof Feb 4, 2015
9dc86ec
Merge pull request #6 from phulshof/master
fredbcode Feb 6, 2015
147ab26
Update README
fredbcode Feb 6, 2015
c31c571
Added <music> tag to themes, allowing selection of background music.
phulshof Feb 13, 2015
1b603de
Merge pull request #7 from phulshof/master
fredbcode Feb 13, 2015
75f8df7
Update README
fredbcode Feb 13, 2015
0efe505
Update README
fredbcode Feb 13, 2015
bfcb51c
Update README
fredbcode Feb 13, 2015
036c330
Update README
fredbcode Feb 13, 2015
bdcd6be
SDL2 initial support.
sergiobenrocha2 Mar 20, 2015
43efedc
line deleted by accident, fix typos.
sergiobenrocha2 Mar 20, 2015
e608517
Fix leak in sdl_wrapper, update SDL info in README.
sergiobenrocha2 Mar 21, 2015
9dcb122
Update README
fredbcode Mar 21, 2015
723912f
Try to make this more legible, small fix in open and close joystick.
sergiobenrocha2 Mar 22, 2015
56b179c
Fix some clang warnings.
sergiobenrocha2 Mar 22, 2015
b2e5f06
Bump debian/changelog version.
sergiobenrocha2 Mar 22, 2015
f8f67f3
Make width and height tags optional, Cabrio will use SDL_GetDesktopDi…
sergiobenrocha2 Mar 22, 2015
7d32099
Some clean up & refactoring.
sergiobenrocha2 Mar 22, 2015
a9db70e
Added support for event filter (needed to ignore SDL_TEXTINPUT from k…
sergiobenrocha2 Mar 23, 2015
d850af9
Merge pull request #1 from sergiobenrocha2/SDL2
sergiobenrocha2 Mar 23, 2015
6308112
Merge pull request #8 from sergiobenrocha2/master
fredbcode Mar 23, 2015
a8fd2ed
Update README
fredbcode Mar 23, 2015
e2ad9ec
Update README
fredbcode Mar 23, 2015
6dab21f
Added <concat-path> tag to concatenates rom path with directory (some…
sergiobenrocha2 Mar 24, 2015
aba9149
Update README.
sergiobenrocha2 Mar 24, 2015
4b71793
Merge pull request #9 from sergiobenrocha2/master
fredbcode Mar 25, 2015
b86e1ef
Enable some optimization, fix string length.
sergiobenrocha2 Apr 14, 2015
cdaf6f8
Workaround for joystick event issue (libsdl bug 2438), needs to set S…
sergiobenrocha2 Apr 15, 2015
e577a5c
Merge pull request #10 from sergiobenrocha2/master
fredbcode Apr 15, 2015
80f96e0
Fix Joystick
Apr 15, 2015
2c46dc7
Merge branch 'master' of https://github.com/fredbcode/cabrio
Apr 15, 2015
c02bf56
Revert cdaf6f8, fixed in 80f96e0.
sergiobenrocha2 Apr 15, 2015
185700c
Merge pull request #11 from sergiobenrocha2/master
fredbcode Apr 15, 2015
fe90237
Update README
fredbcode Apr 15, 2015
c3c598d
Remove compila warning
Apr 16, 2015
9c28d78
Merge branch 'master' of https://github.com/fredbcode/cabrio
Apr 16, 2015
ba42b83
Fix: Cabrio still on windows top
Apr 16, 2015
209bf7e
Fix compil warning
Apr 16, 2015
3cc2caa
Update README
fredbcode Apr 16, 2015
2ff9aa6
Let's quickly return matched events; improve handle of noisy joysticks.
sergiobenrocha2 Apr 17, 2015
03e93ea
Fix to joystick analog axis.
sergiobenrocha2 Apr 17, 2015
a45fa29
Improve analog axis handle.
sergiobenrocha2 Apr 18, 2015
7837371
Merge pull request #12 from sergiobenrocha2/master
fredbcode Apr 19, 2015
1fdb757
Build with bundled libav.
sergiobenrocha2 Oct 29, 2015
0229bd0
Allow flags from the system; Update debian packaging to use bundled l…
sergiobenrocha2 Oct 29, 2015
a843b70
Merge pull request #13 from sergiobenrocha2/master
fredbcode Oct 31, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.o
cabrio

.bzr
.bzrignore
.pc

debian/cabrio.debhelper.log
debian/cabrio.substvars
debian/cabrio
debian/files
24 changes: 21 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
CC=gcc
BIN_DIR=/usr/bin
DATA_DIR=/usr/share/cabrio
CFLAGS=-g -Wall -DDATA_DIR=\"$(DATA_DIR)\"
LDFLAGS=-lGL -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lSDL_mixer -lGLU -lxml2 \
-lavutil -lavformat -lavcodec -lswscale
OPTIMIZE=-O3 -ffast-math
ifeq ($(DEBUG), 1)
OPTIMIZE=-O0
endif
CFLAGS+=-g -Wall $(OPTIMIZE) -DDATA_DIR=\"$(DATA_DIR)\"
LDFLAGS+=-lGL -lSDL2 -lSDL2_image -lSDL2_gfx -lSDL2_ttf -lSDL2_mixer -lGLU -lxml2
INCLUDES=-I./include -I/usr/include/libxml2

# Works with libav 9.18 and 10.7 (buggy with this, weird behavior)
ifneq (,$(BUNDLED_LIBAV))
LIBAV_PATH=libav
LDFLAGS+=-L./$(LIBAV_PATH)/linux/lib -lavformat -lavcodec -lavutil -lswscale -lm -lz -lpthread
INCLUDES+=-I./$(LIBAV_PATH)/linux/include
ifeq (,$(wildcard ./$(LIBAV_PATH)/linux/lib/libavformat.a))
TMP:=$(shell cp -f ./build_libav_linux.sh ./$(LIBAV_PATH)/ && cd $(LIBAV_PATH)/ && ./build_libav_linux.sh)
endif
else
LDFLAGS+=-lavutil -lavformat -lavcodec -lswscale
endif

INSTALL=/usr/bin/install -c

cabrio: main.o ogl.o sdl_wrapper.o config.o bg.o menu.o game_sel.o \
Expand All @@ -23,6 +38,8 @@ install: cabrio
$(INSTALL) -m 644 -t $(DATA_DIR)/pixmaps data/pixmaps/*
$(INSTALL) -m 644 -t $(DATA_DIR)/sounds data/sounds/*
$(INSTALL) -m 755 -d $(DATA_DIR)/themes
$(INSTALL) -m 755 -d $(DATA_DIR)/themes/lmc
$(INSTALL) -m 644 -t $(DATA_DIR)/themes/lmc data/themes/lmc/*
$(INSTALL) -m 755 -d $(DATA_DIR)/themes/carousel
$(INSTALL) -m 644 -t $(DATA_DIR)/themes/carousel data/themes/carousel/*
$(INSTALL) -m 755 -d $(DATA_DIR)/themes/ice
Expand All @@ -31,6 +48,7 @@ install: cabrio
$(INSTALL) -m 644 -t $(DATA_DIR)/themes/industrial data/themes/industrial/*
$(INSTALL) -m 755 -d $(DATA_DIR)/themes/wood
$(INSTALL) -m 644 -t $(DATA_DIR)/themes/wood data/themes/wood/*
$(INSTALL) -m 644 -t $(DATA_DIR)/../applications/ cabrio.desktop
$(INSTALL) -m 755 -d $(BIN_DIR)
$(INSTALL) -m 755 -t $(BIN_DIR) cabrio

Expand Down
116 changes: 110 additions & 6 deletions README
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,101 @@
Cabrio
TODO: HELP NEEDED !
- Link a theme for each list -
- Video with some freezes and memory leaks ... -

Version from "Livemamecab" https://github.com/fredbcode/livemamecab
Demo ISO Here http://traceroot.c.la
Ubuntu PPA here https://launchpad.net/~sergio-br2/+archive/ubuntu/cabrio (Thanks Sergio Benjamim)

- Added <music> tag to themes, allowing selection of background music by Pieter Hulshoff
- Fixed memory leaks in XML configuration functions by Pieter Hulshoff
- Improved handling of long game lists by Pieter Hulshoff
- Fix ffmpeg problem, should works with libavcodec53/54/55 fixed by f.dorin
- New option "video loop" for snap
- New option "video sound" for snap
- New option "theme sound" music theme onf/off
- New option "theme sound" volume (1 min -> 128 Max)
- New option direct switch to list
- New option hide buttons
- Save selection game at cabrio start
- SDL2 support by sergio-br2

New options:

<video-loop>false/true</video-loop>
<video-sound>false/true</video-sound>
<theme-sound>false/true</theme-sound>
<music-volume>50</music-volume>
<hide-buttons>false/true</hide-buttons>
<concat-path>false/true</concat-path>

Option for music:

Put your music here /usr/share/cabrio/sounds/music.mp3
You can also use the tag <music> placed within the <theme> tag (in a theme XML file).
A directory indication will cause a random music file to be selected from that directory.
In your theme file:

<name>lmc</name>
<music>/path/music/</music>

Option for direct list:

Example: keyboard touch "a" to directly switch to the first list and "b" for the second (max 5 lists)

<event>
<name>list1</name>
<value>a</value>
<device>
<type>keyboard</type>
<id>0</id>
</device>
</event>
<event>
<name>list2</name>
<value>b</value>
<device>
<type>keyboard</type>
<id>0</id>
</device>
</event>

Option to use full path for roms:

You can use directory tag to indicate a rom folder, so you don't need to use
full path in the rom-image tag. But some emulators have problem with this,
because they need the full path instead Cabrio default approach: it first go
to the directory, and then executes the emulator. So you can use concat-path
tag, it will join both directory and rom-image in one string only:

<emulators>
<emulator>
<name>MAME</name>
<display-name>MAME</display-name>
<executable>retroarch</executable>
<platform>Arcade</platform>
<directory>/home/your-user/Path/to/your/ROMs/</directory>
<concat-path>true</concat-path>
<params>
<param>
<name>-L</name>
</param>
<param>
<name>/usr/lib/libretro/mame_libretro.so</name>
</param>
</params>
</emulator>
</emulators>
[...]
<game>
<name>After Burner II</name>
<platform>Arcade</platform>
<rom-image>aburner2.zip</rom-image>
</game>

This results:

retroarch -L /usr/lib/libretro/mame_libretro.so /home/your-user/Path/to/your/ROMs/aburner2.zip

======

Cabrio is an emulator front-end primarily designed for use with arcade
Expand All @@ -9,11 +106,11 @@ with limited controls (e.g. a joystick).
Installation
------------
You will need the following libraries and their headers/development packages:
* SDL
* SDL_image
* SDL_gfx
* SDL_mixer
* SDL_ttf
* SDL2
* SDL2_image
* SDL2_gfx
* SDL2_mixer
* SDL2_ttf
* glut
* libxml2
* ffmpeg
Expand All @@ -24,6 +121,10 @@ can be edited in the Makefile).

See http://www.cabrio-fe.org/support/compile.html for more information.

Debian/Ubuntu:

apt-get install gcc make libc6-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libsdl2-dev libsdl2-image-dev libsdl2-gfx-dev libsdl2-mixer-dev libsdl2-ttf-dev libxml2-dev


Configuration
-------------
Expand All @@ -46,3 +147,6 @@ Astronomy, Heidelberg). http://hubblesite.org/

Default font "FreeSans.ttf" courtesy of the GNU FreeFont project:
http://www.gnu.org/software/freefont/

Music Theme: Happy Arcade Tune
Author: rezoner from http://opengameart.org
88 changes: 88 additions & 0 deletions build_libav_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#!/bin/sh

rm -f config.h
echo "Building for Linux"

GENERAL="
--disable-shared \
--enable-static"

MODULES="\
--disable-avresample \
--disable-avdevice \
--disable-filters \
--disable-programs \
--disable-network \
--disable-avfilter \
--disable-encoders \
--disable-doc \
--disable-avplay \
--disable-avprobe \
--disable-avserver"

VIDEO_DECODERS="\
--enable-decoder=h264 \
--enable-decoder=h263 \
--enable-decoder=h263p \
--enable-decoder=mpeg2video"

AUDIO_DECODERS="\
--enable-decoder=aac \
--enable-decoder=atrac3 \
--enable-decoder=atrac3p \
--enable-decoder=mp3 \
--enable-decoder=pcm_s16le \
--enable-decoder=pcm_s8"

DEMUXERS="\
--enable-demuxer=mov \
--enable-demuxer=h264 \
--enable-demuxer=mpegps \
--enable-demuxer=mpegvideo \
--enable-demuxer=avi \
--enable-demuxer=mp3 \
--enable-demuxer=aac \
--enable-demuxer=oma \
--enable-demuxer=pcm_s16le \
--enable-demuxer=pcm_s8 \
--enable-demuxer=wav"

VIDEO_ENCODERS="\
--enable-encoder=huffyuv \
--enable-encoder=ffv1 \
--enable-encoder=mjpeg"

AUDIO_ENCODERS="\
--enable-encoder=pcm_s16le"

MUXERS="\
--enable-muxer=avi"

PARSERS="\
--enable-parser=h264 \
--enable-parser=mpeg4video \
--enable-parser=mpegvideo \
--enable-parser=aac \
--enable-parser=mpegaudio"


./configure \
--prefix=./linux \
${GENERAL} \
--extra-cflags="-D__STDC_CONSTANT_MACROS -O3" \
--enable-zlib \
--enable-pic \
--disable-yasm \
--disable-everything \
--enable-protocol=file \
${MODULES} \
${VIDEO_DECODERS} \
${AUDIO_DECODERS} \
${VIDEO_ENCODERS} \
${AUDIO_ENCODERS} \
${DEMUXERS} \
${MUXERS} \
${PARSERS}

make clean
make install
8 changes: 8 additions & 0 deletions cabrio.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Cabrio
GenericName=Front End for Emulators
Comment=Graphical front end for video game emulators
Exec=cabrio %f
Categories=Game;Emulator;
9 changes: 8 additions & 1 deletion category.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ int category_value_add( struct category *category, char *name ) {
struct category_value *search = category->values;
struct category_value *after = category->values;
struct category_value *category_value = malloc( sizeof(struct category_value) );
int i = 0;

if( search ) {
do {
Expand All @@ -74,6 +75,13 @@ int category_value_add( struct category *category, char *name ) {
if( category_value ) {
memset( category_value, 0, sizeof(struct category_value) );
category_value->name = name;
while( i < 4) {
if (!list_choice[i]) {
list_choice[i]=name;
break;
}
i++;
}

if( after ) {
after = after->prev;
Expand Down Expand Up @@ -160,7 +168,6 @@ void catgeory_dump( void ) {
printf("Category: %s (%d)\n", category->name, category->value_count );
struct category_value *value = category->values;
while( value ) {
printf(" Value: %s\n", value->name );
value = value->next;
if( value == category->values ) break;
}
Expand Down
Loading