diff -r -c -N old/cheat.c src/cheat.c *** old/cheat.c Fri Sep 22 09:46:34 2006 --- src/cheat.c Fri Sep 22 09:49:54 2006 *************** *** 862,867 **** --- 862,868 ---- /**** Exported Globals *******************************************************/ + int he_did_cheat = 0; const char * cheatfile = NULL; /**** Local Globals **********************************************************/ *************** *** 1756,1761 **** --- 1757,1763 ---- void cheat_init(running_machine *machine) { + he_did_cheat = 0; cheatList = NULL; cheatListLength = 0; *************** *** 9948,9953 **** --- 9950,9956 ---- } entry->flags |= kCheatFlag_Active; + he_did_cheat = 1; } static void DeactivateCheat(CheatEntry * entry) diff -r -c -N old/cheat.h src/cheat.h *** old/cheat.h Fri Sep 22 09:46:34 2006 --- src/cheat.h Fri Sep 22 09:50:22 2006 *************** *** 14,19 **** --- 14,21 ---- #ifndef __CHEAT_H__ #define __CHEAT_H__ + extern int he_did_cheat; + void cheat_init(running_machine *machine); int cheat_menu(int selection); diff -r -c -N old/core.mak src/core.mak *** old/core.mak Fri Sep 22 09:46:18 2006 --- src/core.mak Fri Sep 22 09:47:52 2006 *************** *** 30,35 **** --- 30,36 ---- $(OBJ)/fileio.o \ $(OBJ)/harddisk.o \ $(OBJ)/hash.o \ + $(OBJ)/hiscore.o \ $(OBJ)/info.o \ $(OBJ)/input.o \ $(OBJ)/inptport.o \ diff -r -c -N old/drawgfx.c src/drawgfx.c *** old/drawgfx.c Fri Sep 22 09:46:26 2006 --- src/drawgfx.c Fri Sep 22 09:47:52 2006 *************** *** 3544,3550 **** plot_pixel(bitmap,x,y,pen); } ! static int crosshair_enable=1; void drawgfx_toggle_crosshair(void) { --- 3544,3550 ---- plot_pixel(bitmap,x,y,pen); } ! static int crosshair_enable=0; void drawgfx_toggle_crosshair(void) { diff -r -c -N old/hiscore.c src/hiscore.c *** old/hiscore.c Thu Jan 1 00:00:00 1970 --- src/hiscore.c Fri Sep 22 09:47:52 2006 *************** *** 0 **** --- 1,375 ---- + /*************************************************************************** + + hiscore.c + + Manages the hiscore system. + + Copyright (c) 1996-2006, Nicola Salmoria and the MAME Team. + Visit http://mamedev.org for licensing and usage restrictions. + + ***************************************************************************/ + + #include "driver.h" + #include "hiscore.h" + #include "cheat.h" + + #define MAX_CONFIG_LINE_SIZE 48 + + #define VERBOSE 0 + + static mame_timer *timer; + + #if VERBOSE + #define LOG(x) logerror x + #else + #define LOG(x) + #endif + + const char *db_filename = "hiscore.dat"; /* high score definition file */ + + + struct _memory_range + { + UINT32 cpu, addr, num_bytes, start_value, end_value; + struct _memory_range *next; + }; + typedef struct _memory_range memory_range; + + + static struct + { + int hiscores_have_been_loaded; + memory_range *mem_range; + } state; + + + static int is_highscore_enabled(void) + { + /* disable high score when record/playback is on */ + if (Machine->record_file != NULL || Machine->playback_file != NULL) + return FALSE; + + /* disable high score when cheats are used */ + if (he_did_cheat != 0) + return FALSE; + + return TRUE; + } + + + + /*****************************************************************************/ + + static void copy_to_memory (int cpu, int addr, const UINT8 *source, int num_bytes) + { + int i; + for (i=0; i='0' && c<='9') + { + digit = c-'0'; + } + else if (c>='a' && c<='f') + { + digit = 10+c-'a'; + } + else if (c>='A' && c<='F') + { + digit = 10+c-'A'; + } + else + { + /* not a hexadecimal digit */ + /* safety check for premature EOL */ + if (!c) string = NULL; + break; + } + result = result*16 + digit; + } + *pString = string; + } + return result; + } + + /* given a line in the hiscore.dat file, determine if it encodes a + memory range (or a game name). + For now we assume that CPU number is always a decimal digit, and + that no game name starts with a decimal digit. + */ + static int is_mem_range (const char *pBuf) + { + char c; + for(;;) + { + c = *pBuf++; + if (c == 0) return 0; /* premature EOL */ + if (c == ':') break; + } + c = *pBuf; /* character following first ':' */ + + return (c>='0' && c<='9') || + (c>='a' && c<='f') || + (c>='A' && c<='F'); + } + + /* matching_game_name is used to skip over lines until we find : */ + static int matching_game_name (const char *pBuf, const char *name) + { + while (*name) + { + if (*name++ != *pBuf++) return 0; + } + return (*pBuf == ':'); + } + + /*****************************************************************************/ + + /* safe_to_load checks the start and end values of each memory range */ + static int safe_to_load (void) + { + memory_range *mem_range = state.mem_range; + while (mem_range) + { + if (cpunum_read_byte (mem_range->cpu, mem_range->addr) != + mem_range->start_value) + { + return 0; + } + if (cpunum_read_byte (mem_range->cpu, mem_range->addr + mem_range->num_bytes - 1) != + mem_range->end_value) + { + return 0; + } + mem_range = mem_range->next; + } + return 1; + } + + /* hiscore_free disposes of the mem_range linked list */ + static void hiscore_free (void) + { + memory_range *mem_range = state.mem_range; + while (mem_range) + { + memory_range *next = mem_range->next; + free (mem_range); + mem_range = next; + } + state.mem_range = NULL; + } + + static void hiscore_load (void) + { + if (is_highscore_enabled()) + { + mame_file *f = mame_fopen (Machine->gamedrv->name, 0, FILETYPE_HIGHSCORE, 0); + state.hiscores_have_been_loaded = 1; + LOG(("hiscore_load\n")); + if (f) + { + memory_range *mem_range = state.mem_range; + LOG(("loading...\n")); + while (mem_range) + { + UINT8 *data = malloc (mem_range->num_bytes); + if (data) + { + /* this buffer will almost certainly be small + enough to be dynamically allocated, but let's + avoid memory trashing just in case + */ + mame_fread (f, data, mem_range->num_bytes); + copy_to_memory (mem_range->cpu, mem_range->addr, data, mem_range->num_bytes); + free (data); + } + mem_range = mem_range->next; + } + mame_fclose (f); + } + } + } + + static void hiscore_save (void) + { + if (is_highscore_enabled()) + { + mame_file *f = mame_fopen (Machine->gamedrv->name, 0, FILETYPE_HIGHSCORE, 1); + LOG(("hiscore_save\n")); + if (f) + { + memory_range *mem_range = state.mem_range; + LOG(("saving...\n")); + while (mem_range) + { + UINT8 *data = malloc (mem_range->num_bytes); + if (data) + { + /* this buffer will almost certainly be small + enough to be dynamically allocated, but let's + avoid memory trashing just in case + */ + copy_from_memory (mem_range->cpu, mem_range->addr, data, mem_range->num_bytes); + mame_fwrite(f, data, mem_range->num_bytes); + free (data); + } + mem_range = mem_range->next; + } + mame_fclose(f); + } + } + } + + + /* call hiscore_update periodically (i.e. once per frame) */ + static void hiscore_periodic (int param) + { + if (state.mem_range) + { + if (!state.hiscores_have_been_loaded) + { + if (safe_to_load()) + { + hiscore_load(); + timer_enable(timer, FALSE); + } + } + } + } + + + /* call hiscore_close when done playing game */ + void hiscore_close (running_machine *machine) + { + if (state.hiscores_have_been_loaded) hiscore_save(); + hiscore_free(); + } + + + /*****************************************************************************/ + /* public API */ + + /* call hiscore_open once after loading a game */ + void hiscore_init (running_machine *machine) + { + const char *name = machine->gamedrv->name; + memory_range *mem_range = state.mem_range; + mame_file *f; + + state.hiscores_have_been_loaded = 0; + + while (mem_range) + { + cpunum_write_byte( + mem_range->cpu, + mem_range->addr, + ~mem_range->start_value + ); + + cpunum_write_byte( + mem_range->cpu, + mem_range->addr + mem_range->num_bytes-1, + ~mem_range->end_value + ); + mem_range = mem_range->next; + } + + state.mem_range = NULL; + + f = mame_fopen (NULL, db_filename, FILETYPE_HIGHSCORE_DB, 0); + if (f) + { + char buffer[MAX_CONFIG_LINE_SIZE]; + enum { FIND_NAME, FIND_DATA, FETCH_DATA } mode; + mode = FIND_NAME; + + while (mame_fgets (buffer, MAX_CONFIG_LINE_SIZE, f)) + { + if (mode==FIND_NAME) + { + if (matching_game_name (buffer, name)) + { + mode = FIND_DATA; + LOG(("hs config found!\n")); + } + } + else if (is_mem_range (buffer)) + { + const char *pBuf = buffer; + memory_range *mem_range = malloc(sizeof(memory_range)); + if (mem_range) + { + mem_range->cpu = hexstr2num (&pBuf); + mem_range->addr = hexstr2num (&pBuf); + mem_range->num_bytes = hexstr2num (&pBuf); + mem_range->start_value = hexstr2num (&pBuf); + mem_range->end_value = hexstr2num (&pBuf); + + mem_range->next = NULL; + { + memory_range *last = state.mem_range; + while (last && last->next) last = last->next; + if (last == NULL) + { + state.mem_range = mem_range; + } + else + { + last->next = mem_range; + } + } + + mode = FETCH_DATA; + } + else + { + hiscore_free(); + break; + } + } + else + { + /* line is a game name */ + if (mode == FETCH_DATA) break; + } + } + mame_fclose (f); + } + + timer = timer_alloc(hiscore_periodic); + timer_adjust(timer, TIME_IN_HZ(60), 0, TIME_IN_HZ(60)); + add_exit_callback(machine, hiscore_close); + } diff -r -c -N old/hiscore.h src/hiscore.h *** old/hiscore.h Thu Jan 1 00:00:00 1970 --- src/hiscore.h Fri Sep 22 09:47:52 2006 *************** *** 0 **** --- 1,19 ---- + /*************************************************************************** + + hiscore.h + + Manages the hiscore system. + + Copyright (c) 1996-2006, Nicola Salmoria and the MAME Team. + Visit http://mamedev.org for licensing and usage restrictions. + + ***************************************************************************/ + + #pragma once + + #ifndef __HISCORE_H__ + #define __HISCORE_H__ + + void hiscore_init( running_machine *machine ); + + #endif /* __HISCORE_H__ */ diff -r -c -N old/inptport.c src/inptport.c *** old/inptport.c Fri Sep 22 09:46:34 2006 --- src/inptport.c Fri Sep 22 09:47:52 2006 *************** *** 860,895 **** INPUT_PORT_DIGITAL_DEF( 0, IPG_OTHER, KEYBOARD, "Keyboard", SEQ_DEF_0 ) INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_ON_SCREEN_DISPLAY,"On Screen Display", SEQ_DEF_1(KEYCODE_TILDE) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_DEBUG_BREAK, "Break in Debugger", SEQ_DEF_1(KEYCODE_TILDE) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_CONFIGURE, "Config Menu", SEQ_DEF_1(KEYCODE_TAB) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_PAUSE, "Pause", SEQ_DEF_1(KEYCODE_P) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_RESET_MACHINE, "Reset Game", SEQ_DEF_2(KEYCODE_F3, KEYCODE_LSHIFT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SOFT_RESET, "Soft Reset", SEQ_DEF_3(KEYCODE_F3, CODE_NOT, KEYCODE_LSHIFT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SHOW_GFX, "Show Gfx", SEQ_DEF_1(KEYCODE_F4) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_FRAMESKIP_DEC, "Frameskip Dec", SEQ_DEF_1(KEYCODE_F8) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_FRAMESKIP_INC, "Frameskip Inc", SEQ_DEF_1(KEYCODE_F9) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_THROTTLE, "Throttle", SEQ_DEF_1(KEYCODE_F10) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SHOW_FPS, "Show FPS", SEQ_DEF_5(KEYCODE_F11, CODE_NOT, KEYCODE_LCONTROL, CODE_NOT, KEYCODE_LSHIFT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SNAPSHOT, "Save Snapshot", SEQ_DEF_3(KEYCODE_F12, CODE_NOT, KEYCODE_LSHIFT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_RECORD_MOVIE, "Record Movie", SEQ_DEF_2(KEYCODE_F12, KEYCODE_LSHIFT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_TOGGLE_CHEAT, "Toggle Cheat", SEQ_DEF_1(KEYCODE_F6) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_UP, "UI Up", SEQ_DEF_3(KEYCODE_UP, CODE_OR, JOYCODE_1_UP) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_DOWN, "UI Down", SEQ_DEF_3(KEYCODE_DOWN, CODE_OR, JOYCODE_1_DOWN) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_LEFT, "UI Left", SEQ_DEF_3(KEYCODE_LEFT, CODE_OR, JOYCODE_1_LEFT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_RIGHT, "UI Right", SEQ_DEF_3(KEYCODE_RIGHT, CODE_OR, JOYCODE_1_RIGHT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_HOME, "UI Home", SEQ_DEF_1(KEYCODE_HOME) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_END, "UI End", SEQ_DEF_1(KEYCODE_END) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_PAGE_UP, "UI Page Up", SEQ_DEF_1(KEYCODE_PGUP) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_PAGE_DOWN, "UI Page Down", SEQ_DEF_1(KEYCODE_PGDN) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SELECT, "UI Select", SEQ_DEF_3(KEYCODE_ENTER, CODE_OR, JOYCODE_1_BUTTON1) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_CANCEL, "UI Cancel", SEQ_DEF_1(KEYCODE_ESC) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_CLEAR, "UI Clear", SEQ_DEF_1(KEYCODE_DEL) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_ZOOM_IN, "UI Zoom In", SEQ_DEF_1(KEYCODE_EQUALS) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_ZOOM_OUT, "UI Zoom Out", SEQ_DEF_1(KEYCODE_MINUS) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_PREV_GROUP, "UI Previous Group", SEQ_DEF_1(KEYCODE_OPENBRACE) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_NEXT_GROUP, "UI Next Group", SEQ_DEF_1(KEYCODE_CLOSEBRACE) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_ROTATE, "UI Rotate", SEQ_DEF_1(KEYCODE_R) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SHOW_PROFILER, "Show Profiler", SEQ_DEF_2(KEYCODE_F11, KEYCODE_LSHIFT) ) #ifdef MESS INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_TOGGLE_UI, "UI Toggle", SEQ_DEF_1(KEYCODE_SCRLOCK) ) #endif --- 860,895 ---- INPUT_PORT_DIGITAL_DEF( 0, IPG_OTHER, KEYBOARD, "Keyboard", SEQ_DEF_0 ) INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_ON_SCREEN_DISPLAY,"On Screen Display", SEQ_DEF_1(KEYCODE_TILDE) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_DEBUG_BREAK, "Break in Debugger", SEQ_DEF_1(KEYCODE_TILDE) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_CONFIGURE, "Config Menu", SEQ_DEF_1(KEYCODE_TAB) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_PAUSE, "Pause", SEQ_DEF_3(KEYCODE_P, CODE_OR, KEYCODE_TAB) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_RESET_MACHINE, "Reset Game", SEQ_DEF_1(KEYCODE_F3) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SOFT_RESET, "Soft Reset", SEQ_DEF_3(KEYCODE_F3, CODE_NOT, KEYCODE_LSHIFT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SHOW_GFX, "Show Gfx", SEQ_DEF_1(KEYCODE_F4) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_FRAMESKIP_DEC, "Frameskip Dec", SEQ_DEF_1(KEYCODE_F8) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_FRAMESKIP_INC, "Frameskip Inc", SEQ_DEF_1(KEYCODE_F9) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_THROTTLE, "Throttle", SEQ_DEF_1(KEYCODE_F10) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SHOW_FPS, "Show FPS", SEQ_DEF_5(KEYCODE_F11, CODE_NOT, KEYCODE_LCONTROL, CODE_NOT, KEYCODE_LSHIFT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SNAPSHOT, "Save Snapshot", SEQ_DEF_1(KEYCODE_F12) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_RECORD_MOVIE, "Record Movie", SEQ_DEF_2(KEYCODE_F12, KEYCODE_LSHIFT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_TOGGLE_CHEAT, "Toggle Cheat", SEQ_DEF_1(KEYCODE_F6) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_UP, "UI Up", SEQ_DEF_3(KEYCODE_UP, CODE_OR, JOYCODE_1_UP) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_DOWN, "UI Down", SEQ_DEF_3(KEYCODE_DOWN, CODE_OR, JOYCODE_1_DOWN) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_LEFT, "UI Left", SEQ_DEF_3(KEYCODE_LEFT, CODE_OR, JOYCODE_1_LEFT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_RIGHT, "UI Right", SEQ_DEF_3(KEYCODE_RIGHT, CODE_OR, JOYCODE_1_RIGHT) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_HOME, "UI Home", SEQ_DEF_1(KEYCODE_HOME) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_END, "UI End", SEQ_DEF_1(KEYCODE_END) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_PAGE_UP, "UI Page Up", SEQ_DEF_1(KEYCODE_PGUP) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_PAGE_DOWN, "UI Page Down", SEQ_DEF_1(KEYCODE_PGDN) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SELECT, "UI Select", SEQ_DEF_3(KEYCODE_1, CODE_OR, JOYCODE_1_BUTTON1) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_CANCEL, "UI Cancel", SEQ_DEF_1(KEYCODE_ESC) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_CLEAR, "UI Clear", SEQ_DEF_1(KEYCODE_DEL) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_ZOOM_IN, "UI Zoom In", SEQ_DEF_1(KEYCODE_EQUALS) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_ZOOM_OUT, "UI Zoom Out", SEQ_DEF_1(KEYCODE_MINUS) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_PREV_GROUP, "UI Previous Group", SEQ_DEF_1(KEYCODE_OPENBRACE) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_NEXT_GROUP, "UI Next Group", SEQ_DEF_1(KEYCODE_CLOSEBRACE) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_ROTATE, "UI Rotate", SEQ_DEF_1(KEYCODE_R) ) ! INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_SHOW_PROFILER, "Show Profiler", SEQ_DEF_2(KEYCODE_F11, KEYCODE_LSHIFT) ) #ifdef MESS INPUT_PORT_DIGITAL_DEF( 0, IPG_UI, UI_TOGGLE_UI, "UI Toggle", SEQ_DEF_1(KEYCODE_SCRLOCK) ) #endif diff -r -c -N old/mame.c src/mame.c *** old/mame.c Fri Sep 22 09:46:24 2006 --- src/mame.c Fri Sep 22 09:47:52 2006 *************** *** 77,82 **** --- 77,83 ---- #include "driver.h" #include "config.h" #include "cheat.h" + #include "hiscore.h" #include "debugger.h" #include "profiler.h" #include "render.h" *************** *** 304,313 **** /* load the configuration settings and NVRAM */ settingsloaded = config_load_settings(); nvram_load(); /* display the startup screens */ ! ui_display_startup_screens(!settingsloaded && !options.skip_disclaimer, !options.skip_warnings, !options.skip_gameinfo); /* ensure we don't show the opening screens on a reset */ options.skip_disclaimer = options.skip_warnings = options.skip_gameinfo = TRUE; --- 305,315 ---- /* load the configuration settings and NVRAM */ settingsloaded = config_load_settings(); + settingsloaded = 1; nvram_load(); /* display the startup screens */ ! ui_display_startup_screens(!1 && !1, !1, !1); /* ensure we don't show the opening screens on a reset */ options.skip_disclaimer = options.skip_warnings = options.skip_gameinfo = TRUE; *************** *** 1028,1033 **** --- 1030,1036 ---- fatalerror("devices_init failed"); #endif + hiscore_init(machine); /* start the save/load system */ saveload_init(machine); diff -r -c -N old/profiler.c src/profiler.c *** old/profiler.c Sat Jul 29 13:34:28 2006 --- src/profiler.c Fri Sep 22 09:47:52 2006 *************** *** 137,142 **** --- 137,143 ---- "Sound ", "Mixer ", "Callbck", + "Hiscore", "Input ", "Movie ", "Logerr ", diff -r -c -N old/profiler.h src/profiler.h *** old/profiler.h Sat Jul 29 13:34:28 2006 --- src/profiler.h Fri Sep 22 09:47:52 2006 *************** *** 39,44 **** --- 39,45 ---- PROFILER_SOUND, PROFILER_MIXER, PROFILER_TIMER_CALLBACK, + PROFILER_HISCORE, PROFILER_INPUT, /* input.c and inptport.c */ PROFILER_MOVIE_REC, /* movie recording */ PROFILER_LOGERROR, /* logerror */ diff -r -c -N old/windows/config.c src/windows/config.c *** old/windows/config.c Fri Sep 22 09:46:20 2006 --- src/windows/config.c Fri Sep 22 09:47:52 2006 *************** *** 147,152 **** --- 147,153 ---- { "nvram_directory", "nvram", 0, "directory to save nvram contents" }, { "memcard_directory", "memcard", 0, "directory to save memory card contents" }, { "input_directory", "inp", 0, "directory to save input device logs" }, + { "hiscore_directory", "hi", 0, "directory to save hiscores" }, { "state_directory", "sta", 0, "directory to save states" }, { "artpath;artwork_directory","artwork", 0, "path to artwork files" }, { "snapshot_directory", "snap", 0, "directory to save screenshots" }, diff -r -c -N old/windows/drawd3d.c src/windows/drawd3d.c *** old/windows/drawd3d.c Sun Aug 13 21:33:46 2006 --- src/windows/drawd3d.c Fri Sep 22 09:47:52 2006 *************** *** 48,54 **** // CONSTANTS //============================================================ ! #define ENABLE_BORDER_PIX (0) #define VERTEX_FORMAT (D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1) #define VERTEX_BUFFER_SIZE (2048*4) --- 48,54 ---- // CONSTANTS //============================================================ ! #define ENABLE_BORDER_PIX (1) #define VERTEX_FORMAT (D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1) #define VERTEX_BUFFER_SIZE (2048*4) diff -r -c -N old/windows/fileio.c src/windows/fileio.c *** old/windows/fileio.c Sat Jul 29 13:34:28 2006 --- src/windows/fileio.c Fri Sep 22 09:47:52 2006 *************** *** 98,103 **** --- 98,104 ---- { FILETYPE_SAMPLE, "samplepath" }, { FILETYPE_ARTWORK, "artpath" }, { FILETYPE_NVRAM, "nvram_directory" }, + { FILETYPE_HIGHSCORE, "hiscore_directory" }, { FILETYPE_CONFIG, "cfg_directory" }, { FILETYPE_INPUTLOG, "input_directory" }, { FILETYPE_STATE, "state_directory" },