Commit Graph

478 Commits

Author SHA1 Message Date
Jeffrey Pfau 2ce017b555 Fix WIN0H writing with overlapping values 2013-09-22 03:00:43 -07:00
Jeffrey Pfau 4523777bee Fix initializing savegames when writing to disk fails 2013-09-22 02:13:03 -07:00
Jeffrey Pfau e80ab4c855 Make debugger optional 2013-09-21 18:10:13 -07:00
Jeffrey Pfau 9d10ca3f90 Move out int declarations for stricter parsers 2013-09-21 01:27:16 -07:00
Jeffrey Pfau 85e1c2d573 Exploit cache locality for slightly faster drawing 2013-08-03 01:15:08 -07:00
Jeffrey Pfau 6b86cdf9ef LDM should force-align loads 2013-07-31 01:59:00 -07:00
Jeffrey Pfau 3301cc9f97 Reuse code for splitting WIN0 for WIN1 2013-07-31 00:48:57 -07:00
Jeffrey Pfau d2f15f4af4 Window bounds enforced 2013-07-31 00:48:34 -07:00
Jeffrey Pfau 0939d5e2bc Fix WIN0 cases 2013-07-31 00:24:21 -07:00
Jeffrey Pfau 5a685558c7 Window respects y coordinate now 2013-07-30 21:39:25 -07:00
Jeffrey Pfau 453939fc8d Sloppy first implementation of windows 2013-07-29 03:33:22 -07:00
Jeffrey Pfau 7291fcfe9e Start windows 2013-07-29 01:46:09 -07:00
Jeffrey Pfau 27f5468e01 Writing for Window registers 2013-07-29 01:30:27 -07:00
Jeffrey Pfau 3f122dcf14 Fix 8-bit I/O writes 2013-07-29 01:30:06 -07:00
Jeffrey Pfau 15aa862d70 Small optimization for sprite drawing 2013-07-29 00:44:38 -07:00
Jeffrey Pfau 425056ca15 Ensure LDM does not write back incorrectly with register list overlaps 2013-07-27 03:02:52 -07:00
Jeffrey Pfau 9e578da5a1 Do register writeback in addressing mode 2 before actual load/store 2013-07-26 23:42:45 -07:00
Jeffrey Pfau 8b1eb01a96 Fix MUL, UMULL, UMLAL 2013-07-26 01:03:34 -07:00
Jeffrey Pfau 6321b1f827 Fix ARM_CARRY_FROM 2013-07-26 00:50:20 -07:00
Jeffrey Pfau 76cd712907 Fix modes 4 and 5 2013-07-26 00:10:33 -07:00
Jeffrey Pfau 3537099820 Fix sprites 64+ not drawing 2013-07-21 21:10:12 -07:00
Jeffrey Pfau 774b7d75bc Fix broken bitmap 2013-07-21 19:04:24 -07:00
Jeffrey Pfau 6829b54234 Bitmap of enabled sprites 2013-07-21 18:58:32 -07:00
Jeffrey Pfau edecf6c1f6 Minor optimization to backgroud mode 0 2013-07-21 18:56:45 -07:00
Jeffrey Pfau 8dc3fa9bec Use software renderer for EGL, just use it for uploading the texture 2013-07-21 05:15:02 -07:00
Jeffrey Pfau da7853bda6 Mode 5 2013-07-20 01:46:40 -07:00
Jeffrey Pfau 15a2e43b2b Fix read/write 0x0400020A 2013-07-20 01:40:17 -07:00
Jeffrey Pfau 02cb9c56c5 Reuse bitmap mode background code 2013-07-20 01:38:13 -07:00
Jeffrey Pfau 90ddf937a5 Implement modes 3 and 4 2013-07-19 21:51:14 -07:00
Jeffrey Pfau 1e4a82ef5b Update GBA BIOS from GBA.js 2013-07-18 02:14:22 -07:00
Jeffrey Pfau 6a1afbda50 8-bit write to IO 2013-07-18 02:13:49 -07:00
Jeffrey Pfau 8215afcee6 Decouple GLSL and GL mains 2013-07-17 23:31:19 -07:00
Jeffrey Pfau 49de0fb52e Different mains for SDL and EGL, supporting Raspberry Pi and BeagleBone Black 2013-05-29 21:18:25 -07:00
Jeffrey Pfau f8b0acd86a Fix tile mapping for 256-color sprites 2013-05-13 02:47:11 -07:00
Jeffrey Pfau c20efb42ff Clean up thread locking in the software renderer 2013-05-11 21:07:10 -07:00
Jeffrey Pfau 63b72657c1 Fix transformed sprites that are off the top of the screen 2013-05-11 18:36:35 -07:00
Jeffrey Pfau f7ddc3a2b6 Implement RLUnCompWram/RLUnCompVram 2013-05-11 18:22:23 -07:00
Jeffrey Pfau a6d87bbfb9 Better cycle counting for STR 2013-05-11 18:01:16 -07:00
Jeffrey Pfau b6361cdfa9 Start LDM/STM timings 2013-05-11 17:05:57 -07:00
Jeffrey Pfau 0a37300bcf Improve LDR/STR cycle counting 2013-05-11 14:55:29 -07:00
Jeffrey Pfau 013e322c0b Improved cycle counting for branches 2013-05-11 14:45:31 -07:00
Jeffrey Pfau f6592b17b8 Implement MUL timings 2013-05-11 14:35:10 -07:00
Jeffrey Pfau 5c31757912 Remove int operations and vectorize shader calculation 2013-05-08 21:10:32 -07:00
Jeffrey Pfau f246587a9d Add support for (my) joystick 2013-05-08 16:57:17 -07:00
Jeffrey Pfau 12e681392d Fragment shader now no longer requires extensions 2013-05-08 15:19:54 -07:00
Jeffrey Pfau 8047ce11d0 Fix off-by-one scanline 2013-05-07 22:22:35 -07:00
Jeffrey Pfau 5b5251434f Add background sizes to GLSL mode 0 2013-05-07 22:21:40 -07:00
Jeffrey Pfau f278805255 Fix x indexing into VRAM 2013-05-07 21:48:46 -07:00
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