Lior Halphon
ab5611119a
Accuracy improvements, especially to the length control
2017-08-02 21:14:23 +03:00
Lior Halphon
d65c2247e5
Added channel 1 and 2, fixed accuracy issues with channel 3
2017-07-27 23:11:33 +03:00
Lior Halphon
2936f7fa57
Fixed channel 3 counter behavior, verified with new tests. The DIV register ticks the APU at 512Hz.
2017-07-22 19:51:11 +03:00
Lior Halphon
a19ee1e5e0
2MHz audio downscaling support. Implemented NR50 and NR51.
2017-07-21 23:17:48 +03:00
Lior Halphon
baccf336d7
Complete rewrite of the APU. Channel 3 is complete and passes all the relevant tests from blargg’s suite, as well as PCM34-based tests. Actual sound output is basic and limited, though.
2017-07-21 19:06:55 +03:00
nattthebear
eb7492c6c6
Fix undefined behavior (sequence point modification). GCC 4.6.4 compiles the code incorrectly without this fix.
2017-07-16 21:08:07 -04:00
Lior Halphon
c4ccbd5cce
Improved serial interrupt timing, fixes boot_sclk_align.
2017-06-23 17:58:04 +03:00
Lior Halphon
c59272d46d
Misc minor fixes, fixes several Mooneye-GB tests
2017-06-21 20:39:23 +03:00
Lior Halphon
efbc385417
Forgot to amend the last commit, it was broken.
2017-06-21 01:07:11 +03:00
Lior Halphon
aefca34b39
Improved MBC1 emulation. Fixed incorrect error messages.
2017-06-19 19:46:09 +03:00
Lior Halphon
abf7efcc5a
Fixed lcdon_write_timing.
2017-06-18 21:27:07 +03:00
Lior Halphon
86c9f9d89d
Updated SameBoy to pass Mooneye-GB’s lcdon_timing test (on a DMG), as well as refined related CBG behaviors.
2017-06-17 22:17:58 +03:00
Lior Halphon
babcc0a7dc
Added API to load/save states from RAM
2017-06-14 00:23:34 +03:00
Lior Halphon
144d0348dd
Loading a save state creating during the effect of the previous MBC RAM bug will now attempt to fix the (broken) save state.
2017-06-08 23:26:04 +03:00
Lior Halphon
c650337928
Fixed a bug where MBC RAM was no longer accessible after using the GB_reset functions
2017-06-08 22:48:23 +03:00
Lior Halphon
a9475fbdf4
Refined the behavior of the last fix on a DMG.
2017-06-03 20:06:52 +03:00
Lior Halphon
65b0dcb2c5
Fixed a bug where SameBoy freeze for a moment after leaving turbo mode
2017-06-03 17:02:12 +03:00
Lior Halphon
d72807dd67
Implemented LCD first-frame-skip behavior, fixes a visual glitch in Pokémon Pinball
2017-06-03 16:42:42 +03:00
Lior Halphon
48acc09e91
Fixed the first item in the backtrace command
2017-06-03 16:19:39 +03:00
Lior Halphon
22ee6f6ca2
Fixed incorrect calculation in rendering timing. Fixes some of the issues in Prehistorik Man (and doesn’t break GBVideoPlayer)
2017-05-31 23:58:14 +03:00
Lior Halphon
9b89d76b3b
Todo cleanup
2017-05-27 17:30:12 +03:00
Lior Halphon
096bd8ba94
Merge branch 'sdl2'
2017-05-27 12:30:25 +03:00
Lior Halphon
a01ea29cf1
The first entry in the backtrace command is now in the same format as the rest
2017-05-26 20:21:39 +03:00
Lior Halphon
7d88ee00cc
Added side view to Cocoa debugger
2017-05-26 20:16:19 +03:00
Lior Halphon
ece1a11a23
SDL port: GUI-based error reporting, added help dialog (? on macOS, F1 on everything else)
2017-05-25 23:28:48 +03:00
Lior Halphon
4d5dc6a30e
Cleanup
2017-05-24 21:44:43 +03:00
Lior Halphon
bef89c6604
Upgraded Sameboy-SDL to SDL2, fixed Windows build, fixed save states in SDL, added reset and mute to SDL. The SDL port now renders via OpenGL.
2017-05-21 21:45:19 +03:00
Lior Halphon
6dd24e0733
Fixed hung note issue. Closes #7
2017-05-13 17:04:05 +03:00
Lior Halphon
86332d0311
Modifying WX and WY outside of VBlank is now more accurate, but still requires more research. Closes #6 .
2017-05-12 19:33:42 +03:00
Lior Halphon
00623d4eea
- Added audio supersampling support to greatly improve audio quality.
...
- Fixed a bug where low sampling rate or disabled sound resulted in wrong APU behavior.
- Added API to get the current number of pending samples.
- This change broke save state compatibility with v0.8 and older
Closes #8 .
2017-05-12 17:11:55 +03:00
Lior Halphon
b858f17425
Added the GB_run_frame API; closes #5 .
2017-04-25 00:19:10 +03:00
Lior Halphon
22d3510dde
Added LCD command to the debugger
2017-04-22 14:55:17 +03:00
Lior Halphon
c766704267
More accurate FPS capping that tracks time correctly even when the screen is off. Should also support restarting the LCD during blank to increase FPS to 63.
2017-04-21 16:00:53 +03:00
Lior Halphon
fb55c35f87
New APIs, Document.m no longer requires GB_INTERNAL, fixed a bug where the sprite viewer showed incorrect sprites for some CGB exclusive games.
2017-04-19 23:26:39 +03:00
Lior Halphon
3feaeb153e
New turbo related APIs, Quick Look no longer requires GB_INTERNAL
2017-04-19 21:55:58 +03:00
Lior Halphon
a925ef130d
Stabilizing API: New joypad, debugger and reset APIs; internal APIs and direct struct access are no longer available without defining GB_INTERNAL. The SDL port uses the new “public” APIs, as well as most of the non-debug Cocoa code.
2017-04-17 20:16:17 +03:00
Lior Halphon
0b1e2784cd
Fixed saves and save states not working correctly on Windows
2017-03-24 14:39:39 +03:00
Lior Halphon
4bf391b1c8
SCX now effects Mode 3’s length. Fixes hblank_ly_scx_timing-GS
2017-02-25 23:30:31 +02:00
Lior Halphon
55e54d9499
Refinements to DMG STAT write interrupt bug. Fixes stat_irq_blocking on DMG.
2017-02-25 21:56:46 +02:00
Lior Halphon
dbd04f09e8
HBlank HDMA should start instantly when starting during HBlank. Fixes 3-D Ultra Pinball.
2017-02-25 15:42:59 +02:00
Lior Halphon
724153e5ef
Minimal attempt to be compatible with ROMs without correct headers
2017-02-24 15:14:47 +02:00
Lior Halphon
3d99773ddb
Changed how the Cocoa port initializes GB_gameboy_t
2017-02-24 15:14:00 +02:00
Lior Halphon
319857db89
Fixed window behavior
2017-02-24 00:59:07 +02:00
Lior Halphon
a420cfd798
HUC1’s RAM Enable only controls writing
2017-02-23 00:27:08 +02:00
Lior Halphon
c5ce14dad1
Prevent Hblank HDMAs when the LCD is off
2017-02-21 22:33:09 +02:00
Lior Halphon
f4a364c3db
It seems like STAT’s LYC flag should be on while the screen is off.
2017-02-21 21:31:52 +02:00
Lior Halphon
fed3b4f9cd
Symbolicate LDH instructions
2017-02-21 21:31:22 +02:00
Lior Halphon
aca7687edd
Fixed a bug where LYC would be compared to the wrong value in the first cycle of a frame
2017-02-20 22:52:34 +02:00
Lior Halphon
91513ced22
Minor adjustment to LCD timing after enabling it.
2017-02-20 14:20:45 +02:00
Lior Halphon
399e88d5fe
STAT timing and LCD interrupts rewritten, should be more accurate.
2017-02-19 02:22:50 +02:00
Lior Halphon
74d00b84b7
Treat STOP as a 2-byte instruction
2017-02-17 00:21:02 +02:00
Lior Halphon
6b1363e96e
Fixed: Writing to 3XXX in MBC5 before writing to 2XXX no longer switches to the wrong bank.
2017-02-16 23:13:55 +02:00
Lior Halphon
421d3b27f5
Correct emulation of HUC1 banks higher than 0x1F
2017-02-16 21:07:35 +02:00
Lior Halphon
10ab2b4fe0
Fixed typo in the disassembler.
2017-02-16 20:51:32 +02:00
Lior Halphon
3fbc2c5716
DI should not be delayed.
2017-02-15 19:04:53 +02:00
Lior Halphon
4b6fda0cb6
Simplified HDMA and fixed the reading of the HDMA5 register
2017-02-08 21:58:15 +02:00
Lior Halphon
d5c9a52337
Fixed: HDMA registers were not being updated during transfer
2017-02-07 00:24:26 +02:00
Lior Halphon
eed8a06fc0
Several fixes to the help command
2017-02-04 19:00:31 +02:00
Lior Halphon
57c73c8a51
Fixed the help command for the disassemble command
2017-02-04 17:49:22 +02:00
Lior Halphon
517e72f92b
Printer compression support
2017-01-20 23:00:02 +02:00
Lior Halphon
527ae01e0e
Printer API, compression not supported yet
2017-01-13 22:20:11 +02:00
Lior Halphon
cd382ef236
Fixed: Conditional read watchpoints crashed if the expression referred to the 'new' variable. Breakpoint and watchpoint conditions no longer trigger watchpoints.
2017-01-12 23:11:26 +02:00
Lior Halphon
8c14ec3268
An interrupt should also occur when using external clock.
2016-11-13 00:42:05 +02:00
Lior Halphon
22c34e1095
Serial API
2016-11-12 01:58:53 +02:00
Lior Halphon
388fb600de
Added VRAM-debugging APIs, added VRAM viewer to Cocoa Port, fixed uninitialized VRAM, fixed memory viewer crash
2016-10-27 00:23:24 +03:00
Lior Halphon
47aaf44017
Rumble API
2016-10-22 15:37:03 +03:00
Lior Halphon
2d51d13479
Various optimizations
2016-10-22 02:18:29 +03:00
Lior Halphon
1b8832a7ff
Added disassemble command
2016-10-19 23:55:23 +03:00
Lior Halphon
ee51dec20e
Added modifier syntax to debugger: Changed watch's syntax, added format modifier to print/eval, added count option to examine command.
2016-10-19 23:48:46 +03:00
Lior Halphon
edf93abff1
According to Mooneye's test ROMs, this behavior does not happen on a CGB
2016-10-18 00:31:07 +03:00
Lior Halphon
11f8c41305
Basic HUC3 support
2016-10-17 18:51:43 +03:00
Lior Halphon
9ca7540c69
Fixed dereferencing a non-banked address in the debugger
2016-10-14 01:19:39 +03:00
Lior Halphon
fa35869bc4
Implemented DMG STAT-write interrupt bug, fixed Road Rash and Zero no Densetsu (These game do not work on CGBs)
2016-10-11 13:37:43 +03:00
Lior Halphon
76c795a966
Whoops.
2016-10-04 04:01:06 +03:00
Lior Halphon
90b7383df7
The camera's get pixel callback must return the same value for every coordinate until a new photo is taken.
2016-10-03 23:05:47 +03:00
Lior Halphon
2d06599a85
Edge enhancement support
2016-10-03 19:39:20 +03:00
Lior Halphon
8941504863
Refinements to camera support according to AntonioND's docs
2016-10-03 18:24:15 +03:00
Lior Halphon
dd23fffcc0
Proper (I believe) emulation of most GameBoy Camera registers
2016-10-03 14:22:54 +03:00
Lior Halphon
2a84d62187
Forbid reading the image while the camera is busy
2016-10-03 01:29:54 +03:00
Lior Halphon
479a64dca6
Dither using a pattern, closer to actual GameBoy Camera
2016-10-02 23:36:20 +03:00
Lior Halphon
de7c15fc68
Another camera API bugfix
2016-10-02 18:33:33 +03:00
Lior Halphon
9c68ac1419
Camera API bugfix
2016-10-02 18:14:05 +03:00
Lior Halphon
ab5f66795a
Gameboy Camera API
2016-10-02 17:14:58 +03:00
Lior Halphon
b3b041a151
Basic GB Camera support (Emulate only MBC, enough for the ROM to boot).
2016-10-02 03:40:11 +03:00
Lior Halphon
9b71454f07
Basic HUC1 support (Emulated as MBC1)
2016-10-02 02:15:03 +03:00
Lior Halphon
4904277f0d
Corrected behavior of palette registers in DMG mode. This affected a broken Game & Watch Gallery 2 ROM that was previously used in the automation test.
2016-10-01 22:10:44 +03:00
Lior Halphon
80a1b12ae7
Added palette command to the debugger
2016-10-01 22:08:34 +03:00
Lior Halphon
4a2bec239a
MBC2 RAM support was completely broken.
2016-09-30 23:34:06 +03:00
Lior Halphon
5565c096c7
Misc optimizations, especially for the tester
2016-09-30 01:09:44 +03:00
Lior Halphon
3ac3eccebb
Bugfix: Multiple watchpoints did not work correctly and conflicted with breakpoints
2016-09-30 01:09:17 +03:00
Lior Halphon
258500bda3
Merge branch 'master' into rateless_apu
2016-09-23 18:53:38 +03:00
Lior Halphon
52ed2ca55e
Corrected BG enable's behavior (Fixes visual glitch with Krusty's Funhouse)
2016-09-23 18:30:07 +03:00
Lior Halphon
42c01a21b2
Fixed crash when accessing MBC RAM on a cartridge that "has RAM", but it's 0-sized.
2016-09-22 01:52:40 +03:00
Lior Halphon
0991705379
Refined HALT bug behavior, fixed Robocop
2016-09-22 01:51:09 +03:00
Lior Halphon
bc3cab7dfa
Forbid pressing two opposing direction keys. Fixes Pocket Bomberman (U).
2016-09-21 02:15:02 +03:00
Lior Halphon
252439c1af
Fixed a deadlocking race condition that might happen when reading APU memory in the hex viewer
2016-09-21 01:59:43 +03:00
Lior Halphon
c40b86d4a4
Merge branch 'master' into rateless_apu
2016-09-21 00:23:59 +03:00
Lior Halphon
6f2b36cacb
The HALT bug also happens on CGBs, regardless of DMG mode.
2016-09-20 22:59:25 +03:00
Lior Halphon
f88c9d299b
Merge branch 'master' into rateless_apu
2016-09-20 20:05:03 +03:00
Lior Halphon
f46414b7b1
Updated struct version :(
2016-09-20 20:04:38 +03:00
Lior Halphon
37e895352f
Volumes no longer doubles
2016-09-20 19:58:30 +03:00
Lior Halphon
f049284324
Emulate the HALT bug on a DMG
2016-09-20 01:22:21 +03:00
Lior Halphon
1a3a96762b
CPU cleanup
2016-09-18 23:50:04 +03:00
Lior Halphon
ed31358934
Forgot to emulate LCDC bit 0!
2016-09-18 21:00:05 +03:00
Lior Halphon
fe51805ed7
Incorrect constant name
2016-09-16 18:24:38 +03:00
Lior Halphon
f4c5cf20bc
Cleanup of ret_cc
2016-09-16 13:27:32 +03:00
Lior Halphon
71d4ba21f2
Added a tick-counting debugger command
2016-09-16 11:58:31 +03:00
Lior Halphon
4beb946468
Slight APU optimization
2016-09-14 22:49:35 +03:00
Lior Halphon
f274cbc2ec
Read wave form while playing
2016-09-13 17:40:10 +03:00
Lior Halphon
594aea2d5a
APU is now being run lazily
2016-09-13 17:33:48 +03:00
Lior Halphon
eefc998e43
Removed for loop in APU
2016-09-13 17:06:35 +03:00
Lior Halphon
ff7b8a6854
Removed doubles, reorganized code a bit
2016-09-13 16:57:16 +03:00
Lior Halphon
b95860c034
Making the APU independent of sample rate
2016-09-13 16:55:26 +03:00
Lior Halphon
43be91f032
Slightly more readable code.
2016-09-13 01:20:18 +03:00
Lior Halphon
95cfb114a2
Properly setting MBC RAM
2016-09-10 13:25:18 +03:00
Lior Halphon
6d836b9f48
Fixed APU bug that prevented some games from working
2016-09-10 02:20:44 +03:00
Lior Halphon
62ecadeb57
Fixed another reset-while-debugging deadlock in Cocoa
2016-09-07 00:37:11 +03:00
Lior Halphon
01fc137256
Fixed an APU issue that might occur when having more than one GB_gameboy_t object
2016-09-06 22:36:16 +03:00
Lior Halphon
603b8969ab
Correct (disconnected) serial emulation.
2016-09-06 13:13:14 +03:00
Lior Halphon
a6c5a8fdaa
Fixed a bug that caused the Cocoa port to freeze sometimes if the emulator was reset while debugging.
2016-09-03 13:34:49 +03:00
Lior Halphon
a2d77b1754
Warn about unsupported cartridges/MBCs
2016-09-03 04:00:37 +03:00
Lior Halphon
a746c726ee
Added basic automatic ROM tester
2016-09-03 03:39:32 +03:00
Lior Halphon
ee4907949b
Support for RTC latching. Fixes #4 .
2016-08-21 22:33:57 +03:00
Lior Halphon
e7626535a8
Initial Windows support
2016-08-20 17:51:17 +03:00
Lior Halphon
0734e990b3
Memory viewer now has a Goto command, different memory space modes, and allows viewing/editing specific banks
2016-08-19 14:54:54 +03:00
Lior Halphon
f9236d12bf
Improvements to the help command and general debugger usability.
2016-08-13 22:52:41 +03:00
Lior Halphon
806d0775a4
Added backtrace command to debugger
2016-08-09 22:48:53 +03:00
Lior Halphon
bebb5c7a41
Correctly emulating the unused OAM memory in DMG mode
2016-08-06 18:58:44 +03:00
Lior Halphon
cc8664b0a8
Correctly emulating a disconnected serial cable
2016-08-06 18:57:33 +03:00
Lior Halphon
af10e07ed7
Initing OBP0/1 correctly
2016-08-06 18:57:13 +03:00
Lior Halphon
e95d2c4abe
Fixed DI instruction on CGB
2016-08-06 17:16:38 +03:00
Lior Halphon
d03a1fbd16
Fixed TMA writing while reloading.
2016-08-06 14:36:33 +03:00
Lior Halphon
85a33ed8ef
Emulating DMA delay correctly
2016-08-06 14:24:43 +03:00
Lior Halphon
4a50000e83
Corrected timing for many instructions
2016-08-06 14:00:35 +03:00
Lior Halphon
8dd5462525
Correct DMA timing
2016-08-06 13:57:38 +03:00
Lior Halphon
0f98ac5ff9
Emulate TIMA reloading
2016-08-06 13:56:29 +03:00
Lior Halphon
55cbe5d4d0
Accuracy improvements to timers
2016-08-06 00:24:12 +03:00
Lior Halphon
d098458ee4
Major improvements to accuracy: Fixed instruction timing, DMA timing, and IO reg masking. Passes most of mooneye-gb acceptance tests.
2016-08-05 16:36:38 +03:00
Lior Halphon
47e3300b66
Improved DMA accuracy, mooneyegb test ROMs no longer crash miserably. (but still fail)
2016-08-03 23:31:10 +03:00
Lior Halphon
fad1007427
Merge branch 'master' of https://github.com/LIJI32/SameBoy
2016-08-03 22:28:28 +03:00
Lior Halphon
e6d4cac00e
Fix logical bug when changing watchpoint flags
2016-07-21 15:20:25 +03:00
Lior Halphon
185e71fe12
Improvements to IR API, since timing is VERY important
2016-07-21 01:03:13 +03:00
Lior Halphon
1d35c04ab1
Infrared API
2016-07-18 22:11:18 +03:00
Lior Halphon
da0911d69b
Fixed SDL crash
2016-07-18 14:30:21 +03:00
Lior Halphon
b30822fd0b
Async commands in SDL port, better handling of ^C and ^D
2016-07-18 13:10:19 +03:00
Lior Halphon
aa6438fa06
Async debugger commands
2016-07-18 00:46:45 +03:00
Lior Halphon
a68b06226a
Fixed crash on free
2016-07-15 23:20:14 +03:00
Lior Halphon
eaca0634aa
Reading and writing absolute addresses in the expression evaluator.
2016-07-15 17:06:46 +03:00
Lior Halphon
e20e81befd
Symbol support in the expression evaluator
2016-07-15 14:31:27 +03:00
Lior Halphon
c3a831db7d
Debugger's pc "variable" now returns a full address
2016-07-14 23:27:48 +03:00