renamed to hpemung
This commit is contained in:
parent
87765b2b92
commit
21e5e00cf1
9 changed files with 28 additions and 31 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,4 +1,2 @@
|
||||||
/src/*.o
|
/src/*.o
|
||||||
/dist/hpemu
|
/dist/hpemung
|
||||||
/dist/port*
|
|
||||||
/dist/ram
|
|
||||||
|
|
22
Makefile
22
Makefile
|
@ -1,5 +1,5 @@
|
||||||
PREFIX = /usr
|
PREFIX = /usr
|
||||||
DOCDIR = $(PREFIX)/doc/hpemu
|
DOCDIR = $(PREFIX)/doc/hpemung
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
LIBS = $(shell pkg-config --libs sdl2 SDL2_ttf)
|
LIBS = $(shell pkg-config --libs sdl2 SDL2_ttf)
|
||||||
|
@ -7,9 +7,9 @@ CFLAGS = -Wall -Werror -O3 -Wno-error=unused-function -Wno-error=unused-variable
|
||||||
|
|
||||||
.PHONY: all clean clean-all pretty-code install mrproper get-roms
|
.PHONY: all clean clean-all pretty-code install mrproper get-roms
|
||||||
|
|
||||||
all: dist/hpemu
|
all: dist/hpemung
|
||||||
|
|
||||||
dist/hpemu: src/bus.o \
|
dist/hpemung: src/bus.o \
|
||||||
src/cpu.o \
|
src/cpu.o \
|
||||||
src/display.o \
|
src/display.o \
|
||||||
src/emulator.o \
|
src/emulator.o \
|
||||||
|
@ -30,7 +30,7 @@ clean:
|
||||||
-rm src/*.o
|
-rm src/*.o
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
-rm dist/hpemu
|
-rm dist/hpemung
|
||||||
|
|
||||||
clean-all: mrproper
|
clean-all: mrproper
|
||||||
|
|
||||||
|
@ -44,16 +44,16 @@ get-roms:
|
||||||
|
|
||||||
install: all get-roms
|
install: all get-roms
|
||||||
install -m 755 -d -- $(DESTDIR)$(PREFIX)/bin
|
install -m 755 -d -- $(DESTDIR)$(PREFIX)/bin
|
||||||
install -c -m 755 dist/hpemu $(DESTDIR)$(PREFIX)/bin/hpemu
|
install -c -m 755 dist/hpemung $(DESTDIR)$(PREFIX)/bin/hpemung
|
||||||
|
|
||||||
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/hpemu
|
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/hpemung
|
||||||
install -c -m 644 dist/hplogo.png $(DESTDIR)$(PREFIX)/share/hpemu/hplogo.png
|
install -c -m 644 dist/hplogo.png $(DESTDIR)$(PREFIX)/share/hpemung/hplogo.png
|
||||||
cp -R dist/ROMs/ $(DESTDIR)$(PREFIX)/share/hpemu/
|
cp -R dist/ROMs/ $(DESTDIR)$(PREFIX)/share/hpemung/
|
||||||
sed "s|@PREFIX@|$(PREFIX)|g" dist/setup-hpemu-home.sh > $(DESTDIR)$(PREFIX)/share/hpemu/setup-hpemu-home.sh
|
sed "s|@PREFIX@|$(PREFIX)|g" dist/setup-hpemung-home.sh > $(DESTDIR)$(PREFIX)/share/hpemung/setup-hpemung-home.sh
|
||||||
chmod 755 $(DESTDIR)$(PREFIX)/share/hpemu/setup-hpemu-home.sh
|
chmod 755 $(DESTDIR)$(PREFIX)/share/hpemung/setup-hpemung-home.sh
|
||||||
|
|
||||||
install -m 755 -d -- $(DESTDIR)$(DOCDIR)
|
install -m 755 -d -- $(DESTDIR)$(DOCDIR)
|
||||||
cp -R ./*.txt $(DESTDIR)$(DOCDIR)
|
cp -R ./*.txt $(DESTDIR)$(DOCDIR)
|
||||||
|
|
||||||
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/applications
|
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/applications
|
||||||
sed "s|@PREFIX@|$(PREFIX)|g" dist/hpemu.desktop > $(DESTDIR)$(PREFIX)/share/applications/hpemu.desktop
|
sed "s|@PREFIX@|$(PREFIX)|g" dist/hpemung.desktop > $(DESTDIR)$(PREFIX)/share/applications/hpemung.desktop
|
||||||
|
|
4
dist/hpemu.desktop → dist/hpemung.desktop
vendored
4
dist/hpemu.desktop → dist/hpemung.desktop
vendored
|
@ -3,7 +3,7 @@ Encoding=UTF-8
|
||||||
Version=1.0
|
Version=1.0
|
||||||
Type=Application
|
Type=Application
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Exec=@PREFIX@/bin/hpemu
|
Exec=@PREFIX@/bin/hpemung
|
||||||
Name=hpemu
|
Name=hpemung
|
||||||
Icon=@PREFIX@/share/hpemu/hplogo.png
|
Icon=@PREFIX@/share/hpemu/hplogo.png
|
||||||
Categories=Utility;
|
Categories=Utility;
|
1
dist/rom
vendored
1
dist/rom
vendored
|
@ -1 +0,0 @@
|
||||||
../ROMs/gxrom-r
|
|
11
dist/setup-hpemu-home.sh
vendored
11
dist/setup-hpemu-home.sh
vendored
|
@ -1,11 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
DOTHPEMU=${DOTHPEMU:-.config/hpemu}
|
|
||||||
|
|
||||||
ROM=${ROM:-gxrom-r}
|
|
||||||
|
|
||||||
mkdir -p ~/"${DOTHPEMU}"
|
|
||||||
|
|
||||||
[ -e ~/"${DOTHPEMU}"/rom ] && rm ~/"${DOTHPEMU}"/rom
|
|
||||||
ln -s @PREFIX@/share/hpemu/ROMs/"$ROM" ~/"${DOTHPEMU}"/rom
|
|
||||||
cd ~/"${DOTHPEMU}"
|
|
11
dist/setup-hpemung-home.sh
vendored
Executable file
11
dist/setup-hpemung-home.sh
vendored
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
DOTHPEMUNG=${DOTHPEMUNG:-.config/hpemung}
|
||||||
|
|
||||||
|
ROM=${ROM:-gxrom-r}
|
||||||
|
|
||||||
|
mkdir -p ~/"${DOTHPEMUNG}"
|
||||||
|
|
||||||
|
[ -e ~/"${DOTHPEMUNG}"/rom ] && rm ~/"${DOTHPEMUNG}"/rom
|
||||||
|
ln -s @PREFIX@/share/hpemung/ROMs/"$ROM" ~/"${DOTHPEMUNG}"/rom
|
||||||
|
cd ~/"${DOTHPEMUNG}"
|
|
@ -1,7 +1,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
Config config = {
|
Config config = {
|
||||||
.progname = "hpemu",
|
.progname = "hpemung",
|
||||||
.ui_font = "/usr/share/fonts/TTF/unifont.ttf",
|
.ui_font = "/usr/share/fonts/TTF/unifont.ttf",
|
||||||
.real_speed = true,
|
.real_speed = true,
|
||||||
.verbose = true,
|
.verbose = true,
|
||||||
|
|
|
@ -45,7 +45,7 @@ void emulator_init( char* fn_rom, char* fn_ram, char* fn_port1, char* fn_port2 )
|
||||||
{
|
{
|
||||||
static bool locked = false;
|
static bool locked = false;
|
||||||
|
|
||||||
get_absolute_working_dir_path( "hpemu" );
|
get_absolute_working_dir_path( "hpemung" );
|
||||||
rom_init( fn_rom );
|
rom_init( fn_rom );
|
||||||
ram_init( fn_ram );
|
ram_init( fn_ram );
|
||||||
ports_init( fn_port1, fn_port2 );
|
ports_init( fn_port1, fn_port2 );
|
||||||
|
|
|
@ -1509,7 +1509,7 @@ bool gui_init( void )
|
||||||
int window_width = ( LCD_WIDTH + ( 2 * UI_PADDING ) ) * UI_SCALE;
|
int window_width = ( LCD_WIDTH + ( 2 * UI_PADDING ) ) * UI_SCALE;
|
||||||
int window_height = ( UI_KB_OFFSET_Y + UI_KB_HEIGHT ) + 2 * UI_PADDING;
|
int window_height = ( UI_KB_OFFSET_Y + UI_KB_HEIGHT ) + 2 * UI_PADDING;
|
||||||
|
|
||||||
window = SDL_CreateWindow( "hpemu", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, window_width, window_height, SDL_WINDOW_SHOWN );
|
window = SDL_CreateWindow( "hpemung", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, window_width, window_height, SDL_WINDOW_SHOWN );
|
||||||
if ( window == NULL ) {
|
if ( window == NULL ) {
|
||||||
printf( "Window could not be created! SDL_Error: %s\n", SDL_GetError() );
|
printf( "Window could not be created! SDL_Error: %s\n", SDL_GetError() );
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue