From its inception in October of 2016, WashingtonDC has always used github as its primary source repository. Github is a company that provides free git hosting for open-source projects. It's probably the most popular open-source project hosting service in the world. I've been hosting my various personal programming projects there since 2012.
Github was originally an independent corporation, but in 2018 they were bought out by Microsoft. Microsoft has used the open-source code hosted on github to develop a GVaaS (GPL Violations as a Service) tool called copilot.
I have a lot of opinions about this, and most of them aren't directly related to WashingtonDC or Dreamcast so I don't want to put them in the blog, but if you're curious you can read my full thoughts on the situation here.
From now on, WashingtonDC's official upstream git repository will be hosted on a competing service called gitlab. I apologize for the inconvenience this may cause but I really don't think anybody should be using a company which thinks it is exempt from license terms to host their projects. I'll still be keeping my github profile around because I occasionally need to open PRs on other peoples' code, but as far as my own code goes github is dead to me.
The URL for the gitlab repo is https://gitlab.com/washemu/washdc.
Since the URL is changing, I'm also taking the opportunity to rename the emulator from WashingtonDC to washDC. This is something I've wanted to do for several years (in fact, it's already called washDC several times in the codebase) but it never seemed worth the trouble since that would entail changing the URL of the git repo. Now that the URL is changing due to this github bullshit, I might as well rename the emulator too.
With regards to WashingtonDC/washDC itself, nothing has changed except the name being changed to washDC. WashingtonDC/washDC is still open-source software, and it is still available under the terms of the GNU GPL. The official website of the project is still http://www.washemu.org. I will continue to support Microsoft Windows as a platform even though it's made by the same company as copilot. The only thing that's changing is that the official upstream git repo will be hosted at https://gitlab.com/washemu/washdc.
I'm also working on making the site look better. washemu.org is written using emac's org-mode markup language, which is exported to HTML using ox-html.el. In the past I've used my own custom theme to do this which mimicked the old geocities aesthetic, but it's always been a bit of an eyesore and I didn't want to fix it because that would cut into my WashingtonDC-development time. I'm finally giving up on that theme and using a theme called ReadTheOrg, which you can find here.
Or maybe I'll try a different theme, we'll see. In any event I'm greatful towards the creators of this theme despite my criticisms. I hope that last paragraph didn't sound too negative, ReadTheOrg really is a great theme.
I didn't get any work done on WashingtonDC this weekend because I was too busy writing that rant about github/Microsoft's hypocrisy, but I'll get more done next week. I've got a branch going called make_aica_great_again where I'm finally working on fixing all the longstanding problems with WashingtonDC's AICA audio implementation. When I get back to work I'm going to finally get the DSP implemented, but even without it make_aica_great_again already sounds significantly better than the master branch. I think you're going to love it when this merges to master, bad audio emulation is the biggest problem with washDC and once it's fixed I think this emulator will finally be in a position where it can be considered as an alternative to the other major Dreamcast emulators out there.
I added another test to the hw tests section. It tests that the emulator implemented the VRAM memory bus correctly.
TBH this test is kinda pedantic and I doubt the things it tests actually matter. I made this a few years ago becuase I was convinced I had found a game which relies upon a very specific hardware quirk of the VRAM bus, but eventually that turned out to be incorrect.
So this test is kind-of a waste of time but it's something I made and it does test for actual hardware quirks that could otherwise be easily overlooked by an emulator so I might as well keep it around. I'm actually using it right now to test some that some optimizations I'm making don't break VRAM writes so it's not totally useless. Sometimes it's useful to have a test that does lots of uninteresting things just to prove or disprove that your emulator is sane.
also happy thanksgiving, i guess.
I've added a new section to the site where I'm going to be publishing the various hardware tests I create while I'm working on WashingtonDC. I've been making Dreamcast hardware tests for various reasons ever since the beginning of WashingtonDC six years ago, but they've usually been simple "throwaway" tests that get discarded once they've served their purpose. Going forward I'm going to publish them here so that they're around in case I or somebody else needs them in the future.
So far there are two tests, one that I ported from DS back in 2019, and a newer one I just created in the past few days to test PowerVR2's backface culling. In both cases I've made the source code available. I'll also be providing binary downloads in the form of .cdi images, although I don't have one ready yet for the culling test because it's so new.
The Last Two Years
The past two years have been really difficult for me, but I finally feel like I'm in a state where I can get back to work on WashingtonDC, so I'm un-abandonning the project. The cancer treatments I've received over the past two years have taken a great toll on me both mentally and physically, and I'm not sure if I'll ever be able to work as hard on WashingtonDC as I used to.
Over the past two years, I've undergone seven rounds of chemotherapy, twenty-five doses of targeted radiation, approximately ten different surgeries, and a clinical trial for a new form of immunotherapy. But the biggest and most damaging treatment of all is that my left leg had to be amputated above the knee. This has been the biggest reason for my lack of activity; in addition to limiting my mobility, it has also left me in a state of unending chronic pain.
For obvious reasons the large sarcoma on my left leg is gone but it had already metastasized to my lungs back in 2020 before I wrote my last blog post, so I still have cancer. I've actually got another surgery next week so that might lead to another period of WashingtonDC not being worked on, although it won't be nearly as long as the last one.
Since I've gotten back to work, I've focused primarily on quality-of-life features. The following new features have been added:
- loading of compressed MAME chd images
- these often take up significantly less space than the GDI format
- the most extreme example is Namco Museum, which is 1.2GB as a GDI but only 14 MB as a chd
- most games are somewhere around 500MB as a chd, and 1.2GB as a GDI
- they're also entirely contained in a single file, unlike GDI which consists of a directory with several files inside
- they can be created from GDI images using the chdman program which is included with MAME
- these often take up significantly less space than the GDI format
- loading and direct-booting ELF files
- this is primarily of interest to homebrew developers who test their creations on emulators
- previously WashingtonDC only supported loading raw binaries of SH-4 programs which had to be created from ELF files using the objcopy program
- symbols are not loaded (yet)
- as before, remote GDB instances can load symbols from elf files so you can use that when debugging
- system call dumps are no longer required when direct-booting ELF or
raw binary programs
- firmware image (-b option) and flash image (-f option) are still required
- the new direct-boot implementation copies the system calls from the firmware image into where they would be in memory after a normal boot.
- the arguments taken by the washingtondc program itself have been
- the new argument format are documented in README.org
- this is being done because i had received feedback that the old format was causing confusion for some users.
- the game to load is now specified as the first non-option argument
- by "non-option argument", i mean the first argument that does not start with a hyphen (-) charactor or the first argument that follows two hyphens next to each other (–)
- the old -m flag which used to specify which disc-image to load (for .gdi and .cdi images) is now gone
- the old -u flag which used to specify which binary program to direct-boot is now gone
- regardless of whether you're loading .cdi, .gdi, .chd, .bin, or .elf, you do so by making that image the first non-option argument on the command line
- this will cause problems for people who are used to the old
arguments, and I'm sorry for that
- this seemed like the best time to change things up since I doubt there are any people who are still using WashingtonDC after two years of abandonment.
WashingtonDC is GPL again
Regarding the licensing situation, I regret my decision to change WashingtonDC's license to BSD two years ago. I was in a state of panic when I did this, and I was worried that if my medical condition deteriorated too fast then I wouldn't have a chance to work on WashingtonDC again, and I really didn't want it to be abandoned after my death. The BSD license seemed like a good way to maximize an orphaned project's usability.
In general I'm not a particularly big fan of permissive licenses like BSD, so I changed the license back to GPL in commit a468ba7b0f after it became apparent that I was not going to die in the immediate future. I wish I had never relicensed WashingtonDC to BSD, but compared to all the other troubles I've had it's not that big of a deal.
In general the way licensing changes work is that each commit of WashingtonDC is licensed independently of the other commits; that is to say that the license that is included with any given version of WashingtonDC is the license that applies to that version of WashingtonDC. It cannot be applied to a version of WashingtonDC that uses a different license. So any code taken from a commit prior to b58f004a59 is licensed under the terms of the GNU GPL. Any code taken from commit a468ba7b0f or any commit after commit a468ba7b0f is also GPL. Any code taken between b58f004a59 and a468ba7b0f is licensed under the terms of the BSD license.
I'd prefer it if people only forked from GPL-licensed commits and not the BSD-licensed commits because, as I stated above, I regret relicensing WashingtonDC under the BSD license. However, what's done is done so if you want to fork from one of the BSD-licensed commits then you can. Just keep in mind that the BSD license is not the same thing as public domain; it does have terms and I expect anybody who forks from a BSD-licensed commit to abide by those terms, just as I expect anybody who takes code from a GPL-licensed commit to abide by the terms of the GPL.
I really regret having listened to the doctor I mentioned in the last snickerblog post who said the thing growing in my leg was nothing to worry about. Basically, I had been sent to see somebody who is supposed to know what she's talking about because she has an M.D. in Oncology from Harvard University, she told me the large lump in my leg didn't need to be biopsied because it was obviously just a hematoma, and she monitored it for about a year during which time it steadily got smaller. Then over the course of the past couple of months (about the same timeframe as the coronavirus apocalypse albeit unrelated) I noticed it looked like my leg was getting bigger again.
Towards the end of May, I had a previously scheduled ultrasound appointment so the oncologist could monitor its progress, and that showed the growth had become significantly larger. The Oncologist was alarmed but still informed me over the phone that it would be "unheard of" for a tumor to shrink without treatment and then start growing again like mine had. Eventually a sudden bought of pain drove me to the emergency room at the hospital, where they biopsied it and confirmed that it is indeed a type of cancer called Synovial Sarcoma.
So unfortunately the situation is that I don't know how much longer I'm going to be alive. From what I gather this is definitely not the sort of cancer where you can afford to wait an entire year to begin treatment because it's incurable after it metastasizes, and even if it hasn't metastatized it still has a tendency to reoccur. I'm starting the first of 8 rounds of chemotherapy soon and I'm going to get the primary tumor removed surgically.
I wish this story had a real obvious moral like "don't listen to traditional herbalists instead of real doctors", but the person I was getting my advice from was actually supposed to be a real doctor and she still gave be dangerous advice that might have already killed me so IDK.
I don't expect to be able to work on WashingtonDC during my cancer treatment, and even if I survive this I don't know if I can keep working on a large-scale project alone knowing that I'll have a reduced life expectency so I've decided to abandon the project. I may come back to it if I survive, or I may leave it abandoned forever and get involved with a larger group project where I know my work won't all go to waste if I die.
WashingtonDC has been moved to the 3-clause BSD license to maximize the amount of ways its code can be useful to anybody who may need it. This is a feature-complete Dreamcast emulator which was going to be better than its competitors given just a few more years of dev work. I had plans and infrastructure to support all sorts of cool features like Windows CE games, a Vulkan renderer, NAOMI arcade emulation and even a Wii U homebrew port but unfortunately that will probably never happen now.
The relicensing has forced me to ditch support for .cdi homebrew images because that was GPL code I had copied over from lxdream. That's unfortunate but it shouldn't be too hard to code up a replacement since this isn't "real" emulation code; it's just code to load an image of a CD in a certain file format from the host computer's filesystem. The only other bit of WashingtonDC code I didn't write was the ADPCM decoding stuff in AICA; that had been copied from FFMPEG (LGPL) but I was able to replace it with equivalent code from MAME which is already under the 3-clause BSD license. Other than those two bits of code which have already been taken care of, I am the sole author and copyright holder of WashingtonDC so I have the authority to do this licensing unilaterally. Unlike other emulators which have made similar license changes, there are no assblasted formed contributors who claim to still hold copyrights on part of the codebase, so if you use WashingtonDC's code for your project you can be assurred it's completely legitimately available under the terms of the 3-clause BSD license.
Anyways, it now occurrs to be that it's been over a year since the last snickerblog post so I may as well go over some of the things which I've gotten accomplished in that time. I've never been a big fan of the way certain emudevs hype themselves up and make an /r/emulation post every time they take a shit, but perhaps in retrospect I should have done that maybe a little so people would know how much work I do/did.
- Siginificant JIT improvements, especially in dispatch - this boosted performance a LOT
- Microsoft Windows port - you can now build WashingtonDC with mingw-w64 or Microsoft Visual Studio and run it on Windows!
- various timing fixes - now you can finally go for broke on Street Fighter Alpha 3!
- SH4 IRQ multiplexing bug - this one mistake I made in January 2017 was causing dozens of games to hang because IRQs wouldn't get raised, but after three years it got fixed
- MMU emmulation (interpreter mode only) - allows you to boot dozens of Windows CE games in interpreter mode only. Fan favorites like Resident Evil 2!
Those are just the major things that took a lot of time, there were also smaller things too, and the things on that list were all multi-month endeavors. I was working on this emulator almost every day since I started on October 14, 2016.