lxdream.org :: News
lxdream 0.9
released Oct 25
Download Now

Archive for the 'Development' Category

February 18th, 2008 by nkeynes
Render rewrite still going
Posted in Development

Still working on the render rewrite which is now in the lxdream-render branch (which may or may not even compile, and certainly won’t work at the moment).

The frontend stage to extract the poly+vertex data out into a nice array format is working now, and it runs in just about negligible time. Current task is to execute the rendering from the vertex buffer, which should be pretty straightforward. So… once this is done we should have a renderer which is a) much cleaner/extensible, b) much faster, and c) about the same or even less code.

If only all software engineering was like that ^_^.

Trunk Changes

  • Fix inverted mouse button sense
  • Fix incorrect error response size for maple get_condition buffers
  • Fix keypad keycode translations
  • Fix SLEEP timing fubar introduced in 0.8.3
February 10th, 2008 by nkeynes
Looking for linux (in all the wrong places?)
Posted in Development

It turns out that the lc2000.iso link that was posted (btw, thanks for that! ^_^) is an earlier version of linux-dc (it identifies as running the 2.4.0-test8 kernel) than the one I’d been testing with, and it exposed a few issues that needed fixing. These are now fixed in svn, except for the keyboard issue, for which source [0] would be very helpful if anyone has it?
Unfortunately this does mean I’m still looking for the original dreamcast-linux-010605.tar.bz2 (and the associated pre-built CDI and NRG images) - so if anyone has them, or knows where to find them, please let me know. I’m quite happy to host them locally, at least until the bandwidth runs out ^_^.

Btw for the BSD fans, there was supposed to have been a live netbsd disc floating around somewhere (the link from gxemul is dead) - has anyone seen it?

Edit: Nevermind, the NetBSD 3.1 image is actually included in the main netbsd mirror… having a look at it now.
Changes

  • Fix LDS/STS FPSCR/FPUL instructions to raise FPU disabled exceptions (wasn’t very well documented in the original SH4 manual)
  • Fix IDE dma read looping forever if the disc was removed or failed in the middle of the operation
  • Fix crash when changing maple peripherals (this one was just boneheaded)

[0] The image itself does have quite a bit of source on it, but I can’t find the associated linux-sh-dc kernel patches against 2.4.0-test8. Which, of course, is the bit I actually need…

Updated 13 Feb: I don’t need the 2.4.0 source patch anymore - turns out its not a bug, that version was just hard coded to expect the keyboard on the 4th maple port, and I had it on the 3rd. Although, it would still be good to see it for the sake of the history.

February 7th, 2008 by nkeynes
Rendering WIP
Posted in Development

I’ve started fiddling with the vertex shader, which has been fairly educational. It hasn’t actually fixed any of the bugs yet, but I’m hoping it will eventually give much better rendering accuracy. (Thanks to dknute for some good suggestions on the z-buffer problem) Unfortunately turning on the VS (even with a trivial program) gave me a big performance hit on my (admittedly relatively old) hardware, so it remains to be seen whether this will be viable for said hardware.
Also did some work to get osmesa support up and running, which is mostly done now but doesn’t quite work correctly (there’s some weird texture bugs, as well as the occasional projection matrix screwup). Unfortunately it’s also _really_ slow on any kind of real scene, so I’m not sure how much effort it’s worth spending on it at the moment[0].

Currently I’m working on reworking the renderer to use vertex buffers (or client-side arrays in the absense of VBO support), which are purported to be outrageously faster than immediate mode. We’ll see if that’s true, but even if there’s no big difference, the resultant data structures should be a lot easier to work with for processing purposes (saves traversing the tilebuffer repeatedly).
After the dust settles on that, the next priority is to fix the known outstanding blatant render bugs:

  • Bug #29: Texture coordinate problems.
  • Obviously wrong colours in some scenes
  • Issues with misplaced (or incorrect geometry) in some scenes (the pre-render data is demonstrably correct in these cases, so it’s either a misread of the scene data (probably), or cases that need to be handled specially).
  • Various hw specific issues with certain texture types (my favourite thus far is a scene that breaks on both ATI and NV but in quite different and distinct ways…)

And then on to shadow volumes (interesting), RTT (easy), pixel-level transparency sorting (hard) and all the other fun stuff ^_^.

[0] It should be possible to take just the sw rasterization engine out of mesa, and blow away the front end more or less completely. This would be a fair bit faster than it is currently, but it still probably won’t be fast enough. It also looks to involve quite a bit of work as well.

January 23rd, 2008 by nkeynes
Linux booting
Posted in Development

After fixing some boneheadedness in the ASIC event code (and a whole passel of translator caching and other bugs), I’ve finally gotten to the login prompt:
Linux-dc login prompt
(to clarify, this is the dreamcast-linux-010605 ISO that Takeshi Yaegashi put together several years ago, running a modified 2.4.5 kernel)

Unfortunately (after the happy dance), it was at this point that I realised I haven’t actually implemented the keyboard yet, so it’s impossible to do anything useful with it. It’s also admittedly painfully slow to start, but I was expecting that (TLB lookup is currently near pessimal).

Anyway, working on the keyboard driver now ^_^.

PS: If anyone has a working link to this image, please let me know where it is (I’d like to keep a link to it) - my google-fu has utterly failed to turn up a good version as yet, and my own copy is only on a somewhat scratched CD…
Changes

  • Add VMA support to the SH4 disassembly functions
  • Handle out-of-page delay slot execution with emulation single-step
  • Finish translator breakpoint implementation
  • Fix a pair of long standing ASIC event bugs
  • Fix xltcache forgetting to clear references to blocks before overwriting them
  • Fix recovery + backpatch records not being position independent (big duh!)
  • Fix yet another translate block bounds overrun
  • Fix MAC.L/MAC.W exception handling (broke the stack if the second arg caused an exception)
  • Fix various other minor bugs

Update: Just hacked together a quick keyboard driver, able to login and launch X now. Excellent…

January 16th, 2008 by nkeynes
lxdream-mmu merged
Posted in Development

Now that the mmu branch is running on all three platforms, I’ve merged it back to the trunk. Which is not to say that it’s _finished_ (it still doesn’t fully boot linux-dc), just that it doesn’t break anything that was previously working (to the best of my knowledge).

I’ve also working on some preliminary joystick/gamepad support (linux /dev/input/js*) - the driver itself is nearly trivial (the linux input interfaces are pretty nice), but I need to refactor our input event handling a little (currently it expects all input events to come from the UI).

Changes

  • Add support for breakpoints in translated code (about time)
  • Add MMU store-queue support
  • Handle dreamcast_stop() and dreamcast_reset() properly from translated code
  • Fix MMU build on OSX and x86-64
  • Fix testsh4×86 compilation
  • Fix TRAPA in emulation core
  • Fix MMU support in emulation core
  • Fix ITLB
  • Fix delay slot exception translation issues
January 11th, 2008 by nkeynes
Happy New Year!
Posted in Development

Hope everyone had a good christmas ^_^.

Second iteration of the MMU implementation is nearly done - it’s now slightly faster with MMU off than 0.8.2, which is nice (MMU-on is still rather slow, but I’ll worry about that later). The (old) version of linux-dc I’m using is still not booting yet though (odd IRQ errors now). Hopefully not much further now…

December 11th, 2007 by nkeynes
MMU-in-progress
Posted in Development

Currently working slowly through the MMU TLB implementation and testing. If all goes according to plan (as if that ever happens), we should have a running linux-dc sometime this month. Once that’s working I’ll cut a 0.8.2 and then get on to all those lovely rendering issues…

In unrelated news I’ve had to install an anti-spam filter on the forum, as the spam levels were starting to get out of control. So far it looks to be working well - a little too well, possibly - if anyone is having problems registering or posting, please let me know by email and I’ll sort it out.

November 29th, 2007 by nkeynes
Pbuffer support
Posted in Development

So… I’ve finally bitten the bullet and implemented some basic pbuffer-based rendering support, and even tidied up the glx code a little in the process (which is nice). It seems to work ok, but it would be good if I could get some of the people who were having framebuffer troubles to test out the current subversion trunk, and let me know if it works for them.

Don’t get me started on the current state of GL/GLX support in Linux… :-(

I’ve also spent some time on native CD and audio drivers for Mac OS X, but I’ll probably have to come back to them later (they’re taking a lot longer than I originally hoped unfortunately).
Next stop: MMU (finally! ^_^)

November 23rd, 2007 by nkeynes
x86-64 and Mac OS X ports
Posted in Development

It must be porting week - both the x86-64 and mac ports should (fingers crossed) work out of the box now. (Note that the mac port is intel only, and still requires X11+GTK 2.0 to build). Real native mac support will probably follow slowly as time permits - I’m getting something of a crash course in mac programming at the moment ^_^.

Changes

  • Added x86-64 support to the translator
  • Initial Mac OS X support (configuration and translator ABI changes)
  • Fix buggy TRAPA instruction (translator only - fixes several homebrew games)
  • Improve error handling of a few situations (can’t connect to display, etc)
  • Esound is now optional (but without it you’re not getting any audio)
  • Re-add the “Load Binary” menu entry that somehow got lost in the GUI revamp.
November 16th, 2007 by nkeynes
This week in lxdream
Posted in Development

The big change this week was the cutover to subversion for source control, otherwise things are fairly quiet at the moment. Also looking into a few homebrew games that are black-screening at the moment (damnit…) which would be nice to fix…
Changes

  • Converted source repository to subversion
  • Handful of minor bugfixes
  • Add support for CDI v4 (I think), and NRG 5.5+ images.
  • Add quick-n-dirty set of debian control files
  • Fix make install to include system rc file and exclude intermediate tools.
  • Start fixing up the unit/system tests to actually run properly
  • Added brazilian portugese and german UI translations (thanks to arthonis and linuxdonald)
.