forked from KallistiOS/KallistiOS
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upstream master (KOS Proper) #58
Open
andressbarajas
wants to merge
317
commits into
master
Choose a base branch
from
upstream_master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also speedup spu_reset_chans().
dc-chain Updates
Remove dependence on minimal termios stub.
pvr_prim: Speed up header compilation
All exception codes were divisible by 32, except for the two soft exceptions. Since they do not represent any hardware value, modify these code so that they are also divisible by 32, and make them smaller than 0x800. This means that all exception codes can now be represented in just 6 bits, and the IRQ table can be reduced from 0x100 entries to just 0x40 entries. This saves 1.5 KiB, but more importantly, the table now fits in just 16 cache lines instead of 64 cache lines. Signed-off-by: Paul Cercueil <[email protected]>
By default, the DMA IRQs have a priority of 0, which means that they are masked. Increase that to a priority of 3, which unmasks them. Signed-off-by: Paul Cercueil <[email protected]>
Introduce an API to use the DMA Controller of the SH4. This new API can be used to program DMA transfers between memory and devices, or from memory to memory. Signed-off-by: Paul Cercueil <[email protected]>
Use the new DMA Controller API instead of poking into the DMAC registers directly. Signed-off-by: Paul Cercueil <[email protected]>
Make the code more self-describing by using the regfield macros. Mask DMA IRQs on shutdown to avoid potential nasty bugs. Signed-off-by: Paul Cercueil <[email protected]>
The FSRRA and FSCA instructions will not be used by GCC unless -ffast-math is enabled. Therefore we can move them to the environ_dreamcast.sh script, and leave the -ffast-math option in the main environ.sh script. Signed-off-by: Paul Cercueil <[email protected]>
I do not see any valid reason to have it enabled by default. It also most likely prevents GCC from generating better code. Signed-off-by: Paul Cercueil <[email protected]>
We recommend -ffast-math everywhere, and everyone seems to be using it. Those who don't, probably don't need the full IEEE compliance and just forgot to add the flag. Note that the previous comment suggested that FSQRT was not used without fast-math, but this was wrong. GCC will still emit that instruction in a "fast path" when it knows it can use it, or a call to the C sqrtf() otherwise. Signed-off-by: Paul Cercueil <[email protected]>
Using just "asm" seems to cause compilation errors when building some external software that use ISO compliant C and not the GNU version. Signed-off-by: Paul Cercueil <[email protected]>
arch.h: Use __asm__ instead of asm
Spinlock cleanups
irq: Shrink IRQ table size
I can only presume that the strict include list in this (as opposed to kos.h) meant that there happened to be no references to stdlib in its includes.
Only the first call of dma_next_list() is done by the calling thread; the function is registered as the DMA complete callback, so the following calls are done in interrupt context. In that case, the mutex should be unlocked differently by passing a pointer to the thread that locked it. This was detected by defaulting all mutexes to error-checking. Signed-off-by: Paul Cercueil <[email protected]>
It seems this awful hack was possible due to dcload returning the host-side `DIR *` as the fd for dirs. The problem is that it's absolute bunk as there's no guarantee that the fds for non-dirs from the host side returned by `open` will be less than 100. This could mean that a file gets opened and not be able to be closed properly. This also clears the way to remove the hack from the host-side dc-loads, and to correct readdir behavior.
Removed lwip code/references where unneeded.
Fixed a few warnings in the tools and examples. Added biosfont_naomi version powered by minifont so naomi has access to that api.
Spaces are now drawn for wide or kana characters. Created new function bfont_draw_opaque_space() to simplify logic.
No changes required on the dcload side. Works for both serial and IP.
Fixed spacing, better variable name(buffer).
Add dc/vmu icon draw functions, fix bios offsets, organized code
- Cleaned up formatting and styling issues with the protocol descriptions - Started implementing thread-specific commands * Currently incomplete. Debugging fails without some of the other thread commands implemented. WIP
- Got the stub to at least execute properly as it used to with the new threading commands enabled. Still not displaying the extended info or other thread ID's, though. WIP.
Fixed Dockerfile to compile GCC 15.0.0. Created profile.dev and profile.legacy. Fix compilation of mkdcdisc.
Make adjustments to Dockerfile and pr-docs-check.yml
make clean now only remove object files for all utils. Need to use the new make distclean to remove util binaries
The KOS_PATH is now dynamically set to the directory where environ.sh.master is located, instead of being hardcoded to /opt/toolchains/dc/kos. This improves portability and allows users to place KallistiOS in custom directories without needing to modify the script.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.