Commit Graph

881 Commits

Author SHA1 Message Date
Raphaël Zumer 0092937148 Rename SRAMFlash to SRAMFlashState 2019-12-10 16:36:00 -05:00
Raphaël Zumer 4d1f3d419e Clarify comments and credit DeSmuME for Flash I/O 2019-12-10 09:57:15 -05:00
Raphaël Zumer 68d3474458 Fix GBA Flash read/writes and clean up 2019-12-09 07:37:09 -05:00
Raphaël Zumer 8fc9a33a9f Implement GBA cartridge Flash reading and writing 2019-12-09 06:10:26 -05:00
Raphaël Zumer 5a7600dc79 Fix "é" character encoding in NDS.cpp 2019-12-09 06:09:52 -05:00
Raphaël Zumer 4e8b0c8ce4 Eject GBA cartridges on stop from the UI 2019-12-09 06:09:30 -05:00
Raphaël Zumer 5ad85f15c1 Add a framework to support non-SRAM GBA saves
The support is not yet there, but at least
we should not read or write bogus data.
2019-12-09 04:58:54 -05:00
Raphaël Zumer 86b746dd1c Remove unused Write function in NDSCart 2019-12-09 04:51:59 -05:00
Raphaël Zumer 62b9f51e23 Handle GBA cartridge SRAM writes 2019-12-08 21:20:01 -05:00
Raphaël Zumer 48a8a25548 Reset GBA cartridge state when loading a new ROM 2019-12-08 17:13:56 -05:00
Raphaël Zumer 91bf62a1d4 Keep GBA carts loaded when booting to firmware 2019-12-08 15:55:06 -05:00
Raphaël Zumer 1da9b3806c Hook up the GBA slot to the UI
A GBA cartridge may be loaded in the same
way as a DS cartridge. If the extension of
the selected file is "gba", it will be treated
as a GBA file. The system boot logic is still
centered around the DS cartridge, so loading
a GBA file will not start or reset it.
2019-12-08 15:31:20 -05:00
Raphaël Zumer 968768042e Properly init/deinit the GBA slot 2019-12-08 15:30:56 -05:00
Raphaël Zumer d86ee1d5bf Add GBA cart model and allow reading from it 2019-12-08 15:30:07 -05:00
Raphaël Zumer f21347c918 Fix GBA memory values on deselected CPU
Previously, the GBA memory was 0xFF-filled
on both CPUs. However, GBATEK reports that
the deselected CPU is 0x00-filled, and that
some titles depend on this behavior to
function properly.
2019-12-08 12:33:02 -05:00
Nadia Holmquist Pedersen 23bca8c17a Tell the user where to place romlist.bin if it can't be found for UNIX non-portable builds. 2019-12-05 00:40:59 +01:00
Nadia Holmquist Pedersen 03f33fa5c3 Make UNIX builds non-portable by default. 2019-12-05 00:12:40 +01:00
Nadia Holmquist Pedersen 4f87707cda If all else fails, look for data files (romlist.bin) in the current working direcoty. 2019-12-05 00:11:52 +01:00
Nadia Holmquist Pedersen 959c37ead7 Open with rb instead of r in OpenDataFile to avoid potential problems with Windows. 2019-12-04 22:54:30 +01:00
Nadia Holmquist Pedersen 7af658f089 Add a UNIX_PORTABLE build option, turning it off makes a build of melonDS suitable for systemwide installation. 2019-12-04 22:46:33 +01:00
i404788 7730e6c1e2
Coding style + weird spacing 2019-11-20 23:24:16 +00:00
i404788 477be1d155
add device name 2019-11-19 22:34:02 +00:00
i404788 c2a55bc217
clean log 2019-11-19 22:22:47 +00:00
i404788 cdd60bb298
fix build 2019-11-19 22:20:39 +00:00
i404788 7e07250652
Maybe better to log 2019-11-19 22:19:30 +00:00
i404788 7340b1d6e3
Fix hanging UI when `null` addr 2019-11-19 21:37:47 +00:00
Arisotura 3f7bc1a6c1 add warning against hacked firmware dumps 2019-11-08 21:55:13 +01:00
Arisotura c064f738ea OpenGL: fix bug when rendering translucent polygons coming after shadow polygons, against a zero-alpha clear-plane (would use wrong shader, resulting in broken transparency) 2019-11-03 09:55:52 +01:00
Arisotura b641ccaf35 fix remaining sprite y-coord bugs. fixes #531 2019-11-03 04:53:11 +01:00
Arisotura 3561e93bf6 fix sprite y-flip
also, meaningless shenanigans
2019-11-03 04:32:47 +01:00
Arisotura e117da235e smarter CP15 PU region updates. disable some useless logging.
fixes #528
2019-10-21 23:14:34 +02:00
Arisotura 58c2790ea3 uuuh we should only do it once per scanline 2019-09-15 02:08:47 +02:00
Arisotura e418b353e8 well, here, OBJ X mosaic is done too 2019-09-15 02:01:22 +02:00
Arisotura cb90475b60 begin work on mosaic
OBJ Y mosaic emulated correctly, there's atleast that.
2019-09-15 01:31:09 +02:00
Arisotura b8f55623c1 prevent capture-o-magic from freezing. also, make code more readable. 2019-09-14 13:45:01 +02:00
Arisotura 1c3661f33d BLAHAHAHAHHHH 2019-09-14 01:16:38 +02:00
Arisotura 9d376335b7 HARK HARK HARK HARK 2019-09-13 22:43:02 +02:00
Arisotura 1aaf0c33ce guess who the idiot is who broke sprite extpal 2019-09-05 11:49:22 +02:00
Arisotura 0010e296bd GPU2D: delay palette lookup for sprites 2019-09-05 11:42:08 +02:00
Arisotura 3efe90f78a deal with SPU FIFO overflow in a more pleasant manner 2019-09-04 16:40:29 +02:00
Arisotura 02a6fe182c see, Arisotura, was it that hard? 2019-09-04 16:29:40 +02:00
Arisotura 1b40149b0a blarg
here, have code
2019-09-04 15:41:42 +02:00
StapleButter a4f9187b9b fix bug with vsync checkbox 2019-09-01 23:04:06 +02:00
Arisotura f70ee39543 BAHAHAHAHHHAHARKKZKFKKSLFS-*~+¤ 2019-09-01 20:40:55 +02:00
Arisotura 27498ced4a
Merge pull request #505 from Zettymaster/master
Add warning message if romlist.bin is not found
2019-09-01 20:25:06 +02:00
Arisotura b3df6e523a
Merge pull request #509 from Zapeth/master
Fix cmake resource file compilation issues
2019-09-01 20:24:14 +02:00
Arisotura abb06269a1 add VSync toggle 2019-09-01 20:20:22 +02:00
Arisotura 5b51034436 zerp 2019-09-01 18:38:01 +02:00
Arisotura f01016a30b GPU2D: shape3 sprites are always 8x8 2019-09-01 18:35:33 +02:00
Arisotura 455b0e5689 more fixes to audio output
maybe by 2034 we'll finally get that shit going
2019-09-01 15:41:46 +02:00
Arisotura 210c1056b0 Merge branch 'master' of https://github.com/Arisotura/melonDS 2019-08-29 15:55:33 +02:00
Arisotura fbad8b0f43 * new FPS limiter
* new audio output/sync method

about fucking time
2019-08-29 15:55:18 +02:00
Zapeth 96d5d3f4c8 Fix glib-compile-resources path issues
Apparently double quotes are not stripped away for assigned arguments when parsing, which causes isses for paths that include spaces.
2019-08-28 22:24:54 +02:00
Zapeth 7cb8112984 Fix MinGW resource file compilation issues 2019-08-25 18:28:54 +02:00
xperia64 6c7c037b20 Fix division edge case 2019-08-24 11:52:24 -04:00
Lukas Wienke fefcd5165b Merge branch 'master' of https://github.com/Arisotura/melonDS 2019-08-19 19:09:57 +02:00
Arisotura 626a9c1385 my bad. 2019-08-18 11:31:03 +02:00
Lukas Wienke 6a50bcfaf7 add warning message if romlist.bin is not found 2019-08-15 23:59:05 +02:00
Arisotura 78ff4165ed GPU2D:
* implement reserved mode for bitmap sprites (not too interesting)
* mask out DISPCNT bits that don't apply to the sub GPU
2019-07-24 04:29:19 +02:00
Arisotura a8886d5949 GPU2D: add 'prohibited' large BG sizes 2019-07-24 03:30:09 +02:00
Arisotura 3c006fd361 GPU2D: fill gaps in BG modes
* mode6 actually works on the sub GPU, albeit limited to 1/4 the full bitmap size due to having only 128K of VRAM
* mode7 draws BG0, BG1 and sprites. no BG2/BG3.
2019-07-24 02:46:30 +02:00
Arisotura c1fa5d8283 GPU2D: forced-blank only disables BG/OBJ compositing (VRAM/FIFO display, capture, master brightness still run)
fixes #491
2019-07-24 00:27:08 +02:00
Arisotura 22f3cae067 fix potential out-of-bounds write 2019-07-13 02:54:14 +02:00
Arisotura ff27036b35 start botching the FPS limiter
results in shitty audio because it's overflowing the buffer
2019-07-12 22:04:55 +02:00
Arisotura 504ccb7044 don't allow modifier mappings in input config dialog, either 2019-07-09 18:41:44 +02:00
Arisotura 592e493a7a input: don't check modifiers for regular input 2019-07-09 18:39:50 +02:00
Arisotura 36f1e6f475 remove glBindImageTexture (4.2) 2019-06-30 16:57:30 +02:00
Arisotura 1b98a3e3a0 fix 'shift by register' operands: always only take the lower 8 bits of the register, fix handling for LSL/LSR >32
fixes #479
2019-06-27 14:05:51 +02:00
Arisotura 204b5d8700 HARK HARK HARK 2019-06-25 19:29:21 +02:00
Arisotura 4d775dcf85 fix OpenGL deinit when closing emu 2019-06-25 17:37:32 +02:00
Arisotura 1d8902c631 remove stupid hack that caused more problems than it fixed 2019-06-25 13:09:06 +02:00
Arisotura 58575f82b7 libui/windows: backport fix for #471 2019-06-25 12:29:56 +02:00
Arisotura 49b2f8d969 raise kMaxIterationCycles to 64 2019-06-25 02:05:48 +02:00
Arisotura e2dc98d144 fix bug when mapping a joystick axis control but no button 2019-06-20 16:31:28 +02:00
Arisotura f59094e033 OpenGL: disable vsync, atleast under Windows 2019-06-20 16:00:12 +02:00
Arisotura 77bf92a272 Merge branch 'master' of https://github.com/Arisotura/melonDS 2019-06-20 13:57:34 +02:00
Arisotura 6d01677a57 add 32bit writes to some IO ports. fixes #313 2019-06-20 13:57:14 +02:00
RSDuck dac9ccc577 fix OGL renderer not working at all on some GPUs 2019-06-17 13:14:52 +02:00
StapleButter c4182b5ad3 BAHAHHAHAHAHH 2019-06-12 14:03:06 +02:00
Arisotura 34c60eaca4 fix bugs with line polygons 2019-06-12 13:14:11 +02:00
Arisotura 886bf6bc10 prevent loading savestates that are too recent 2019-06-12 12:49:52 +02:00
Arisotura 27f758d353 hack so that the GL renderer can render lines 2019-06-12 03:55:40 +02:00
Arisotura 4553da720c add setting for showing/hiding OSD 2019-06-12 03:32:25 +02:00
Arisotura ea5dc39e83 cheapass fix for texture positions, atleast effective at 1xIR 2019-06-12 02:55:38 +02:00
Arisotura a3fed77da3 somewhat better edge marking 2019-06-12 02:23:40 +02:00
Arisotura 711fda469e stop fast-forward hotkeys from getting lost every damn time 2019-06-12 01:39:12 +02:00
Arisotura 4abf0473c2 add pause/reset hotkeys 2019-06-12 01:12:49 +02:00
Arisotura 1cb8f3c8b2 rework input/hotkey code to suck less, implement the new features 2019-06-12 00:59:51 +02:00
Arisotura 82f4f4fdcb fix bugs, make it more responsive 2019-06-11 23:48:49 +02:00
Arisotura bfc12a038e add ability to map joystick axes, too
and add support for multiple hats
2019-06-11 23:41:48 +02:00
Arisotura 1ea25ac6f1 add ability to map keys with modifiers, only in config UI for now 2019-06-11 23:16:15 +02:00
Arisotura 4447e010d7 actually save the current joystick ID 2019-06-11 18:57:22 +02:00
Arisotura b9183b8818 begin work on multiple joystick support 2019-06-11 18:55:04 +02:00
Arisotura 543a40c7cb add some OSD messages. prepare shit. 2019-06-11 04:04:49 +02:00
Arisotura 3c70015da7 software renderer: fix rendering of line polygons. fixes #350 2019-06-11 03:10:32 +02:00
Arisotura 09cfdc6e76 pft 2019-06-10 18:24:38 +02:00
Arisotura fd28391160 fix ass-stupid bug in CP15 PU region setup 2019-06-10 15:29:40 +02:00
Arisotura d28035674a GPU2D: hardware renders sprites one scanline in advance.
fixes #375 (midframe OAM update)
2019-06-10 03:05:26 +02:00
Arisotura 9ab331c6dd fix more stupid shit. askzjkdsf 2019-06-09 20:44:35 +02:00
Arisotura c056dfe509 fix fog alpha 2019-06-09 19:53:28 +02:00
Arisotura 086354a420 miserable, feeble little attempt at edge marking 2019-06-09 19:32:02 +02:00
Arisotura 434a3007e2 fasterer BG/OBJ VRAM reads 2019-06-09 16:06:01 +02:00
Arisotura 00a5576492 fasterer IRQ check. clean up code. 2019-06-08 22:16:51 +02:00
Arisotura 8fc30d69c5 fix last bugs when changing video settings with no game loaded 2019-06-08 13:06:36 +02:00
Arisotura bc53ff35a9 this is the same thing, but, for the sake of consistency 2019-06-08 12:39:52 +02:00
Arisotura eaaf5ec93b also, don't hardcode the timer interval in the callback 2019-06-04 16:19:49 +02:00
Arisotura 86b4cbcb03 when closing an input config dialog, remove SDL timer if needed
fixes #429
2019-06-04 16:17:30 +02:00
Arisotura c8472a67c1 make capitalization consistent 2019-06-04 15:56:09 +02:00
Arisotura 97f4b5f70b
Merge branch 'master' into fast-forward-hotkey 2019-06-04 15:53:08 +02:00
Arisotura 3134c8fc66 add support for setting key mappings to none 2019-06-04 15:44:40 +02:00
Arisotura e3dc4e122a use OSD for some actual purposes 2019-06-03 17:01:53 +02:00
Arisotura 2b3ca2089f take the OSD shito somewhere 2019-06-03 16:45:55 +02:00
Arisotura 4a4415fc2e more work on OSD 2019-06-03 15:00:49 +02:00
Arisotura 43e3e53afc fix some shito 2019-06-02 21:45:36 +02:00
Arisotura 5487a4e71c fix bugs when changing 3D renderer with no game loaded 2019-06-02 15:22:37 +02:00
Arisotura 6de19645f8 fix potential crash when running the software renderer (oops) 2019-06-02 14:57:59 +02:00
Arisotura 3aa971403b lay base for OSD 2019-06-02 14:33:20 +02:00
Arisotura 78208a9728 OpenGL: fix cases of layers/sprites blending over the 3D layer 2019-06-01 03:39:35 +02:00
Arisotura 27d21e06df use regular slash instead of backslash in config file name. fixes #413 2019-06-01 02:54:38 +02:00
Arisotura 06e08b053f do binding of VS inputs and FS outputs before linking shader programs, as per OpenGL standard.
should fix the rendering issues with strict drivers (AMD, Intel).
2019-05-31 02:26:13 +02:00
StapleButter 6f5e45ef2c also, properly delete glarea framebuffers on exit 2019-05-30 23:16:56 +02:00
StapleButter b9529e8361 Linux: fix uiGLGetProcAddress() 2019-06-01 00:27:54 +02:00
Arisotura 5d5e8ceced BAHAHAHAHAHHAHHHHH-~*+ 2019-05-31 21:57:11 +02:00
Arisotura f6814e02c0 * add needed libui functions under Windows, even if they don't do a whole lot
* fix ass-stupid fog bug
2019-05-31 21:37:30 +02:00
StapleButter 65ccf2a717 blarg 2019-05-31 19:29:48 +02:00
StapleButter 1a3314f0bd GL: don't draw the screens when nothing is running 2019-05-31 12:25:16 +02:00
StapleButter 464b116916 fix the whole mutex shito
fixes potential crash when resizing window
2019-05-31 04:15:37 +02:00
StapleButter d8d7ba9251 fix potential crash when switching video output methods 2019-05-31 03:18:09 +02:00
StapleButter c49dec1acd try to fix fog consecutively to the Intel fix. still not perfect for whatever reason
also clean up more code
2019-05-31 03:00:53 +02:00
StapleButter 3ef00f8fa6 attempt at fixing THE FLICKERING without making everything shitty. also, clean up code 2019-05-31 02:21:41 +02:00
StapleButter 27d451d07a clean up code, attempt at shit 2019-05-31 01:46:47 +02:00
StapleButter ea669190aa fix crash when using -O3.
gcc will try to optimize the memfill with MMX opcodes, but those seem to crash if the memory isn't aligned to a 8-byte boundary.
2019-05-30 18:05:52 +02:00
StapleButter ce9d728fb6 fix cleanup of libui objects when closing melonDS
fixes to Cmake shito
attempt shit
2019-05-30 17:29:41 +02:00
StapleButter ee61b97ec9 OpenGL renderer: fix for Intel driver (doesn't like RGB8UI framebuffers) 2019-05-30 02:44:49 +02:00
StapleButter 891ab9fd3c Linux: start getting somewhere with the whole OpenGL shito 2019-05-28 19:48:59 +02:00
PoroCYon ebad773a38 apply tgsm's changes (see PR #411 ) 2019-05-26 00:50:27 +02:00
PoroCYon 38f61a24fc 'port' libui GL stuff to Linux
Only implemented the functions needed by melonDS, and only tested using
a very recent mesa+libglvnd+nouveau. Will most likely bork using
proprietary nvidia or old(er) drivers (see gl.c)
2019-05-26 00:38:24 +02:00
PoroCYon 31e0f15797 fix oudated CMake compile settings, add OpenGL dependency for Linux 2019-05-26 00:37:51 +02:00
StapleButter 99dbbb0b04 gfghfshdf 2019-05-25 22:23:43 +02:00
Arisotura dd14a3e88e for config dialogs that reflect changes instantly, make behavior of window close button consistent with that of Cancel button 2019-05-25 21:03:39 +02:00
Arisotura eb6fe823f8 close any opened dialogs when closing the main window 2019-05-25 20:58:32 +02:00
Arisotura af581513fb * remove old 'threaded 3D' setting from emu settings dialog
* remove 'antialiasing' for now
2019-05-25 20:51:26 +02:00
Arisotura 94f5ecb647 Merge branch 'blackmagic'
BAHAHAHHAHAHAHAAHAHAHAHHH

HARK HARK HARK HARK HA-*~
2019-05-25 20:42:27 +02:00
Arisotura 9ed1dda9ca fix possible crash 2019-05-25 19:52:56 +02:00
Arisotura 956c2c5d86 finalize the GL/software switch 2019-05-25 19:47:19 +02:00
Arisotura 70a3243714 simpler GPU-compositing. will make it easier to grab neighbor 2D/3D pixels individually for filtering. 2019-05-25 19:36:47 +02:00
Arisotura 8c93a45574 also support alpha-only fog 2019-05-25 13:45:00 +02:00
Arisotura 478ca019da implement fog correctly
also some base work for edgemarking
2019-05-25 13:43:06 +02:00
Arisotura 7cdeb7fa4e feeble, miserable little attempt at emulating fog 2019-05-25 04:28:00 +02:00
Arisotura 04f1809dd1 finish fixing shadows 2019-05-25 02:34:14 +02:00