precompile boilerplate mame.ini, place if needed

This commit is contained in:
markwkidd 2018-02-22 20:37:56 -05:00
parent 38715084cf
commit 4a2ba28241
21 changed files with 37729 additions and 214 deletions

View File

@ -73,6 +73,23 @@ endif
# uncomment next line to build PortMidi as part of MAME/MESS build
#BUILD_MIDILIB = 1
# eventually it would be good to compile with bin2c as part of the
# automated build process for all platforms, but that's not in place yet
BUILD_BIN2C ?= 0
ifeq ($(BUILD_BIN2C),1)
# compile bin2c
DUMMY_RESULT:=$(shell mkdir -p ./precompile)
DUMMY_RESULT:=$(shell gcc -o ./precompile/bin2c ./src/tools/bin2c/bin2c.c)
# compile hiscore.dat into a c header file for the freshest possible version
DUMMY_RESULT:=$(shell ./precompile/bin2c ./metadata/hiscore.source ./precompile/precompile_hiscore_dat.h hiscoredat)
DUMMY_RESULT:=$(shell ./precompile/bin2c ./metadata/mameini.boilerplate ./precompile/precompile_mameini_boilerplate.h mameini_boilerplate)
endif
# otherwise we fall use precompiled data from the github repo
# which is already located at ./precompiled
VRENDER ?= soft
PLATCFLAGS += -D__LIBRETRO__
@ -120,7 +137,10 @@ ifeq ($(platform), unix)
SHARED := -shared -Wl,--version-script=src/osd/retro/link.T
CCOMFLAGS += -fsigned-char -finline -fno-common -fno-builtin -fweb -frename-registers -falign-functions=16 -fsingle-precision-constant
ALIGNED=1
PLATCFLAGS += -fstrict-aliasing -fno-merge-constants
ifeq ($(BUILD_BIN2C), 1)
CCOMFLAGS += -DCOMPILE_DATS
endif
PLATCFLAGS += -fstrict-aliasing -fno-merge-constants
ifeq ($(VRENDER),opengl)
LIBS += -lGL
endif
@ -219,7 +239,7 @@ else ifeq ($(platform), ps3)
TARGETLIB := $(TARGET_NAME)_libretro_$(platform).a
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ -DPS3_LIBRETRO
CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__
STATIC_LINKING = 1
BIGENDIAN=1
LIBS += -lstdc++ -lpthread
@ -367,7 +387,10 @@ else ifeq ($(platform), wincross)
CC_AS ?= gcc
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=src/osd/retro/link.T
CCOMFLAGS +=-D__WIN32__ -D__WIN32_LIBRETRO__
CCOMFLAGS +=-D__WIN32__ -D__WIN32_LIBRETRO__
ifeq ($(BUILD_BIN2C), 1)
CCOMFLAGS += -DCOMPILE_DATS
endif
ifeq ($(VRENDER),opengl)
LIBS += -lopengl32
endif
@ -388,6 +411,9 @@ ifneq ($(MDEBUG),1)
SHARED += -s
endif
CCOMFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__
ifeq ($(BUILD_BIN2C), 1)
CCOMFLAGS += -DCOMPILE_DATS
endif
ifeq ($(VRENDER),opengl)
LIBS += -lopengl32
endif
@ -686,7 +712,9 @@ maketree: $(sort $(OBJDIRS))
clean: $(OSDCLEAN)
@echo Deleting object tree $(OBJ)...
$(RM) -r obj/*
$(RM) -r obj
@echo Deleting bin2c working folder...
$(RM) -fr precompile
@echo Deleting $(EMULATOR)...
$(RM) $(EMULATOR)
@echo Deleting $(TOOLS)...

View File

@ -3,7 +3,7 @@ LIBRETRO_COMM_DIR = $(SRC_DIR)/osd/retro/libretro-common
DEPS_DIR = $(SRC_DIR)/lib
INCFLAGS := \
-I$(LIBRETRO_COMM_DIR)/include \
-I$(LIBRETRO_COMM_DIR)/include \
-I$(SRC_DIR)/$(TARGET) \
-I$(OBJ)/$(TARGET)/layout \
-I$(SRC_DIR)/emu \
@ -12,7 +12,13 @@ INCFLAGS := \
-I$(DEPS_DIR)/util \
-I$(SRC_DIR)/lib \
-I$(SRC_DIR)/osd \
-I$(SRC_DIR)/osd/retro \
-I$(SRC_DIR)/osd/retro
ifeq ($(BUILD_BIN2C), 1)
INCFLAGS += -I$(CORE_DIR)/precompile
else
INCFLAGS += -I$(CORE_DIR)/metadata
endif
# add expat XML library
INCFLAGS += -I$(DEPS_DIR)/expat

BIN
bin2c-generator/bin2c.exe Normal file

Binary file not shown.

18395
bin2c-generator/hiscore_dat.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,299 @@
const char mameini_boilerplate[3235] = {
0xef, 0xbb, 0xbf, 0x3c, 0x55, 0x4e, 0x41, 0x44, 0x4f, 0x52, 0x4e,
0x45, 0x44, 0x30, 0x3e, 0x20, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x43, 0x4f, 0x4e,
0x46, 0x49, 0x47, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x20,
0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x72, 0x65, 0x61, 0x64, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x77, 0x72, 0x69,
0x74, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x30, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x23, 0x20,
0x43, 0x4f, 0x52, 0x45, 0x20, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48,
0x20, 0x50, 0x41, 0x54, 0x48, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f,
0x4e, 0x53, 0x0d, 0x0a, 0x72, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x68,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x6f, 0x6d,
0x73, 0x0d, 0x0a, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x61,
0x74, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x73, 0x0d, 0x0a, 0x61, 0x72, 0x74, 0x70, 0x61, 0x74,
0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x72,
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x0d, 0x0a, 0x63, 0x74, 0x72, 0x6c,
0x72, 0x70, 0x61, 0x74, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x63, 0x74, 0x72, 0x6c, 0x72, 0x0d, 0x0a, 0x69, 0x6e, 0x69, 0x70,
0x61, 0x74, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x2e, 0x3b, 0x69, 0x6e, 0x69, 0x0d, 0x0a, 0x66, 0x6f, 0x6e, 0x74,
0x70, 0x61, 0x74, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x2e, 0x0d, 0x0a, 0x63, 0x68, 0x65, 0x61, 0x74, 0x70, 0x61, 0x74,
0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x68, 0x65, 0x61,
0x74, 0x0d, 0x0a, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x68, 0x61, 0x69,
0x72, 0x70, 0x61, 0x74, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x72, 0x6f, 0x73,
0x73, 0x68, 0x61, 0x69, 0x72, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x4f, 0x55, 0x54,
0x50, 0x55, 0x54, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x4f,
0x52, 0x59, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d,
0x0a, 0x23, 0x0d, 0x0a, 0x63, 0x66, 0x67, 0x5f, 0x64, 0x69, 0x72,
0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x66, 0x67,
0x0d, 0x0a, 0x6e, 0x76, 0x72, 0x61, 0x6d, 0x5f, 0x64, 0x69, 0x72,
0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x76, 0x72, 0x61, 0x6d,
0x0d, 0x0a, 0x6d, 0x65, 0x6d, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x64,
0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x6d, 0x63, 0x61,
0x72, 0x64, 0x0d, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x64,
0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x70,
0x0d, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x72,
0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x0d, 0x0a,
0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x64, 0x69,
0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x73, 0x6e, 0x61, 0x70, 0x0d, 0x0a, 0x64,
0x69, 0x66, 0x66, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x79, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x64, 0x69, 0x66, 0x66, 0x0d, 0x0a, 0x63, 0x6f,
0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63,
0x74, 0x6f, 0x72, 0x79, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x0d,
0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52,
0x45, 0x20, 0x53, 0x54, 0x41, 0x54, 0x45, 0x2f, 0x50, 0x4c, 0x41,
0x59, 0x42, 0x41, 0x43, 0x4b, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f,
0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x73, 0x74, 0x61, 0x74,
0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x0d, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x73, 0x61, 0x76, 0x65, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x70, 0x6c,
0x61, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x0d, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, 0x6d,
0x6e, 0x67, 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x0d, 0x0a, 0x61, 0x76, 0x69, 0x77, 0x72, 0x69,
0x74, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a,
0x77, 0x61, 0x76, 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x6e,
0x61, 0x6d, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x25,
0x67, 0x2f, 0x25, 0x69, 0x0d, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73,
0x69, 0x7a, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61,
0x75, 0x74, 0x6f, 0x0d, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x76, 0x69,
0x65, 0x77, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x0d, 0x0a, 0x62, 0x75, 0x72,
0x6e, 0x69, 0x6e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x30, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x23, 0x20,
0x43, 0x4f, 0x52, 0x45, 0x20, 0x50, 0x45, 0x52, 0x46, 0x4f, 0x52,
0x4d, 0x41, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f,
0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x61, 0x75, 0x74, 0x6f,
0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x6b, 0x69, 0x70, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x31, 0x0d, 0x0a, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x6b, 0x69,
0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x73,
0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72,
0x75, 0x6e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x74, 0x68, 0x72, 0x6f, 0x74,
0x74, 0x6c, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31,
0x0d, 0x0a, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x73, 0x70,
0x65, 0x65, 0x64, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x72, 0x65, 0x66, 0x72,
0x65, 0x73, 0x68, 0x73, 0x70, 0x65, 0x65, 0x64, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x30, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x23, 0x20, 0x43,
0x4f, 0x52, 0x45, 0x20, 0x52, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f,
0x4e, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a,
0x23, 0x0d, 0x0a, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x72,
0x6f, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x72, 0x6f, 0x6c, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30,
0x0d, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x72, 0x6f, 0x72, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x61, 0x75,
0x74, 0x6f, 0x72, 0x6f, 0x6c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x30, 0x0d, 0x0a, 0x66, 0x6c, 0x69, 0x70, 0x78, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d,
0x0a, 0x66, 0x6c, 0x69, 0x70, 0x79, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x0d, 0x0a, 0x23,
0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x41, 0x52,
0x54, 0x57, 0x4f, 0x52, 0x4b, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f,
0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x61, 0x72, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x5f, 0x63, 0x72, 0x6f, 0x70, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x30, 0x0d, 0x0a, 0x75, 0x73, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b,
0x64, 0x72, 0x6f, 0x70, 0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x75,
0x73, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x73,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x75, 0x73, 0x65, 0x5f, 0x62,
0x65, 0x7a, 0x65, 0x6c, 0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31,
0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f,
0x52, 0x45, 0x20, 0x53, 0x43, 0x52, 0x45, 0x45, 0x4e, 0x20, 0x4f,
0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a,
0x62, 0x72, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x30, 0x2e, 0x39, 0x35, 0x0d, 0x0a, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x67, 0x61, 0x6d,
0x6d, 0x61, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x30, 0x2e, 0x38, 0x35, 0x0d, 0x0a, 0x70, 0x61, 0x75, 0x73,
0x65, 0x5f, 0x62, 0x72, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x65, 0x73,
0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x30, 0x2e, 0x36, 0x35, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a,
0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x56, 0x45, 0x43, 0x54,
0x4f, 0x52, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d,
0x0a, 0x23, 0x0d, 0x0a, 0x61, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x69,
0x61, 0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a,
0x62, 0x65, 0x61, 0x6d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x66, 0x6c,
0x69, 0x63, 0x6b, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x30, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x23,
0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x53, 0x4f, 0x55, 0x4e, 0x44,
0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23,
0x0d, 0x0a, 0x73, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x73, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x34, 0x38, 0x30, 0x30, 0x30, 0x0d, 0x0a, 0x73, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x31, 0x0d, 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d,
0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52,
0x45, 0x20, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x20, 0x4f, 0x50, 0x54,
0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x63, 0x6f,
0x69, 0x6e, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x31, 0x0d, 0x0a, 0x63, 0x74, 0x72, 0x6c, 0x72, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a,
0x6d, 0x6f, 0x75, 0x73, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x6a, 0x6f, 0x79, 0x73,
0x74, 0x69, 0x63, 0x6b, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x31, 0x0d, 0x0a, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x67, 0x75, 0x6e,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72,
0x64, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69,
0x6d, 0x6f, 0x75, 0x73, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30,
0x0d, 0x0a, 0x73, 0x74, 0x65, 0x61, 0x64, 0x79, 0x6b, 0x65, 0x79,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x6f, 0x66,
0x66, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x5f, 0x72, 0x65, 0x6c,
0x6f, 0x61, 0x64, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x30, 0x0d, 0x0a, 0x6a, 0x6f, 0x79, 0x73, 0x74, 0x69,
0x63, 0x6b, 0x5f, 0x6d, 0x61, 0x70, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x75,
0x74, 0x6f, 0x0d, 0x0a, 0x6a, 0x6f, 0x79, 0x73, 0x74, 0x69, 0x63,
0x6b, 0x5f, 0x64, 0x65, 0x61, 0x64, 0x7a, 0x6f, 0x6e, 0x65, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x2e, 0x33,
0x0d, 0x0a, 0x6a, 0x6f, 0x79, 0x73, 0x74, 0x69, 0x63, 0x6b, 0x5f,
0x73, 0x61, 0x74, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x2e, 0x38, 0x35, 0x0d,
0x0a, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x61, 0x6c, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x75, 0x69, 0x6d,
0x6f, 0x64, 0x65, 0x6b, 0x65, 0x79, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x61, 0x75, 0x74, 0x6f, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x49, 0x4e, 0x50,
0x55, 0x54, 0x20, 0x41, 0x55, 0x54, 0x4f, 0x4d, 0x41, 0x54, 0x49,
0x43, 0x20, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x4f, 0x50,
0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x70,
0x61, 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63,
0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64,
0x0d, 0x0a, 0x61, 0x64, 0x73, 0x74, 0x69, 0x63, 0x6b, 0x5f, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6b, 0x65, 0x79, 0x62, 0x6f,
0x61, 0x72, 0x64, 0x0d, 0x0a, 0x70, 0x65, 0x64, 0x61, 0x6c, 0x5f,
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6b, 0x65,
0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x0d, 0x0a, 0x64, 0x69, 0x61,
0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x0d, 0x0a,
0x74, 0x72, 0x61, 0x63, 0x6b, 0x62, 0x61, 0x6c, 0x6c, 0x5f, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72,
0x64, 0x0d, 0x0a, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x67, 0x75, 0x6e,
0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6b, 0x65, 0x79, 0x62,
0x6f, 0x61, 0x72, 0x64, 0x0d, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63,
0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6b,
0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x0d, 0x0a, 0x6d, 0x6f,
0x75, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x0d, 0x0a, 0x0d, 0x0a,
0x23, 0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x44,
0x45, 0x42, 0x55, 0x47, 0x47, 0x49, 0x4e, 0x47, 0x20, 0x4f, 0x50,
0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x6c,
0x6f, 0x67, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x76, 0x65, 0x72, 0x62, 0x6f,
0x73, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30,
0x0d, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e,
0x5f, 0x70, 0x61, 0x75, 0x73, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x64, 0x65,
0x62, 0x75, 0x67, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x30, 0x0d, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a,
0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x4d, 0x49, 0x53,
0x43, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a,
0x23, 0x0d, 0x0a, 0x62, 0x69, 0x6f, 0x73, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, 0x63, 0x68,
0x65, 0x61, 0x74, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x30, 0x0d, 0x0a, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x67,
0x61, 0x6d, 0x65, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d,
0x0a
};
const int mameini_boilerplate_length = 3235;

8
metadata/README.txt Normal file
View File

@ -0,0 +1,8 @@
*******************************
PRECOMPILED DATA HEADER FILES
*******************************
The .h header files in this folder have been pre-processed by bin2c, which can be found within /src/tools/bin2c.
Perhaps you have changed the hiscore.dat file or would like to change the mame.ini boilerplate. Compile fresh versions of these headers by passing the parameter BUILD_BIN2C=1 to make as a commandline argument, like this:
make BUILD_BIN2C=1

18395
metadata/hiscore_dat.h Normal file

File diff suppressed because it is too large Load Diff

33
mame.ini → metadata/mameini.boilerplate Executable file → Normal file
View File

@ -6,28 +6,6 @@
readconfig 1
writeconfig 0
#
# CORE SEARCH PATH OPTIONS
rompath roms
samplepath samples
artpath artwork
ctrlrpath ctrlr
inipath .;ini
fontpath .
cheatpath cheat
crosshairpath crosshair
#
# CORE OUTPUT DIRECTORY OPTIONS
#
cfg_directory cfg
nvram_directory nvram
memcard_directory memcard
input_directory inp
state_directory sta
snapshot_directory snap
diff_directory diff
comment_directory comments
#
# CORE STATE/PLAYBACK OPTIONS
@ -74,14 +52,6 @@ use_backdrops 1
use_overlays 1
use_bezels 1
#
# CORE SCREEN OPTIONS
#
brightness 0.95
contrast 1.0
gamma 0.85
pause_brightness 0.65
#
# CORE VECTOR OPTIONS
#
@ -93,7 +63,6 @@ flicker 0
# CORE SOUND OPTIONS
#
sound 1
samplerate 48000
samples 1
volume 0
@ -104,7 +73,7 @@ coin_lockout 1
ctrlr
mouse 1
joystick 1
lightgun 0
lightgun 1
multikeyboard 0
multimouse 0
steadykey 0

View File

@ -0,0 +1,227 @@
const char mameini_boilerplate[2444] = {
0xef, 0xbb, 0xbf, 0x3c, 0x55, 0x4e, 0x41, 0x44, 0x4f, 0x52, 0x4e,
0x45, 0x44, 0x30, 0x3e, 0x20, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x43, 0x4f, 0x4e,
0x46, 0x49, 0x47, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x20,
0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x72, 0x65, 0x61, 0x64, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x77, 0x72, 0x69,
0x74, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x30, 0x0d, 0x0a, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a,
0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x53, 0x54, 0x41, 0x54,
0x45, 0x2f, 0x50, 0x4c, 0x41, 0x59, 0x42, 0x41, 0x43, 0x4b, 0x20,
0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, 0x61, 0x75, 0x74, 0x6f,
0x73, 0x61, 0x76, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x30, 0x0d, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x62, 0x61, 0x63, 0x6b,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, 0x72, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x0d, 0x0a, 0x6d, 0x6e, 0x67, 0x77, 0x72, 0x69, 0x74,
0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, 0x61,
0x76, 0x69, 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x0d, 0x0a, 0x77, 0x61, 0x76, 0x77, 0x72, 0x69,
0x74, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a,
0x73, 0x6e, 0x61, 0x70, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x25, 0x67, 0x2f, 0x25, 0x69, 0x0d, 0x0a,
0x73, 0x6e, 0x61, 0x70, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x0d, 0x0a, 0x73,
0x6e, 0x61, 0x70, 0x76, 0x69, 0x65, 0x77, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
0x0d, 0x0a, 0x62, 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x0d, 0x0a,
0x23, 0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x50,
0x45, 0x52, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x4e, 0x43, 0x45, 0x20,
0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x61, 0x75, 0x74, 0x6f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73,
0x6b, 0x69, 0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x66, 0x72, 0x61,
0x6d, 0x65, 0x73, 0x6b, 0x69, 0x70, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x30, 0x0d, 0x0a, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73,
0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x75, 0x6e, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a,
0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x73, 0x6c, 0x65, 0x65,
0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x31, 0x0d, 0x0a, 0x73, 0x70, 0x65, 0x65, 0x64, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x0d,
0x0a, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x73, 0x70, 0x65,
0x65, 0x64, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x0d, 0x0a, 0x23,
0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x52, 0x4f,
0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x20, 0x4f, 0x50, 0x54, 0x49,
0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x72, 0x6f, 0x74,
0x61, 0x74, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x31, 0x0d, 0x0a, 0x72, 0x6f, 0x72, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a,
0x72, 0x6f, 0x6c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x61, 0x75, 0x74, 0x6f,
0x72, 0x6f, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x30, 0x0d, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x72, 0x6f, 0x6c, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x66,
0x6c, 0x69, 0x70, 0x78, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x66, 0x6c, 0x69, 0x70, 0x79,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30,
0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f,
0x52, 0x45, 0x20, 0x41, 0x52, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x20,
0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x63, 0x72,
0x6f, 0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x75, 0x73, 0x65,
0x5f, 0x62, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x6f, 0x70, 0x73, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x31, 0x0d, 0x0a, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x76, 0x65,
0x72, 0x6c, 0x61, 0x79, 0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a,
0x75, 0x73, 0x65, 0x5f, 0x62, 0x65, 0x7a, 0x65, 0x6c, 0x73, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d,
0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x56, 0x45, 0x43,
0x54, 0x4f, 0x52, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53,
0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x61, 0x6e, 0x74, 0x69, 0x61, 0x6c,
0x69, 0x61, 0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d,
0x0a, 0x62, 0x65, 0x61, 0x6d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x66,
0x6c, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a,
0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x53, 0x4f, 0x55, 0x4e,
0x44, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a,
0x23, 0x0d, 0x0a, 0x73, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x73,
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d,
0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30,
0x0d, 0x0a, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f,
0x52, 0x45, 0x20, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x20, 0x4f, 0x50,
0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a, 0x63,
0x6f, 0x69, 0x6e, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x6f, 0x75, 0x74,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x63, 0x74, 0x72, 0x6c, 0x72,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d,
0x0a, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a, 0x6a, 0x6f, 0x79,
0x73, 0x74, 0x69, 0x63, 0x6b, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x31, 0x0d, 0x0a, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x67, 0x75,
0x6e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x0d, 0x0a,
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61,
0x72, 0x64, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x6d, 0x75, 0x6c, 0x74,
0x69, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x30, 0x0d, 0x0a, 0x73, 0x74, 0x65, 0x61, 0x64, 0x79, 0x6b, 0x65,
0x79, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x6f,
0x66, 0x66, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x5f, 0x72, 0x65,
0x6c, 0x6f, 0x61, 0x64, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x6a, 0x6f, 0x79, 0x73, 0x74,
0x69, 0x63, 0x6b, 0x5f, 0x6d, 0x61, 0x70, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61,
0x75, 0x74, 0x6f, 0x0d, 0x0a, 0x6a, 0x6f, 0x79, 0x73, 0x74, 0x69,
0x63, 0x6b, 0x5f, 0x64, 0x65, 0x61, 0x64, 0x7a, 0x6f, 0x6e, 0x65,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x2e,
0x33, 0x0d, 0x0a, 0x6a, 0x6f, 0x79, 0x73, 0x74, 0x69, 0x63, 0x6b,
0x5f, 0x73, 0x61, 0x74, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x2e, 0x38, 0x35,
0x0d, 0x0a, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x61, 0x6c, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x75, 0x69,
0x6d, 0x6f, 0x64, 0x65, 0x6b, 0x65, 0x79, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x0d, 0x0a, 0x0d, 0x0a, 0x23,
0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x49, 0x4e,
0x50, 0x55, 0x54, 0x20, 0x41, 0x55, 0x54, 0x4f, 0x4d, 0x41, 0x54,
0x49, 0x43, 0x20, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x4f,
0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a,
0x70, 0x61, 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x76, 0x69,
0x63, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72,
0x64, 0x0d, 0x0a, 0x61, 0x64, 0x73, 0x74, 0x69, 0x63, 0x6b, 0x5f,
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6b, 0x65, 0x79, 0x62,
0x6f, 0x61, 0x72, 0x64, 0x0d, 0x0a, 0x70, 0x65, 0x64, 0x61, 0x6c,
0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6b,
0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x0d, 0x0a, 0x64, 0x69,
0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x0d,
0x0a, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x62, 0x61, 0x6c, 0x6c, 0x5f,
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61,
0x72, 0x64, 0x0d, 0x0a, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x67, 0x75,
0x6e, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6b, 0x65, 0x79,
0x62, 0x6f, 0x61, 0x72, 0x64, 0x0d, 0x0a, 0x70, 0x6f, 0x73, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69,
0x63, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x0d, 0x0a, 0x6d,
0x6f, 0x75, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x0d, 0x0a, 0x0d,
0x0a, 0x23, 0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20,
0x44, 0x45, 0x42, 0x55, 0x47, 0x47, 0x49, 0x4e, 0x47, 0x20, 0x4f,
0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d, 0x0a, 0x23, 0x0d, 0x0a,
0x6c, 0x6f, 0x67, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x76, 0x65, 0x72, 0x62,
0x6f, 0x73, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x30, 0x0d, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69,
0x6e, 0x5f, 0x70, 0x61, 0x75, 0x73, 0x65, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x64,
0x65, 0x62, 0x75, 0x67, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d,
0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x0d, 0x0a, 0x23,
0x0d, 0x0a, 0x23, 0x20, 0x43, 0x4f, 0x52, 0x45, 0x20, 0x4d, 0x49,
0x53, 0x43, 0x20, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x0d,
0x0a, 0x23, 0x0d, 0x0a, 0x62, 0x69, 0x6f, 0x73, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, 0x63,
0x68, 0x65, 0x61, 0x74, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x30, 0x0d, 0x0a, 0x73, 0x6b, 0x69, 0x70, 0x5f,
0x67, 0x61, 0x6d, 0x65, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30,
0x0d, 0x0a
};
const int mameini_boilerplate_length = 2444;

View File

@ -1882,9 +1882,6 @@ static void init_port_types(running_machine *machine)
stateptr = &(*stateptr)->next;
}
/* ask the OSD to customize the list */
osd_customize_input_type_list(&portdata->typestatelist->typedesc);
/* now iterate over the OSD-modified types */
for (curtype = portdata->typestatelist; curtype != NULL; curtype = curtype->next)
{

View File

@ -246,14 +246,12 @@ static void sound_pause(running_machine &machine)
{
sound_private *global = machine.sound_data;
global->muted |= 0x02;
osd_set_mastervolume(global->muted ? -32 : global->attenuation);
}
static void sound_resume(running_machine &machine)
{
sound_private *global = machine.sound_data;
global->muted &= ~0x02;
osd_set_mastervolume(global->muted ? -32 : global->attenuation);
}
@ -263,6 +261,7 @@ static void sound_resume(running_machine &machine)
void sound_mute(running_machine *machine, int mute)
{
/*
sound_private *global = machine->sound_data;
if (mute)
@ -270,6 +269,7 @@ void sound_mute(running_machine *machine, int mute)
else
global->muted &= ~0x01;
osd_set_mastervolume(global->muted ? -32 : global->attenuation);
*/
}
@ -279,9 +279,11 @@ void sound_mute(running_machine *machine, int mute)
void sound_set_attenuation(running_machine *machine, int attenuation)
{
/*
sound_private *global = machine->sound_data;
global->attenuation = attenuation;
osd_set_mastervolume(global->muted ? -32 : global->attenuation);
*/
}

View File

@ -159,24 +159,4 @@ void osd_update_audio_stream(running_machine *machine, INT16 *buffer, int sample
void osd_set_mastervolume(int attenuation);
/******************************************************************************
Controls
******************************************************************************/
/*
inptport.c defines some general purpose defaults for key and joystick bindings.
They may be further adjusted by the OS dependent code to better match the
available keyboard, e.g. one could map pause to the Pause key instead of P, or
snapshot to PrtScr instead of F12. Of course the user can further change the
settings to anything he/she likes.
This function is called on startup, before reading the configuration from disk.
Scan the list, and change the keys/joysticks you want.
*/
void osd_customize_input_type_list(input_type_desc *typelist);
#endif /* __OSDEPEND_H__ */

View File

@ -20,6 +20,15 @@ mame2010 - libretro port of mame 0.139
#include "log.h"
#include "rendersw.c"
#ifdef COMPILE_DATS
#include "precompile_hiscore_dat.h"
#include "precompile_mameini_boilerplate.h"
#else
#include "hiscore_dat.h"
#include "mameini_boilerplate.h"
#endif
#ifdef M16B
uint16_t videoBuffer[1024*1024];
#define PITCH 1
@ -32,11 +41,6 @@ mame2010 - libretro port of mame 0.139
#include "retroogl.c"
#endif
#if defined(_WIN32)
char PATH_DELIMITER = '\\';
#else
char PATH_DELIMITER = '/';
#endif
const char* core_name = "mame2010";
char libretro_content_directory[1024];
@ -117,25 +121,6 @@ void retro_set_input_poll(retro_input_poll_t cb) { input_poll_cb = cb; }
void retro_set_video_refresh(retro_video_refresh_t cb) { video_cb = cb; }
void retro_set_audio_sample(retro_audio_sample_t cb) { }
static void extract_basename(char *buf, const char *path, size_t size)
{
const char *base = strrchr(path, '/');
if (!base)
base = strrchr(path, '\\');
if (!base)
base = path;
if (*base == '\\' || *base == '/')
base++;
strncpy(buf, base, size - 1);
buf[size - 1] = '\0';
char *ext = strrchr(buf, '.');
if (ext)
*ext = '\0';
}
static void extract_directory(char *buf, const char *path, size_t size)
{
strncpy(buf, path, size - 1);
@ -150,37 +135,7 @@ static void extract_directory(char *buf, const char *path, size_t size)
else
buf[0] = '\0';
}
//============================================================
// CONSTANTS
//============================================================
// fake a keyboard mapped to retro joypad
enum
{
KEY_F11,
KEY_TAB,
KEY_F3,
KEY_F2,
KEY_START,
KEY_COIN,
KEY_BUTTON_1,
KEY_BUTTON_2,
KEY_BUTTON_3,
KEY_BUTTON_4,
KEY_BUTTON_5,
KEY_BUTTON_6,
KEY_JOYSTICK_U,
KEY_JOYSTICK_D,
KEY_JOYSTICK_L,
KEY_JOYSTICK_R,
KEY_TOTAL
};
#ifdef DEBUG_LOG
# define LOG(msg) fprintf(stderr, "%s\n", msg)
#else
# define LOG(msg)
#endif
//============================================================
// GLOBALS
@ -236,7 +191,7 @@ void retro_set_environment(retro_environment_t cb)
static const struct retro_variable vars[] = {
{ "mame_current_mouse_enable", "Mouse supported; disabled|enabled" },
{ "mame_current_videoapproach1_enable", "Video approach 1 Enabled; disabled|enabled" },
{ "mame_current_skip_nagscreen", "Hide nag screen; disabled|enabled" },
{ "mame_current_skip_nagscreen", "Hide nag screen; enabled|disabled" },
{ "mame_current_skip_gameinfo", "Hide game info screen; disabled|enabled" },
{ "mame_current_skip_warnings", "Hide warning screen; disabled|enabled" },
{ "mame_current_aspect_ratio", "Core provided aspect ratio; DAR|PAR" },
@ -430,39 +385,6 @@ static void update_geometry()
environ_cb(RETRO_ENVIRONMENT_SET_GEOMETRY, &av_info);
}
void init_input_descriptors(void)
{
#define describe_buttons(INDEX) \
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_LEFT, "Joystick Left" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_RIGHT, "Joystick Right" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_UP, "Joystick Up" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_DOWN, "Joystick Down" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_A, "Button 1" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_B, "Button 2" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_X, "Button 3" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_Y, "Button 4" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L, "Button 5" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R, "Button 6" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L2, "UI Menu" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R2, "Turbo Button" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L3, "Service" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R3, "Framerate" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_SELECT, "Insert Coin" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START, "Start" },
struct retro_input_descriptor desc[] = {
describe_buttons(0)
describe_buttons(1)
describe_buttons(2)
describe_buttons(3)
describe_buttons(4)
describe_buttons(5)
{ 0, 0, 0, 0, NULL }
};
environ_cb(RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS, desc);
}
void retro_get_system_info(struct retro_system_info *info)
{
memset(info, 0, sizeof(*info));
@ -521,7 +443,6 @@ void retro_reset (void)
mame_reset = 1;
}
void retro_run (void)
{
bool updated = false;
@ -550,6 +471,47 @@ void prep_retro_rotation(int rot)
environ_cb(RETRO_ENVIRONMENT_SET_ROTATION, &rot);
}
void retro_unload_game(void)
{
if(pauseg == 0)
pauseg = -1;
LOGI("Retro unload_game\n");
}
void init_input_descriptors(void)
{
#define describe_buttons(INDEX) \
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_LEFT, "Joystick Left" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_RIGHT, "Joystick Right" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_UP, "Joystick Up" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_DOWN, "Joystick Down" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_A, "Button 1" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_B, "Button 2" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_X, "Button 3" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_Y, "Button 4" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L, "Button 5" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R, "Button 6" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L2, "UI Menu" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R2, "Turbo Button" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L3, "Service" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R3, "Framerate" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_SELECT, "Insert Coin" },\
{ INDEX, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START, "Start" },
struct retro_input_descriptor desc[] = {
describe_buttons(0)
describe_buttons(1)
describe_buttons(2)
describe_buttons(3)
describe_buttons(4)
describe_buttons(5)
{ 0, 0, 0, 0, NULL }
};
environ_cb(RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS, desc);
}
/*
static void keyboard_cb(bool down, unsigned keycode, uint32_t character, uint16_t mod)
{
@ -579,14 +541,6 @@ static void keyboard_cb(bool down, unsigned keycode, uint32_t character, uint16_
}
*/
void retro_unload_game(void)
{
if(pauseg == 0)
pauseg = -1;
LOGI("Retro unload_game\n");
}
#define PLAYER1_PRESS(button) input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_##button)
#define PLAYER2_PRESS(button) input_state_cb(1, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_##button)
@ -1298,13 +1252,13 @@ void retro_init (void)
if (environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &system_dir) && system_dir)
{
// use a subfolder in the system directory with the core name (ie mame2010)
snprintf(libretro_system_directory, sizeof(libretro_system_directory), "%s%c%s", system_dir, PATH_DELIMITER, core_name);
snprintf(libretro_system_directory, sizeof(libretro_system_directory), "%s%s%s", system_dir, path_default_slash(), core_name);
}
if (environ_cb(RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY, &save_dir) && save_dir)
{
// use a subfolder in the save directory with the core name (ie mame2010)
snprintf(libretro_save_directory, sizeof(libretro_save_directory), "%s%c%s", save_dir, PATH_DELIMITER, core_name);
snprintf(libretro_save_directory, sizeof(libretro_save_directory), "%s%s%s", save_dir, path_default_slash(), core_name);
}
else
{
@ -1315,47 +1269,63 @@ void retro_init (void)
path_mkdir(libretro_save_directory);
// content loaded from mame2010 subfolder within the libretro system folder
snprintf(cheatpath, sizeof(cheatpath), "%c%s", PATH_DELIMITER, libretro_system_directory);
snprintf(cheatpath, sizeof(cheatpath), "%s%s", path_default_slash(), libretro_system_directory);
path_mkdir(libretro_save_directory);
snprintf(samplepath, sizeof(samplepath), "%s%c%s", libretro_system_directory, PATH_DELIMITER, "samples");
snprintf(samplepath, sizeof(samplepath), "%s%s%s", libretro_system_directory, path_default_slash(), "samples");
path_mkdir(samplepath);
snprintf(artpath, sizeof(artpath), "%s%c%s", libretro_system_directory, PATH_DELIMITER, "artwork");
snprintf(artpath, sizeof(artpath), "%s%s%s", libretro_system_directory, path_default_slash(), "artwork");
path_mkdir(artpath);
snprintf(fontpath, sizeof(fontpath), "%s%c%s", libretro_system_directory, PATH_DELIMITER, "fonts");
snprintf(fontpath, sizeof(fontpath), "%s%s%s", libretro_system_directory, path_default_slash(), "fonts");
path_mkdir(fontpath);
snprintf(crosshairpath, sizeof(crosshairpath), "%s%c%s", libretro_system_directory, PATH_DELIMITER, "crosshairs");
snprintf(crosshairpath, sizeof(crosshairpath), "%s%s%s", libretro_system_directory, path_default_slash(), "crosshairs");
path_mkdir(crosshairpath);
// user-generated content loaded from mame2010 subfolder within the libretro save folder
snprintf(ctrlrpath, sizeof(ctrlrpath), "%s%c%s", libretro_save_directory, PATH_DELIMITER, "ctrlr");
snprintf(ctrlrpath, sizeof(ctrlrpath), "%s%s%s", libretro_save_directory, path_default_slash(), "ctrlr");
path_mkdir(ctrlrpath);
snprintf(inipath, sizeof(inipath), "%s%c%s", libretro_save_directory, PATH_DELIMITER, "ini");
snprintf(inipath, sizeof(inipath), "%s%s%s", libretro_save_directory, path_default_slash(), "ini");
path_mkdir(inipath);
snprintf(cfg_directory, sizeof(cfg_directory), "%s%c%s", libretro_save_directory, PATH_DELIMITER, "cfg");
snprintf(cfg_directory, sizeof(cfg_directory), "%s%s%s", libretro_save_directory, path_default_slash(), "cfg");
path_mkdir(cfg_directory);
snprintf(nvram_directory, sizeof(nvram_directory), "%s%c%s", libretro_save_directory, PATH_DELIMITER, "nvram");
snprintf(nvram_directory, sizeof(nvram_directory), "%s%s%s", libretro_save_directory, path_default_slash(), "nvram");
path_mkdir(nvram_directory);
snprintf(memcard_directory, sizeof(memcard_directory), "%s%c%s", libretro_save_directory, PATH_DELIMITER, "memcard");
snprintf(memcard_directory, sizeof(memcard_directory), "%s%s%s", libretro_save_directory, path_default_slash(), "memcard");
path_mkdir(memcard_directory);
snprintf(input_directory, sizeof(input_directory), "%s%c%s", libretro_save_directory, PATH_DELIMITER, "input");
snprintf(input_directory, sizeof(input_directory), "%s%s%s", libretro_save_directory, path_default_slash(), "input");
path_mkdir(input_directory);
snprintf(image_directory, sizeof(image_directory), "%s%c%s", libretro_save_directory, PATH_DELIMITER, "image");
snprintf(image_directory, sizeof(image_directory), "%s%s%s", libretro_save_directory, path_default_slash(), "image");
path_mkdir(image_directory);
snprintf(diff_directory, sizeof(diff_directory), "%s%c%s", libretro_save_directory, PATH_DELIMITER, "diff");
snprintf(diff_directory, sizeof(diff_directory), "%s%s%s", libretro_save_directory, path_default_slash(), "diff");
path_mkdir(diff_directory);
snprintf(comment_directory, sizeof(comment_directory), "%s%c%s", libretro_save_directory, PATH_DELIMITER, "comment");
snprintf(comment_directory, sizeof(comment_directory), "%s%s%s", libretro_save_directory, path_default_slash(), "comment");
path_mkdir(comment_directory);
char mameini_path[1024];
snprintf(mameini_path, sizeof(mameini_path), "%s%s%s", inipath, path_default_slash(), "mame.ini");
if(!path_file_exists(mameini_path))
{
FILE *mameini_file;
if((mameini_file=fopen(mameini_path, "wb"))==NULL)
{
printf("[MAME 2010][ERROR] Something went wrong creating new mame.ini at: %s\n", mameini_path);
}
else
{
fwrite(mameini_boilerplate, sizeof(char), mameini_boilerplate_length, mameini_file);
fclose(mameini_file);
}
}
}
bool retro_load_game(const struct retro_game_info *info)
{
char basename[1024];
basename[0] = '\0';
extract_basename(basename, info->path, sizeof(basename));
extract_directory(libretro_content_directory, info->path, sizeof(libretro_content_directory));
strncpy(libretro_content_directory, info->path, sizeof(libretro_content_directory));
printf("\npath_parent_dir output: %s\n\n", libretro_content_directory);
struct retro_log_callback log_cb;
if (environ_cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log_cb))
@ -1418,7 +1388,6 @@ bool retro_load_game(const struct retro_game_info *info)
return 1;
}
void osd_exit(running_machine &machine)
{
write_log("osd_exit called \n");
@ -1643,28 +1612,6 @@ void osd_update_audio_stream(running_machine *machine,short *buffer, int samples
}
//============================================================
// set_mastervolume
//============================================================
void osd_set_mastervolume(int attenuation)
{
// if we had actual sound output, we would adjust the global
// volume in response to this function
}
//============================================================
// customize_input_type_list
//============================================================
void osd_customize_input_type_list(input_type_desc *typelist)
{
// This function is called on startup, before reading the
// configuration from disk. Scan the list, and change the
// default control mappings you want. It is quite possible
// you won't need to change a thing.
}
//============================================================
// main
//============================================================
@ -1702,7 +1649,7 @@ static int parsePath(char* path, char* gamePath, char* gameName) {
}
for (i = len - 1; i >=0; i--) {
if (path[i] == PATH_DELIMITER) {
if (path[i] == path_default_slash()[0]) {
slashIndex = i;
break;
} else
@ -1733,8 +1680,7 @@ static int parsePath(char* path, char* gamePath, char* gameName) {
static int getGameInfo(char* gameName, int* rotation, int* driverIndex) {
int gameFound = 0;
int drvindex;
//FIXME for 0.149 , prevouisly in driver.h
#if 1
//check invalid game name
if (gameName[0] == 0)
return 0;
@ -1748,9 +1694,6 @@ static int getGameInfo(char* gameName, int* rotation, int* driverIndex) {
write_log("[INFO][MAME2010] %-18s\"%s\" rot=%i \n", drivers[drvindex]->name, drivers[drvindex]->description, *rotation);
}
}
#else
gameFound = 1;
#endif
return gameFound;
}
@ -1864,9 +1807,8 @@ extern "C"
int mmain(int argc, const char *argv)
{
static char gameName[1024];
int result = 0;
strcpy(gameName,argv);
if(executeGame(gameName)!=0)return -1;
strncpy(gameName, argv, 1024);
if(executeGame(gameName)!=0) return -1;
return 1;
}

View File

@ -44,8 +44,6 @@ extern int RLOOP;
void osd_init(running_machine* machine);
void osd_update(running_machine* machine,int skip_redraw);
void osd_update_audio_stream(running_machine* machine,short *buffer, int samples_this_frame);
void osd_set_mastervolume(int attenuation);
void osd_customize_input_type_list(input_type_desc *typelist);
void osd_exit(running_machine &machine);
//============================================================
@ -74,4 +72,32 @@ extern char input_directory[];
extern char diff_directory[];
extern char comment_directory[];
// fake a keyboard mapped to retro joypad
enum
{
KEY_F11,
KEY_TAB,
KEY_F3,
KEY_F2,
KEY_START,
KEY_COIN,
KEY_BUTTON_1,
KEY_BUTTON_2,
KEY_BUTTON_3,
KEY_BUTTON_4,
KEY_BUTTON_5,
KEY_BUTTON_6,
KEY_JOYSTICK_U,
KEY_JOYSTICK_D,
KEY_JOYSTICK_L,
KEY_JOYSTICK_R,
KEY_TOTAL
};
#ifdef DEBUG_LOG
# define LOG(msg) fprintf(stderr, "%s\n", msg)
#else
# define LOG(msg)
#endif
#endif /* __RETROMAIN_H__ */

7
src/tools/bin2c/LICENCE Normal file
View File

@ -0,0 +1,7 @@
The person or persons who have associated work with this document (the "Dedicator" or "Certifier") hereby either (a) certifies that, to the best of his knowledge, the work of authorship identified is in the public domain of the country from which the work is published, or (b) hereby dedicates whatever copyright the dedicators holds in the work of authorship identified below (the "Work") to the public domain. A certifier, moreover, dedicates any copyright interest he may have in the associated work, and for these purposes, is described as a "dedicator" below.
A certifier has taken reasonable steps to verify the copyright status of this work. Certifier recognizes that his good faith efforts may not shield him from liability if in fact the work certified is not in the public domain.
Dedicator makes this dedication for the benefit of the public at large and to the detriment of the Dedicator's heirs and successors. Dedicator intends this dedication to be an overt act of relinquishment in perpetuity of all present and future rights under copyright law, whether vested or contingent, in the Work. Dedicator understands that such relinquishment of all rights includes the relinquishment of all rights to enforce (by lawsuit or otherwise) those copyrights in the Work.
Dedicator recognizes that, once placed in the public domain, the Work may be freely reproduced, distributed, transmitted, used, modified, built upon, or otherwise exploited by anyone for any purpose, commercial or non-commercial, and in any way, including by methods that have not yet been invented or conceived.

21
src/tools/bin2c/Makefile Normal file
View File

@ -0,0 +1,21 @@
CFLAGS := -O2 -Wall -Wextra
.PHONY: all
all: bin2c
.PHONY: clean
clean:
rm -f bin2c test/test test/test_header.h
bin2c: bin2c.c
$(CC) $(CFLAGS) -o $@ $<
test/test_header.h: test/test.bin bin2c
./bin2c $< $@ test_array
test/test: test/test.c test/test_header.h
$(CC) $(CFLAGS) -o $@ $<
.PHONY: test
test: test/test test/test.bin
test/test test/test.bin

64
src/tools/bin2c/README Normal file
View File

@ -0,0 +1,64 @@
bin2c - A simple utility for converting a binary file to a c application which
can then be included within an application.
Usage:
bin2c input_file output_file array_name
for example, using:
bin2c my_file.dat my_file.h data
will create something along the lines of
const char data[3432] = {
0x43, 0x28, 0x41, 0x11, 0xa3, 0xff,
...
0x00, 0xff, 0x23
};
const int data_length = 3432;
This can then be used within your application, for example with SDL you would
use SDL_RWops. The application can also be used in a very similar fashion to
Qt's RC system.
I haven't included a Makefile because the utility is SO simple, I don't
think that one is needed. But for an example, compiling for GNU/Linux can be
done as shown
gcc -o bin2c bin2c.c
In the current system, you can tell bin2c to compress the data with BZ2
compression. This would be very useful in applications where a lot of files
are stored this way or if memory is tight (although not CPU). To produce an
executable which can make bz2 files, define USE_BZ2. However, since this is
such a simple application, you can either define USE_BZ2 or not and it will
then produce compressed data or not. An example as to how to compile a BZ2
compression version of bin2c is as such
gcc -o bin2cbz2 bin2c.c -DUSE_BZ2 -lbz2
This will add an extra constant, data_length_uncompressed, which is the size
of the file before it was compressed. So to decompress the file, you would
do something like the following:
unsigned int decompressed_size = data_length_uncompressed;
char *buf = malloc(data_length_uncompressed);
int status;
status = BZ2_bzBuffToBuffDecompress(buf, &decompressed_size,
const_cast<char *>data, (unsigned int)data_length, 0, 0);
// do something with buf
free(buf);
I'm not entirely happy with having to do const_cast in C++ so if anyone can
suggest an alternative then I'd be happy to implement it.
Patches are welcome, just fork the project on github and send me a pull
request. If you are unable or unwilling to do this through github, then feel
free to email me your patch. This utility is so small I don't think that any
licence is needed, and I took most of the code from Serge Fukanchick and made
quite a few modifications so left it in the public domain. So please just send
me a little note to say that you don't mind your code being in the public
domain.

114
src/tools/bin2c/bin2c.c Normal file
View File

@ -0,0 +1,114 @@
/*
* This is bin2c program, which allows you to convert binary file to
* C language array, for use as embedded resource, for instance you can
* embed graphics or audio file directly into your program.
* This is public domain software, use it on your own risk.
* Contact Serge Fukanchik at fuxx@mail.ru if you have any questions.
*
* Some modifications were made by Gwilym Kuiper (kuiper.gwilym@gmail.com)
* I have decided not to change the licence.
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef USE_BZ2
#include <bzlib.h>
#endif
int
main(int argc, char *argv[])
{
char *buf;
char *ident;
unsigned int i, file_size, need_comma;
FILE *f_input, *f_output;
#ifdef USE_BZ2
char *bz2_buf;
unsigned int uncompressed_size, bz2_size;
#endif
if (argc < 4) {
fprintf(stderr, "Usage: %s binary_file output_file array_name\n",
argv[0]);
return -1;
}
f_input = fopen(argv[1], "rb");
if (f_input == NULL) {
fprintf(stderr, "%s: can't open %s for reading\n", argv[0], argv[1]);
return -1;
}
// Get the file length
fseek(f_input, 0, SEEK_END);
file_size = ftell(f_input);
fseek(f_input, 0, SEEK_SET);
buf = (char *) malloc(file_size);
assert(buf);
fread(buf, file_size, 1, f_input);
fclose(f_input);
#ifdef USE_BZ2
// allocate for bz2.
bz2_size =
(file_size + file_size / 100 + 1) + 600; // as per the documentation
bz2_buf = (char *) malloc(bz2_size);
assert(bz2_buf);
// compress the data
int status =
BZ2_bzBuffToBuffCompress(bz2_buf, &bz2_size, buf, file_size, 9, 1, 0);
if (status != BZ_OK) {
fprintf(stderr, "Failed to compress data: error %i\n", status);
return -1;
}
// and be very lazy
free(buf);
uncompressed_size = file_size;
file_size = bz2_size;
buf = bz2_buf;
#endif
f_output = fopen(argv[2], "w");
if (f_output == NULL) {
fprintf(stderr, "%s: can't open %s for writing\n", argv[0], argv[1]);
return -1;
}
ident = argv[3];
need_comma = 0;
fprintf(f_output, "const char %s[%i] = {", ident, file_size);
for (i = 0; i < file_size; ++i) {
if (need_comma)
fprintf(f_output, ", ");
else
need_comma = 1;
if ((i % 11) == 0)
fprintf(f_output, "\n\t");
fprintf(f_output, "0x%.2x", buf[i] & 0xff);
}
fprintf(f_output, "\n};\n\n");
fprintf(f_output, "const int %s_length = %i;\n", ident, file_size);
#ifdef USE_BZ2
fprintf(f_output, "const int %s_length_uncompressed = %i;\n", ident,
uncompressed_size);
#endif
fclose(f_output);
return 0;
}

Binary file not shown.

View File

@ -0,0 +1,35 @@
#include <assert.h>
#include <stdio.h>
#include "test_header.h"
int
main(int argc, char **argv)
{
if (argc != 2) {
fprintf(stderr, "Expected 1 argument, got %i\n", argc - 1);
return 1;
}
FILE *f = fopen(argv[1], "rb");
int length = 0;
// We know the file has size 100 bytes so don't need to worry about
// half full buffers. Also, we need to handle endianness of the
// machine so we can't just read one byte at a time, but must instead
// read 2 bytes at a time...
char buff[2];
while ((fread(buff, 1, 2, f)) == 2) {
assert((buff[0] & 0xff) == (test_array[length] & 0xff));
assert((buff[1] & 0xff) == (test_array[length + 1] & 0xff));
length += 2;
}
assert(length == test_array_length);
fclose(f);
printf("All tests successful\n");
return 0;
}