Re: [Tuxnes-devel] SDL audio player
Brought to you by:
tmmm
From: Jim U. <ji...@3e...> - 2002-05-03 19:18:30
|
At 11:14am on 2002 May 03, Mike Melanson did write: > On Fri, 3 May 2002, W. Michael Petullo wrote: > > Jim, why did you port the nofrendo engine to TuxNES instead of just > > modifying nofrendo to run on the Dreamcast? > As for why Jim did not port nofrendo, I don't believe the nofrendo > source was generally available Jim began his effort. Here are my reasons: - I had worked with nestra even before TuxNES was forked. I intended to produce proof-of-concept code utilizing a tile-based engine, accelerated with my 3dfx card. Which I did. Open-source NES emulators are a recent phenomenon; nestra was the only good one I could find at the time. - Years later, intending to do the same on the Dreamcast, I looked for nestra and found TuxNES. I knew nestra in great detail, so it seemed ideal. In retrospect, it may have been faster to port another emulator. But even then TuxNES was the only -good- open NES emu out there. Nester et al were still closed source. Nofrendo -may- have been open, but Matt Conte seemed to have dropped off the map. I tried keep the Dreamcast port integrated in the original TuxNES code, but the burden of compatibility became too large. TuxNES's portability also makes the code hard to follow (at least for me) and the #ifdefs for the DC obfuscated it more. So I scrapped code that was not sufficiently abstracted. But I did keep the plug-in model when possible--e.g. the DC has two separate renderers, "dc" and "dc-tile". I also made the sound engine a plug-in, adding "oss", "dc", "mute", and "none" outputs. Personally, I would try to simplify main(). It's one hell of a function, and it needs to be broken out into smaller functions. I did this to some extent in tuxnes-dc. But again, some code I replaced outright, because abstracting it was too much work at the time. I'd like to see, for example, the separate renderer/palette/sample_format selection code factored out into one reusable function. (I tried this, and failed.) This would aid not only readability but portability, especially to non-POSIX systems, although the latter perhaps does not concern you as much. -- "When I was a child, I did things as a child. Now that I'm a man, I bust your ass and get wild." --Black Sheep/Freak Y'all ji...@3e... / 0x43340710 / 517B C658 D2CB 260D 3E1F 5ED1 6DB3 FBB9 4334 0710 |