Commit Graph

849 Commits

Author SHA1 Message Date
Jeffrey Pfau ffea820148 Remove some redundant flags 2014-04-23 02:09:06 -07:00
Jeffrey Pfau 232abab7f4 Add long-missing arm-algo.S 2014-04-23 02:05:50 -07:00
Jeffrey Pfau 53389684db Add more command line options and perf-main duration 2014-04-20 22:15:17 -07:00
Jeffrey Pfau 810c35c318 Disentagle graphics flags from global flags 2014-04-20 21:54:05 -07:00
Jeffrey Pfau 5b300bbcff Make command line arguments more dynamic 2014-04-20 21:41:21 -07:00
Jeffrey Pfau 7334b89833 Add more command line options + usage 2014-04-20 21:33:27 -07:00
Jeffrey Pfau 7c356ffd07 Move debugger creation off the stack 2014-04-20 04:19:03 -07:00
Jeffrey Pfau 89ccb41b03 Start moving command line parsing into a separate file 2014-04-20 04:06:44 -07:00
Jeffrey Pfau e739e4000b Initialize halt 2014-04-20 01:05:29 -07:00
Jeffrey Pfau 9bf77f6653 Call ARMDeinit 2014-04-20 00:52:37 -07:00
Jeffrey Pfau 7a4ca414e5 Restructure watchpoints 2014-04-20 00:47:49 -07:00
Jeffrey Pfau 0f68dbc832 Redo component model/type punning 2014-04-20 00:19:55 -07:00
Jeffrey Pfau c0eb7c81f7 Remove ARMMemory and ARMBoard shims 2014-04-19 18:14:17 -07:00
Jeffrey Pfau 775e417cc6 Move halting functionality out of GBAHalt 2014-04-16 23:05:44 -07:00
Jeffrey Pfau b8ecabbaa9 Fix the build 2014-04-03 00:00:06 -07:00
Jeffrey Pfau ecb1939ff1 Move common headers to common.h, remove util and debugger from being first class include directories 2014-04-02 23:51:35 -07:00
Jeffrey Pfau 73d32e7cc7 Initialize some SIO variables properly 2014-04-02 23:16:37 -07:00
Jeffrey Pfau fec4040691 Load/store with immediate width corrections 2014-03-29 23:08:32 -07:00
Jeffrey Pfau fc132b4d93 Some instructions can write to pc directly 2014-03-29 23:08:32 -07:00
Jeffrey Pfau 01d4672f56 Reclassify thumb load/store multiple instructions 2014-03-29 23:08:32 -07:00
Jeffrey Pfau 764d9740ee Fix exporting of ARMDecodeThumb 2014-03-29 23:08:32 -07:00
Jeffrey Pfau c8a2f595d4 Start cycle counting 2014-03-29 23:08:32 -07:00
Jeffrey Pfau 9b2cd97505 Split out decoder files in preparation of ARM decoder 2014-03-29 23:08:31 -07:00
Jeffrey Pfau c8e1a9cd59 PC-relative disassembling 2014-03-29 23:08:31 -07:00
Jeffrey Pfau 39e1a85ffc Implement memory decoding 2014-03-29 23:06:07 -07:00
Jeffrey Pfau f32155526b More thumb decompilation 2014-03-29 23:06:07 -07:00
Jeffrey Pfau e60cbfaf84 Begin disassembler 2014-03-29 23:06:07 -07:00
Jeffrey Pfau 58545f112e Rename decompiler to decoder 2014-03-29 22:59:40 -07:00
Jeffrey Pfau 65c1d67dfd Descriptions of all opcodes 2014-03-29 22:59:40 -07:00
Jeffrey Pfau 5d19919df2 Extract emittor macros into headers 2014-03-29 22:59:39 -07:00
Jeffrey Pfau 66d1c0c55c Start fleshing out decompiler 2014-03-29 22:59:39 -07:00
Jeffrey Pfau 5b91d6d336 Small framework for decompiler 2014-03-29 22:59:39 -07:00
Jeffrey Pfau 4c1014685f Fix some valgrind errors 2014-03-29 22:58:58 -07:00
Jeffrey Pfau 2cd4bb3cff Initialize memory->eventDiff; fixes a valgrind warning 2014-03-29 22:58:58 -07:00
Jeffrey Pfau 2f39a57567 Get RPi EGL port building again 2014-03-29 22:58:58 -07:00
Jeffrey Pfau 8f241e2cfb Partially implement SOUNDBIAS 2014-03-29 22:53:56 -07:00
Jeffrey Pfau 683e90fa06 Remove special treatment for DISPSTAT 2014-03-29 22:53:52 -07:00
Jeffrey Pfau 8e51ffbf2c Add function for connecting to an already-open TCP port 2014-02-11 00:19:29 -08:00
Jeffrey Pfau 4d8a00c180 Add thread-interrupt functions for having multiple threads that want to pause the GBA thread 2014-02-10 23:59:07 -08:00
Jeffrey Pfau e9c4412819 Put missing returns in SDL event handling 2014-02-10 23:13:39 -08:00
Jeffrey Pfau eb5580f719 Make DriverSet setting read in normal driver 2014-02-10 01:42:44 -08:00
Jeffrey Pfau 6451aeaefc Support normal mode drivers 2014-02-10 01:42:44 -08:00
Jeffrey Pfau 764b3fce10 Fix SIO loading of a driver that is for the current mode 2014-02-10 01:42:44 -08:00
Jeffrey Pfau 9c8e5fc222 SIO registers can now be read and written properly 2014-02-10 01:42:40 -08:00
Jeffrey Pfau 3422527d5a Read SIO registers from sio field 2014-02-10 01:41:20 -08:00
Jeffrey Pfau a2a3f317b5 Make driver loading signal failure, and fix case where setting a driver can cause a null pointer deref 2014-02-05 01:50:01 -08:00
Jeffrey Pfau 043d396320 Make socket shims inline 2014-02-05 01:22:34 -08:00
Jeffrey Pfau 924c6cf5a6 Clarify some function names and add more essenital SIO architecture 2014-02-05 01:03:34 -08:00
Jeffrey Pfau e5ee1aa07f Fill out SIO driver infrastructure 2014-02-04 01:28:16 -08:00
Jeffrey Pfau 70e1661342 Begin SIO 2014-02-04 00:39:55 -08:00
Jeffrey Pfau 20a5fa8476 Abstract out sockets 2014-02-03 23:01:26 -08:00
Jeffrey Pfau 23e0737649 Add missing GBA_KEY_NONE 2014-02-03 22:56:24 -08:00
Jeffrey Pfau 90760a30a3 Move key mapping into its own function 2014-02-03 22:28:49 -08:00
Jeffrey Pfau 5a17030c65 Automatically break into the debugger if it was provided at launch time 2014-02-03 03:48:39 -08:00
Jeffrey Pfau 285b94b66a Add thread-safe function for telling if the GBA thread has started 2014-02-03 03:48:39 -08:00
Jeffrey Pfau 0f6523941c Null out threadContext->gba when shutting down 2014-02-03 03:48:39 -08:00
Jeffrey Pfau 56c51181e1 Debugger can get detached during a callback, clean up appropriately 2014-02-02 03:59:03 -08:00
Jeffrey Pfau 243cf2236b Ability to fullscreen the window in SDL2 2014-02-02 03:05:30 -08:00
Jeffrey Pfau 19142a2881 Use command key on OS X 2014-02-02 02:56:02 -08:00
Jeffrey Pfau ad38ae63ec Properly support 16-bit color 2014-02-02 02:47:50 -08:00
Jeffrey Pfau 02aec4fc65 Add SDL2 support 2014-02-02 02:39:34 -08:00
Jeffrey Pfau 020aec4e7b The debugger should not stop by default 2014-02-01 20:49:12 -08:00
Jeffrey Pfau 0c332d972b Add ability to detach debugger 2014-02-01 20:49:12 -08:00
Jeffrey Pfau cc53b06cae Implement OBJWIN for OBJs 2014-02-01 16:58:55 -08:00
Jeffrey Pfau d09004cf01 Fix infinite listen errors 2014-02-01 16:27:48 -08:00
Jeffrey Pfau 69d188668d Fix debugging shim to work even if there is no GBA struct at the moment 2014-02-01 16:27:27 -08:00
Jeffrey Pfau b9f8955890 Add debugging logging interface 2014-02-01 16:26:48 -08:00
Jeffrey Pfau d97976d0df Add stepping and clean up 2014-02-01 15:50:12 -08:00
Jeffrey Pfau 325380989c Clean up unnecessary operation in GDB stub 2014-02-01 15:39:47 -08:00
Jeffrey Pfau 9435226c58 Breakpoint clearing in CLI debugger 2014-02-01 15:39:30 -08:00
Jeffrey Pfau c30807117f Breakpoint clearing 2014-02-01 15:37:15 -08:00
Jeffrey Pfau ea6b129509 LLDB compatibility 2014-02-01 15:21:17 -08:00
Jeffrey Pfau 1541e6e0b0 Expand packet size for lldb compat 2014-02-01 05:44:40 -08:00
Jeffrey Pfau cc9575228c Add support for qHostInfo command for lldb 2014-02-01 05:40:39 -08:00
Jeffrey Pfau e4375fd3d9 Stub out [qQvV].* commands 2014-02-01 05:23:56 -08:00
Jeffrey Pfau 1c60ada7de Add support for g, m and p GDB packets 2014-02-01 05:02:54 -08:00
Jeffrey Pfau 434099ac77 Parse GDB packet format 2014-02-01 04:10:22 -08:00
Jeffrey Pfau 244f197742 Begin GDB stub 2014-02-01 03:08:32 -08:00
Jeffrey Pfau 38aac38a0c Remove obsolete, dead code 2014-02-01 01:41:25 -08:00
Jeffrey Pfau 6616ca9111 Always enable the debugger framework 2014-02-01 01:14:41 -08:00
Jeffrey Pfau a214481b76 Fix typo in type 2014-02-01 01:02:26 -08:00
Jeffrey Pfau 5bbf7f2308 Separate out CLI debugger from debugging interface 2014-02-01 00:47:36 -08:00
Jeffrey Pfau 6822a0d770 Start separating out debugger logic 2014-02-01 00:27:53 -08:00
Jeffrey Pfau 6ad2b673b1 Omit sprites that are off-screen vertically from OAM calculations 2014-01-31 22:40:21 -08:00
Jeffrey Pfau bab92ba659 Squelch compiler warning in perf shutdown 2014-01-31 02:30:56 -08:00
Jeffrey Pfau 4255d10f08 Squelch compiler warning about type punning 2014-01-31 02:29:27 -08:00
Jeffrey Pfau d6a4fbd25a Squelch a compiler warning about an uninitialized variable 2014-01-31 02:27:17 -08:00
Jeffrey Pfau f8449482de Squelch warnings in software renderer 2014-01-31 02:17:41 -08:00
Jeffrey Pfau 2122ff1f43 Change override structure to not use multi-byte char literals 2014-01-31 02:17:41 -08:00
Jeffrey Pfau bce620e717 Split SDL build into its own CMake list 2014-01-31 00:13:33 -08:00
Jeffrey Pfau 80511fcb9f Fix perf main after adding BIOS loading 2014-01-31 00:11:55 -08:00
Jeffrey Pfau 95cf2909c1 Unblock on audio when closing thread 2014-01-30 04:05:53 -08:00
Jeffrey Pfau f0481d9413 Enable piping through BIOS 2014-01-29 23:13:44 -08:00
Jeffrey Pfau 79d4011650 Initialize OAM 2014-01-29 23:02:12 -08:00
Jeffrey Pfau 13d3146d0b Add LOG_FATAL 2014-01-29 22:49:34 -08:00
Jeffrey Pfau 70afe23fe4 Add log handling 2014-01-29 22:49:24 -08:00
Jeffrey Pfau 9d351d4a58 SDL audio should use now centralized audio functions 2014-01-29 22:49:09 -08:00
Jeffrey Pfau 5fde0d8c35 GBAAudioResampleNN returns how many (destination) samples were read 2014-01-29 22:49:09 -08:00
Jeffrey Pfau a79a592c1e Move audio resampling out of SDL code 2014-01-29 22:48:38 -08:00
Jeffrey Pfau 2e2ca19220 Add GBAThreadEnd function for manually shutting down the GBA thread 2014-01-29 22:48:38 -08:00
Jeffrey Pfau c8b04a2ca5 Ensure rewind buffer is null if we are not enabling rewinding 2014-01-29 22:48:38 -08:00
Jeffrey Pfau 48a3522fbc Move inline struct definitions out of place for C++ compatibility 2014-01-29 22:48:19 -08:00
Jeffrey Pfau a72c77a3df Update DMA timings, and higher priority DMAs always take precedence, regardless of timing 2014-01-28 21:56:14 -08:00
Jeffrey Pfau 8e5b806cdd Have board re-read CPSR when it is modified by MSR 2014-01-27 00:21:14 -08:00
Jeffrey Pfau ef66e4a8c7 Only unpause from state operations when we paused manually 2014-01-26 23:17:17 -08:00
Jeffrey Pfau c3a5fb497a Fix rewind buffer sizing itself wrong 2014-01-26 12:47:47 -08:00
Jeffrey Pfau 705b6e9b13 Simple rewind buffer 2014-01-26 02:50:28 -08:00
Jeffrey Pfau b1a648e46e Don't sync on audio and video at the same time--this can cause audio skipping 2014-01-25 18:08:33 -08:00
Jeffrey Pfau 9c2c93220b Implement most of audio serialization 2014-01-25 18:01:31 -08:00
Jeffrey Pfau 668c4f68b7 Fix OAM deserialization 2014-01-25 15:06:28 -08:00
Jeffrey Pfau 941c629f8b Serialize timers and DMA state 2014-01-25 15:02:55 -08:00
Jeffrey Pfau 408d39a297 Move mode 0 into macro-land so that much of the logic can be inlined 2014-01-25 14:47:21 -08:00
Jeffrey Pfau 0e379fed41 Fix audio buffer reading in SDL audio 2014-01-23 20:59:15 -08:00
Jeffrey Pfau 709269ee5c Fix initial DMA count 2014-01-23 20:59:15 -08:00
Jeffrey Pfau 968dbe55db Properly sync to frame only when not in turbo 2014-01-22 03:25:09 -08:00
Jeffrey Pfau 1e0f400091 Precompute some parameters in mode 0 2014-01-22 01:39:48 -08:00
Jeffrey Pfau 7132c873e3 Make viewport size not-hardcoded 2014-01-21 23:51:52 -08:00
Jeffrey Pfau a8921116dc Preprocess OBJ heights 2014-01-21 23:49:10 -08:00
Jeffrey Pfau 04c3b61d1c Basic OAM dirtying 2014-01-21 23:41:41 -08:00
Jeffrey Pfau 2553b96e9b Skip table lookup in ARMStep if not needed 2014-01-21 23:15:51 -08:00
Jeffrey Pfau f08e466fce Partially unroll video clearing loop 2014-01-21 22:37:08 -08:00
Jeffrey Pfau 52808da265 Inline CPU stepping 2014-01-21 22:36:40 -08:00
Jeffrey Pfau f8de62ba71 Null out frameCallback on perf-main 2014-01-21 22:36:40 -08:00
Jeffrey Pfau e432c66249 Fix some uninitialized values 2014-01-21 22:36:40 -08:00
Jeffrey Pfau 86bc662d9f Support proper DMA timings and priority 2014-01-21 21:07:15 -08:00
Jeffrey Pfau 3c100a5e31 Prevent bank switching when reloading CPU state 2014-01-20 23:42:07 -08:00
Jeffrey Pfau 98c8b42b0f Slow down audio slightly to match target FPS 2014-01-20 20:02:44 -08:00
Jeffrey Pfau dccde662c6 Minor cleanup 2014-01-20 18:01:49 -08:00
Jeffrey Pfau 728f6481d6 Abort in invalid memory instead of SEGVing 2014-01-20 17:46:17 -08:00
Jeffrey Pfau aa99196700 Smarter I/O serialization 2014-01-20 17:42:30 -08:00
Jeffrey Pfau 872c3ceba3 Savestate game checks 2014-01-20 17:18:12 -08:00
Jeffrey Pfau 26c1fbd48f Add frame advance 2014-01-20 16:39:46 -08:00
Jeffrey Pfau e7d4f3ae8a Fix MSR with immediate 2014-01-20 15:40:56 -08:00
Jeffrey Pfau 12f4ff6cbb Fix ARM_ROR 2014-01-20 15:40:44 -08:00
Jeffrey Pfau 2db6d27496 Implement SWP, SWPB 2014-01-20 15:19:52 -08:00
Jeffrey Pfau fede211874 Remove checks for ARM writeback operations that fail on real hardware 2014-01-20 15:10:41 -08:00
Jeffrey Pfau 35a5e83465 Unified DISPSTAT representation 2014-01-20 14:18:24 -08:00
Jeffrey Pfau 5a1a04a353 Add basic IO and video serialization 2014-01-20 03:05:54 -08:00
Jeffrey Pfau 9f28b1ec73 Add missing version magic 2014-01-20 03:05:31 -08:00
Jeffrey Pfau a5d8be30d8 Don't block any signals on the run thread 2014-01-20 02:33:40 -08:00
Jeffrey Pfau 1f8c1bcdfa Fix signal handling for debugger 2014-01-19 23:42:34 -08:00
Jeffrey Pfau 4e98546cd6 Add missing header guard 2014-01-19 03:38:18 -08:00
Jeffrey Pfau daf12994db Start savestates 2014-01-19 01:59:35 -08:00
Jeffrey Pfau f2b031467f Fix non-debugger build 2014-01-19 01:24:29 -08:00
Jeffrey Pfau 7b682dd7c5 Break into debugger with F11 2014-01-19 00:37:53 -08:00
Jeffrey Pfau fbf8edf19b Create savestate format 2014-01-19 00:32:49 -08:00
Jeffrey Pfau a969d70de3 Handle illegal and stub opcodes separately 2014-01-18 00:39:51 -08:00
Jeffrey Pfau ce4d0b5203 Checksum BIOS 2014-01-18 00:17:58 -08:00
Jeffrey Pfau 94cc48faf1 Account for floating point error in resampling 2014-01-16 02:12:35 -08:00
Jeffrey Pfau 4e88cc86d9 Have circle buffer work when memory is misaligned 2014-01-16 01:56:17 -08:00
Jeffrey Pfau 39025dedff Ensure that video buffers are flushed to the GPU before unlocking the mutex 2014-01-16 01:05:32 -08:00
Jeffrey Pfau 48e89fb5eb Fix buffer size in SDL audio 2014-01-16 00:27:15 -08:00
Jeffrey Pfau 5758964617 Unlock mutex before swapping buffers 2014-01-16 00:26:59 -08:00
Jeffrey Pfau 3837213f94 Support Win32 threads on Vista and higher 2014-01-15 23:46:47 -08:00
Jeffrey Pfau 2b558a5a65 Rearchitect audio copying to make it cleaner and more atomic 2014-01-15 03:43:56 -08:00
Jeffrey Pfau b8167f55b1 Create Windows and POSIX platform directories 2014-01-15 01:28:30 -08:00
Jeffrey Pfau 270c1a35d7 Fix mappedMemoryFree on *nix 2014-01-15 00:34:45 -08:00
Jeffrey Pfau dd1f1bc79e Initial support for Windows 2014-01-15 00:32:54 -08:00
Jeffrey Pfau 003db6019c Fix _mix for 16-bit color 2014-01-15 00:32:53 -08:00
Jeffrey Pfau d53b1c784f Mirror SRAM across 0x0F000000 2013-11-23 16:22:26 -08:00
Jeffrey Pfau bc03872ab5 Add FireRed/LeafGreen to the override list 2013-11-18 00:34:54 -08:00
Jeffrey Pfau e6eea94626 Revert "Move halting code out from below the ARM emulator"
This reverts commit 3b74b61862.
2013-11-14 23:17:14 -08:00
Jeffrey Pfau 0bc5c4a69e Fix color blending in 16-bit 5-5-5 mode 2013-11-14 23:09:13 -08:00
Jeffrey Pfau 55c6103116 Remove "finalized" flag in favor of stricter sorting 2013-11-14 00:33:34 -08:00
Jeffrey Pfau a2a306bb03 Significantly optimize 16-bit color mixing 2013-11-14 00:19:18 -08:00
Jeffrey Pfau 620adbd577 Remove extra free in SDL code 2013-11-11 19:40:37 -08:00
Jeffrey Pfau f8d5842240 Implement mosaic for mode 0 with 256-color tiles 2013-11-10 23:09:50 -08:00
Jeffrey Pfau c2658ce7a1 Initialize mosaic to 0 2013-11-10 22:53:12 -08:00
Jeffrey Pfau 7d526e97f4 Support narrow windows 2013-11-10 22:43:57 -08:00
Jeffrey Pfau 53dd260b3e Fast 32-to-16-bit memory conversion routine on ARM 2013-11-09 13:30:25 -08:00
Jeffrey Pfau 95b6cc9b00 Initialize halted 2013-11-09 13:29:08 -08:00
Jeffrey Pfau f43c82e79e Preprocess instead of post-process 5-6-5 color 2013-11-07 02:57:22 -08:00
Jeffrey Pfau f09e44062f Use gettimeofday for perf-main instead of clock_gettime 2013-11-06 22:20:29 -08:00
Jeffrey Pfau 2a683aaf99 Preselect palettes for sprites 2013-11-06 00:00:42 -08:00
Jeffrey Pfau fd6e9cb311 Use unsigned instead of uint16_t in sprite drawing 2013-11-05 23:25:44 -08:00
Jeffrey Pfau e3dac089e7 Small refactor of _composite 2013-11-05 21:57:24 -08:00
Jeffrey Pfau 818ce96d0d Fix mixing colors on 16-bit 2013-11-05 04:13:49 -08:00
Jeffrey Pfau 9253eeba23 Optimize range check in mode 2 rendering 2013-11-05 01:49:29 -08:00
Jeffrey Pfau 53515b41cd Fix warnings in CircleBuffer 2013-11-05 01:20:46 -08:00
Jeffrey Pfau 2c826e208c Optimize palette access 2013-11-05 00:19:42 -08:00
Jeffrey Pfau 7d688ceb5a Use unsigned instead of color_t where size is irrelevant 2013-11-04 21:47:44 -08:00
Jeffrey Pfau 3005c6c9fb Add per-second perf updating 2013-11-04 21:07:41 -08:00
Jeffrey Pfau 3b74b61862 Move halting code out from below the ARM emulator 2013-11-03 23:26:10 -08:00
Jeffrey Pfau 66ee98513f Pass pointers instead of offsets to composite 2013-11-03 01:00:56 -07:00
Jeffrey Pfau 32e0591fd0 Early finalization if possible 2013-11-02 22:36:07 -07:00
Jeffrey Pfau 53a52d8cf8 Call setActiveRegion with the right address 2013-11-02 03:56:13 -07:00
Jeffrey Pfau e0eefa24da Hack to guess when blending should be disabled 2013-11-01 23:50:13 -07:00
Jeffrey Pfau a87d30ed9f Fix channel 1 - 4 volume 2013-10-29 21:12:26 -07:00
Jeffrey Pfau 9fd181dba9 Fix potential issues with sound playing when they shouldn't, or with the wrong volume 2013-10-29 02:19:58 -07:00
Jeffrey Pfau 8902635e3a Fix bugs in OBJ mosaic 2013-10-27 21:58:37 -07:00
Jeffrey Pfau 09888a8852 Add performance-monitoring main thread 2013-10-27 05:16:07 -07:00
Jeffrey Pfau f5a3fd7c7f Rearrange _composite to optimize for common cases first 2013-10-27 04:51:14 -07:00
Jeffrey Pfau 6e40c7ec29 Replace bit-packed map data with flags 2013-10-27 04:51:09 -07:00
Jeffrey Pfau 7cb183a8be Only update active region if necessary 2013-10-27 03:44:38 -07:00
Jeffrey Pfau 775f9db546 Begin OBJ mosaic 2013-10-27 03:12:55 -07:00
Jeffrey Pfau 3b0ee473d3 Refactor sprite code in preparation of implementing OBJ mosaic 2013-10-27 02:39:35 -07:00
Jeffrey Pfau 72ef1643c7 Rotate 16-bit without using AND 2013-10-26 16:40:31 -07:00
Jeffrey Pfau 0155d9c028 Remove SPRITE_DRAW_PIXEL_*_VARIANT 2013-10-26 14:56:35 -07:00
Jeffrey Pfau ffef3d2486 Preemptively mark the envelope as dead in some cases 2013-10-26 04:23:08 -07:00
Jeffrey Pfau 70365782de Reorganize audio code so as to only update channels when audible 2013-10-26 04:08:18 -07:00