Commit graph

572 commits

Author SHA1 Message Date
Sean Maas
62481d9b94 Add touch input and button hide toggle for Android 2020-08-05 20:38:41 -04:00
Sean Maas
37b8f663bc Make VRAMCNT registers readable
Fixes libnds texture functions. Not sure why GBATEK says they're write-only?
2020-08-04 00:07:48 -04:00
Sean Maas
aa81b164f7 Fix 3D Y coordinates being one pixel off 2020-08-02 22:19:15 -04:00
Sean Maas
a43f19e5e9 Write the save file whenever the emulator is paused
This should hopefully fix cases of the Android build not always
writing save files properly.
2020-08-01 20:52:40 -04:00
Sean Maas
5bf140add0 Add proper on-screen buttons for Android 2020-08-01 20:31:19 -04:00
Sean Maas
c8c2ddb095 Fix the Switch buildbot (again)
No, I will not just use the latest devkitA64; it breaks things and
has worse performance :P
2020-08-01 00:00:49 -04:00
Sean Maas
78562ede5d Handle a weird DMA edge case
Finally fixes the DS Zelda games!
In other news, the DMA code desperately needs a cleanup...
2020-07-31 23:13:18 -04:00
Sean Maas
63bd27104a Oops, remember to ignore the prescaler in count-up mode 2020-07-28 03:20:01 -04:00
Sean Maas
0232c61a93 Optimize timer prescaling 2020-07-27 22:36:55 -04:00
Sean Maas
e10892ae88 Axe getVramBlock() and other cleanups 2020-07-25 18:14:17 -04:00
Sean Maas
93be19c769 Optimize 2D rendering (again) and handle GBA object edge case
Fixes #7
2020-07-24 21:38:13 -04:00
Sean Maas
58571f3b8d Barebones Android port
The absolute mad lad
2020-07-23 14:37:21 -04:00
Sean Maas
dfac99c377 Use Docker for Switch buildbot + other improvements 2020-07-14 16:26:55 -04:00
Sean Maas
c0323f1b9c Move interrupt handling out of the main loop 2020-07-12 13:03:22 -04:00
Sean Maas
9624e7ac08 Update some links 2020-07-12 11:54:40 -04:00
Sean Maas
4fd535f305 Add support for EEPROM 128KB DS saves and EEPROM 0.5KB GBA saves
EEPROM 128KB is used by Pokemon Mystery Dungeon: Explorers of Sky.
It uses a 3-bit address bus, so I previously mistook it as using a
FLASH save.
EEPROM 0.5KB uses the same ID string as EEPROM 8KB on the GBA, so
some messy on the fly detection was added. Eventually there will be
some form of detection for DS games too, as well as manual overrides
for both.
2020-07-02 02:45:32 -04:00
Sean Maas
0eaa0e99e5 Update devkitPro pacman 2020-07-01 21:36:51 -04:00
Sean Maas
aab70b0090 Refactor in preparation for a proper scheduler 2020-07-01 21:27:40 -04:00
Sean Maas
01ba2cacef Implement wireframe polygons
Fixes #34
2020-06-27 03:31:40 -04:00
Sean Maas
2b5d90cf67 Properly handle unaligned halfword loads on ARM7 2020-06-25 21:31:57 -04:00
Sean Maas
0e814981aa Fix some ALU edge cases
-Read PC+4 when Rn=PC and shfiting by register
-Set carry flag for immediate operands
2020-06-25 20:43:31 -04:00
Sean Maas
31480e67b4 Improve W normalization 2020-06-21 11:55:41 -04:00
Sean Maas
11c5959e90 Transparency and stencil buffer fixes
Based on http://melonds.kuribo64.net/board/thread.php?id=13
2020-06-21 08:50:13 -04:00
Sean Maas
76145bc5c0 Whoops, fix transparent polygon render order 2020-06-21 05:04:15 -04:00
Sean Maas
bc12aa1afa Expand vertex color values to 9 bits during interpolation
Fixes that ugly, blocky interpolation
2020-06-21 00:09:55 -04:00
Sean Maas
b0e5535d9a Fix clipped polygon rendering edge case (for real this time) 2020-06-19 20:17:47 -04:00
Sean Maas
5e45e0ad47 Implement the remaining 3D tests 2020-06-18 17:27:44 -04:00
Sean Maas
8ee85d0df1 Implement fog rendering 2020-06-18 02:38:09 -04:00
Sean Maas
3fb5f22981 Fix the highlight blending formula
Fixes #36
2020-06-17 20:22:08 -04:00
Sean Maas
46fb09b564 Fix a couple broken I/O reads 2020-06-17 20:05:35 -04:00
Sean Maas
87b79d5513 Stub enough to make Pictochat work 2020-06-17 16:58:09 -04:00
Sean Maas
b90b4911a5 Get a bit farther with the WiFi stub 2020-06-17 04:39:44 -04:00
Sean Maas
9936472eab Implement the remaining ARM9-exclusive instructions 2020-06-17 00:08:52 -04:00
Sean Maas
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
2020-06-16 22:37:26 -04:00
Sean Maas
6869829ed5 Fix equal depth test
Fixes #35
2020-06-16 18:17:44 -04:00
Sean Maas
bd5e5fead3 Implement the remaining texture coordinate transformations 2020-06-16 17:53:08 -04:00
Sean Maas
fe88002d6a Capture from layers even if displaying something else
Also fixed a potential 3D-related crash.
Fixes #25 and possibly others.
2020-06-14 02:24:46 -04:00
Sean Maas
5afe45b974 Implement large bitmap mode 2020-06-13 23:39:44 -04:00
Sean Maas
cc3c60cd0f Ignore transparency for direct color bitmaps in GBA mode 2020-06-13 22:09:23 -04:00
Sean Maas
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.
2020-06-13 21:28:56 -04:00
Sean Maas
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
2020-06-12 10:44:36 -04:00
Sean Maas
49be2881d0 Implement GBA bitmap modes
Fixes #8 and fixes #12
2020-06-11 01:34:54 -04:00
Sean Maas
f9c6398616 Fill new saves with 0xFF 2020-06-09 01:37:15 -04:00
Sean Maas
723d7f003e Fix 3D clear color not being detected during blending
Why do I keep causing regressions
2020-06-07 02:19:35 -04:00
Sean Maas
aa8c407a88 Fix H-blank DMA issue + fix crash when toggling GBA crop 2020-06-07 00:23:59 -04:00
Sean Maas
6c58f22be8 Properly emulate the internal BG rotscale registers
Fixes mode 7 in Mario Kart Super Circuit and others
2020-06-06 21:44:06 -04:00
Sean Maas
9cdedeceab Clean up some duplicate stuff 2020-06-06 20:04:43 -04:00
Sean Maas
73d27b04ad Optimize 2D layer priority (again)
Please don't let anything break this time
2020-06-04 23:18:10 -04:00
Sean Maas
b101ce902b Blend transparent objects and 3D even when blending disabled
Fixes cave fog in Pokemon Emerald
2020-06-04 22:00:49 -04:00
Sean Maas
4920f2f4b4 Add an option to disable the FPS counter on Switch 2020-06-04 19:31:00 -04:00