Search found 968 matches

by nymus
Wed Apr 19, 2017 10:19 pm
Forum: Programming Discussion
Topic: USB to Serial Port Adapter - Use as Dumb Terminal
Replies: 3
Views: 804

Re: USB to Serial Port Adapter - Use as Dumb Terminal

There's someone on the Gamedev.net forums who needs some help using dcload through the Dreamcast serial port. I've never used the serial adapter, so perhaps someone here could offer some advice? I thought about directing them here, but felt it would be better to include a solution. I think the expos...
by nymus
Wed Mar 29, 2017 12:40 pm
Forum: Programming Discussion
Topic: The case of the divide by zero
Replies: 17
Views: 2191

Re: The case of the divide by zero

The following code seems to allow some fpu exception handling. I hope it helps. #include <kos.h> typedef enum fpu_exception_source { E_FPU_ERROR = 0x00020000, V_INVALID_OP = 0x00010800, Z_DIVIDE_BY_ZERO = 0x00008400, O_OVERFLOW = 0x00004200, U_UNDERFLOW = 0x00002100, I_INEXACT = 0x00001080, CAUSE_EN...
by nymus
Wed Mar 29, 2017 4:54 am
Forum: Programming Discussion
Topic: Better understand the TA Bining Process & rasterization
Replies: 20
Views: 3235

Re: Better understand the TA Bining Process & rasterization

I read/watched it a while ago, but I think tbr for nvidia has to do with reducing memory bandwidth requirements by completing a piece of the scene and moving on. They can cache data for a single tile so maybe the texture, shader and vertex data for that tile can be processed in a localized manner an...
by nymus
Wed Mar 29, 2017 3:48 am
Forum: Programming Discussion
Topic: The case of the divide by zero
Replies: 17
Views: 2191

Re: The case of the divide by zero

I've tested disabling the fpu and it resets my Dreamcast right away, probably because of fp code in the kernel when interrupts are already blocked. I think you need one more shift (shll) to set bit 15. shll8 shll2 shll2 shll2 moves 1 to position 14. // these handlers are not even called because cpu ...
by nymus
Tue Mar 28, 2017 10:10 am
Forum: Programming Discussion
Topic: The case of the divide by zero
Replies: 17
Views: 2191

Re: The case of the divide by zero

Thanks! I wasn't sure which part in the post was inaccurate. That actually starts to make fp math clearer. So, wrt the OP, there is little risk of arriving at zero by repeated division / multiplation (of values that fit) since the mantissa stays roughly the same and the exponent will hold the "...
by nymus
Mon Mar 27, 2017 8:35 pm
Forum: Programming Discussion
Topic: The case of the divide by zero
Replies: 17
Views: 2191

Re: The case of the divide by zero

Yes! That's the document I've seen refrerenced before. It doesn't make any more sense today than the couple of times I've looked at it before :D. However, being "confused about the rest" seems a bit broad... I certainly have an over-simplified view by comparison, but I wouldn't say I'm com...
by nymus
Mon Mar 27, 2017 4:12 pm
Forum: Programming Discussion
Topic: The case of the divide by zero
Replies: 17
Views: 2191

Re: The case of the divide by zero

I just thought I'd try some pseudocode to imagine how one might go about handling fpu exceptions... there could be errors. // fpscr cause and enable masks in one. will write cause (ignored?) and enable to fpscr when enabling // will be compared to cause field when handling // manual says cause is fo...
by nymus
Mon Mar 27, 2017 3:06 pm
Forum: Programming Discussion
Topic: The case of the divide by zero
Replies: 17
Views: 2191

Re: The case of the divide by zero

I could be wrong, but I think KOS ignores FPU exceptions. perhaps this default handler in irq.c explains it: /* Default FPU exception handler (can't seem to turn these off) */ static void irq_def_fpu(irq_t src, irq_context_t *context) { (void)src; context->pc += 2; } IEEE754 floating point generates...
by nymus
Sun Mar 05, 2017 7:36 pm
Forum: Programming Discussion
Topic: freeglut+libEGL+libGLU ports
Replies: 21
Views: 4048

Re: freeglut+libEGL+libGLU ports

My condolences for your loss and best wishes as you cope.
by nymus
Sat Feb 18, 2017 4:54 pm
Forum: Programming Discussion
Topic: *ONE* KOS Error: libbz2 validation error
Replies: 15
Views: 2519

Re: *ONE* KOS Error: libbz2 validation error

Regarding genromfs, I don't think it has external dependencies so you could just go into ${KOS_BASE}/utils/genromfs and "make" which should build it. if not, looks like bogglez linked to the alternative thread... Going with what Bluecrab said about Python not being installed, check which v...
by nymus
Mon Nov 28, 2016 6:37 pm
Forum: Programming Discussion
Topic: Inline assembly vector operands
Replies: 7
Views: 1180

Re: Inline assembly vector operands

Further investigation reveals that gcc doesn't even recognize the vector registers outside of gas: typedef float v4sf __attribute__ ((vector_size(16))); // suggested elsewhere typedef union vec4u { v4sf v; float f[4]; } vec4; void sh4_fipr(v4sf *v1, v4sf *v2) { volatile register v4sf fv4 asm("f...
by nymus
Mon Nov 28, 2016 6:02 pm
Forum: Programming Discussion
Topic: Inline assembly vector operands
Replies: 7
Views: 1180

Re: Inline assembly vector operands

I found out the following, though... The sh family is not listed in targets with special constraints: https://gcc.gnu.org/onlinedocs/gccint/Machine-Constraints.html#Machine-Constraints I tried using the vector register definition suggested elsewhere but it didn't work: typedef float v4sf __attribute...
by nymus
Mon Nov 28, 2016 5:02 pm
Forum: Programming Discussion
Topic: Inline assembly vector operands
Replies: 7
Views: 1180

Re: Inline assembly vector operands

I tried a few different ways according to manuals and various guides but gcc always rejected the operands as invalid.

Reading mailing list and forum posts showed that this feature had not existed in gcc for the superh.
by nymus
Mon Oct 24, 2016 3:14 pm
Forum: Programming Discussion
Topic: Ordered a broadband adaptor; what's next?
Replies: 7
Views: 1392

Re: Ordered a broadband adaptor; what's next?

I'd say it's worth the money, especially for a primary development target. The price at $100-$150 seems to have remained "fair" considering how rare it is and the fact that I bought mine for about $90 in 2002. After building your dcload, you'll need to use the "arp" command to re...
by nymus
Mon Oct 24, 2016 1:51 pm
Forum: Programming Discussion
Topic: Ordered a broadband adaptor; what's next?
Replies: 7
Views: 1392

Re: Ordered a broadband adaptor; what's next?

Congrats. I'm curious about what the going rate of a broadband adapter is these days.
by nymus
Thu Oct 13, 2016 2:36 pm
Forum: Programming Discussion
Topic: snd_sfx_play_chn() causes sounds to loop
Replies: 9
Views: 1212

Re: snd_sfx_play_chn() causes sounds to loop

I've also noticed that it might be necessary to use a system besides sleeping to ensure that the sound system is ready. My testing is yielding inconsistent freezes, delays and even failures. Perhaps it's easier to use the mp3 or vorbis libraries since they handle all the low level details such as st...
by nymus
Thu Oct 13, 2016 12:28 pm
Forum: Programming Discussion
Topic: snd_sfx_play_chn() causes sounds to loop
Replies: 9
Views: 1212

Re: snd_sfx_play_chn() causes sounds to loop

Are you using real hardware, ant512? On my Dreamcast, the files seem to be playing just fine; none of the looping/overlap issues you describe. The only problem is that after playing about three times, there is a long pause and then the program resumes the regular interval (probably related to the sl...
by nymus
Thu Oct 13, 2016 10:17 am
Forum: Programming Discussion
Topic: snd_sfx_play_chn() causes sounds to loop
Replies: 9
Views: 1212

Re: snd_sfx_play_chn() causes sounds to loop

I seem to recall mention in KOS source code of a Dreamcast hardware "feature" where it automatically loops samples for you.

I think it was meant for background music and such...
by nymus
Tue Oct 11, 2016 12:36 pm
Forum: Programming Discussion
Topic: Testing .elf on real hardware
Replies: 14
Views: 4496

Re: Testing .elf on real hardware

Good Work ant512! Your game is fun! My very first experience with a computer was on an NCR system where I played a game just like this one. :)
by nymus
Mon Oct 10, 2016 1:31 am
Forum: Programming Discussion
Topic: Testing .elf on real hardware
Replies: 14
Views: 4496

Re: Testing .elf on real hardware

I haven't used Dreamshell but it seems that you can write standalone programs for it which might be why it's trying to load your .elf. Apparently, Dreamshell is able to load iso images so I would suggest converting your elf into a bootable iso by converting to binary, scrambling, creating iso, inser...