Commit Graph

244 Commits

Author SHA1 Message Date
b78bc4cb66 fixes to the threadedness of the sw rasteriser
also fix #639 and fix #880
2021-01-26 16:42:27 +01:00
1e4c0c9d72 Polish up archive support (#930)
* Fix directory path when extracting from archive

* Don't create new dir in execution dir of melonds
* Create it beside the archive instead

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* ArchiveUtil : Use QT functions for I/O

* Make it more platform independent, cleaner

* Fixes permission related crash on linux

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* NDSCart : Abstract out common code in LoadROM()

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Extract nds roms to memory

* Some stuff is still broken in the frontend

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* GBACart : Abstract out common code in LoadROM()

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Extract gba roms to memory

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Integrate archive support with recent files

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* onClickRecentFile : Pause emu thread conditionally

* Don't pause at start of the function
* If user opens an archive and hits cancel, it won't pause

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Handle Resets when loading from archives

* Ask user to pick the rom(s) again (i.e. GBA & NDS)
when there are multiple files in the archive(s)

* Directly load if only 1 file

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Archive support for drag-n-drop

* Also recent files support for drag-n-drop

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* main : Allocate rombuffer objects on stack

* Less messy, decreases chances of memory leaks

* Underlying implementation of qbytearray uses heap (hopefully?)

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* GetSavestateName : Archive support

* Construct ssname from srampath (since rompath has archive name)

NOTE: In general, archive name != rom file name !!!!!!!!!!

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Add srl and dsi as "direct-load" formats

* Direct-load = anything not in an archive

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Don't use static functions

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Remove QT stuff from Util_ROM

* Also, during reset, directly load file from archive (no rom picker)

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Remove QT includes from FrontendUtil.h

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Util_ROM/LoadROM() : Use SetupDSiNAND()

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Util_ROM/Reset() : Use strrchr()

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Util_ROM : Put Archive stuff behind ifdefs

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* main: Set parent widget for archive dialog boxes

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Revert "Util_ROM/Reset() : Use strrchr()"

This reverts commit c8af6f066f.
2021-01-22 11:22:32 +01:00
d42ca1ec4b Implement "lag frame" flag and counter (#949)
* Implement "lag frame" flag and counter, and expose flag and both frame counters. BizHawk wants these.

* Track frame count and lag frames while the system isn't running.
2021-01-21 21:26:27 +01:00
bf97387f26 Improved SRAM performance (#925)
* Offload NDS SRAM writing to separate thread, debounce writes to two seconds after last flush or DeInit.

* Fixed printf messages.

* Fixes after CR.

* Fixed potential portability issue with time_t
2021-01-09 22:18:57 +01:00
fa4363ede6 make FIFO size static whene possible 2020-12-30 23:37:46 +01:00
0f353e0d5f add palette and OAM dirty flag
currently not used anywhere
2020-12-23 09:23:46 +01:00
49317e9165 don't axe error bits when writing to IPCFIFOCNT. fixes #801 2020-12-11 18:06:26 +01:00
1dbe69c6be remove some debug crap 2020-12-10 18:09:11 +01:00
129018a662 Merge remote-tracking branch 'remotes/origin/master' into dsi_camera 2020-12-04 18:28:15 +01:00
1ff4a1564f fix DSi mode with interpreter
I'm so stupid
2020-11-26 00:04:19 +01:00
842379c410 harmless DMA micro optimisation 2020-11-16 17:22:34 +01:00
1085cc14a4 prevent use after free 2020-11-16 17:03:24 +01:00
05b94eff66 make audio output thread safe(r?) 2020-11-15 15:29:38 +01:00
62e3f41f20 delay savefile flush to the end of the frame 2020-11-11 13:38:05 +01:00
05e274a1f6 Added 8/16-bit IPCFIFOSEND writes 2020-10-29 16:09:25 -04:00
d2cd3eadbe fix to timers (ZXDS no longer runs slow as shit) 2020-10-27 05:03:17 +01:00
fc922ffb14 Merge branch 'master' into dsi_camera
# Conflicts:
#	src/DSi_I2C.cpp
2020-10-26 20:47:30 +01:00
9fdc1de6fe add a few missing 32bit I/O accesses (IPC, SPI) 2020-10-25 18:14:40 +01:00
f2fa52f26c add functionality to import savefiles 2020-09-11 03:08:06 +02:00
8d42b1c7d7 messin' around 2020-09-08 20:19:37 +02:00
9772201345 remove some UB
- savestates used to read a four bytes from a single byte value
- a few unassigned variables
- some other things
- also make the ROR macro an inline function
2020-09-04 20:37:14 +02:00
5431c469c3 actually add DLDI. bahahahhh 2020-09-03 20:28:07 +02:00
9bfaf8682d Fix a typo 2020-08-31 16:37:42 -05:00
ba373ca72a DSi: make ARM9-clock-selector actually work 2020-08-17 19:15:45 +02:00
ea734084ca check DSi interrupts for halted processor wakeup 2020-07-27 23:18:33 +02:00
b4ad35948d Merge remote-tracking branch 'upstream/slirp' into slirp-merge 2020-07-26 21:41:09 +02:00
8a96dfce18 fix build with JIT disabled
fixes #675 and #674
2020-07-25 20:59:53 +02:00
2f9a6b7c03 SPU: delay channel start until whenever it can actually start. fixes maxmod interpolated mode. 2020-07-23 12:59:19 +02:00
778623a8b7 make linux work and fix a few bugs 2020-07-04 18:58:00 +02:00
c5381d2911 reconcile DSi and JIT, fastmem for x64 and Windows 2020-06-30 23:50:41 +02:00
e335a8ca76 first steps in bringing over the JIT refactor/fastmem 2020-06-16 12:11:19 +02:00
e7d076403d Merge branch 'generic_jit' of https://github.com/Arisotura/melonDS into generic_jit 2020-06-16 12:06:42 +02:00
052ff73672 rewrite JIT memory emulation 2020-06-16 12:01:08 +02:00
441869a105 integrate changes from ARM64 backend and more
- better handle LDM/STM in reg alloc
- unify Halted and IRQ in anticipation for branch inlining
- literal optimisations can be disabled in gui
- jit blocks follow simple returns
- fix idle loop detection
- break jit blocks on IRQ (fixes saving in Pokemon White)
2020-06-16 11:57:45 +02:00
40b88ab05a new block cache and much more...
- more reliable code invalidation detection
- blocks aren't stopped at any branch, but are being followed
if possible to get larger blocks
- idle loop recognition
- optimised literal loads, load/store cycle counting
 and loads/stores from constant addresses
2020-06-16 11:56:36 +02:00
00cd9af033 fix uninitialised memory mapping 2020-06-16 11:54:47 +02:00
4deecc7d65 jit: decrease blockcache AddrMapping size for ARM9 2020-06-16 11:54:05 +02:00
86f2be7260 jit: add compile option 2020-06-16 11:54:03 +02:00
d13d625f73 jit: make everything configurable 2020-06-16 11:53:21 +02:00
10e386fe50 JIT: most mem instructions working
+ branching
2020-06-16 11:53:08 +02:00
c692287eba JIT: base
all instructions are interpreted
2020-06-16 11:53:05 +02:00
fc5eedc716 * take nwifi forward some
* shut up CP15 printf's for Fx0
* fix bugs
2020-06-15 13:39:33 +02:00
43e045357f make it able to switch between DS and DSi modes 2020-06-01 20:36:30 +02:00
6326ddd172 reset SD controllers during a soft-reset 2020-06-01 16:32:44 +02:00
b62d90cbe4 Merge remote-tracking branch 'remotes/origin/master' into melonDSi 2020-05-30 03:19:20 +02:00
2327de2423 Merge commit '4b57416552ec2fa95216e2b044559f215723bf70' into melonDSi 2020-05-30 03:12:42 +02:00
5eb01f1f15 begin renovating melonDSi 2020-05-30 02:40:51 +02:00
95f9698077 add back some hotkeys.
remove some legacy cruft from NDS.cpp.
2020-05-19 22:37:48 +02:00
c5c9434ac9 verify BIOS and firmware before booting games/firmware 2020-05-17 05:42:09 +02:00
17d30e91f0 actually hook this up 2020-05-17 04:37:44 +02:00