Skip to content

Commit

Permalink
first commit for Miyoo
Browse files Browse the repository at this point in the history
  • Loading branch information
salvacam committed Feb 21, 2021
1 parent d01a3df commit f160f41
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 1 deletion.
69 changes: 69 additions & 0 deletions Makefile.miyoo
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
TOOLCHAIN = /opt/miyoo/usr
SDL_CONFIG = $(TOOLCHAIN)/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/bin/sdl-config

#arm-open2x-linux-
#/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/c++/4.1.1
#/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/c++/4.1.1

#INCLUDES = -I. -I/usr/local/open2x/include/c++ `sdl-open2x-config --cflags`
#INCLUDES = -I. -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/c++/4.1.1 `arm-open2x-linux-sdl-config --cflags`
INCLUDES = -I. `$(SDL_CONFIG) --cflags`


#DEPINCLUDES = $(INCLUDES) $(SDINCLUDES) -I/usr/local/open2x/include/linux -I/usr/local/open2x/include/c++
#DEPINCLUDES = $(INCLUDES) $(SDINCLUDES) -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/arm-open2x-linux/include/linux -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/c++/4.1.1
#DEPINCLUDES = $(INCLUDES) $(SDINCLUDES) -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/arm-open2x-linux/include/linux

#CC = open2x-gcc -O6 -mcpu=arm920 -mtune=arm920t -msoft-float -ffast-math -falign-functions=32 -finline-functions -funroll-all-loops
#CC = arm-open2x-linux-gcc -O6 -mcpu=arm920 -mtune=arm920t -msoft-float -ffast-math -falign-functions=32 -finline-functions -funroll-all-loops
CC = $(TOOLCHAIN)/bin/arm-linux-gcc


#CFLAGS = $(INCLUDES) $(SDINCLUDES) -Wall -g -DBEEB_DOTIME $(RESOURCES) -DGP2X=1 -DSOUNDSUPPORT
# -DSOUNDSUPPORT
CFLAGS = $(INCLUDES) -Wall -g -DBEEB_DOTIME -DMIYOO_MODE -DSOUNDSUPPORT $(RESOURCES) -O3 -march=armv5te -mtune=arm926ej-s
# -DEG_DEBUG

#RESOURCES=-DROMS_DIR=\"./romimg/\" -DRC_DIR=\"./\" -DOS_DIR=\"./romimg/\" -DDEFAULT_DISC=\"S:80:/mnt/sd/beebem/Zalaga.ssd\" -DVERSION=\"0.6\"
RESOURCES= -DVERSION=\"0.6\"

#LINKFLAGS = -lstdc++ `sdl-open2x-config --libs` -lm -s --static
#LINKFLAGS = -lstdc++ `arm-open2x-linux-sdl-config --libs` -lm -s --static
LINKFLAGS = -lstdc++ `$(SDL_CONFIG) --libs`
LIBS =
LIBFILES = gui/libeg.a

SRCS = 6502core.cc beebmem.cc beebwin.cc disc8271.cc main.cc mode7font.c\
sysvia.cc uservia.cc via.cc video.cc beebsound.cc atodconv.cc sdl.cc \
keyboard.cc beebconfig.cc beebem_pages.cc screensaver.c stick.cc \
virtualkeyboard.cc button.c fileselector.cc progressdialog.cc \
keyboardmapper.cc messagebox.cc uefstate.cc listbox.cc fileselector_saveas.cc dma.cc

OBJS = 6502core.o beebmem.o beebwin.o disc8271.o main.o mode7font.o\
sysvia.o uservia.o via.o video.o beebsound.o atodconv.o sdl.o \
keyboard.o beebconfig.o beebem_pages.o screensaver.o stick.o \
virtualkeyboard.o button.o fileselector.o progressdialog.o \
keyboardmapper.o messagebox.o uefstate.o listbox.o fileselector_saveas.o dma.o


.cc.o:
$(CC) -c $(CFLAGS) $<

beebem: $(OBJS) $(LIBFILES)
$(CC) -o beebem $(OBJS) $(LIBFILES) $(LIBS) $(LINKFLAGS)

gui/libeg.a:
(cd gui; make -f Makefile_RS97)

depend:
makedepend -- $(DEPINCLUDES) $(INCLUDES) $(CFLAGS) $(LINKFLAGS) -- $(SRCS)

clean:
rm -f $(OBJS) beebem

reallyclean:
make clean
(cd gui; make clean)

# DO NOT DELETE THIS LINE -- make depend depends on it.

4 changes: 4 additions & 0 deletions beebem_pages.cc
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,11 @@ static EG_BOOL Menu_Make(SDL_Surface *frame_buffer_p, BeebEm_Pages *gui_p)
r2.y++;

gui_p->menu.lbl_title = EG_Label_Create("menu_title", title_col
#ifdef MIYOO_MODE
, EG_LABEL_ALIGN_CENTER, "BeebEm for Miyoo (0.6.3) based on GP2X (" VERSION ")", C_1_1(r2, 1, 2));
#else
, EG_LABEL_ALIGN_CENTER, "BeebEm for JZ47xx (0.6.3) based on GP2X (" VERSION ")", C_1_1(r2, 1, 2));
#endif
(void) EG_Window_AddWidget(gui_p->menu.win, gui_p->menu.lbl_title);

/* Box around list of pages:
Expand Down
59 changes: 59 additions & 0 deletions gui/Makefile.miyoo
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
TOOLCHAIN = /opt/miyoo/usr
SDL_CONFIG = $(TOOLCHAIN)/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/bin/sdl-config

##arm-open2x-linux-
#/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/c++/4.1.1
#//opt/open2x/gcc-4.1.1-glibc-2.3.6/include/c++/4.1.1

#INCLUDES = -I. -I/usr/local/open2x/include/c++
#INCLUDES = -I. -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/c++/4.1.1
INCLUDES = -I. `$(SDL_CONFIG) --cflags` -I..


#DEPINCLUDES = $(INCLUDES) $(SDINCLUDES) -I/usr/local/open2x/include/linux -I/usr/local/open2x/include/c++
#DEPINCLUDES = $(INCLUDES) $(SDINCLUDES) -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/arm-open2x-linux/include/linux -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/c++/4.1.1
#DEPINCLUDES = $(INCLUDES) $(SDINCLUDES) -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/linux


#CC = open2x-gcc
#CC = arm-open2x-linux-gcc
#CC = /opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/arm-open2x-linux-gcc
CC = $(TOOLCHAIN)/bin/arm-linux-gcc
AR = $(TOOLCHAIN)/bin/arm-linux-ar

#CFLAGS = -O6 $(INCLUDES) $(SDINCLUDES) -Wall -mcpu=arm920 -mtune=arm920t -msoft-float -ffast-math -falign-functions=32 -finline-functions -funroll-all-loops `arm-open2x-linux-sdl-config --cflags` -DDATA_DIR=\"/mnt/sd/beebem/\" -DEG_DEBUG -DWITH_DEBUG_OUTPUT
#CFLAGS = -O6 $(INCLUDES) $(SDINCLUDES) -Wall -mcpu=arm920 -mtune=arm920t -msoft-float -ffast-math -falign-functions=32 -finline-functions -funroll-all-loops `/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl-config --cflags` -DDATA_DIR=\"/mnt/sd/beebem/\" -DEG_SLIDEBAR_ASTROFFONLY=1
# -DEG_DEBUG -DWITH_DEBUG_OUTPUT
CFLAGS = $(INCLUDES) -Wall -g -DBEEB_DOTIME $(RESOURCES) -DGP2X=1 -DSOUNDSUPPORT -O3 -march=armv5te -mtune=arm926ej-s -DEG_SLIDEBAR_ASTROFFONLY=1

#LINKFLAGS = -lstdc++ `sdl-open2x-config --libs` --static -s
#LINKFLAGS = -lstdc++ `arm-open2x-linux-sdl-config --libs` --static -s
LINKFLAGS = -lstdc++ `$(SDL_CONFIG) --libs` --static -s

SDINCLUDES = -I..
SRCS = sdl.c functions.c log.c window.c widget.c widget_shared.c label.c button.c box.c tickbox.c togglebutton.c \
radiobutton.c radiogroup.c slidebar.c progressbar.c virtualzone.c graphics.c graphics_font.c \
graphics_font_iso_8859.c image.c skin.c

OBJS = sdl.o functions.o log.o window.o widget.o widget_shared.o label.o button.o box.o tickbox.o togglebutton.o \
radiobutton.o radiogroup.o slidebar.o progressbar.o virtualzone.o graphics.o graphics_font.o \
graphics_font_iso_8859.o image.o skin.o

.cc.o:
$(CC) -c $(CFLAGS) $<

libeg.a: $(OBJS)
rm -f libeg.a
#arm-open2x-linux-ar rc libeg.a $(OBJS)
#/usr/local/open2x/bin/open2x-ar rc libeg.a $(OBJS)
$(AR) rc libeg.a $(OBJS)

depend:
makedepend -- $(CFLAGS) $(LINKFLAGS) $(SDINCLUDES) -- $(SRCS)
# makedepend -- $(DEPINCLUDES) $(CFLAGS) $(LINKFLAGS) $(SDINCLUDES) -- $(SRCS)

clean:
rm -f $(OBJS) libeg.a

# DO NOT DELETE

9 changes: 8 additions & 1 deletion main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,11 @@ int main(int argc,char *argv[]) {
// SaveUEFState("test.uef");
// break;
// }

#ifdef MIYOO_MODE
if (event.key.keysym.sym == SDLK_BACKSPACE || event.key.keysym.sym == SDLK_RETURN) {
#else
if (event.key.keysym.sym == SDLK_BACKSPACE) {
#endif
if (mainWin->OnScreenKeyboardShown()) {
mainWin->HideOnScreenKeyboard();
cls();
Expand Down Expand Up @@ -572,7 +575,11 @@ int main(int argc,char *argv[]) {
break;
}
*/
#ifdef MIYOO_MODE
if (event.key.keysym.sym == SDLK_TAB || event.key.keysym.sym == SDLK_RCTRL) {
#else
if (event.key.keysym.sym == SDLK_TAB) {
#endif
mainWin->ShiftBooted = false;
BeebKeyUp(0, 0);

Expand Down

0 comments on commit f160f41

Please sign in to comment.