Commit graph

474 commits

Author SHA1 Message Date
Yuri Kunde Schlesner
5961a2852d GSP: Update framebuffer info on all interrupts
Hardware testing determined that the GSP processes shared memory
framebuffer update info even when no memory transfer or filling GX
commands are used. They are now updated on every interrupt, which isn't
confirmed correct but matches hardware behaviour more closely.

This also reverts the hack introduced in #404. It made a few games
behave better, but I believe it's incorrect and also breaks other games.
2015-01-14 05:20:12 -02:00
Yuri Kunde Schlesner
98e3274935 GPU: Fire GPU interrupts at the correct places.
PDC0 and PDC1 are both VBlank interrupts. PDC0 was being treated as a
HBlank interrupt and fired many more times than it should. They now both
fire together at 60 Hz. This puzzlingly *improves* apparent framerate on
many applications.

A few other interrupts were being fired inside the GSP command
processing instead of on the actual GPU register writes, so they were
moved there, which should cover direct writes tho those registers not
going through the GX command queue.
2015-01-14 05:07:35 -02:00
Subv
cf071cd897 Services: Added some missing services.
cfg:s, ptm:sysm, apt:s.
apt:s is almost exactly the same as apt:u as per 3dbrew
2015-01-13 14:43:30 -05:00
darkf
67c644e317 Fix building on MinGW 2015-01-11 20:22:08 -08:00
bunnei
b33380ca59 Merge pull request #456 from Subv/waitsync1
SVC: Wake up the thread after the delay in WaitSync1
2015-01-11 18:52:09 -05:00
bunnei
542b0b0057 Merge pull request #466 from Subv/wake
Thread: Prevent waking a thread multiple times.
2015-01-11 13:39:23 -05:00
Subv
b68d51ed30 Thread: Prevent waking a thread multiple times.
If a thread was woken up by something, cancel the wakeup timeout.
2015-01-11 13:18:52 -05:00
Subv
38da198aa1 SVC: Wake up the thread after the delay in WaitSync1 2015-01-11 10:42:59 -05:00
archshift
3b555e2512 Stubbed y2r:u IsBusyConversion
There is no documentation available on this function, but we set the result to false as a stub.
This allows Super Little Acorns to move all the way in game with pp3c.
2015-01-10 22:47:31 -08:00
archshift
95be6ad7ae Added Archive ID to fs:USER debug logs involving opening the archive. 2015-01-10 14:32:11 -08:00
archshift
228843c43e Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance. 2015-01-10 14:32:10 -08:00
Yuri Kunde Schlesner
8ad41775cc Kernel: Start using boost::intrusive_ptr for lifetime management 2015-01-09 19:43:52 -02:00
Yuri Kunde Schlesner
d751de7341 Kernel: Don't re-assign object's handle when duplicating one 2015-01-09 19:43:51 -02:00
bunnei
6ae12424df Merge pull request #444 from yuriks/handle-reform2
Kernel Lifetime Reform Pt. 2
2015-01-09 12:59:35 -05:00
bunnei
86e07124ad Merge pull request #436 from kevinhartman/system-core
Warn if a new thread is intended to be run on the system CPU core
2015-01-09 11:14:35 -05:00
Yuri Kunde Schlesner
78ea76e12f Thread: Fix nullptr access in a logging function 2015-01-09 04:02:28 -02:00
Yuri Kunde Schlesner
7f1557fbbd Thread: Rename thread_queue => thread_list 2015-01-09 04:02:17 -02:00
Yuri Kunde Schlesner
9bf8462b96 Thread: Reduce use of Handles and move some funcs to inside the class. 2015-01-09 04:02:15 -02:00
Yuri Kunde Schlesner
ba72208cd4 Kernel: Move Thread's definition to the header file 2015-01-09 03:51:55 -02:00
Yuri Kunde Schlesner
7b3452c730 Move ThreadContext to core/core.h and deal with the fallout 2015-01-09 03:51:55 -02:00
bunnei
d46f650036 Merge pull request #255 from Subv/cbranch_3
Implemented timers
2015-01-08 22:38:33 -05:00
Subv
07044651ef SVC: Implemented the Timer service calls. 2015-01-08 21:22:14 -05:00
Subv
dfc440785a SVC: Fixed SleepThread.
It will now properly wait the specified number of nanoseconds and then wake up the thread.
2015-01-08 18:39:12 -05:00
Subv
60a373a786 Threads: Use a dummy idle thread when no other are ready.
This thread will not actually execute instructions, it will only advance the timing/events and try to yield immediately to the next ready thread, if there aren't any ready threads then it will be rescheduled and start its job again.
2015-01-07 20:31:31 -05:00
bunnei
b659cac2dc Merge pull request #404 from bunnei/more-frame-synch-fixes
GPU: Toggle active framebuffer each frame
2015-01-07 18:13:48 -05:00
bunnei
f7a3f45f1e GSP: Toggle active framebuffer each frame 2015-01-07 18:06:00 -05:00
bunnei
e6864a1f41 Merge pull request #431 from yuriks/thread-queue-cleanup
Common: Clean up ThreadQueueList
2015-01-07 17:58:31 -05:00
Kevin Hartman
63be6aaadd Warn if a new thread is intended to be run on the system CPU core until we implement correct scheduling for such a thread. 2015-01-07 14:14:48 -08:00
Yuri Kunde Schlesner
122c2bb324 Common: Clean up ThreadQueueList
Replace all the C-style complicated buffer management with a std::deque.
In addition to making the code easier to understand it also adds support
for non-POD IdTypes.

Also clean the rest of the code to follow our code style.
2015-01-07 18:38:25 -02:00
Yuri Kunde Schlesner
a6ad68190f Fix double-free in Service manager during shutdown
Fixes #423.
2015-01-07 17:32:31 -02:00
bunnei
088863c921 Merge pull request #376 from Subv/arc_reorder
Archives: Change the folder layout of some archives.
2015-01-06 20:13:56 -05:00
Subv
32dbb76e00 Archives: Changed the unimplemented archives comment.
It now refers to me as the PoC
2015-01-06 15:34:37 -05:00
Subv
5244ac0e9c Archives: Addressed some comments 2015-01-06 15:02:30 -05:00
bunnei
9eaef4e04a Merge pull request #413 from purpasmart96/serv_clean
Services: Clean up a few things and add a few function names
2015-01-05 22:48:58 -05:00
bunnei
9b83f0e158 Merge pull request #272 from rohit-n/sign-compare
Silence some -Wsign-compare warnings.
2015-01-05 22:10:56 -05:00
purpasmart96
379b39e583 Services: Clean up a few things and add a few function names 2015-01-05 16:07:15 -08:00
bunnei
e9650f1c61 DSP: Signal (faked) interrupt on every frame.
- Hack to work around games checking that the DSP event has been signaled by a real DSP interrupt.
2015-01-05 00:25:37 -05:00
bunnei
cc23269ff4 Merge pull request #407 from Subv/arbiter
AddressArbiter: Ported arbitration type 2 from 3dmoo.
2015-01-05 00:05:50 -05:00
bunnei
96e6b2aa50 Merge pull request #408 from Subv/mutex
Mutex: Add the calling thread to the waiting list when needed
2015-01-04 22:55:53 -05:00
bunnei
26f31a2dfb Merge pull request #386 from archshift/y2ru
Stub the y2r:u service
2015-01-04 21:40:58 -05:00
Subv
ea80363cc2 Mutex: Add the calling thread to the waiting list when needed
This will happen when the mutex is already owned by another thread. Should fix some issues with games being stuck due to waiting threads not being awoken.
2015-01-04 12:52:34 -05:00
Subv
90dffe3fc1 Archives: Make SYSTEM_ID and SDCARD_ID strings 2015-01-04 09:10:27 -05:00
Subv
71a063f45c Archives: Changed the way paths are built for the archives.
Each archive now takes a mount point of either NAND or SDMC, and builds its own directory structure there, trying to simulate an HLE-friendly hardware layout
2015-01-03 20:46:05 -05:00
archshift
48130b1eaa Stub the y2r:u service 2015-01-03 16:42:39 -03:00
Subv
0276a75f24 AddressArbiter: Ported arbitration type 2 from 3dmoo.
(Thanks 3dmoo!)
2015-01-03 12:09:11 -05:00
Subv
3bc9f5509b Archives: Change the folder layout of some archives.
This is to better represent the hardware layout, they are still aren't quite accurate, but this better and will help a bit when implementing the other archives like NAND-RO and NAND-RW
2015-01-02 21:55:13 -05:00
Subv
aade417b14 Archives: Reduced duplicate code in RomFS and SaveCheck.
Fixed a few warnings and cleaned up the code
2015-01-02 21:13:54 -05:00
Subv
13efbdc201 SaveDataCheck: Preliminary work in this archive.
This allows Steel Diver to boot further, some files are needed.

This is still not ready and needs a big cleanup, this will possibly be delayed until the way we handle archives is fixed (with factory classes instead of ahead-of-time creation of archives)
2015-01-02 21:13:53 -05:00
bunnei
3d9bf13439 Merge pull request #391 from lioncash/pedantic
archive/elf: Minor misc changes.
2015-01-02 21:04:49 -05:00
Lioncash
0d81b1e75b archive: Fix initializer list order 2015-01-02 20:30:57 -05:00