Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Emulators
meka
meka.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File meka.dif of Package meka
--- srcs/Makefile +++ srcs/Makefile @@ -87,9 +87,12 @@ MV = mv MKDIR = mkdir #--- Definitions -DEF_OS = -DARCH_UNIX -DX86_ASM -DASM_SYMBOLS_REQUIRE_UNDERSCORE +DEF_OS = -DARCH_UNIX +ifeq ($(X86_ASM), yes) +DEF_OS += -DX86_ASM -DASM_SYMBOLS_REQUIRE_UNDERSCORE +endif INC_OS = -Ilibs -I../include # This may require an update -X86_ASM = yes +#X86_ASM = no #--- Libraries LIB_OS = -Llibs -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L../lib # This may require an update LIB_OS += -lXcursor -lXpm @@ -184,7 +187,7 @@ endif ifeq ($(SYSTEM), unix) -LIB_SOUND = -lseal +LIB_SOUND = -laudio endif ifeq ($(SYSTEM), macosx) @@ -267,7 +270,10 @@ OBJ_FEAT = $(OD)/checksum.o $(OD)/db.o $(OD)/vlfn.o $(OD)/patch.o $(OD)/games.o $(OD)/saves.o OBJ_CFG = $(OD)/config.o $(OD)/config_v.o $(OD)/config_j.o OBJ_MISC = $(OD)/misc.o $(OD)/build.o $(OD)/fonts.o $(OD)/file.o $(OD)/data.o $(OD)/tools.o $(OD)/tools_t.o $(OD)/keyinfo.o $(OD)/drivers.o $(OD)/message.o $(OD)/capture.o $(OD)/errors.o $(OD)/sdsc.o $(OD)/setup.o -OBJ_BLIT = $(OD)/blit.o $(OD)/blitintf.o $(OD)/eagle.o $(OD)/hq2x.o $(OD)/hq2x16.o $(OD)/hq2x32.o +OBJ_BLIT = $(OD)/blit.o $(OD)/blitintf.o +ifeq ($(X86_ASM), yes) +OBJ_BLIT += $(OD)/eagle.o $(OD)/hq2x.o $(OD)/hq2x16.o $(OD)/hq2x32.o +endif OBJ_CPU = $(OD)/machine.o $(OD)/cpu.o $(OD)/m6502.a OBJ_VIDEO = $(OD)/video.o $(OD)/video_m2.o $(OD)/video_m5.o $(OD)/video_c.o $(OD)/vdp.o $(OD)/palette.o $(OD)/effects.o $(OD)/fskipper.o OBJ_MACH = $(OD)/sg1ksc3k.o $(OD)/sf7000.o $(OD)/nes.o $(OD)/nes_maps.o $(OD)/nes_ppu.o $(OD)/coleco.o $(OD)/fdc765.o @@ -316,7 +322,7 @@ # UNIX/MS-DOS # RELEASE build ifeq ($(BUILD), release) -CFLAGS += -Wall -march=pentium -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -fomit-frame-pointer +CFLAGS += -Wall $(RPM_OPT_FLAGS) -ffast-math endif # DEBUG build ifeq ($(BUILD), debug) --- srcs/app_options.c +++ srcs/app_options.c @@ -39,7 +39,7 @@ static void Option_Switch_NES_Crap(void) { - g_Configuration.enable_NES = FALSE; + //g_Configuration.enable_NES = FALSE; Msg (MSGT_USER_INFOLINE, Msg_Get (MSG_NES_Deny_Facts)); } --- srcs/blit.c +++ srcs/blit.c @@ -49,7 +49,9 @@ blit_cfg.tv_mode_factor = 0.700f; // FIXME-TUNING // Initialize HQ2X filters +#ifdef X86_ASM HQ2X_Init(); +#endif } static const t_blitters_table_entry Blitters_Table[BLITTER_MAX] = @@ -58,8 +60,10 @@ { Blit_Fullscreen_Double, 2, 2 }, { Blit_Fullscreen_TV_Mode, 1, 2 }, { Blit_Fullscreen_TV_Mode_Double, 2, 2 }, +#ifdef X86_ASM { Blit_Fullscreen_Eagle, 2, 2 }, { Blit_Fullscreen_HQ2X, 2, 2 }, +#endif }; void Blit_Fullscreen_Misc (void) @@ -184,6 +188,7 @@ Blit_Fullscreen_CopyStretch(Blit_Buffer_Double, 2, 2); } +#ifdef X86_ASM void Blit_Fullscreen_Eagle (void) { // Eagle, x1 -> x2 @@ -201,7 +206,9 @@ Blit_Fullscreen_Misc (); Blit_Fullscreen_CopyStretch(Blit_Buffer_Double, 2, 2); } +#endif +#ifdef X86_ASM void Blit_Fullscreen_HQ2X (void) { // Perform HQ2X into double buffer @@ -213,6 +220,7 @@ Blit_Fullscreen_Misc(); Blit_Fullscreen_CopyStretch(Blit_Buffer_Double, 2, 2); } +#endif void Blit_Fullscreen_TV_Mode (void) { --- srcs/file.c +++ srcs/file.c @@ -97,7 +97,12 @@ getcwd (g_Env.Paths.StartingDirectory, countof(g_Env.Paths.StartingDirectory)); // Find emulator directory -------------------------------------------------- - strcpy (g_Env.Paths.EmulatorDirectory, g_Env.argv[0]); + strcpy (g_Env.Paths.EmulatorDirectory, "/usr/share/meka/"); //g_Env.argv[0]); + sprintf(g_Env.Paths.ConfigDirectory, "%s/.meka", getenv("HOME")); + mkdir(g_Env.Paths.ConfigDirectory, 0755); + char tmp[PATH_MAX + 80]; + sprintf(tmp, "cp -p /usr/share/meka/meka.fdb /usr/share/meka/meka.inp %s/", g_Env.Paths.ConfigDirectory); + system(tmp); #ifndef ARCH_UNIX StrReplace (g_Env.Paths.EmulatorDirectory, '\\', '/'); #endif @@ -131,12 +136,12 @@ sprintf (g_Env.Paths.SkinFile, "%s/meka.thm", g_Env.Paths.EmulatorDirectory); sprintf (Patches.filename, "%s/meka.pat", g_Env.Paths.EmulatorDirectory); - sprintf (VLFN_DataBase.filename, "%s/meka.fdb", g_Env.Paths.EmulatorDirectory); + sprintf (VLFN_DataBase.filename, "%s/meka.fdb", g_Env.Paths.ConfigDirectory); sprintf (Blitters.filename, "%s/meka.blt", g_Env.Paths.EmulatorDirectory); //sprintf (registered.filename [0], "%s/meka.reg", g_Env.Paths.EmulatorDirectory); //sprintf (registered.filename [1], "%s/meka.key", g_Env.Paths.EmulatorDirectory); - sprintf (Desktop.filename, "%s/meka.dsk", g_Env.Paths.EmulatorDirectory); - sprintf (Inputs.FileName, "%s/meka.inp", g_Env.Paths.EmulatorDirectory); + sprintf (Desktop.filename, "%s/meka.dsk", g_Env.Paths.ConfigDirectory); + sprintf (Inputs.FileName, "%s/meka.inp", g_Env.Paths.ConfigDirectory); sprintf (Messages.FileName, "%s/meka.msg", g_Env.Paths.EmulatorDirectory); // Documentations @@ -155,7 +160,7 @@ #ifdef ARCH_WIN32 sprintf (g_Env.Paths.ConfigurationFile, "%s/mekaw.cfg", g_Env.Paths.EmulatorDirectory); #else - sprintf (g_Env.Paths.ConfigurationFile, "%s/meka.cfg", g_Env.Paths.EmulatorDirectory); + sprintf (g_Env.Paths.ConfigurationFile, "%s/meka.cfg", g_Env.Paths.ConfigDirectory); #endif // Directories --- srcs/meka.c +++ srcs/meka.c @@ -133,7 +133,7 @@ g_Configuration.enable_BIOS = TRUE; g_Configuration.show_product_number = FALSE; g_Configuration.show_fullscreen_messages = TRUE; - g_Configuration.enable_NES = FALSE; + g_Configuration.enable_NES = TRUE; g_Configuration.allow_opposite_directions = FALSE; g_Configuration.start_in_gui = TRUE; --- srcs/meka.h +++ srcs/meka.h @@ -144,9 +144,9 @@ // Max path length // FIXME: Portable way to obtain this at compilation stage? -#define FILENAME_LEN (512) +//#define FILENAME_LEN (512) //#define FILENAME_LEN MAXPATHLEN -//#define FILENAME_LEN PATH_MAX +#define FILENAME_LEN PATH_MAX OPT_TYPE opt; TGFX_TYPE tgfx; @@ -207,6 +207,7 @@ typedef struct { char EmulatorDirectory [FILENAME_LEN]; + char ConfigDirectory [FILENAME_LEN]; char StartingDirectory [FILENAME_LEN]; char ConfigurationFile [FILENAME_LEN]; char DataBaseFile [FILENAME_LEN];
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor