Commit Graph

257 Commits

Author SHA1 Message Date
Lior Halphon f8a105e8d0 Stop whining GCC 2022-02-06 14:42:53 +02:00
Lior Halphon b5eea012cc STAT reads 0 during mode 2 if DMA is active 2022-02-05 17:43:48 +02:00
Lior Halphon 6a8db89ae5 Emulate PPU OAM reads while both DMA and GDMA are active 2022-02-05 14:52:09 +02:00
Lior Halphon 1c6ecc2e14 GDMA/DMA Timing fix 2022-02-05 14:08:56 +02:00
Lior Halphon ba5416ee5b Correct comment 2022-02-04 19:07:47 +02:00
Lior Halphon 320aff1d1e DMA doesn't block GDMA 2022-02-04 13:58:44 +02:00
Lior Halphon 864f0927be Timing confirmed and improved 2022-02-04 13:55:06 +02:00
Lior Halphon 37ca174f37 OAM DMA/GDMA conflicts 2022-02-03 21:00:37 +02:00
Lior Halphon 1a41957b3c LCDOff behavior, basic halt/stop behavior 2022-01-31 01:02:31 +02:00
Lior Halphon ad1f019893 Actually fix overflow behavior 2022-01-30 23:11:29 +02:00
Lior Halphon 941afee3ba Fix overflow behavior 2022-01-30 21:33:33 +02:00
Lior Halphon dbb14d7040 Minor edge case for HDMA instant start 2022-01-30 20:52:34 +02:00
Lior Halphon a7f7530eed Preparation for future AGB-0 and B support 2022-01-30 18:11:35 +02:00
Lior Halphon 4bebd2bc33 Correct comment 2022-01-30 17:33:33 +02:00
Lior Halphon 3a2d028efa GDMA/PPU conflicts 2022-01-30 14:38:58 +02:00
Lior Halphon 26656de44f Improvements to GDMA 2022-01-28 23:56:26 +02:00
Lior Halphon 196aaaa7ed Conflicts don't happen in the first 6 T-cycles 2022-01-22 16:56:32 +02:00
Lior Halphon ee03b1e433 Initial halt/stop during DMA support 2022-01-19 01:24:40 +02:00
Lior Halphon ab75858c86 DMA/PPU VRAM conflicts on the CGB/AGB 2022-01-17 22:07:24 +02:00
Lior Halphon b45761146f VRAM DMA during mode 3 2022-01-16 13:50:59 +02:00
Lior Halphon 3133687e68 Potential logic bug fixes 2022-01-16 00:50:08 +02:00
Lior Halphon ffa53eda20 DMA during mode 3 emulation 2022-01-14 17:09:39 +02:00
Lior Halphon ec012cf9f8 is_dma_restarting hack no longer needed 2022-01-12 14:12:55 +02:00
Lior Halphon c4a14ac4db Simplify DMA code, fix DMA read timing 2022-01-12 00:26:18 +02:00
Lior Halphon b7f03dea8d Add CGB-A support 2022-01-05 21:55:46 +02:00
Lior Halphon ab1d4cd26e More DMA write conflicts 2022-01-05 21:40:10 +02:00
Lior Halphon 5e7bb0f891 DMA write conflict revision differences 2022-01-04 19:59:46 +02:00
Lior Halphon 5c17c0ec3b unreachable fun 2022-01-03 17:17:35 +02:00
Lior Halphon cd16431699 OMA DMA improvements (WIP) 2022-01-03 16:51:45 +02:00
Lior Halphon c7298ae5a6 Fix a silly underflow 2022-01-03 16:51:05 +02:00
Lior Halphon 769aac93c0 Lazy APU, extra ~17% speed up 2021-12-29 00:48:44 +02:00
Lior Halphon 59dfb1a85a It's not verified because it's wrong 2021-12-26 21:57:40 +02:00
Lior Halphon c5f6be1e64 Several likely/unlikely optimization, saving on a memset 2021-12-26 02:38:54 +02:00
Lior Halphon 69de3f0fae Implement a PPU fast path, up to 34% performance boost 2021-12-26 01:47:59 +02:00
Lior Halphon eaccd792ed Fixes to safe reads, closes #422 2021-12-18 14:56:33 +02:00
Lior Halphon c63ddbe771 Lag frame detection API (#422) 2021-12-18 01:25:06 +02:00
Lior Halphon c3d9141b7c Replace the term sprite with object for consistency 2021-12-17 21:16:23 +02:00
Lior Halphon 25e3414974 Redesigned vblank callback scheduling scheme, should be more regular and less prune to various sorts of frontend DOS 2021-12-04 15:04:46 +02:00
Lior Halphon 06b744259b Add memory write callback, optimize memory access with likely/unlikely 2021-11-26 14:09:41 +02:00
Lior Halphon bdbe02b043 Add a safe memory read API 2021-11-26 13:54:28 +02:00
Lior Halphon c6f39bc60b Initial MBC7 support 2021-11-12 17:44:51 +02:00
Lior Halphon fbf1bb7f98 Save state compatibility breaking cleanup 2021-11-07 12:56:46 +02:00
Lior Halphon 5565c2540b Register name and info update 2021-11-06 13:34:34 +02:00
Lior Halphon f237b1e9b9 CGB-0 support 2021-11-04 00:35:44 +02:00
Lior Halphon 6cd13be624 Add CGB-B support 2021-10-30 20:58:57 +03:00
Lior Halphon 1f7b20251b Improved sanitation for save states for better security and stability 2021-10-30 16:03:13 +03:00
Lior Halphon e6c4ceaf5a Add CGB-D support 2021-10-27 01:40:28 +03:00
Lior Halphon 5b9746084d Writes to SVBK should work before the boot ROM is disabled 2021-10-23 23:51:48 +03:00
Lior Halphon 18007f0e53 MGB support 2021-10-23 23:28:54 +03:00
Lior Halphon c459058156 That was silly 2021-07-30 14:10:04 +03:00
Lior Halphon 4d1a28f1d1 Improved OAM bug accuracy in several read edge cases 2021-07-25 16:34:34 +03:00
Lior Halphon efb644bc72 MBC5 RAM enable is 8 bit 2021-07-10 15:02:15 +03:00
Lior Halphon ac5b0aca2c RTC accuracy fix 2021-04-23 21:01:17 +03:00
Lior Halphon 87a2d48675 Redo TPP1 saving, fix RTC and HUC3 in BESS 2021-04-16 00:35:54 +03:00
Lior Halphon 763de9d2e0 Fix Rumble support in TPP1 2021-04-11 22:52:34 +03:00
Lior Halphon 42471095e4 Normalize invalid weekdays only after a $11 command 2021-04-11 22:38:25 +03:00
Lior Halphon f24489b983 TPP1 support 2021-04-10 23:56:41 +03:00
Lior Halphon ad54dc57b0 Improved time syncing when turning the LCD on and off, fixes #193 2021-03-21 15:15:04 +02:00
Lior Halphon 72cb391612 Slightly improve MBC3 accuracy 2021-02-26 00:52:18 +02:00
Lior Halphon 71c6fa45e0 Accurate RTC emulation 2021-02-26 00:40:18 +02:00
Lior Halphon 96736fe7c5 Fix false positives in odd-mode detection 2021-01-09 00:59:12 +02:00
Lior Halphon 4bbd27735f Fix a regression in speed switch timing, reset DIV on speed switch, better odd-mode detection and avoidance 2020-12-25 20:41:00 +02:00
Lior Halphon 1d9ac5ccc3 More accurate IR emulation, simplify API 2020-11-21 00:52:54 +02:00
Lior Halphon b7f3454763 More accurate emulation of the IR port 2020-11-20 22:12:15 +02:00
Lior Halphon bce4bfba61 Fix major battery save regressions introduced by the last release, fixes #282 2020-08-06 19:34:57 +03:00
Lior Halphon 3f97b8eaa8 Even more regressions 2020-08-05 02:10:21 +03:00
Lior Halphon d3664d5da0 Fix more RTC regressions 2020-08-05 01:39:19 +03:00
Lior Halphon b0d118f246 Fix broken and regressed MBC3 RTC emulation. Fixes #273, fixes #276, fixes #280 2020-08-04 21:32:27 +03:00
Lior Halphon ffa569deeb Partial emulation of reading VRAM right after mode 3 2020-05-29 23:10:23 +03:00
Lior Halphon 7af66387de HuC-3 alarm clock emulation 2020-05-23 14:50:54 +03:00
Lior Halphon 369410f370 Fix HuC-1 regression 2020-05-23 00:09:30 +03:00
Lior Halphon 08ca56eec7 Cleanup 2020-05-23 00:05:43 +03:00
Lior Halphon ce9114ed55 Fix IR bugs 2020-05-19 01:24:09 +03:00
Lior Halphon a588993f28 Add an HuC command required by Pocket Family 2 2020-05-17 00:10:43 +03:00
Lior Halphon a9023d08c6 Emulate HuC-3’s IR and RTC 2020-05-16 23:27:17 +03:00
Lior Halphon 2cc980755e HuC1 IR support 2020-05-13 22:21:31 +03:00
Lior Halphon 3cba3e8e27 Emulate CGB-C PCM read glitch, fix a potential noise volume envelope bug 2020-05-10 00:37:52 +03:00
Lior Halphon 5a14eb93c6 Merge branch 'master' into JoyKit
# Conflicts:
#	Cocoa/Document.m
#	Cocoa/GBView.h
#	Cocoa/GBView.m
#	Cocoa/joypad.m
#	Cocoa/main.m
#	Core/display.c
#	Core/gb.h
#	Core/save_state.c
2020-04-29 15:52:03 +03:00
Lior Halphon 0cf168f32b Fixing inconsistent style 2020-04-24 20:37:57 +03:00
Lior Halphon 337e74352d Add cheats API, with GameShark and GameGenie import 2020-04-09 22:13:09 +03:00
Lior Halphon 92d6cc6394 Use official register names 2020-04-09 02:36:27 +03:00
Lior Halphon 05403d3a56 Fix the Joypad interrupt. Fixes #237 2020-03-27 17:36:55 +03:00
Lior Halphon 4cb56dc76f Improve MBC2 emulation. Fixes #238 2020-03-27 16:35:36 +03:00
Lior Halphon 34cf0f558d It's more reasonable to do it this way 2020-03-06 18:56:51 +02:00
Lior Halphon 409ab2a6d4 Accurate emulation of tilemap advancement timings 2020-03-03 02:21:19 +02:00
Lior Halphon 9c7a8fdb1b WY is tested every cycle 2020-02-26 22:24:08 +02:00
Lior Halphon 2be58439bf Starting over – removing all window related code 2020-02-23 00:38:47 +02:00
Lior Halphon 08eb2f3d98 Correct emulation of FF6C (Turns out it controls object priority) 2020-02-15 15:32:06 +02:00
Lior Halphon 0737655753 Merge branch 'master' into JoyKit 2020-01-03 23:42:25 +02:00
Lior Halphon 31609319de Fix the set_joyp API 2019-11-09 14:45:38 +02:00
Lior Halphon c802361800 Whoops, this function was missing 2019-11-08 16:14:16 +02:00
Lior Halphon 0ece21bca7 Replace the SDL-derived controller support with my own JoyKit framework. Adds rumble support, LED support, better manual and automatic configurations, analog speed controls. 2019-10-19 19:26:04 +03:00
Lior Halphon dee29c118c Added GB_set_sample_rate_by_clocks API, split SGB_NO_SFC into PAL and NTSC; now they report the correct clock rate. 2019-10-08 15:10:24 +03:00
Lior Halphon 652e52df3d Pass the SGB multiplayer tests 2019-09-14 12:31:52 +03:00
Lior Halphon 4fcc921b46 Fix SGB multiplayer, improve multiplayer accuracy 2019-09-13 17:10:58 +03:00
Lior Halphon eaa1c1cd4a Merge bsnes’s changes 2019-08-16 17:38:43 +03:00
Lior Halphon 9ba6915c85 ICD JOYP write API 2019-07-16 21:42:57 +03:00
Lior Halphon 346e499602 ICD APIs 2019-07-15 23:02:58 +03:00
Lior Halphon f55c254959 Fixed a regression that made ly_lyc_0_write and ly_lyc_write fail 2019-07-12 02:18:25 +03:00
Lior Halphon e268efefef Redesign and reimplement the audio API, let the frontends handle more stuff. Probably affects #161 2019-06-15 23:22:27 +03:00