Commit graph

  • 76145bc5c0 Whoops, fix transparent polygon render order Sean Maas 2020-06-21 05:04:15 -04:00
  • bc12aa1afa Expand vertex color values to 9 bits during interpolation Fixes that ugly, blocky interpolation Sean Maas 2020-06-21 00:09:55 -04:00
  • b0e5535d9a Fix clipped polygon rendering edge case (for real this time) Sean Maas 2020-06-19 20:17:47 -04:00
  • 5e45e0ad47 Implement the remaining 3D tests Sean Maas 2020-06-18 17:27:44 -04:00
  • 8ee85d0df1 Implement fog rendering Sean Maas 2020-06-18 02:38:09 -04:00
  • 3fb5f22981 Fix the highlight blending formula Fixes #36 Sean Maas 2020-06-17 20:22:08 -04:00
  • 46fb09b564 Fix a couple broken I/O reads Sean Maas 2020-06-17 20:05:35 -04:00
  • 87b79d5513 Stub enough to make Pictochat work Sean Maas 2020-06-17 16:58:09 -04:00
  • b90b4911a5 Get a bit farther with the WiFi stub Sean Maas 2020-06-17 04:39:44 -04:00
  • 9936472eab Implement the remaining ARM9-exclusive instructions Sean Maas 2020-06-17 00:08:52 -04:00
  • feedbf2f3d Fix LDM/STM edge cases - Always transfer in an increasing order - Properly handle writeback when Rn is in Rlist - Use current mode registers for LDR^ with R15 in Rlist Sean Maas 2020-06-16 22:37:26 -04:00
  • 6869829ed5 Fix equal depth test Fixes #35 Sean Maas 2020-06-16 18:17:44 -04:00
  • bd5e5fead3 Implement the remaining texture coordinate transformations Sean Maas 2020-06-16 17:53:08 -04:00
  • fe88002d6a Capture from layers even if displaying something else Also fixed a potential 3D-related crash. Fixes #25 and possibly others. Sean Maas 2020-06-14 02:24:46 -04:00
  • 5afe45b974 Implement large bitmap mode Sean Maas 2020-06-13 23:39:44 -04:00
  • cc3c60cd0f Ignore transparency for direct color bitmaps in GBA mode Sean Maas 2020-06-13 22:09:23 -04:00
  • be467ec8be Remove unsafe pointer shenanigans from 2D GPU code This comes with a slight performance hit, but should prevent any crashes or other unwanted behavior. Sean Maas 2020-06-13 21:28:56 -04:00
  • dd5168249c Only increment internal registers when a rotscale BG is drawn Also move the V-counter check back to before the V-count increment. It seems wrong, but it tends to work better? Fixes #21 Sean Maas 2020-06-12 10:44:36 -04:00
  • 49be2881d0 Implement GBA bitmap modes Fixes #8 and fixes #12 Sean Maas 2020-06-11 01:34:54 -04:00
  • f9c6398616 Fill new saves with 0xFF Sean Maas 2020-06-09 01:37:15 -04:00
  • 723d7f003e Fix 3D clear color not being detected during blending Why do I keep causing regressions Sean Maas 2020-06-07 02:19:35 -04:00
  • aa8c407a88 Fix H-blank DMA issue + fix crash when toggling GBA crop Sean Maas 2020-06-07 00:23:59 -04:00
  • 6c58f22be8 Properly emulate the internal BG rotscale registers Fixes mode 7 in Mario Kart Super Circuit and others Sean Maas 2020-06-06 21:44:06 -04:00
  • 9cdedeceab Clean up some duplicate stuff Sean Maas 2020-06-06 20:04:43 -04:00
  • 73d27b04ad Optimize 2D layer priority (again) Please don't let anything break this time Sean Maas 2020-06-04 23:18:10 -04:00
  • b101ce902b Blend transparent objects and 3D even when blending disabled Fixes cave fog in Pokemon Emerald Sean Maas 2020-06-04 22:00:49 -04:00
  • 4920f2f4b4 Add an option to disable the FPS counter on Switch Sean Maas 2020-06-04 19:31:00 -04:00
  • c7a1736fa9 Reduce frame stutters There are almost no stutters on the Switch now, but desktop doesn't seem to have changed much. Sean Maas 2020-06-04 18:47:11 -04:00
  • 986e74f375 Various cleanups, fixes, and adjustments Sean Maas 2020-06-03 23:13:34 -04:00
  • 33598c213c Add option for GBA crop and share layout code between platforms Sean Maas 2020-06-01 16:37:41 -04:00
  • eb252da72d Get back some of the performance that GBA support took There's a lot of stuff I want to clean up (honestly the whole codebase feels like a major OCD attack) but GBA support is working pretty well and I want to get it merged into master. Hopefully I can find the motivation to do some cleanup afterwards (I'm always putting it off, bleh). Sean Maas 2020-06-01 00:14:32 -04:00
  • d7df7aef03 Implement the GBA PSG sound channels Not gonna lie, this was way less fun than the DS sound chip Sean Maas 2020-05-30 23:43:39 -04:00
  • 0579da13d8 Implement GBA saves Sean Maas 2020-05-29 19:08:31 -04:00
  • 2dfd5daebb Implement the GBA DMA sound channels Sean Maas 2020-05-29 02:36:14 -04:00
  • 6e32136ed6 Fix GBA H-blank DMA transfers Sean Maas 2020-05-28 16:56:01 -04:00
  • e3cbbb763a Fix GBA cart access on ARM7 DMA channels Sean Maas 2020-05-28 16:07:43 -04:00
  • 2c6bcc4c9a Draw GBA screen border and stub audio to allow FPS limiting Yes I know this is a mess I will clean it before I merge it into master Sean Maas 2020-05-28 14:46:51 -04:00
  • eba3e5b97c Add affine backgrounds to GBA mode Sean Maas 2020-05-28 06:00:06 -04:00
  • 80038a4eb4 Fix GBA object tile mapping Also fixed a crash when the DS firmware isn't loaded Sean Maas 2020-05-28 05:10:57 -04:00
  • a9a26c03b1 Map the GBA ROM better Sean Maas 2020-05-28 04:47:04 -04:00
  • 184613af50 Add text layers for GBA mode + slight cleanup Sean Maas 2020-05-28 03:27:36 -04:00
  • a776d15048 Preliminary, messy GBA support Sean Maas 2020-05-28 00:49:23 -04:00
  • da29a39614 Fix a bug in the POP PC instruction on ARM7 Sean Maas 2020-05-27 19:33:01 -04:00
  • a043d257b1 Minor timer fixes Fixes audio issues in some games Sean Maas 2020-05-21 05:45:07 -04:00
  • 624a57f60a Minor desktop layout fixes Sean Maas 2020-05-16 07:57:43 -04:00
  • b8773491d0 Fix yet another potential threaded 3D crash Sean Maas 2020-05-16 05:47:55 -04:00
  • f5cc2e52f4 Properly handle unaligned memory accesses Fixes #6 Sean Maas 2020-05-16 05:31:07 -04:00
  • 4ebd2ca5dd Upgrade MSYS2 wxWidgets, downgrade devkitA64 The wxWidgets linking issue seems to be fixed. Unfortunately, now the latest devkitA64 package is causing trouble for the Switch build, causing insanely long startup times and performance loss. Sean Maas 2020-05-16 00:15:26 -04:00
  • 45fd5b2f1c Allow choosing light or accurate FPS limiting on desktop Sean Maas 2020-05-15 23:03:19 -04:00
  • b53b083dbb Fix an accidental depth buffer regression Sean Maas 2020-05-11 01:33:49 -04:00
  • 0e260a151d Allow configuring thread count for threaded 3D Sean Maas 2020-05-11 00:59:55 -04:00
  • f70fc2afc5 Bring back condition variables on the Switch I hate platform-specific code but I hate losing performance even more Sean Maas 2020-05-10 04:52:58 -04:00
  • dfc906a88d Improve FPS limit reliability by not relying on condition variables Sean Maas 2020-05-10 03:49:19 -04:00
  • 47cf95825c Fix cases of overlapping shadows Sean Maas 2020-05-09 15:16:59 -04:00
  • b36570d6b1 Properly implement shadow polygons Sean Maas 2020-05-09 06:28:25 -04:00
  • 92cf64244e Fix the GL canvas blocking program closure Also set texture clamping to make filtering look better Sean Maas 2020-05-07 05:05:05 -04:00
  • 9238db3936 Manually install an old, working MSYS2 wxWidgets package The latest package doesn't seem to link properly. Hopefully it gets fixed soon and this can be reverted. Sean Maas 2020-05-06 19:12:17 -04:00
  • b5b9a99d74 Add screen layouts Sean Maas 2020-05-06 06:33:42 -04:00
  • 0c7a3ba600 Fix an object blending bug caused by the previous fix Sean Maas 2020-04-29 22:39:42 -04:00
  • 827b8255b4 Fix blending layers with the same priority Sean Maas 2020-04-29 01:32:13 -04:00
  • 075b093683 Implement noise channels Sean Maas 2020-04-29 00:17:35 -04:00
  • 65a3362bf9 Add WiFi RAM and a temporary hack for gen 4 Pokemon games Sean Maas 2020-04-27 01:39:58 -04:00
  • 13e99f494f Reduce memory usage by only saving one scanline per layer As opposed to saving an entire framebuffer. This saves about 1.5MB of memory, and somehow seems to give a significant performance boost on the Switch? Well, I won't complain :) Sean Maas 2020-04-25 23:59:27 -04:00
  • 0c8cc71ce0 Fix missing break statements I'm a dummy Sean Maas 2020-04-25 04:17:30 -04:00
  • 4653919660 Improve 3D interpolation to fix artifacts Sean Maas 2020-04-25 00:05:37 -04:00
  • 9b18c3f556 Compile separate object files Sean Maas 2020-04-23 02:28:53 -04:00
  • e7a2c83741 Implement the viewport command and make threads safer The formula for scaling 3D X and Y coordinates is now more accurate, which fixes issues most noticeable in some 2D graphics such as the player sprite in Pokemon Black and White. Sean Maas 2020-04-21 01:21:52 -04:00
  • 744ac4c9a8 Update for libnx v3.1.0 Sean Maas 2020-04-07 19:59:04 -04:00
  • 74465dc835 Allow passing a filename through the command line Sean Maas 2020-04-07 19:46:32 -04:00
  • fe9d264dbc Improve threaded 3D a bit Sean Maas 2020-04-03 00:32:45 -04:00
  • 73851fc8a3 Draw the framebuffer with OpenGL + Add filter and int scale settings wxPanel was causing an absurd amount of slowdown when enlarging the window. Drawing with OpenGL mitigates the problem, but having a hard dependancy on OpenGL isn't ideal. If this causes issues for anyone, the old code can be brought back, or added as an option. Sean Maas 2020-03-24 19:48:08 -04:00
  • 63cd90a95d Use enums like a sane person Sean Maas 2020-03-24 03:03:14 -04:00
  • d315ceddaa Add a pause menu to the Switch UI Plus other minor adjustments to make everything just right :) Sean Maas 2020-03-23 21:55:25 -04:00
  • e45216199f Rewrite 2D blending to be faster and more accurate Sean Maas 2020-03-23 07:12:49 -04:00
  • c323271422 Implement the BOX_TEST command Fixes missing geometry in the Pokemon games Sean Maas 2020-03-22 00:41:37 -04:00
  • ee67792c75 Stub an IR-related command Fixes exp. gain in Pokemon Black and White Sean Maas 2020-03-21 18:31:37 -04:00
  • 23d4c24d77 Give the Switch build a proper UI This is essentially the UI that I wrote for my port of melonDS to the Switch, but I rewrote it to be cleaner and easier to use. It's still missing a pause menu, because there are some compilcations that need to be worked out. Still, this is much better than having no UI! Sean Maas 2020-03-21 07:26:33 -04:00
  • 5836132bda Finally add non-extended affine backgrounds I just needed a good test case :P Sean Maas 2020-03-20 21:27:14 -04:00
  • 1fe9771835 Apply master brightness after display capture Fixes flickering in Pokemon Ranger Guardian Signs Sean Maas 2020-03-20 21:05:18 -04:00
  • c9de7031d3 Redirect normal reads from the first 32KB of a ROM Passes anti-piracy checks in games like Bowser's Inside Story and Pokemon Ranger Guardian Signs Sean Maas 2020-03-20 18:58:26 -04:00
  • b966213485 Add an option for threaded 3D rendering Sean Maas 2020-03-20 05:37:21 -04:00
  • 98a374eebb Fix 3D pixels being treated as object window pixels Fixes blending in Bowser's Inside Story and probably others Sean Maas 2020-03-19 05:04:45 -04:00
  • 7f608ad092 Fix audio crackles when running slow Obviously there are still stutters, but that can't be fixed Sean Maas 2020-03-19 01:04:43 -04:00
  • 628aaecab2 Switch to a timer for redrawing on desktop Fixes the display freezing when using the drop-down menus on Windows Sean Maas 2020-03-19 00:51:54 -04:00
  • aee9c8f397 Implement pulse waves Sean Maas 2020-03-18 03:12:10 -04:00
  • 20981c0554 Switch to synchronous audio output Asynchronous was nice for when the emulator is running too slow, but synchronous is far more accurate and will make implementing sound capture much easier. Also, the frame limiter is now based on audio, so that disgusting while statement for Windows can finally be axed! Sean Maas 2020-03-18 00:47:24 -04:00
  • 7c57743014 Add the ability to pause, restart, and stop the core on desktop Sean Maas 2020-03-15 19:31:18 -04:00
  • de81c63bb8 Strip Windows binaries for better file sizes Sean Maas 2020-02-29 16:28:10 -05:00
  • 3e7ac246b2 Read the ADPCM header correctly Fixes #4. Sean Maas 2020-02-25 14:39:39 -05:00
  • 862ec52b54 Implement GPU-timed DMA transfers Required some reworking of the DMA system. Sean Maas 2020-02-21 00:12:13 -05:00
  • 9db622980d Try to fix edge cases where clipped polygons don't fully render The original cases are fixed, but now some new ones are showing up. They're a lot less prominent though, and I can't find a test case that I can reliably reproduce for debugging. Sean Maas 2020-02-09 01:12:43 -05:00
  • 8deab7d8ec Only interpolate values at polygon edges once per scanline Gives a decent performance boost to the 3D renderer. Sean Maas 2020-02-07 20:06:19 -05:00
  • 5d47418ada Minor UI fixes Sean Maas 2020-02-06 21:52:55 -05:00
  • e989e78fcc Implement 2D engine window functionality Sean Maas 2020-02-06 21:04:31 -05:00
  • 576476d605
    Initialize coreThread to nullptr (#3) Gran PC 2020-02-06 23:36:18 +01:00
  • 7d34e8ea9b Address code review comments Jesús Higueras 2020-02-06 23:24:46 +01:00
  • d428d14a45 Initialize coreThread to NULL. Fixes #2 Jesús Higueras 2020-02-06 20:09:25 +01:00
  • daae6ca26d Turn down the volume a bit Sean Maas 2020-02-05 23:58:51 -05:00
  • 3611f8f822 Add save type selection for when no save file exists Not ideal, but it's better than nothing. Eventually either a save type database or automatic detection code will be added, and this can be used as a manual override. Sean Maas 2020-02-05 03:26:59 -05:00
  • f157863b7d Switch to 48000Hz to fix issues on some systems Sean Maas 2020-02-03 12:10:06 -05:00