RSS feed

Nathan's Journal

Created by nkeynes on Sat 06 of Mar., 2010 18:52 PST
Last post Mon 08 of Mar., 2010 20:33 PST
(1 Posts | 806032 Visits | Activity=2.00)

Thu 30 of Mar., 2006 06:48 PST

G2 Bus + more demos

Tags: lxdream

Taking a break from the BIOS, and after some small video fixes there's a couple more (admittedly fairly basic) KOS demos that are confirmed running now. I noticed that libdream based demos appear to be having a problem with the following snippet of (dreamcast) code

void dc_snd_ram_write_wait() {
        volatile unsigned long *a05f688c = (unsigned long*)0xa05f688c;
        int i;

        for (i=0; i<0x1800; i++) {
                if (a05f688c[0] & 1) break;

Why yes, that test _is_ backwards. For those playing along at home, the low bit of A05F688C (AKA the G2 status register) is set while the G2 bus is busy, and cleared when idle. So the above loop is actually waiting for the G2 to become busy rather than finish what it was doing. I'm not sure how this manages to actually work confused.

So... testing of the write FIFO is as follows: (Note that a "tick" here is not an exact measurement; It's roughly the time needed to poll the register and write the result back to main ram plus a half-dozen SH4 instructions).

Idle state is 0x0E (or at least, bits 1-3 were always 1 while testing). Immediately after executing a write to the G2 bus (ie to SPU ram), bit 5 is set, ie giving 0x2E. Shortly thereafter (within a couple of ticks) bit 4 is set, and bit 5 is cleared (0x1E). If there is a second write to the bus, bit 5 is set again, ie 0x3E.

At 2-3 ticks after bit 4 is set, bit 0 is set (0x1F or 0x3F). From this point, bit 4 remains high for roughly 1 tick per queued dword, and then bit 0 remains high for roughly 1.5 ticks per queued dword, eventually settling back to 0x0E.

My moderately uneducated guess is that bit 5 = data received from SH4, bit 4 = data queued, bit 0 = writing to G2 bus, but I could be wildly wrong. In any case, now to implement this...

Plasma demo (KOS)

2ndmix demo (KOS)

Tue 28 of Mar., 2006 15:51 PST

Another screenshot

Tags: lxdream

Date/time entry
Fixed up texture DMA and we're able to to see the date selection screen. It's not 100% correct (and I have a nasty feeling it may need to be z-sorted) but it's at least there. I've also added the AICA RTC (tuned to the system date/time), but it doesn't seem to like the values for some to-be-determined reason.

Update: Yep, that frame does need to be depth-sorted by the looks of things. *sigh*. This is going to be expensive...

Sat 25 of Mar., 2006 23:20 PST

Website tweaks

Tags: website

The site has been inaccessible for the last few days due to nameserver issues - according to Joker (external link) they've been suffering from a severe DDOS. It seems to be back to normal now, but access may be variable for a bit until they have a permanent solution. If the main address is unresolvable, you can try (external link) as an alternate.

I've started to rearrange the web-space a little to be more usable. The right-hand column was nuked to get some more space, and I've tidied up the useless crud in the main nav menu. The journal will also be moving to the main page just as soon as I write some intro content.

Unfortunately the tiki forums are kinda, well, crappy, at least in comparison with phpbb or vBulletin. Not sure yet whether it's going to be better/easier to integrate a real forum into the site, or to fix up what I've got currently into something more usable.

Thu 23 of Mar., 2006 05:49 PST

That's a little better

Tags: lxdream

Boot splash screen Mk.2
The rendering background plane doesn't seem to be very well documented online - It's expressed as a single triangle between three of the screen corners, in what I can only assume is the compiled vertex format (as opposed to the better understood TA format). I've added support for the most basic case (packed colour only), and fixed a couple of other small issues, so I now have a much prettier image to show off with cool

The remaining cases will have to wait until I encounter them, or until I have time to test all the options out on the DC, whichever comes first.

Wed 22 of Mar., 2006 07:15 PST

Booting progress

Tags: lxdream

Boot splash screen Mk1
Tracked down two more dumb-yet-lingering FP issues, with the result that the boot splash screen is finally being generated (approximately) correctly. It's not being _displayed_ correctly (as you can see), but at least that's due to renderer issues now.

I've actually already fixed a few things since this screenshot, but unfortunately it looks even worse at the moment. Hopefully I'll have a better shot in the next day or two biggrin

Tue 21 of Mar., 2006 18:31 PST

More small fixes

Tags: lxdream

I've started putting together the floating-point validation test cases. Fixed an incredibly stupid bug in FSCA that this picked up, but nothing cared. FSRRA is actually working correctly too, to my surprise. Also fixed up the IRQ handling in the IDE driver to be fully kosher, getting rid of a couple of dodgy hacks in the process. Nothing broken, at least.

Mon 20 of Mar., 2006 04:51 PST

A few small repairs

Tags: lxdream

Found and squashed a few minor bugs, with the overall result that KOS is able to start up correctly now (and shut down too, for that matter). Pong now gets as far as the menu (albeit with corrupted fonts - not surprisingly considering the BIOS hasn't been initialized). A couple of the other examples work, although many hit unimplemented features (render-to-texture being one notable issue).

And in a rather pleasant surprise, I also discovered that the BIOS does actually get as far as trying to load the bootstrap from the disc; Apparently I hadn't left it to run for long enough. This is, incidentally, quite despite the fact that the video and sound are both stuffed currently... In any case, I guess it's finally time to finish off the IDE interface

Wed 15 of Mar., 2006 07:00 PST

It's alive!

Tags: lxdream

'Nuff said - after fixing far too many of both dumb errors and misunderstandings, tatest looks to be running correctly at long last. Ok, so it's very slow at the moment (about 1 frame/second), but it's a start.

Now I just need to tidy up all the dodgy hacks and start implementing the other vertex cases. Oh and keep trying to get the bios running of course biggrin

Tue 14 of Mar., 2006 18:39 PST

Status update

Tags: lxdream

I've been spending some time focussing on the rendering pipeline (including a crash course (external link) in OpenGL (external link), which is now at the point where tatest (external link) is almost running. Well, it runs but it's not actually displaying anything yet; this will be sorted Real Soon Now(tm).

I've also added a quick and dirty ELF (external link) loader, along with a syscall hack for dcload, with the result that it's now possible to run the same test cases through dcload and DreamOn to compare the results.

So hopefully finally (after far far too long), we should start to see some actual results (vis running demos) in the very near future. biggrin

Sat 04 of Feb., 2006 18:32 PST

Miscellaneous Update

Tags: lxdream

I finally gave in and added some fake BIOS hooks so that I could run demos without going through the full boot process - with admittedly rather disappointing results so far (nothing I've tried seems to work properly yet cry). I did fix a bunch of FP double-precision bugs in the process though (gcc was using it for integer divides), which seems to have had the pleasant side-effect that the BIOS is now giving me actual vertices to render.

I also wasted a few days writing a replacement GTK widget to do more direct rendering, which in the end turned out not to actually help much (I thought I could get X to do the colour-space conversion, but apparently not, except maybe through Xv which is beyond the current scope), so I've reverted that for the time being and written the conversions by hand. On the bright side I can now claim I've written a GTK widget biggrin ( *sigh* so much boilerplate...)

I'm likely to be busy with other matters for a little while, but the next TODO item is the actual 3D rendering (now that I'm getting reasonably sane display lists to process).

First Page Fast Prev Prev PagePage: 5/32 Next Page Fast Next Last Page
1 3 4 5 6 7 9 32

About me

Nathan is a full-time software engineer and part-time maintainer of several pieces of open-source software that noone has even heard of (most notably lxdream and elr). His interests include programming language design, distributed systems, emulation, Japanese, and go.