Skip to content
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
wants to merge 317 commits into
base: master
Choose a base branch
from
Open

Upstream master (KOS Proper) #58

wants to merge 317 commits into from

Conversation

andressbarajas
Copy link
Collaborator

No description provided.

DC-SWAT and others added 30 commits January 6, 2025 10:50
Also speedup spu_reset_chans().
Remove dependence on minimal termios stub.
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]>
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.
andressbarajas and others added 30 commits March 8, 2025 19:44
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.