Search found 108 matches
- Tue Apr 30, 2024 11:44 pm
- Forum: Programming Discussion
- Topic: Streaming Music Playback CPU Usage
- Replies: 6
- Views: 2131
Re: Streaming Music Playback CPU Usage
HI, TapamN A lot of work has been done to reconfigure the KOS scheduler, and other things. I would love to see this benchmark done again ?. Do you have the benchmark src we can run to check, or can you try the latest PR's and check? What changes were made? The two most important changes would be fi...
- Tue Apr 30, 2024 11:38 pm
- Forum: Programming Discussion
- Topic: What's the fastest implementation of the cross product on the SH4?
- Replies: 5
- Views: 1694
Re: What's the fastest implementation of the cross product on the SH4?
well looks pretty bad here letting the compiler do it https://godbolt.org/z/qKGhKxqPf sh4 The output for the first one is pretty stupid, but the second and third are perfectly acceptable. You would probably inline a cross product anyways, so all those loads from the first two wouldn't be happening.
- Tue Apr 30, 2024 11:30 pm
- Forum: Programming Discussion
- Topic: Crowdfunding the improvement of the gcc SH backend
- Replies: 19
- Views: 1152
Re: Crowdfunding the improvement of the gcc SH backend
I'm impressed by the hardware you found. Here's another thing to add to your list: A speak-and-spell clone by Namco . I ordered that SG630. I have two systems I can dig out with PCI slots (a P3 and P4) that I can try it in at some point. Hopefully no battery damage on those, I've been meaning to che...
- Fri Apr 19, 2024 7:25 am
- Forum: Programming Discussion
- Topic: KOS Examples not Building
- Replies: 2
- Views: 178
Re: KOS Examples not Building
It looks like it's trying to use vqenc, but it hasn't been built yet. Go to the /opt/toolchains/dc/kos/utils/vqenc/ directory and build vqenc.
- Fri Feb 23, 2024 5:33 pm
- Forum: Programming Discussion
- Topic: CDDA Won't Loop Last Track on GDEMU/MODE
- Replies: 13
- Views: 1106
Re: CDDA Won't Loop Last Track on GDEMU/MODE
I have the basic CD driver working. You use can use stdio and fs_read to read stuff via DMA, with caching similar to KOS's existing CD cache, and it handles reads from multiple threads at the same time fine (trying that on KOS will hang those threads, though not the entire system). It probably doesn...
- Fri Feb 23, 2024 4:55 pm
- Forum: Programming Discussion
- Topic: Crowdfunding the improvement of the gcc SH backend
- Replies: 19
- Views: 1152
Re: Crowdfunding the improvement of the gcc SH backend
Could you open a bug report for that in the gcc bug tracker? [1] Make sure to set sh*-*-* as the target and CC me and Oleg. Also, please prefix the subject with [SH] . Ok, I'll try to do it sometime. It shouldn't be a big deal that I was using a patched version of 12.2? The patches are for integrat...
- Wed Feb 21, 2024 6:16 am
- Forum: Programming Discussion
- Topic: Crowdfunding the improvement of the gcc SH backend
- Replies: 19
- Views: 1152
Re: Crowdfunding the improvement of the gcc SH backend
I'd be willing to help fund improvements. It would be nice if GCC would compile "char val = *char_ptr++;" as a single instruction, instead of four! [1] Related aside: I was recently looking into -mrelax and how/why it only partially works on GCC 12.2. Until a couple of years ago, would reg...
- Sun Jan 28, 2024 5:33 pm
- Forum: Programming Discussion
- Topic: pvrtex - PVR Texture Encoder
- Replies: 14
- Views: 1476
Re: pvrtex - PVR Texture Encoder
Apparently Tvspelsfreak's texconv was never even considered for being added to KOS due to the big-ass Qt dependency. I always thought it was a massive shame and that it feels wrong to have a Dreamcast SDK without such a tool built into it... is there any way you would consider letting us put this i...
- Sun Jan 28, 2024 5:22 pm
- Forum: Programming Discussion
- Topic: HDR rendering on Dreamcast
- Replies: 15
- Views: 3057
Re: HDR rendering on Dreamcast
If we were to twiddle the reduced buffer, it would work much faster. In that case, the tile matrix would have to be uniquely aligned (e.g. horizontally) and the KOS PVR would have to be hijacked, so it might not be suitable as a sample. Yes, I've done 60 FPS bloom on the DC , and twiddling the bloo...
- Sat Dec 23, 2023 5:36 pm
- Forum: Programming Discussion
- Topic: Timer precision
- Replies: 13
- Views: 1674
Re: Timer precision
Do you have example of doing this The clock counts the 50 MHz peripheral clock, divided by four (which would be 12.5 MHz), but it can be set to count on both the rising and falling edges of the clock, doubling it back up to 25 MHz. i have not been able to get this to work.. I haven't tried this, bu...
- Thu Oct 26, 2023 4:04 pm
- Forum: Programming Discussion
- Topic: Timer precision
- Replies: 13
- Views: 1674
Re: Timer precision
I think you have the right final result, but the calculation is off. The clock counts the 50 MHz peripheral clock, divided by four (which would be 12.5 MHz), but it can be set to count on both the rising and falling edges of the clock, doubling it back up to 25 MHz. One complaint I have about the ti...
- Thu Oct 26, 2023 3:26 pm
- Forum: Programming Discussion
- Topic: What's the fastest implementation of the cross product on the SH4?
- Replies: 5
- Views: 1694
Re: What's the fastest implementation of the cross product on the SH4?
For a cross product, I think it would be better to just let GCC decide how to preform it than using inline asm. That way GCC has more freedom to allocate and move registers around, rather than having to get things lined up for how the asm wants it. And, if you were writing asm yourself, I think it c...
- Thu Sep 28, 2023 4:52 am
- Forum: Programming Discussion
- Topic: pvrtex - PVR Texture Encoder
- Replies: 14
- Views: 1476
Re: pvrtex - PVR Texture Encoder
I don't know your environment but guess try find /opt/local/include -name avconfig.h I'm using Xubuntu 20.04. All #includes using avconfig.h are local includes (#include "libavutil/avconfig.h"), so I don't think they should be using the system's headers. When I was first setting up the co...
- Wed Sep 27, 2023 12:31 am
- Forum: Programming Discussion
- Topic: pvrtex - PVR Texture Encoder
- Replies: 14
- Views: 1476
Re: pvrtex - PVR Texture Encoder
I tried to build avconfig.h under libavutil seems to be missing. It does not seem to be affected by its . Odd, you're right. I'm surprised it compiles on my system. I wonder why? Is it somehow using my system's avconfig.h? New version with minor fixes: Add missing header (I don't think it's used by...
- Wed Sep 13, 2023 6:38 am
- Forum: Programming Discussion
- Topic: Use fs_read instead of fread
- Replies: 3
- Views: 365
Re: Use fs_read instead of fread
So, the reason BBA is so slow is because newlib breaks up every I/O operation into tiny chunks, and dcload-ip is kind of half baked and doesn't handle many small requests well. I feel incredibly stupid for not thinking about this earlier, but you can use setvbuf to disable stdio's buffering on a str...
- Wed Sep 06, 2023 2:24 am
- Forum: Programming Discussion
- Topic: pvrtex - PVR Texture Encoder
- Replies: 14
- Views: 1476
Re: pvrtex - PVR Texture Encoder
Thanks again TapamN! I'll check this out when I have some time. Btw, do you have a github/gitlab/other? My game framework library auto-downloads its dependencies so it would be nice to add a download for this without the 7-zip requirement. I have SourceForge and GitHub accounts, that I've used for ...
- Wed Aug 30, 2023 4:15 am
- Forum: Programming Discussion
- Topic: pvrtex - PVR Texture Encoder
- Replies: 14
- Views: 1476
pvrtex - PVR Texture Encoder
After running across a post on using FFmpeg's ELBG for encoding Cinepak (which uses vector quantization), I thought I'd try seeing how well it would work for the Dreamcast. It worked quite well, so I ended up creating a full texture convertor (including uncompressed textures). Source code is attache...
- Tue Aug 29, 2023 2:42 pm
- Forum: Programming Discussion
- Topic: Pvr dma glitch at the bottom ?
- Replies: 6
- Views: 304
Re: Pvr dma glitch at the bottom ?
That's much better, but from my benchmarks, the fastest way I've found to flush a large part of the cache is pctPurgeCache in the code in this attachment . I also tried flushing/purging the cache by accessing the memory mapped cache tags, but it still wasn't faster than pctPurgeCache. KOS's function...
- Tue Aug 29, 2023 3:54 am
- Forum: Programming Discussion
- Topic: Is spritesheet demo appropriate for tilemapping
- Replies: 2
- Views: 198
Re: Is spritesheet demo appropriate for tilemapping
Using the sprite command for tile maps works fine. I worked on an unfinished port of Micropolis (open source SimCity Classic), and I used the sprite command to render the city as a 120x100 tile tilemap without issues.
When using KOS's PVR driver, the driver will handle flipping automatically.
When using KOS's PVR driver, the driver will handle flipping automatically.
- Sun Aug 27, 2023 4:17 am
- Forum: Programming Discussion
- Topic: Pvr dma glitch at the bottom ?
- Replies: 6
- Views: 304
Re: Pvr dma glitch at the bottom ?
It looks like the cache isn't being flushed properly. dcache_flush_range((uintptr_t)textures[current_frame], (uintptr_t)(textures[current_frame] + stride * texture_height * 2)); // Send the video frame as a texture over to video RAM pvr_txr_load_dma(buf, textures[current_frame], stride * texture_hei...