Search found 109 matches
- Sun Aug 27, 2023 4:17 am
- Forum: Programming Discussion
- Topic: Pvr dma glitch at the bottom ?
- Replies: 6
- Views: 341
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...
- Sat Aug 26, 2023 4:59 am
- Forum: Programming Discussion
- Topic: CDDA Won't Loop Last Track on GDEMU/MODE
- Replies: 13
- Views: 1359
Re: CDDA Won't Loop Last Track on GDEMU/MODE
Interesting. I guess tvspelsfreak just didn't test it and accepted the SEGA docs like the rest of us did. Glad you tested it. And yeah, makes sense with that palette+compressed+X-linear bug, since SEGA didn't even intend compressed paletted textures to be usable. If you don't use mipmaps or filteri...
- Fri Aug 25, 2023 10:25 pm
- Forum: Programming Discussion
- Topic: CDDA Won't Loop Last Track on GDEMU/MODE
- Replies: 13
- Views: 1359
Re: CDDA Won't Loop Last Track on GDEMU/MODE
Hey TapamN, I just heard about your project and its really cool. Its always good to have multiple options, especially since not everyone wants to use Qt stuff. A few things you said stand out to me and other people, so I'd like to ask for more details about them: - Can you really have a compressed ...
- Mon Aug 07, 2023 5:27 pm
- Forum: Programming Discussion
- Topic: CDDA Won't Loop Last Track on GDEMU/MODE
- Replies: 13
- Views: 1359
Re: CDDA Won't Loop Last Track on GDEMU/MODE
I've been distracted with other things, but getting back to the driver and decoder is my next task. I ran across a post mentioning FFMPEG's ELBG for VQ compression, tried using that for Dreamcast VQ, and it worked very well. I ended up making such good progress on getting a texture compressor/encode...
- Wed Jun 28, 2023 6:04 am
- Forum: Programming Discussion
- Topic: High Performance Rendering
- Replies: 12
- Views: 1781
Re: High Performance Rendering
I've been turning my benchmark code for the SH4's performance counter into a kind of library/framework, which is included in the attached file. I'm not going to spend the time to fully document and clean it up (This took longer than expected; I want to go back and finish the VGA patches. At least I'...
- Wed Jun 07, 2023 3:48 pm
- Forum: Programming Discussion
- Topic: DreamHAL - Dreamcast Hardware Abstraction Layer
- Replies: 21
- Views: 5580
Re: DreamHAL - Dreamcast Hardware Abstraction Layer
I've tried LTO with 12.2, but I don't think on KOS itself, just my own code. Going by the error message, it sounds creating a __exit function (or maybe ___exit or _exit, not sure on the mangling) have having it call arch_exit might be enough to make it happy?
- Sun Jun 04, 2023 6:39 am
- Forum: Programming Discussion
- Topic: High Performance Rendering
- Replies: 12
- Views: 1781
Re: High Performance Rendering
I managed to step away from TotK for a while to try redoing indexed rendering. I was wondering why my T&L code was so much slower than I thought it should have been. It was clearly limited by cache misses, but prefetching did not help, so I used the SH4's performance counter to try to figure out...
- Mon May 29, 2023 2:57 am
- Forum: Programming Discussion
- Topic: DreamHAL - Dreamcast Hardware Abstraction Layer
- Replies: 21
- Views: 5580
Re: DreamHAL - Dreamcast Hardware Abstraction Layer
Neat.
I actually talked about the -fno-builtin switch a bit when the GCC 12.2 port was originally released.
https://dcemulation.org/phpBB/viewtopic ... 9#p1059779
https://dcemulation.org/phpBB/viewtopic ... 5#p1059785
I actually talked about the -fno-builtin switch a bit when the GCC 12.2 port was originally released.
https://dcemulation.org/phpBB/viewtopic ... 9#p1059779
https://dcemulation.org/phpBB/viewtopic ... 5#p1059785
- Fri May 26, 2023 9:05 pm
- Forum: Programming Discussion
- Topic: DreamHAL - Dreamcast Hardware Abstraction Layer
- Replies: 21
- Views: 5580
Re: DreamHAL - Dreamcast Hardware Abstraction Layer
]It's because we do not use -ffast-math or the other flags in standard KOS headers. What I was talking about was that even when you used -ffast-math, GCC still wouldn't generate FSCA/FSRRA unless you manually specified the builtin version. I didn't know it at the time I wrote that post, but the cau...
- Thu May 25, 2023 6:44 am
- Forum: Programming Discussion
- Topic: CDDA Won't Loop Last Track on GDEMU/MODE
- Replies: 13
- Views: 1359
Re: CDDA Won't Loop Last Track on GDEMU/MODE
The "session" parameter for the TOC function controls if you are reading a CD TOC (on a 0) or a GD TOC (on a 1). Obviously, CDs don't have a GD area, so requesting the GD TOC will fail. For the end of the last track, could you use the leadout sector value as the loop end? You might have to...
- Thu May 25, 2023 6:12 am
- Forum: Programming Discussion
- Topic: High Performance Rendering
- Replies: 12
- Views: 1781
Re: High Performance Rendering
Understandable! I haven't tried it yet, but have heard it's better than BotW. I definitely like it better than BotW. I can *sort of* see why prefetch could be slower than not using it for the next vertex (if RAM bus is busy on N-1, you've already got N in cache, trying to prefetch N+1 would be a ba...
- Tue May 16, 2023 6:43 am
- Forum: Programming Discussion
- Topic: High Performance Rendering
- Replies: 12
- Views: 1781
Re: High Performance Rendering
Sorry my follow up has taken so long. I would have responded sooner, but a new Zelda game distracted me... So just to make sure I understand: You can write to the first SQ, issue PREF, go do some other work like transforming a vertex that's already in cache (FMOV, FTRV, etc), then write to the secon...
- Sun May 07, 2023 4:09 pm
- Forum: Programming Discussion
- Topic: High Performance Rendering
- Replies: 12
- Views: 1781
Re: High Performance Rendering
That's not the right interpretation. It's saying that writing to a SQ that currently being written to RAM will cause a stall until the SQ has finished, but writing to the other, idle SQ will still run at full speed. Accessing cache is still fast while an SQ is being written to RAM, but accessing RAM...
- Sat Apr 01, 2023 2:16 am
- Forum: Programming Discussion
- Topic: How to define a variable at a specific memory location, and whether it's cached or not
- Replies: 9
- Views: 1024
Re: How to define a variable at a specific memory location, and whether it's cached or not
I can't say enough how many posts from you I've come across over the years that are overflowing with great advice. Do you happen to reside on any chat servers, like IRC or discord? There are many times when I'd love to pick someones brains regarding if what I'm doing is going to thrash my cache or ...
- Mon Feb 27, 2023 10:16 pm
- Forum: Programming Discussion
- Topic: How to define a variable at a specific memory location, and whether it's cached or not
- Replies: 9
- Views: 1024
Re: How to define a variable at a specific memory location, and whether it's cached or not
I'm not sure that method is a good way to do it. Manually setting addresses of variables in the linker script seems error prone, and I'm worried that GCC will overlap variables in RAM this way. For example, if a large normal, cached buffer is declared, and gets placed to it ranges from 0x8c100000 to...
- Fri Feb 03, 2023 7:51 pm
- Forum: Programming Discussion
- Topic: New gcc 12 and gcc-rs (Rust) toolchains
- Replies: 14
- Views: 1593
Re: New gcc 12 and gcc-rs (Rust) toolchains
I'd love to see wtf your collision algorithm looks like that owned the compiler so badly. :lol: It's for a K-d tree. The part that has problems ids comparing a single float against either X, Y, or Z of a 3D vector. But which axis it compares to is selected by the lowest 2 bits of the float. A simpl...
- Thu Feb 02, 2023 3:56 pm
- Forum: Programming Discussion
- Topic: New gcc 12 and gcc-rs (Rust) toolchains
- Replies: 14
- Views: 1593
Re: New gcc 12 and gcc-rs (Rust) toolchains
That sounds promising. I'm going to try GCC 12 tomorrow. For reference, the error I've been getting in my collision detection code is this . (I can't include it directly in this post because the forum gives me server errors when I try to submit) What values cause such long freezes on difftime? It so...
- Thu Feb 02, 2023 6:38 am
- Forum: Programming Discussion
- Topic: New gcc 12 and gcc-rs (Rust) toolchains
- Replies: 14
- Views: 1593
Re: New gcc 12 and gcc-rs (Rust) toolchains
Oh, wow. I've been having trouble with GCC 9.3.0 being unable to compile my collision detection code (but sh4-linux-gnu-gcc-10, installed though Xubuntu 20.04's apt, seemed to work correctly), so hopefully this will help. And I was looking into what would need to be done to do a Descent port, but on...
- Sat Dec 31, 2022 2:33 pm
- Forum: Programming Discussion
- Topic: Anybody know how to get rid of border for 2D graphics?
- Replies: 6
- Views: 695
- Fri Dec 30, 2022 10:43 pm
- Forum: Programming Discussion
- Topic: 3D in Parallax
- Replies: 1
- Views: 289
Re: 3D rotations in Parallax
I've thought about doing red-blue anaglyphs or connecting the Master System 3D glasses to the serial port to do stereography on the Dreamcast, but the DC isn't, uh, exactly equipped to do VR. About getting the objects to move seperately, you have to remake the matrix for each object. I don't know ab...