Commit Graph

4080 Commits

Author SHA1 Message Date
Jeffrey Pfau 5388fb8cea Draw backdrop in GLSL renderer 2013-05-07 04:40:25 -07:00
Jeffrey Pfau 03fb87acd0 Continue implementing GLSL mode 0, now with layers and offsets 2013-05-07 04:11:49 -07:00
Jeffrey Pfau cc2262149e Reindent GBAVideoGLSLRendererProcessEvents 2013-05-07 03:36:50 -07:00
Jeffrey Pfau 20b67240ae Start on mode 0 renderer 2013-05-07 03:36:34 -07:00
Jeffrey Pfau f6a9467e86 Write to renderer VRAM 2013-05-07 03:36:15 -07:00
Jeffrey Pfau bb1e598a78 Start GLSL renderer 2013-05-07 01:04:36 -07:00
Jeffrey Pfau db96be98dc Deinit video when shutting down 2013-05-07 01:00:18 -07:00
Jeffrey Pfau 8bc5ec4222 Roll out incorrect fix for Halt bug and apply proper fix 2013-05-05 20:37:35 -07:00
Jeffrey Pfau 7ec435b94c Fix 512x512 backgrounds in Mode 0 2013-05-05 01:33:05 -07:00
Jeffrey Pfau ae3f623fd5 Overwrite IF while attempting to IntrWait 2013-05-05 00:44:30 -07:00
Jeffrey Pfau fc7aec557b Count cycles for load/store singles 2013-05-04 23:57:12 -07:00
Jeffrey Pfau 738b3dc44e Implement ArcTan2 2013-05-04 15:50:42 -07:00
Jeffrey Pfau 374aca2ff7 Move event polling to after framedraw only 2013-05-04 14:49:04 -07:00
Jeffrey Pfau ac0c7ba792 Implement BgAffineSet 2013-05-04 01:20:42 -07:00
Jeffrey Pfau fb2ddd6c32 Start implementing modes 1/2 2013-05-04 01:20:24 -07:00
Jeffrey Pfau 7373c37e19 Fix sprite blending with between layers 2013-05-03 22:23:45 -07:00
Jeffrey Pfau 813b2c0697 Partially implement frameskip 2013-05-03 10:24:56 -07:00
Jeffrey Pfau 3ad2510b78 Get rid of flags struct and redo compositing 2013-05-03 10:02:01 -07:00
Jeffrey Pfau 6ef3e3b6a8 Copy ObjAffineSet implementation from GBA.js 2013-05-03 01:43:39 -07:00
Jeffrey Pfau 2bc11c9aac 32- and 16-bit reads of OAM 2013-05-03 01:33:20 -07:00
Jeffrey Pfau 862c93916d Support edge cases for 256-color mode 0, excluding hflip 2013-05-03 01:21:25 -07:00
Jeffrey Pfau 1c6fc26bf7 Support hflip on mode 0 edges 2013-05-02 21:51:00 -07:00
Jeffrey Pfau ebb1c08840 Fix warnings on gcc 2013-05-02 00:40:12 -07:00
Jeffrey Pfau 13a46429e2 Remove -Wno-unused and fix resulting errors 2013-05-02 00:35:32 -07:00
Jeffrey Pfau a635f4de4d Implement addressing mode 1 ASR register shift 2013-05-02 00:32:04 -07:00
Jeffrey Pfau 86c228f2e4 Implement SMLAL 2013-05-02 00:29:06 -07:00
Jeffrey Pfau a80175e689 Fix sprite variant condition 2013-05-01 23:56:59 -07:00
Jeffrey Pfau 3b3f55b14c Variant and 256-color transformed sprites 2013-05-01 23:54:39 -07:00
Jeffrey Pfau 0423656ad8 Extract more into macros 2013-05-01 23:46:15 -07:00
Jeffrey Pfau d6c88fc7cb Introduce macros for sprite drawing 2013-05-01 23:39:55 -07:00
Jeffrey Pfau e3fddc5739 Support 256-color sprites 2013-05-01 23:27:49 -07:00
Jeffrey Pfau 61c6b7186e Implement UMLAL 2013-05-01 23:11:00 -07:00
Jeffrey Pfau cd73c562ea Implement addressing mode 1 LSL/LSR with register 2013-05-01 23:08:22 -07:00
Jeffrey Pfau aeecbdb56f Draw backgrounds with variant palette when appropriate 2013-05-01 02:51:33 -07:00
Jeffrey Pfau 40e9a7ef26 Update variant palettes when writing to palette 2013-05-01 02:37:15 -07:00
Jeffrey Pfau 03361f20a2 Start drawing backdrop 2013-05-01 02:32:56 -07:00
Jeffrey Pfau 2e9a64a26e Implement Sqrt 2013-05-01 00:27:31 -07:00
Jeffrey Pfau 6ed3c18afd Support IWRAM in LZ77 2013-05-01 00:24:28 -07:00
Jeffrey Pfau 5f6cf337a0 16-bit DMA address writes 2013-04-30 23:22:39 -07:00
Jeffrey Pfau da489b90f8 Ensure shifter carry-out gets bits set right 2013-04-30 21:02:56 -07:00
Jeffrey Pfau f7fbb877e0 Fix Div output registers 2013-04-30 20:54:09 -07:00
Jeffrey Pfau 118c393d1b Fix addressing mode 2 register post-indexed 2013-04-30 02:43:12 -07:00
Jeffrey Pfau 337d4dc1e6 Implement addressing mode 1 ROR with register 2013-04-30 02:42:54 -07:00
Jeffrey Pfau e1963c6e60 Implement SMULL 2013-04-30 01:42:24 -07:00
Jeffrey Pfau 698bc0ada5 Re-add 256-color 2013-04-30 01:38:19 -07:00
Jeffrey Pfau 6cdfa43e97 hflip in fast path 2013-04-29 22:05:32 -07:00
Jeffrey Pfau 87e5973039 Proper blending on sprite targets 2013-04-29 21:27:29 -07:00
Jeffrey Pfau 2d4c1fdc2c Add back compositing 2013-04-29 21:27:05 -07:00
Jeffrey Pfau 56333d3344 Use base rendering mode 2013-04-29 21:12:56 -07:00
Jeffrey Pfau 7bb4d9d5ff Throw out slow background renderer. Let me try again. 2013-04-29 00:42:04 -07:00
Jeffrey Pfau 6c2f7b3b73 Use 32-bit color internally 2013-04-28 23:01:45 -07:00
Jeffrey Pfau 7c597d5205 Rearrange some code in preparation of adding windows 2013-04-28 02:57:06 -07:00
Jeffrey Pfau dfd360bfbb Remove accidentally left in testing code 2013-04-28 01:46:43 -07:00
Jeffrey Pfau 5f6b57734d Implement character mapping 2013-04-28 01:43:39 -07:00
Jeffrey Pfau 8072ff7d2c Rotate LDR 2013-04-28 01:33:59 -07:00
Jeffrey Pfau 6450ce16b2 Fix LDR(3) 2013-04-28 01:33:45 -07:00
Jeffrey Pfau e86f7d79fb Clean up and fix conditions for CPSR V 2013-04-28 00:19:15 -07:00
Jeffrey Pfau 19f9b72c33 Fix CPSR C being written 2013-04-28 00:06:13 -07:00
Jeffrey Pfau 682684cb6d Output MUL into the right register 2013-04-27 23:44:33 -07:00
Jeffrey Pfau 2c8786ae4c Use LE instead of GE where appropriate 2013-04-27 23:44:17 -07:00
Jeffrey Pfau dd4e6b0ce1 Stub RegisterRamReset 2013-04-27 22:54:41 -07:00
Jeffrey Pfau ca959c640a Implement EEPROM 2013-04-27 21:51:58 -07:00
Jeffrey Pfau f4fa423135 EEPROM only works in DMAs 2013-04-27 20:39:14 -07:00
Jeffrey Pfau 4380ec0260 Start implementing EEPROM 2013-04-27 20:25:31 -07:00
Jeffrey Pfau e02059947c Start implementing save games 2013-04-27 19:59:41 -07:00
Jeffrey Pfau dab27463a9 Implement DivArm 2013-04-27 19:58:21 -07:00
Jeffrey Pfau fd5661e941 Fix alpha blending when neither target 1 or target 2 are set 2013-04-27 03:09:23 -07:00
Jeffrey Pfau 2e78381e55 Implement SWI 2013-04-27 02:56:34 -07:00
Jeffrey Pfau 6c44cf8dfc Implement BL 2013-04-27 02:54:16 -07:00
Jeffrey Pfau 21b9222357 Fix entering SWI mode 2013-04-27 02:50:35 -07:00
Jeffrey Pfau bd9714b540 Implement STR(2)/STRH(2) 2013-04-27 02:42:42 -07:00
Jeffrey Pfau 2fc5474d91 Implement addressing mode 1 ROR immediate 2013-04-27 01:54:57 -07:00
Jeffrey Pfau 2bc23e7aa2 Redo compositing and sprite blending 2013-04-27 01:36:06 -07:00
Jeffrey Pfau b3e1aa7853 Don't blend if not target 1 2013-04-27 00:11:04 -07:00
Jeffrey Pfau f7922c1627 Restructure background drawing code for multipalette 2013-04-26 23:59:50 -07:00
Jeffrey Pfau 1ff337c6fc Allow 256-color rendering 2013-04-26 22:21:38 -07:00
Jeffrey Pfau 13c95a2aae Build fixes for linux 2013-04-26 03:08:59 -07:00
Jeffrey Pfau 3cd5e8d093 Implement Div 2013-04-26 02:05:54 -07:00
Jeffrey Pfau d2e84f0a30 Implement IntrWait 2013-04-26 02:00:59 -07:00
Jeffrey Pfau 7c895f6091 Load files from arg 1 2013-04-26 01:50:14 -07:00
Jeffrey Pfau 301c07dda3 Implement ADC, SBC 2013-04-26 01:25:31 -07:00
Jeffrey Pfau c61812325c Transformed sprites 2013-04-26 01:06:50 -07:00
Jeffrey Pfau f91149e30f Flipped background tiles 2013-04-25 22:03:15 -07:00
Jeffrey Pfau a1910206c0 Support blending with sprites behind a background 2013-04-25 02:08:12 -07:00
Jeffrey Pfau fefbf7a296 Flip sprites vertically after applying boundary operations 2013-04-25 01:55:47 -07:00
Jeffrey Pfau cea8109c06 Run Vblank and Hblank DMAs 2013-04-25 01:50:28 -07:00
Jeffrey Pfau e9e29610a4 Read from palette memory 2013-04-25 01:48:28 -07:00
Jeffrey Pfau 65e0445375 Implement TST 2013-04-25 00:56:43 -07:00
Jeffrey Pfau cfc3ec4f3b Implement ROR 2013-04-25 00:53:24 -07:00
Jeffrey Pfau 21490dcf51 Implement CMN 2013-04-25 00:48:35 -07:00
Jeffrey Pfau c8b2d2753e Use variant palette on sprites when target 1 2013-04-25 00:28:39 -07:00
Jeffrey Pfau e1932f2411 Implement sprite flipping 2013-04-25 00:17:17 -07:00
Jeffrey Pfau 9dbd925d90 Allow for negative-y sprites 2013-04-25 00:11:27 -07:00
Jeffrey Pfau 4446e0dbde Implement blending on sprites 2013-04-24 23:49:16 -07:00
Jeffrey Pfau 07b96cddef Begin sprites 2013-04-24 23:40:22 -07:00
Jeffrey Pfau 00dd5bdaa8 Dual condition-variable non-hacky waiting-on-frame 2013-04-24 02:43:55 -07:00
Jeffrey Pfau 5122a236e0 Squelch warnings, turn on -Werror 2013-04-24 01:32:49 -07:00
Jeffrey Pfau 1c0af22990 Implement BLDALPHA 2013-04-24 01:16:03 -07:00
Jeffrey Pfau 40b00e7927 Refactor some code to enable compositing code to be shared 2013-04-24 00:50:17 -07:00
Jeffrey Pfau 0d7657e845 Implement BLDCNT (partially) and BLDY 2013-04-24 00:34:50 -07:00
Jeffrey Pfau b3d9a1918b Kludge to prevent busy-waiting while no frames are generating 2013-04-23 23:07:24 -07:00
Jeffrey Pfau 754725e124 Start using pixel flags to keep track of pixel states 2013-04-23 22:48:01 -07:00
Jeffrey Pfau 7c7e934dac Turbo mode 2013-04-23 22:32:15 -07:00
Jeffrey Pfau 190f9b41e6 Implement STRB(2) 2013-04-23 02:13:59 -07:00
Jeffrey Pfau e82fd991fa More sane way of writing 32-bit values to VRAM, palette 2013-04-23 02:05:10 -07:00
Jeffrey Pfau 3a76cdc6e0 VRAM reading 2013-04-23 02:03:06 -07:00
Jeffrey Pfau 21704ab37a Allow use of wrong LZ77 destination 2013-04-22 22:55:49 -07:00
Jeffrey Pfau 11d1de39e1 Fix non-zero character base 2013-04-22 02:28:03 -07:00
Jeffrey Pfau bcf446737c Start implementing transparency 2013-04-22 02:07:35 -07:00
Jeffrey Pfau e1d5f3f457 Fix drawing wide backgrounds 2013-04-22 02:07:19 -07:00
Jeffrey Pfau b48b868cfb Write to VRAM 2013-04-22 01:59:25 -07:00
Jeffrey Pfau f136d8165a Was accidentally chopping off a bit in LZ77UnCompVram 2013-04-22 01:12:48 -07:00
Jeffrey Pfau 060ae364b5 Start drawing backgrounds 2013-04-22 01:11:48 -07:00
Jeffrey Pfau 764b6010c0 Sort backgrounds 2013-04-21 20:59:43 -07:00
Jeffrey Pfau a6fb91bb7d Do some cleanup of pthread data 2013-04-21 14:52:25 -07:00
Jeffrey Pfau 225729b79c Implement BGxHOFS/BGxVOFS 2013-04-21 14:43:28 -07:00
Jeffrey Pfau 3ec0afa8fc Implement BGxCNT 2013-04-21 14:09:41 -07:00
Jeffrey Pfau 265bbe4f8f Add struct for keeping track of background state 2013-04-21 13:17:15 -07:00
Jeffrey Pfau 933e8330d2 Start implementing DISPCNT 2013-04-21 13:16:06 -07:00
Jeffrey Pfau cdddcbf7aa Pass off video registers to renderer 2013-04-21 12:39:33 -07:00
Jeffrey Pfau 573fcead5d Start building up structs for video registers 2013-04-21 12:34:24 -07:00
Jeffrey Pfau 9f425c53c8 Spring IRQs if we need to 2013-04-21 01:09:11 -07:00
Jeffrey Pfau 3ca5e52de1 Handle key, quit events 2013-04-21 00:35:21 -07:00
Jeffrey Pfau 71986b0477 Support writing to palette, display palette on screen 2013-04-20 22:08:58 -07:00
Jeffrey Pfau 2860714714 Draw output buffer 2013-04-20 21:40:06 -07:00
Jeffrey Pfau eba5d547b9 Start using SDL for graphics syncing 2013-04-20 20:29:53 -07:00
Jeffrey Pfau a094024ad5 Add missing files 2013-04-20 18:11:27 -07:00
Jeffrey Pfau 67d25794e1 Fix LDMIA/STMIA 2013-04-20 18:03:59 -07:00
Jeffrey Pfau 14100f19d1 Implement LSL(2) 2013-04-20 18:03:48 -07:00
Jeffrey Pfau 0bfb77106b Properly init and deinit renderers 2013-04-20 16:47:04 -07:00
Jeffrey Pfau b4cee4c286 Properly isolate threading 2013-04-20 16:44:03 -07:00
Jeffrey Pfau fffe39153f Wait on thread initialization before returning from thread creation 2013-04-20 16:40:08 -07:00
Jeffrey Pfau 9ba9fac898 Restructure video memory 2013-04-20 16:16:37 -07:00
Jeffrey Pfau cb48145ea3 Move main emulation into thread 2013-04-20 15:54:09 -07:00
Jeffrey Pfau ff03bcf0f0 Fix MidiKey2Freq 2013-04-20 14:46:53 -07:00
Jeffrey Pfau 18fae08450 Fix Load/store shifters 2013-04-20 14:21:42 -07:00
Jeffrey Pfau cd0f75c83f Implement MLA 2013-04-20 13:36:42 -07:00
Jeffrey Pfau bf54a68b0e Implement UMULL 2013-04-20 13:22:10 -07:00
Jeffrey Pfau 63e809550d Implement MidiKey2Freq 2013-04-20 03:01:50 -07:00
Jeffrey Pfau e272481ccd Implement LDR(2) 2013-04-20 02:57:20 -07:00
Jeffrey Pfau e83936152d Implement LZ77 decompression 2013-04-20 02:52:10 -07:00
Jeffrey Pfau cf9a7224a3 Init video memory from the dummy renderer 2013-04-20 02:51:40 -07:00
Jeffrey Pfau 1972e73bec Define memory regions 2013-04-19 23:34:26 -07:00
Jeffrey Pfau f72c195739 Labels for I/O regions in the switch statement 2013-04-19 23:04:01 -07:00
Jeffrey Pfau 5d81a4eb18 Remainder of timer infrastructure 2013-04-19 23:01:04 -07:00
Jeffrey Pfau 57dcbef030 Implement timers from GBA.js implementation 2013-04-19 22:26:44 -07:00
Jeffrey Pfau 6087ad8c5f Fix reading from DISPSTAT 2013-04-19 21:40:57 -07:00
Jeffrey Pfau adfd8f6872 Make sure if we reset the CPSR to the SPSR that we check if we get tossed into Thumb 2013-04-19 21:26:00 -07:00
Jeffrey Pfau 633a87269a Initialize cpu->privilegeMode 2013-04-19 21:09:00 -07:00
Jeffrey Pfau aa7ef287bc Squelch HLE BIOS warnings 2013-04-19 21:04:53 -07:00
Jeffrey Pfau 283a48613b Read/write REG_IF 2013-04-19 00:05:13 -07:00
Jeffrey Pfau 9b1f3c3c73 Init GBA I/O registers 2013-04-19 00:04:50 -07:00
Jeffrey Pfau 0ba7451e3a Install SIGINT signal handler for debugger 2013-04-18 01:52:46 -07:00
Jeffrey Pfau 0b468a9db8 Null-check that DebugVectors get generated 2013-04-18 01:39:51 -07:00
Jeffrey Pfau 5f1f6088bd Implement MUL 2013-04-18 01:35:48 -07:00
Jeffrey Pfau 783b2a3e09 Implement ADD(5) 2013-04-18 01:24:46 -07:00
Jeffrey Pfau 422961a2df 8-bit I/O reads 2013-04-18 01:19:57 -07:00
Jeffrey Pfau 97b669e4d1 Store vcount back in IO 2013-04-18 01:19:41 -07:00
Jeffrey Pfau 0048de2108 Fix addressing mode 3 immediate 2013-04-18 01:06:19 -07:00
Jeffrey Pfau b5cbd55718 Read back I/O memory when reading 32-bit 2013-04-18 00:58:42 -07:00
Jeffrey Pfau 1e1c8fd2dd Ensure that DMAs read back from I/O memory properly 2013-04-18 00:58:22 -07:00
Jeffrey Pfau 4f8c288f20 Ensure cpsr.t reads back out properly 2013-04-18 00:19:41 -07:00
Jeffrey Pfau ed48ab1c64 Fix storing SPSR 2013-04-18 00:15:45 -07:00
Jeffrey Pfau 062e09ccf5 Implement MSRI 2013-04-18 00:09:28 -07:00
Jeffrey Pfau fdf36f5820 Implement MRS 2013-04-18 00:06:48 -07:00
Jeffrey Pfau b3832205fc Fix some MRS/MSR encoding problems 2013-04-18 00:03:39 -07:00
Jeffrey Pfau 6608ae282c Ensure loads to PC work 2013-04-17 23:54:31 -07:00
Jeffrey Pfau cb03781a5b Implement LDM, STM 2013-04-17 23:44:35 -07:00
Jeffrey Pfau dd479ad907 Now include source for HLE BIOS, even without assembler script 2013-04-17 00:46:32 -07:00
Jeffrey Pfau 54fffb7fff Add HLE BIOS from GBA.js 2013-04-17 00:45:23 -07:00
Jeffrey Pfau 38b1c8d235 Make sure CPSR is updated for IRQ mode properly 2013-04-17 00:29:20 -07:00
Jeffrey Pfau f30b367c7e Make sure to rewrite active region data when jumping to IRQ handler 2013-04-17 00:24:00 -07:00
Jeffrey Pfau 45fcd0fcb5 Implement FastCpuSet 2013-04-16 23:52:53 -07:00
Jeffrey Pfau c143dec77d Fix ADD(4) and MOV(3) 2013-04-16 23:52:30 -07:00
Jeffrey Pfau 4b4914afb6 Implement MUL 2013-04-16 23:26:49 -07:00
Jeffrey Pfau 6b07dd33af Implement ASR(1) 2013-04-16 23:24:19 -07:00
Jeffrey Pfau 8c03c20019 Implement HALT 2013-04-16 23:14:16 -07:00
Jeffrey Pfau e88d177582 Copy GBA.js DMA implementation 2013-04-16 23:13:52 -07:00
Jeffrey Pfau 20622b6135 Copy some IRQ infrastructure from GBA.js 2013-04-16 19:44:16 -07:00
Jeffrey Pfau bc9d0690bb Clean up extra backslashes 2013-04-16 19:29:00 -07:00
Jeffrey Pfau 2d0c3bf275 Implement IRQs 2013-04-16 07:50:34 -07:00
Jeffrey Pfau 2da11dd523 Continue implementing IRQs 2013-04-16 07:42:20 -07:00
Jeffrey Pfau 4dd98f4c25 Remove typo struct member 2013-04-16 07:20:28 -07:00
Jeffrey Pfau 9ac6f6d3bf Start implementing IRQ 2013-04-16 07:18:25 -07:00
Jeffrey Pfau 7de2c91efb Copy DISPSTAT implementation from GBA.js 2013-04-16 07:10:38 -07:00
Jeffrey Pfau e874266343 Initialize video->eventDiff 2013-04-15 23:15:02 -07:00
Jeffrey Pfau 2fe2c80ae5 Add dummy renderer + frame counting infrastructure from GBA.js 2013-04-15 23:01:40 -07:00
Jeffrey Pfau 9b5d5d6478 Start implementing events + add video stubs 2013-04-15 22:18:28 -07:00
Jeffrey Pfau 1838cc0597 Implement waitstate adjusting 2013-04-15 01:10:53 -07:00
Jeffrey Pfau fe5a8d6254 Add function for loading from I/O 2013-04-14 23:30:11 -07:00
Jeffrey Pfau ecc4775c31 Start implementing instruction timing 2013-04-14 23:12:03 -07:00
Jeffrey Pfau fa64310e83 Fix SWI32 2013-04-14 13:46:48 -07:00
Jeffrey Pfau 4e66d7f832 Implement CpuSet 2013-04-14 13:36:32 -07:00
Jeffrey Pfau 90e2443ccd Split gba.c 2013-04-14 13:24:55 -07:00
Jeffrey Pfau 1ca6487151 Create subdirs 2013-04-14 13:04:24 -07:00
Jeffrey Pfau 7c5a6b121c Implement SWI 2013-04-14 11:57:39 -07:00
Jeffrey Pfau 475af6fde2 Squelch some warnings 2013-04-14 04:22:53 -07:00
Jeffrey Pfau 201d34a4d7 Stub out I/O 2013-04-14 04:21:33 -07:00
Jeffrey Pfau 2cb00fe065 Move GBA load/stores internal to gba.c 2013-04-14 04:08:06 -07:00
Jeffrey Pfau 1d445958c9 Initialize breakpoints 2013-04-14 03:49:48 -07:00
Jeffrey Pfau 82a4fa094b Initialize debugger->lastCommand 2013-04-14 03:47:11 -07:00
Jeffrey Pfau cd75d3b399 Implement LDR[S]B/LDR[S]H (2) 2013-04-14 03:38:09 -07:00
Jeffrey Pfau 9cd468794e Implement BIC 2013-04-14 03:31:35 -07:00
Jeffrey Pfau 288eba1f80 Fix POP {pc} 2013-04-14 03:28:58 -07:00
Jeffrey Pfau 3b3b6e0546 Implement MVN 2013-04-14 03:26:04 -07:00
Jeffrey Pfau 3121ed0bb6 Fix BX 2013-04-14 03:23:37 -07:00
Jeffrey Pfau 8eb8cdfad8 Implement SUB(1) 2013-04-14 03:15:21 -07:00
Jeffrey Pfau 18b1fd490f Implement SUB(3) 2013-04-14 03:13:06 -07:00
Jeffrey Pfau 280fc18cff Implement LDRB(1) 2013-04-14 03:10:25 -07:00
Jeffrey Pfau ee5375a8ff Implement CMP(2) 2013-04-14 03:08:07 -07:00
Jeffrey Pfau b541b99d0c Implement NEG 2013-04-14 03:06:11 -07:00
Jeffrey Pfau 53212baee5 Implement SUB(2) 2013-04-14 03:05:12 -07:00
Jeffrey Pfau 5be88fe123 Implement LDRH(1) 2013-04-14 03:00:06 -07:00
Jeffrey Pfau ce593c4bfa Implement STRB(1) 2013-04-14 02:58:05 -07:00
Jeffrey Pfau 7c8d76eb06 Implement BX 2013-04-14 02:55:12 -07:00
Jeffrey Pfau d7ff6aa14b Add missing field for breakpoints 2013-04-14 02:54:58 -07:00
Jeffrey Pfau 81909bed56 Fix indentation of LSR(2)/ASR(2) 2013-04-14 02:51:21 -07:00
Jeffrey Pfau 97ce972b2a Implement LSR(2) 2013-04-14 02:49:07 -07:00
Jeffrey Pfau 76a85c763c Rudimentary breakpoints 2013-04-14 02:42:09 -07:00
Jeffrey Pfau baad7b50bd Add n command, and command repetition 2013-04-13 14:06:57 -07:00
Jeffrey Pfau 4df2d6de8f Pause on stub opcodes 2013-04-13 13:56:29 -07:00
Jeffrey Pfau e5379c99e0 Add ability to run code indefinitely (or at least until we crash) 2013-04-13 13:50:41 -07:00
Jeffrey Pfau dbe9796b34 Implement B 2013-04-13 12:38:47 -07:00
Jeffrey Pfau abd522a2ce Implement ADD(4) 2013-04-13 12:32:15 -07:00
Jeffrey Pfau bc4924cef5 Implement CMP(3) 2013-04-13 12:28:24 -07:00
Jeffrey Pfau aa14ed441c Implement AND, EOR and ORR 2013-04-13 01:50:21 -07:00
Jeffrey Pfau 75fdcd6750 Add missing CPSR update for ASR(2) 2013-04-13 01:48:00 -07:00
Jeffrey Pfau c51ad65cac Implement ASR(2) 2013-04-13 01:42:34 -07:00
Jeffrey Pfau 5094b7717a Add memory reading commands to debugger 2013-04-13 01:36:01 -07:00
Jeffrey Pfau 5465543acc Properly recognize syntax errors 2013-04-13 01:27:05 -07:00
Jeffrey Pfau 0180ee090e Print hex 2013-04-13 01:25:21 -07:00
Jeffrey Pfau f715534083 Begin command line parsing 2013-04-13 01:23:41 -07:00
Jeffrey Pfau 10884de57a Add ability to print current instruction 2013-04-13 00:22:27 -07:00
Jeffrey Pfau 67750e351b Fix sign-extension on BL1 2013-04-12 22:59:19 -07:00
Jeffrey Pfau eed0e77079 Implement B(1) 2013-04-12 22:58:50 -07:00
Jeffrey Pfau be8849d7fe Implement CMP(1) 2013-04-12 22:44:51 -07:00
Jeffrey Pfau 3a097dca96 Implement ADD(3), refactor other ADDs 2013-04-12 22:34:44 -07:00
Jeffrey Pfau 36670b3fa2 Implement LSR(1) and reindent LSL(1) 2013-04-12 22:24:35 -07:00
Jeffrey Pfau 9ca65038ed Implement LDR(4) 2013-04-12 22:18:46 -07:00
Jeffrey Pfau 9f77c32375 Implement ADD(1) 2013-04-12 22:17:37 -07:00
Jeffrey Pfau d7ddbee448 Fix BL(1) 2013-04-12 22:14:01 -07:00
Jeffrey Pfau f86fb9dc74 Implement LDR(1) 2013-04-12 22:06:17 -07:00
Jeffrey Pfau 33fc9587cc Implement STR(1) 2013-04-12 21:57:50 -07:00
Jeffrey Pfau c8f85a657e Implement STR(3) 2013-04-12 21:48:30 -07:00
Jeffrey Pfau 3e57e46046 Implement ADD(2) 2013-04-12 21:48:19 -07:00
Jeffrey Pfau b5182915d7 Command to break into attached debugger 2013-04-12 21:27:43 -07:00
Jeffrey Pfau a7bc99c846 Implement LDR(3) 2013-04-12 20:09:27 -07:00
Jeffrey Pfau 57f2cccacf Implement STRH(1) 2013-04-12 20:06:58 -07:00
Jeffrey Pfau 21ee7946f1 Implement LSL(1) 2013-04-12 20:00:14 -07:00
Jeffrey Pfau 71c68fe79f Implement ADD(6) 2013-04-12 19:59:55 -07:00
Jeffrey Pfau 21df1c48c2 Implement MOV(1) 2013-04-12 02:44:04 -07:00
Jeffrey Pfau 9ab3b0c20a Implement ADD(7)/SUB(4) 2013-04-12 02:22:37 -07:00
Jeffrey Pfau 1ac7f0eb15 Implement MOV(3) 2013-04-12 02:15:47 -07:00
Jeffrey Pfau 37ce1383fc Set bits in MSR properly 2013-04-12 02:10:09 -07:00
Jeffrey Pfau 6097890251 Print proper register 2013-04-12 02:04:51 -07:00
Jeffrey Pfau 688af6cdee Add some basic input to the debugger 2013-04-12 02:03:11 -07:00
Jeffrey Pfau 1db7f5b179 Initial debugger 2013-04-12 01:32:43 -07:00
Jeffrey Pfau b07e052698 Move CMakeList 2013-04-11 23:58:13 -07:00
Jeffrey Pfau d90d7d1899 Implement BL 2013-04-11 03:14:09 -07:00
Jeffrey Pfau 133d574667 Implement LDMIA/STMIA/PUSH/POP 2013-04-11 03:01:07 -07:00
Jeffrey Pfau 1616ec83a2 Stub out incomplete addressing mode 1 opcodes 2013-04-11 02:13:35 -07:00
Jeffrey Pfau 4fbed66bdb Start fleshing out addressing mode 1 2013-04-11 01:32:30 -07:00
Jeffrey Pfau d278429b43 Implement BX 2013-04-11 00:14:12 -07:00
Jeffrey Pfau a511df7920 Put stub definitions in all of Thumb 2013-04-10 23:38:18 -07:00
Jeffrey Pfau 7e5de27f43 Add ability to run Thumb code 2013-04-10 23:34:50 -07:00
Jeffrey Pfau 9a0d14645b Log stubs 2013-04-10 22:52:46 -07:00
Jeffrey Pfau 9a7f0f4a74 Stub out BL, finishing Thumb table 2013-04-10 21:11:05 -07:00
Jeffrey Pfau 87863ad97a Stub out B 2013-04-10 21:09:22 -07:00
Jeffrey Pfau cbc17ad77e Stub out SWI 2013-04-10 21:05:19 -07:00
Jeffrey Pfau e89f49459a Stub out conditional branches 2013-04-10 21:04:41 -07:00
Jeffrey Pfau d5adcac319 Stub out LDMIA/STMIA 2013-04-10 20:58:05 -07:00
Jeffrey Pfau 0db11ec6bb Stub out BKPT (not in ARMv4T, but still useful) 2013-04-10 20:50:56 -07:00
Jeffrey Pfau 5e78400a25 Stub out POP/PUSH 2013-04-10 00:00:24 -07:00
Jeffrey Pfau 99d0b76f3b Stub out ADD7 and SUB4 2013-04-09 23:47:37 -07:00
Jeffrey Pfau 08065d865d Stub out ADD from PC and SP 2013-04-09 23:45:08 -07:00
Jeffrey Pfau 28ecc97671 Stub out LDR/STR from SP 2013-04-09 23:37:28 -07:00
Jeffrey Pfau e3818cf7b6 Stub out more load/stores with immediates 2013-04-09 23:34:25 -07:00
Jeffrey Pfau 39c776eb37 Stub out more load/store format 2 2013-04-09 23:27:37 -07:00
Jeffrey Pfau 5165e0131e Put in missing BX 2013-04-09 23:16:30 -07:00
Jeffrey Pfau f42c8d111e Stub out STR2 2013-04-09 23:00:31 -07:00
Jeffrey Pfau 11de611fd2 Stub out LDR3 2013-04-09 22:57:24 -07:00
Jeffrey Pfau 5e18eabd04 Stub out format 8 2013-04-09 22:51:21 -07:00
Jeffrey Pfau be021605bc Define data format 5 2013-04-09 22:35:51 -07:00
Jeffrey Pfau e577df2142 Fix data format 3 2013-04-09 22:35:38 -07:00
Jeffrey Pfau d3abd2dc63 Minor ROM access optimization 2013-04-09 22:20:35 -07:00
Jeffrey Pfau 027e27caa4 Add data form 3 2013-04-09 04:20:14 -07:00
Jeffrey Pfau 56c3685ba6 ADD/SUB 1 stubs 2013-04-09 03:20:32 -07:00
Jeffrey Pfau 2618c39a5d Macro-insanity for Thumb 2013-04-09 03:15:50 -07:00
Jeffrey Pfau 76dbfce3c3 Start filling in THUMB table with insane preprocessor tricks 2013-04-09 02:57:24 -07:00
Jeffrey Pfau 70eb3634a0 Fix warnings + LDR[B]T/STR[B]T 2013-04-08 03:14:18 -07:00
Jeffrey Pfau 9a1fb100c7 Load/store working RAM 2013-04-08 03:13:37 -07:00
Jeffrey Pfau 93a2f16066 Loading 8/16 bits from ROM 2013-04-08 02:13:40 -07:00
Jeffrey Pfau 67c00f378a Ensure CPSR privilege gets updated in MSR 2013-04-08 00:21:28 -07:00
Jeffrey Pfau 37ad6218da Don't double-execute AL instructions 2013-04-08 00:17:54 -07:00
Jeffrey Pfau 4f3e77c87e Implement MSR 2013-04-08 00:15:16 -07:00
Jeffrey Pfau 4bba75dd0a Separate out ISA files 2013-04-07 21:15:32 -07:00
Jeffrey Pfau b02fdd3dda Remove inline conditions and add ARM specialization 2013-04-07 20:37:48 -07:00
Jeffrey Pfau 186068adfe Start filling in ARMBoard 2013-04-07 13:25:45 -07:00
Jeffrey Pfau 120b85713d Mode switching 2013-04-07 02:36:41 -07:00
Jeffrey Pfau bda71cafc2 ALU instructions can write to PC 2013-04-07 02:01:14 -07:00
Jeffrey Pfau 6e3a9a9508 Fix writing to PC 2013-04-07 01:57:04 -07:00
Jeffrey Pfau 68f2eed84d Mini-test 2013-04-07 01:39:49 -07:00
Jeffrey Pfau 9575e7f0d2 Fix B 2013-04-07 01:39:08 -07:00
Jeffrey Pfau 0e2394e7d5 De-inline ARMStep 2013-04-07 01:46:48 -07:00
Jeffrey Pfau b23f1ee3e3 GBA ROM loading 2013-04-07 01:46:28 -07:00
Jeffrey Pfau 340d3ce6a7 Implement B 2013-04-06 20:16:14 -07:00
Jeffrey Pfau 5c7b4a98c6 Load from ARM table now that we have one 2013-04-06 20:06:51 -07:00
Jeffrey Pfau 6bd7a5ee53 Fill remainder of table 2013-04-06 20:01:32 -07:00
Jeffrey Pfau 7a0fb72e7e Stub out SWI 2013-04-06 19:58:01 -07:00
Jeffrey Pfau d620357ac8 Stub out coprocessor 2013-04-06 19:52:45 -07:00
Jeffrey Pfau 5dd2379dd5 Cleanup 2013-04-06 19:38:14 -07:00
Jeffrey Pfau f2a1257fbb Stub out branch instructions 2013-04-06 19:22:14 -07:00
Jeffrey Pfau 1858dfeb1c Stub out LDM/STM 2013-04-06 18:44:52 -07:00
Jeffrey Pfau 7b82cc0040 Fill in LDR/STR block 2013-04-06 13:05:53 -07:00
Jeffrey Pfau befba57fe6 Simple error checking 2013-04-06 04:34:19 -07:00
Jeffrey Pfau 9efc945f1b Add store callbacks 2013-04-06 04:20:44 -07:00
Jeffrey Pfau 96da9c7ef1 Partially implement LDR/STR and friends 2013-04-06 04:16:34 -07:00
Jeffrey Pfau 92e74a78e1 Apparently I can't count to 8 2013-04-06 02:49:54 -07:00
Jeffrey Pfau cb2469c4f4 Filler for more instructions 2013-04-06 00:32:01 -07:00
Jeffrey Pfau a01fc986a3 Begin GBA structure 2013-04-05 02:17:22 -07:00
Jeffrey Pfau cd07dee7b1 Implement immediate shifter 2013-04-05 00:44:53 -07:00
Jeffrey Pfau c07df4a337 Fill in immediates 2013-04-04 03:12:22 -07:00
Jeffrey Pfau 63f6f53a80 Implement BIC, MOV, MVN, ORR 2013-04-04 02:42:17 -07:00
Jeffrey Pfau dbee1e871e Add stubs, including for illegal instructions 2013-04-04 02:36:53 -07:00
Jeffrey Pfau e093960316 Fill in more opcodes, implement CMN, CMP, TEQ, TST 2013-04-04 02:31:32 -07:00
Jeffrey Pfau fd4ee12eb5 Implement ADD, ADC, RSB, RSC, SUB 2013-04-04 02:04:51 -07:00
Jeffrey Pfau c1a8042db4 Fill in more opcodes, implement EOR 2013-04-04 01:27:51 -07:00
Jeffrey Pfau 4025bf89f2 Add boilerplate for instructions 2013-04-04 00:46:50 -07:00
Jeffrey Pfau bf72532715 Add more framework for loading instructions 2013-04-03 22:34:49 -07:00
Jeffrey Pfau 009bef870c Initial commit 2013-04-03 22:12:15 -07:00