Commit Graph

318 Commits

Author SHA1 Message Date
Lior Halphon ac29b4391e Refactor FIFOs 2022-05-07 19:27:25 +03:00
Lior Halphon 36e2896ec7 Fix a regression while emulating object size change during fetch 2022-05-04 00:23:55 +03:00
Lior Halphon a4209b47d0 Be consistent with hex casing 2022-02-13 16:58:44 +02:00
Lior Halphon 97c758ba75 More accurate internal bus behavior 2022-02-06 13:02:15 +02:00
Lior Halphon 4e27558ac2 Mode 2 OAM open bus behavior 2022-02-05 18:50:33 +02:00
Lior Halphon 850e7bb78c Fixed obscured object indication in the OAM viewer API 2022-02-05 17:44:10 +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 7c5704621a Don't batch during stop mode 2022-02-03 22:34:14 +02:00
Lior Halphon 76b881c2e1 More accurate HDMA during halt 2022-02-02 23:01:38 +02:00
Lior Halphon 1a41957b3c LCDOff behavior, basic halt/stop behavior 2022-01-31 01:02:31 +02:00
Lior Halphon 44ee6dc73f HDMA timing 2022-01-30 20:09:58 +02:00
Lior Halphon a7f7530eed Preparation for future AGB-0 and B support 2022-01-30 18:11:35 +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 81e2ec08e0 Oops 2022-01-23 22:07:15 +02:00
Lior Halphon aa5a279116 Halt during DMA with objects 2022-01-23 21:05:29 +02:00
Lior Halphon 0ab7bf7749 VRAM conflicts during halt/stop on a CGB 2022-01-22 22:52:34 +02:00
Lior Halphon e903333c7e Add TODO 2022-01-17 22:56:13 +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 5088bd0959 Redundant OR 2022-01-16 00:16:06 +02:00
Lior Halphon ffa53eda20 DMA during mode 3 emulation 2022-01-14 17:09:39 +02:00
Lior Halphon 4ce8e77796 More accurate OAM access timings 2022-01-14 15:07:50 +02:00
Lior Halphon c4a14ac4db Simplify DMA code, fix DMA read timing 2022-01-12 00:26:18 +02:00
Lior Halphon 8df572f92e Comment fix 2022-01-09 15:30:33 +02:00
Lior Halphon b7f03dea8d Add CGB-A support 2022-01-05 21:55:46 +02:00
Lior Halphon 5c17c0ec3b unreachable fun 2022-01-03 17:17:35 +02:00
Lior Halphon db50462710 More accurate fix 2021-12-26 23:24:08 +02:00
Lior Halphon 6ffe924637 This is probably better but still wrong 2021-12-26 21:43:54 +02:00
Lior Halphon d178ece909 Disabled an incorrectly emulated portion of the TILE_SET glitch 2021-12-26 19:57:18 +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 c3d9141b7c Replace the term sprite with object for consistency 2021-12-17 21:16:23 +02:00
Lior Halphon c1ae129ed4 Allow hiding background/object "layers" (#422) 2021-12-17 21:12:26 +02:00
Lior Halphon f78fac12c2 Fixed several issues involving LY change timing, as well as an LYC issue in models prior to CGB-D 2021-12-14 20:27:38 +02:00
Lior Halphon a30247cf16 LCD line callback (for #422) 2021-12-10 19:49:52 +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 f08f16346e Fix #293 2021-11-24 23:13:52 +02:00
Lior Halphon fbf1bb7f98 Save state compatibility breaking cleanup 2021-11-07 12:56:46 +02:00
Lior Halphon f237b1e9b9 CGB-0 support 2021-11-04 00:35:44 +02:00
Lior Halphon 93ef8d7db8
Merge pull request #411 from SnowyMouse/sprite_h
Fix partially offscreen sprites not being returned in GB_get_oam_info
2021-10-27 01:44:26 +03:00
Lior Halphon e6c4ceaf5a Add CGB-D support 2021-10-27 01:40:28 +03:00
Snowy 2ec573c84a Change y to a signed value 2021-10-24 11:15:28 -05:00
Lior Halphon c05c3c2abd Improved accuracy of mid-line SCX writes 2021-10-08 19:36:05 +03:00
Lior Halphon 94add1d172 Add "Harsh Reality" color correction mode 2021-06-25 19:57:56 +03:00
Lior Halphon 23e8cc58c5 Vblank should occur 1 T-cycle later 2021-06-19 02:14:16 +03:00
Lior Halphon 339613263c Fixed a bug that prevented STAT interrupt blocking from functioning correctly in the transition to VBlank while the OAM interrupt was disabled 2021-06-18 01:20:05 +03:00
Lior Halphon ba6e22dfc0 Merge branch 'bess' into gbs 2021-04-14 16:44:51 +03:00
Lior Halphon 976f5e4d02 Merge branch 'master' into bess 2021-04-13 20:50:29 +03:00
Lior Halphon 44c75ae7be Remove commented out code 2021-04-10 18:43:24 +03:00
Lior Halphon bb3a73ff88 Cocoa GBS Player 2021-04-03 01:29:43 +03:00
Lior Halphon e460b0a7b4 Change the border format to SNES-style 2021-03-31 00:54:55 +03:00
Lior Halphon 8adaba237e SGB support in BESS, BE fixes, changes to SGB save state format on BE machines 2021-03-29 02:47:57 +03:00
Lior Halphon 71c88323b7 Rename UNROLL to unrolled (`unrolled for`) 2021-02-22 14:45:30 +02:00
Lior Halphon 159d9d0348 Color temperature control 2020-12-25 14:17:57 +02:00
Lior Halphon b5a611c5db More accurate color correction curves 2020-12-24 23:17:20 +02:00
Lior Halphon 66f62d696c More window fixes 2020-12-24 20:50:47 +02:00
Lior Halphon 8f64f49c3b More accurate emulation of window timing, actual correct fix of #123 2020-12-23 23:49:57 +02:00
Lior Halphon 67c0e03f3b Fix a window bug in CGB mode, fixes #123 2020-11-22 00:21:19 +02:00
Lior Halphon 7fdc58a07e Implement CGB-mode TILE_SEL mixing, fixes cgb-acid-hell and m3_lcdc_tile_sel_change2, closes #308 2020-11-20 16:24:16 +02:00
Lior Halphon fa7232944f Better emulation of CGB’s first frame behavior 2020-05-30 01:25:21 +03:00
Lior Halphon ffa569deeb Partial emulation of reading VRAM right after mode 3 2020-05-29 23:10:23 +03:00
Lior Halphon 17dfe0dd6a Fix minor CGB-C regression 2020-05-29 16:30:40 +03:00
Lior Halphon 6448a692e2 Add smart rumble to games without a rumblepak 2020-04-29 16:06:11 +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 695c6ee943 Don't crash if a naughty frontend runs the boot ROM without a ROM 2020-04-11 19:21:00 +03:00
Lior Halphon a6567d9ee1 Update old coding style 2020-04-09 14:32:52 +03:00
Lior Halphon 5ecb845662 Add accurate frame blending option 2020-03-26 20:54:18 +02:00
Lior Halphon e94e7cc501 Add another color correction mode 2020-03-25 20:33:13 +02:00
Lior Halphon c6f9d05124 Emulate LCD-PPU horizontal desync on DMGs 2020-03-06 14:41:13 +02:00
Lior Halphon 4d2f56c42d Minor bug fix 2020-03-04 23:43:05 +02:00
Lior Halphon 1c7351fc85 Missing braces 2020-03-04 23:34:36 +02:00
Lior Halphon 409ab2a6d4 Accurate emulation of tilemap advancement timings 2020-03-03 02:21:19 +02:00
Lior Halphon e846f4f3b0 Hacky, but correct emulation of WX=166 2020-03-01 23:58:28 +02:00
Lior Halphon 2a8b26d5e6 Add TODO 2020-03-01 00:23:50 +02:00
Lior Halphon b7194402eb Accurately emulate Window X = Object X 2020-03-01 00:17:45 +02:00
Lior Halphon 5ca602fbd2 WX=0 emulation 2020-02-29 18:26:16 +02:00
Lior Halphon 39b999a68b Emulate the FIFO insertion glitch (WX variant) 2020-02-29 17:06:08 +02:00
Lior Halphon 955860b463 Get rid of the FIFO pause flags 2020-02-28 22:36:51 +02:00
Lior Halphon e29246fd91 Window tile is reset on WX trigger 2020-02-28 18:28:47 +02:00
Lior Halphon 2a8f15c68b The fetcher pushes pixels to the FIFO as soon as it's empty 2020-02-28 18:10:09 +02:00
Lior Halphon 0c716bd970 More accurate timing emulation of window-objects interaction 2020-02-27 23:42:16 +02:00
Lior Halphon 89303ab046 WX access conflicts 2020-02-27 00:12:42 +02:00
Lior Halphon 9c7a8fdb1b WY is tested every cycle 2020-02-26 22:24:08 +02:00
Lior Halphon b37a0b285a Window Y still advances if WX=166 2020-02-24 23:59:18 +02:00
Lior Halphon 7456beb7b9 Better emulation of negative WX positions 2020-02-24 21:23:06 +02:00
Lior Halphon 248e7bc332 Timing improvements 2020-02-24 20:46:00 +02:00
Lior Halphon 3864ff37e1 Timing improvements 2020-02-24 00:32:47 +02:00
Lior Halphon c22611c701 Minor bugfix 2020-02-23 23:48:08 +02:00
Lior Halphon c0ba898ef2 Basic window implementation 2020-02-23 23:16:45 +02:00
Lior Halphon 2be58439bf Starting over – removing all window related code 2020-02-23 00:38:47 +02:00
Lior Halphon d8282fe3c9 Please pretend the last commit never happened 2020-02-22 00:45:52 +02:00
Lior Halphon 39b88d546b The upper bits of SCX might mid-line 2020-02-21 21:59:03 +02:00
Lior Halphon ea2f32b255 The fetcher state machine advances even while handling an object 2020-02-21 21:44:44 +02:00
Lior Halphon 8409d3bcfb Emulate changing sprite height mid-fetch 2020-02-21 16:43:51 +02:00
Lior Halphon 7d51ba3d97 More fixes, SGB emulation of the same quirk 2020-02-21 16:16:02 +02:00
Lior Halphon 91404edd13 Disgusting hacks to emulate disabling objects while an object is being fetched 2020-02-21 15:14:33 +02:00