Commit graph

1883 commits

Author SHA1 Message Date
casualjames casualjames
d0a59fbe58 Pull latest core changes. 2012-08-09 21:30:59 +02:00
casualjames casualjames
1937ecaf9e Use savestates_clear_job instead of savestates_set_job to release memory. 2012-08-09 21:28:12 +02:00
casualjames casualjames
04d9e4fb1c Don't display the volume on the OSD on frontend volume_get_level. Specify signedness of char because the comparison to 0x8b would be false on systems where char is signed. 2012-08-07 22:19:56 +02:00
casualjames casualjames
673cbfd006 Add missing return to main_reset 2012-08-06 22:05:06 +02:00
casualjames casualjames
eeb552cf6e Polish frontend API and docs 2012-08-06 22:03:49 +02:00
casualjames casualjames
abd2c8f74d Small fixes for savestates. 2012-08-06 22:03:46 +02:00
casualjames casualjames
d4eb3e1649 Don't use global fname at savestates_detect_type. 2012-08-06 22:03:44 +02:00
casualjames casualjames
5fa33a93ef Remove unused functions. 2012-08-06 22:03:42 +02:00
casualjames casualjames
2929e126da Call the new main_* functions instead of calling the plugins directly. 2012-08-06 22:03:39 +02:00
casualjames casualjames
84b3bef9db Redesign the savestates internal API to be simpler and more extensible. Detect the savestate type when loading instead of doing trial-and-error. Add support for loading and saving Project64 uncompressed saves (those can be generated by PJ64 by unchecking a box in the advanced settings). Also, fix the PJ64 state saving code, which got broken in the commit which was supposed to add error checking. And finally, on error conditions, print the full savestate path, to make things easier for the user. Still lacks checks, endianness handling and some simplicity. 2012-08-06 22:03:35 +02:00
casualjames casualjames
e205d858ca Lots of fixes for PJ64 state loading. This should fix most crashes. Changes: Add a COMPARE_INT to the queue, this is what fixes most crashes; don't call some update_* functions which have side effects; call some other needed update_* functions; reordered some things. There's a bit of a mess on memory.c now tough. Also, there remain some audio bugs (noise or muted audio), but don't seem to cause any problem outside that. 2012-08-06 22:03:31 +02:00
casualjames casualjames
9d897f887d Add profiling support for Windows. 2012-08-06 22:03:28 +02:00
casualjames casualjames
f7eae9c359 Replace stray tabs with spaces. Always set recomp_func after dst->ops 2012-08-06 22:03:26 +02:00
casualjames casualjames
af7c79fb1f Remove unused 'source' parameter from init_block. Reoganize NOTCOMPILED. 2012-08-06 22:03:24 +02:00
casualjames casualjames
649823eb99 Don't use magic numbers on the profiling code. Indent profile.c consistently. 2012-08-06 22:03:22 +02:00
casualjames casualjames
2fdb149da9 Add a Makefile switch to enable section timing. Use clock_gettime instead of gettimeofday (which returns wall time). Also remove the useless fflush call which broke compilation. 2012-08-06 22:03:15 +02:00
casualjames casualjames
a6757df660 BUGFIX: RSUB and RNOR shouldn't be compiled on the dynarec if writing to R0; Make free_exec compatible with malloc_exec; OPTIMIZATION: Do not set dst->ops to J_OUT or JAL_OUT if not needed; REFACTOR: Instead of running the dynarec function directly, save it in a variable, then run it if needed. This saves the hack in is_jump, but introduces other duplicated code (I will reverse this commit if it has an effect on performance). 2012-08-06 22:03:13 +02:00
casualjames casualjames
ec2a2eedee Change ini_parse_line behaviour on comments, not to return the comment starter (config.c expects it that way). Use reset_soft in eventloop.c instead of adding the interrupts directly. 2012-08-06 22:03:11 +02:00
casualjames casualjames
7a776d9830 Unbreak osal_mkdirp from last commit and document its behaviour. 2012-08-06 22:03:08 +02:00
casualjames casualjames
7e3da35b05 Compilation fix on savestates.c. Other compilation fixes for Visual Studio. Minor fixes. 2012-08-06 22:03:01 +02:00
casualjames casualjames
d8e7bec734 Error error checking to Project64 state saves (More error checks to follow). Map the so called SP_PC_REG and SP_IBIST_REG to rsp_register.rsp_pc and rsp_register.rsp_ibist (not 100% sure, must test). 2012-08-06 22:02:26 +02:00
casualjames casualjames
112c40c880 Do not make ROM_HEADER point to the ROM, because it may be byteswapped by init_memory. Instead, copy the ROM header. Also, use sl() on Manufacturer_ID, due to the structure of m64p_rom_header 2012-08-06 22:02:16 +02:00
casualjames casualjames
2440a790f9 Remove useless extern declarations. 2012-08-06 22:02:13 +02:00
casualjames casualjames
6eee1673dc Move the TLB lookup table creation code to memory/tlb.c 2012-08-06 22:02:11 +02:00
casualjames casualjames
710d278ef2 Remove duplicate code in the TLBWI and TLBWR instructions (for all r4300 emulators). Use the faster loop version found in the non-pure-interpreter TLBWR implementation in all implementations. Note that this changes the lowest 12 bits in the TLB lookup tables from 0xFFE to 0xFFF, but this shouldn't matter because it is always taken AND 0xFFFFF000 by the emulator. 2012-08-06 22:02:09 +02:00
casualjames casualjames
932144f4aa Remove unnecessary temporal variables from parse_md5. 2012-08-06 22:02:07 +02:00
casualjames casualjames
c27f12451a Remove local ROM_HEADER which made the global be NULL. Join the INI parsers on config.c and rom.c, which clarifies romdatabase_open a bit. Also, remove g_romdatabase.comment, since it only signaled the database creation and required several dynamic allocations. Fix two undefined behaviour bugs on romdatabase_open: One call to snprintf with overlapping buffers (while generating g_romdatabase.comment), and a malloc call whose size is potentially zero, which potentally returned NULL and crashed the program (on GoodName handling). 2012-08-06 22:02:05 +02:00
casualjames casualjames
9ad0ff3e7f Use NULL instead of empty_entry (which is not used anywhere). 2012-08-06 22:02:03 +02:00
casualjames casualjames
ee559d8854 Simplify hexconvert. 2012-08-06 22:02:01 +02:00
casualjames casualjames
15175668d1 Add a new ROM_PARAMS.aidacrate field, and simplify write_ai* functions. This also adds partial support for the MPAL system type (which has no corresponding country code yet). 2012-08-06 22:01:59 +02:00
casualjames casualjames
2a380c417b Move internal parameters from (public) m64p_rom_settings to (private) rom_params. Also, keep ROM_HEADER around (as m64p_rom_header), mostly for future use. 2012-08-06 22:01:57 +02:00
casualjames casualjames
340a6c4b98 Fix M64CMD_ROM_GET_HEADER if the frontend doesn't request the full header (broken in last commit). 2012-08-06 22:01:54 +02:00
casualjames casualjames
cab17857a4 Remove the ROM_HEADER field and the rom_header structure. The clean ROM name is now stored on ROM_SETTINGS.headername (which is properly NUL-terminated). Rationale is that struct rom_header is a duplicate of struct m64p_rom_header, and ROM_HEADER was only used to get the ROM name (and the country code in the goldeneye hack). If you want to access the ROM header fields, you can just cast rom to m64p_rom_header*. 2012-08-06 22:01:52 +02:00
casualjames casualjames
de8a79de90 Refactor osal_mkdirp, adding proper error handing and a quick exit path. Windows version is untested yet, will be fixed in a later commit if it's broken. 2012-08-06 22:01:49 +02:00
casualjames casualjames
3616ee67e7 Small fixes and refactorings, including a fix to a free'd memory read in delete_section introduced in one of my commits. 2012-08-06 22:01:47 +02:00
casualjames casualjames
6ee6decb19 Remove path size limits from screenshots, refactor a bit (not really satisfied). 2012-08-06 22:01:43 +02:00
casualjames casualjames
d8dd5deb52 Replace some clunky string manipulation with formatstr. 2012-08-06 22:01:40 +02:00
casualjames casualjames
8ed2e2c2a0 Remove adler32.c/adler32.h since Zlib provides an adler32() function already. 2012-08-06 22:01:37 +02:00
casualjames casualjames
464bac4dae Centralize and simplify alphabetic section finding code 2012-08-06 22:01:33 +02:00
casualjames casualjames
b1549f3064 Allow config section names of arbitrary length. Centralize section creation code. 2012-08-06 22:01:32 +02:00
casualjames casualjames
2c59693816 Compilation fix. 2012-08-06 22:01:30 +02:00
casualjames casualjames
639dc4b2d8 Fix a new memory leak introduced by previous commit. 2012-08-06 22:01:29 +02:00
casualjames casualjames
bf8a982718 Centralize config_var creation code. Note the fixed memory leaks on ConfigSetDefault* in case strdup fails. 2012-08-06 22:01:27 +02:00
casualjames casualjames
0fdaff33c2 Don't risk blowing up a config section to save a small allocation. Minor simplifications related to last change. 2012-08-06 22:01:25 +02:00
casualjames casualjames
97df25f174 Add find_section_link to remove duplicated code. Also delete redundant checks since free(NULL) is a noop. 2012-08-06 22:01:24 +02:00
casualjames casualjames
c055f5690a Keep all values on an union instead of having a variable for each type. 2012-08-06 22:01:23 +02:00
casualjames casualjames
031b88246b More malloc+strcpy to strdup replacements 2012-08-06 22:01:21 +02:00
casualjames casualjames
69eaece1b3 Remove duplicated section finding code. Found out that there was already a line to NUL-terminate configtext, but don't overallocate anyway. 2012-08-06 22:01:19 +02:00
casualjames casualjames
1be8b37cb8 Remove duplicated section finding code. Found out that there was already a line to NUL-terminate configtext, but don't overallocate anyway. 2012-08-06 22:01:18 +02:00
casualjames casualjames
c8329e3d92 Reorganize util.c so that functions are defined in the same order in which they are declared. Add combinepath function to util.c and use it in config.c 2012-08-06 22:01:14 +02:00