Lior Halphon
bce413821d
Merge pull request #569 from SnowyMouse/gbenum-fix
...
Fix GB_ENUM on C++
2023-11-26 19:39:23 +02:00
Lior Halphon
5823bf9d70
Merge branch 'master' of github.com:LIJI32/SameBoy
2023-11-25 21:24:56 +02:00
Lior Halphon
ecbdb9e95e
Emulate several more pre-CGB-D channel 1 glitches
2023-11-25 21:24:46 +02:00
Snowy
8657d3e4b6
Fix GB_ENUM on C++
...
The else branch results in an error from defining a type in a cast.
2023-10-28 14:20:31 +02:00
Maximilian Mader
0ece951173
Fix memory corruption on removal of multiple cheats with the same address hash
2023-10-22 18:39:14 +02:00
Lior Halphon
e59bc436bd
CGB-C NR10 conflict improvements
2023-09-25 23:35:26 +03:00
Lior Halphon
340d4e0630
WIP: Fix APU regressions (CGB-D/E only so far)
2023-09-09 23:54:01 +03:00
Lior Halphon
5192e3a07b
Merge branch 'master' of github.com:LIJI32/SameBoy
2023-09-03 15:54:42 +03:00
Lior Halphon
d662407df0
Accurate emulation of NR10 write glitches
2023-09-03 15:54:37 +03:00
vailkyte
816cdf2c62
Force parsing order
2023-09-01 22:19:06 -05:00
Florian Märkl
6b6800445f
Fix oob reads in debugger command parsing
...
The length of only one of the operand strings was checked before the
memcmp in these cases, causing out-of-bounds reads when the other was
shorter.
This could be seen by compiling with ASAN and for example executing any
command longer than 2 characters.
2023-08-19 15:03:27 +02:00
Lior Halphon
12ad85355c
Build the iOS frontend without the debugger
2023-08-04 20:02:42 +03:00
Lior Halphon
a9ce9f538f
Experimental backstepping support
2023-08-04 19:54:14 +03:00
Lior Halphon
0b54eea084
Change the internal macro to use hidden, which guarantees a standard ABI
2023-08-04 19:53:52 +03:00
Lior Halphon
fb3db82d42
The Cocoa memory viewer new symbolicates the selection
2023-07-30 20:11:35 +03:00
Lior Halphon
aedb3e2332
Fix GB_debugger_evaluate not correctly returning the bank
2023-07-30 14:21:41 +03:00
Lior Halphon
048da6e6d1
Fixed a bug where accurate RTC emulation halted while SameBoy wasn't running
2023-07-29 22:27:50 +03:00
Lior Halphon
4ab256d896
Correct read emulation of the BANK register while still in the boot ROM
2023-07-29 16:08:26 +03:00
Lior Halphon
10d996330c
Inclusive ranges
2023-07-29 16:05:28 +03:00
Lior Halphon
29becc2870
Treat local and non-local symbols differently
2023-07-29 14:51:31 +03:00
Lior Halphon
d209628369
Fixed a bug where breakpoint and watchpoints would sometime stop working
2023-07-29 13:45:26 +03:00
Lior Halphon
323b6fafa8
Ranged breakpoints and watchpoints
2023-07-29 01:00:36 +03:00
Lior Halphon
dd1330d707
Breakpoints and watchpoints are now identified by a unique id rather than an address
2023-07-28 19:07:56 +03:00
Lior Halphon
61f3c8d7f3
Fixed an edge case where jump-to breakpoints did not work as expected/took the slow path
2023-07-28 00:49:31 +03:00
Lior Halphon
54f45f2fd3
Fix a bug where jump-to breakpoint disassembled the wrong address under certain scenarios
2023-07-28 00:47:15 +03:00
Lior Halphon
d93c1e501c
Remove outdated comments, PPU timings and and the STAT interrupt are no longer based on these sources
2023-07-08 00:55:59 +03:00
Lior Halphon
803abd9925
Halt and Stop trigger the OAM bug
2023-07-04 23:25:53 +03:00
Lior Halphon
49ec02b3b3
Replace cycle_oam_bug_pc with a generic call to cycle_oam_bug
2023-07-04 01:07:01 +03:00
Lior Halphon
e9be438d91
Turns out jr triggers the OAM bug, thanks Sono!
2023-07-04 00:21:57 +03:00
Lior Halphon
1b50856dcf
More of the same
2023-06-21 21:49:23 +03:00
Lior Halphon
207851bc56
Merge branch 'master' of github.com:LIJI32/SameBoy
2023-06-21 21:47:45 +03:00
Lior Halphon
57b50cab63
Work around bad Clang and GCC optimizations of inline compile-time consts (They can't be static before C23, which isn't supported by Clang)
2023-06-21 21:47:30 +03:00
Noah Sweilem
074d152a4e
Formatting fixes
2023-06-20 10:28:18 -07:00
Noah Sweilem
dad9e4b704
Formatting fixes
2023-06-20 10:28:01 -07:00
Noah Sweilem
9148b26bd8
Move `edge_triggered` variables into `gb->apu_output`
2023-06-20 10:25:25 -07:00
Noah Sweilem
4213524286
Fix swapped wave channel volume
2023-06-16 19:04:12 -07:00
Noah Sweilem
ae855d470d
Use different sample index for square channel edge trigger depending on duty cycle
2023-06-11 16:23:26 -07:00
Noah Sweilem
ec9536eede
Try a modified edge trigger detection for pulse and wave channels
2023-06-11 15:44:28 -07:00
Noah Sweilem
7bdf8dbe47
Add initial edge trigger detection method
...
- GB_get_channel_edge_triggered()
2023-06-11 15:27:31 -07:00
Noah Sweilem
5c7b1f01a3
Add som APU query methods for libsameboy
...
- GB_get_channel_volume()
- GB_get_channel_amplitude()
- GB_get_channel_period()
- GB_get_apu_wave_table()
2023-06-10 14:23:15 -07:00
Lior Halphon
fef175dcc6
Use #pragma once for include guards, use #import exclusively on Obj-C files
2023-06-09 14:44:57 +03:00
Lior Halphon
bed26daf73
Allow disabling SameBoy features when compiling as a library. Probably introduces some speed improvements to the Libretro core, as well as bsnes and BizHawk
2023-06-03 22:37:42 +03:00
Lior Halphon
d62132be38
These should be in defs.h
2023-06-03 21:54:01 +03:00
Lior Halphon
be171cfe66
Add a library target, complete with headers that strip implementation details out.
2023-06-03 14:39:21 +03:00
Lior Halphon
4254dcdb2c
Fix incorrect initial value of register IE when playing GBS files. Fixes #544
2023-05-12 17:57:20 +03:00
Lior Halphon
996ebaafa3
Use Oz for the frontend files, reduce some aggressive loop unrolling
2023-05-11 00:08:54 +03:00
Lior Halphon
40b7e25126
Accurate emulation of SVBK, fixes audio in Flyeyes (unlicensed game)
2023-05-10 00:55:04 +03:00
Lior Halphon
06621d1dfe
Fix GB_debugger_break on builds without the debugger
2023-05-10 00:54:34 +03:00
Lior Halphon
3e3ac23432
More likely/unlikely fun
2023-04-25 13:35:25 +03:00
Lior Halphon
32a419ad2e
Do not inline the slow path of frequently called functions
2023-04-25 13:08:19 +03:00
Lior Halphon
237e127b36
Add a comment
2023-04-11 12:37:13 +03:00
Lior Halphon
4421dedbb9
One last attempt
2023-04-11 12:33:10 +03:00
Lior Halphon
479c16e698
Try a better hint
2023-04-11 12:30:05 +03:00
Lior Halphon
aaba172c02
This might hint GCC 9 and make it suck less
2023-04-11 12:23:50 +03:00
Lior Halphon
5b37d3c402
Add a debugger reset command, with a frontend-handled reload option. Closes #537
2023-04-11 12:02:32 +03:00
Lior Halphon
7ac920d2be
Double speed STAT conflicts
2023-03-05 00:32:24 +02:00
Lior Halphon
502f64e6d7
Remove some old TODOs
2023-03-04 20:34:41 +02:00
Lior Halphon
e48eb3515d
More double speed write conflict updates
2023-02-28 01:00:57 +02:00
Lior Halphon
cc4baa1d28
LCDC write conflict emulation in double speed mode
2023-02-25 17:28:48 +02:00
Lior Halphon
f145f05f15
Timing adjustments to object line address calculation
2023-02-19 00:32:16 +02:00
Lior Halphon
29e920697a
Object aborts are DMG only, commit 34cf0f5
accidentally made them happen on CGB
2023-02-18 22:31:29 +02:00
Lior Halphon
22afa576c2
Fix incorrect timing adjustment on LCDC object abort
2023-02-18 20:42:23 +02:00
Lior Halphon
ef8f3aff66
A bit more correct
2023-02-11 21:56:03 +02:00
Lior Halphon
8dd5e6d9b8
Improved emulation of joypad switching delay
2023-02-11 20:21:24 +02:00
Lior Halphon
4f8b081f82
SDL cheats
2023-02-09 20:49:01 +02:00
Lior Halphon
f79f18704d
Improved cheats API, fixed incorrect GameShark imports
2023-02-09 19:49:40 +02:00
Lior Halphon
e1be593a65
Expose and use the built-in accessory type enum
2023-02-05 22:59:26 +02:00
Lior Halphon
30e2a7b7e4
Add thread safety assertions in debug
2023-02-05 19:51:11 +02:00
Lior Halphon
c8b3b080a8
Remove debugging code
2023-02-04 12:49:46 +02:00
Lior Halphon
830f2ddc38
Break save state compatibility. Windows save states should now work with non-Windows save states again.
2023-02-04 02:13:01 +02:00
Lior Halphon
65a646f050
Expose an API to reset the rewind buffer, explicitly reset on ROM changes
2023-02-02 00:18:01 +02:00
Lior Halphon
4c8f364ad7
Force the rewind buffer to reset after the save state size changes
2023-02-02 00:06:22 +02:00
Lior Halphon
c36c7126f8
Hack to not break save state compatibility
2023-02-01 23:47:25 +02:00
Lior Halphon
7f3b3879a0
Fix ROM size rounding when loading from buffer, make size rounding a function
2023-02-01 22:07:16 +02:00
Lior Halphon
d5ff93af3b
Emulate GB printer timer, letting one emulate the mini game in Hello Kitty Pocket Camera. Closes #290
2023-01-30 22:42:03 +02:00
Lior Halphon
c06e320b95
Fix the camera using the wrong aspect ratio on some Macs. Fix a bug that caused artifacts on the right and bottom edges of the camera image.
2023-01-29 23:19:26 +02:00
Lior Halphon
b032b89457
Banked breakpoints should not affect the boot ROM
2023-01-29 12:41:32 +02:00
Lior Halphon
b2bbd9cfdc
Camera emulation
2023-01-27 14:41:12 +02:00
Lior Halphon
1cc131227c
Fix mathematical error in temperature_tint
2023-01-21 01:25:51 +02:00
Lior Halphon
0549dc702c
Add an API to get the model from the state file
2023-01-15 19:15:45 +02:00
Lior Halphon
d9bf739f52
Remove auto-generated comments
2023-01-12 23:19:24 +02:00
Lior Halphon
aa8b7b0c03
Improved emulation of envelope locking, fixes #522
2023-01-10 01:19:07 +02:00
Lior Halphon
88e64fadda
More accurate and customizable timings
2023-01-06 19:06:22 +02:00
Lior Halphon
c92a2c2131
Writes affect the data bus too
2023-01-06 18:46:58 +02:00
Lior Halphon
7a390414ff
Improved accuracy of open bus behavior, merged with the HDMA open bus logic (it's the same bus)
2023-01-06 12:51:36 +02:00
Lior Halphon
0e6803aaa9
Add comment
2023-01-02 00:53:51 +02:00
Lior Halphon
bd6843444f
Emulate cart open bus behavior. Fixes #516
2023-01-01 22:59:16 +02:00
Lior Halphon
1247d00cbb
Minor cosmetic change
2022-12-30 17:32:36 +02:00
Lior Halphon
0d1f686d68
Farewell, manual line breaks
2022-10-22 18:20:05 +03:00
Lior Halphon
87a2b0c842
Give ticks an optional "keep" argument
2022-10-22 17:37:25 +03:00
Lior Halphon
5d5ff1702e
Add quick reset API ( Closes #506 )
2022-10-17 18:52:02 +03:00
Lior Halphon
9b202c670e
Was technically implementation defined
2022-10-17 14:34:55 +03:00
Lior Halphon
4180348567
Fix issues where finish and next did not behave as expected
2022-10-17 14:27:11 +03:00
Lior Halphon
eef8b8448c
That wasn't dead code, just another glitch. Fixes m3_wx_4_change_sprites
2022-10-16 23:57:19 +03:00
Lior Halphon
ac9e36bc1a
Fix assertion regression, fix window pixel insertion glitch regression, remove dead code. Closes #504
2022-10-16 18:19:43 +03:00
Lior Halphon
e49527eff8
Shifter and fetcher information in the debugger
2022-10-16 16:04:30 +03:00
Lior Halphon
ec6612d445
Fix DMA restart regression
2022-10-15 21:31:13 +03:00
Lior Halphon
36cf778232
Update the Cocoa debugger interface with buttons, add an interrupt command
2022-10-01 16:07:06 +03:00
Lior Halphon
98e986b48b
Oopsie
2022-09-18 13:30:36 +03:00
Lior Halphon
ea40a7be05
Fix DMA regression, fixes #495
2022-09-16 12:20:59 +03:00
Lior Halphon
14c4548325
Allow muting audio channels (Missing: SDL)
2022-09-11 15:53:07 +03:00
Lior Halphon
7917984376
Comments
2022-09-11 15:31:05 +03:00
Lior Halphon
c580c44ad3
Constant replacements
2022-09-10 14:55:19 +03:00
Lior Halphon
4f78e4b109
Guide users to use the 'help' command in the debugger, fix apu command line breaks
2022-09-09 15:59:03 +03:00
Lior Halphon
c368c77d28
Use names for LCDC bits
2022-08-28 20:31:50 +03:00
Lior Halphon
5194a41d99
Slight improvements to symbol hash performance
2022-08-28 16:48:20 +03:00
Lior Halphon
e7de1fccab
Support for MBC RAM was broken
2022-08-23 23:35:00 +03:00
Lior Halphon
9fcac76a03
New memory management APIs
2022-08-20 21:45:14 +03:00
Lior Halphon
58750424c7
Fully reset the MBC, for correct ROM switching. Fixes #489
2022-08-20 13:09:08 +03:00
Lior Halphon
9bf7e0b4df
More accurate sample repeat glitch, fixes #483
2022-08-14 17:43:28 +03:00
Lior Halphon
95773b9538
Make things const
2022-08-14 01:54:28 +03:00
Lior Halphon
52ab200544
Accurately emulate CGB first frame behavior. Fixes #432 , fixes #482
2022-08-09 00:54:31 +03:00
Lior Halphon
779ffe3e1b
Fix desaturation
2022-08-03 01:06:34 +03:00
Lior Halphon
7b5846fbaf
Build break
2022-07-31 01:16:03 +03:00
Lior Halphon
44618f75c4
Optimize the memory viewer, GB_INTERNAL no longer required
2022-07-31 00:32:40 +03:00
Lior Halphon
3f7bcb9af2
Rename several color correction modes, add a new accurate mode
2022-07-30 13:32:40 +03:00
Lior Halphon
0894c1dcda
Avoid rounding errors in color correction, minor optimization
2022-07-29 20:31:27 +03:00
Lior Halphon
e0436e33d4
Use gamma correct (and nearly gamma correct) color mixing
2022-07-25 19:55:31 +03:00
Lior Halphon
43e1e85179
Style
2022-07-25 19:11:41 +03:00
Lior Halphon
bcfe36897c
Color correction improvements
2022-07-24 23:57:29 +03:00
Lior Halphon
0c2772942e
Oops
2022-07-24 14:49:58 +03:00
Lior Halphon
dbd33684e8
Missed some switches
2022-07-24 14:34:32 +03:00
Lior Halphon
6f9da353bd
Add GBP model to the core (disables bouncing)
2022-07-24 14:22:49 +03:00
Lior Halphon
03f4f03661
Rename function
2022-07-24 13:56:33 +03:00
Lior Halphon
4b03cc05c1
Optimization to joypad code
2022-07-24 13:16:19 +03:00
Lior Halphon
0f31c7a1ba
Lag minimization bounce optimization
2022-07-24 02:35:46 +03:00
Lior Halphon
a524cc3105
Emulate key bouncing
2022-07-23 23:49:11 +03:00
Lior Halphon
33ba353c3a
Emulate the JOYP mode switching delay on the DMG
2022-07-23 19:29:23 +03:00
Lior Halphon
dd24801507
Merge pull request #476 from CasualPokePlayer/camera_improvements
...
Various GB Camera improvements
2022-07-23 13:24:50 +03:00
Lior Halphon
93c611e9bc
Values must be added to the end of a GB_SECTION for save state compatibility
2022-07-23 13:12:48 +03:00
CasualPokePlayer
bb8f973fb4
Implement GB Camera timing (when no webcam is connected), misc camera accuracy improvements, use GB_random instead of rand for noise_seed
2022-07-22 20:15:00 -07:00
Lior Halphon
f5f79f88ab
Insert the pixel at the correct position
2022-07-23 01:52:33 +03:00
Lior Halphon
f75f170448
Proper fix for WX=0 in the window pixel insertion glitch
2022-07-22 19:51:38 +03:00
Lior Halphon
029b7492b6
Fix WX=0 regression
2022-07-22 19:51:20 +03:00
Lior Halphon
537d0e1b25
Fix for WX=1-6
2022-07-22 18:55:48 +03:00
Lior Halphon
ee407f07f3
Better describe softbreak
2022-07-22 13:51:56 +03:00
Lior Halphon
1fedb81ab7
Emulate window pixel insertion glitch, fixes Star Trek - 25th Anniversary, closes #278
2022-07-22 00:27:21 +03:00
Lior Halphon
08549c1395
Typo
2022-07-19 02:19:31 +03:00
Lior Halphon
541dbc5db3
One last try
2022-07-19 01:52:38 +03:00
Lior Halphon
110deee6f8
Oops
2022-07-18 23:22:23 +03:00
Lior Halphon
09cbf6a13f
Fix GCC C++ warning? #464
2022-07-18 22:19:10 +03:00
Lior Halphon
7071032288
Improved MMM01 emulation, fixes #447
2022-07-02 21:03:26 +03:00
Lior Halphon
1065a40d8f
Add rX as symbol aliases to IO_X
2022-07-01 17:40:47 +03:00
Lior Halphon
96d127e160
Remove the SLD command, reorder debugger commands
2022-07-01 16:14:52 +03:00
Lior Halphon
52a4c09855
More accurate PPU/OAM-DMA conflicts, artifacts in "It Came from Planet Zilog" should match hardware now
2022-06-25 20:08:59 +03:00
Lior Halphon
6a24598266
Grammar
2022-06-25 15:55:42 +03:00
Lior Halphon
aaf9a76b67
The vblank callback now reports the vblank type
2022-06-25 01:59:51 +03:00
Lior Halphon
58df8144ec
Fix audio artifacts in the SGB jingle
2022-06-25 01:44:50 +03:00
Lior Halphon
22f8ab6509
Last fix was wrong, this is correct
2022-06-17 18:17:29 +03:00
Lior Halphon
517f455486
Theorized HDMA behavior proven wrong
2022-06-17 15:58:37 +03:00