Archive for November, 2007

Porting old PC games

Wednesday, November 28th, 2007

When I was just starting to program for the PSP, I envisioned first doing a port of fMSX, then a port of an emulator specifically for emulating arcade versions of Mortal Kombat games 1-3. Since I don’t think any emulators other than MAME support the games (and MAME’s source is a tangled mess), I doubt that phase will ever come to fruition.

Most recently I’ve also considered porting older games, however, and if someone else doesn’t do them first (I hope they do), I just might do a port myself. Two obvious choices right now are OpenTyrian, a rewrite of Tyrian, and Wargus, the Warcraft II-compatible RTS engine based on Stratagus. I prefer not to port these projects myself, as they’re both based on SDL, and I happen to have an inherent dislike for hardware abstraction frameworks.

If you’re looking for an interesting port project, both of these games should be a welcome distraction from the many flavors of DooM already ported to the PSP.

Caprice32 PSP updated

Wednesday, November 28th, 2007

Version 4.2.0.2 of Caprice32 has been released. New in this version:

  • ZIP file support for disk and tape images
  • Disk images can be saved, ejected and loaded without resetting the system (System tab)
  • Save state autoloading – any save state slot can be designated as the autoload slot (Options tab, disabled by default). Saved games in the autoload slot are loaded any time a game is loaded from the Game tab
  • CPC model is now correctly reset when modified via the System menu

For more information, please see the documentation

Download

SNA support

Monday, November 26th, 2007

While there will be no support for SNA files, as mentioned in an earlier post, there will be a more sensible way to quickly load and run disk and tape images in the next version of Caprice32 PSP.

For those who are interested in why exactly SNA will not be supported, here are the reasons:

  1. SNA files are model-dependent. Once a snapshot is created for a 464, for example, it can no longer be used for another model, since the file itself captures the system’s identity
  2. SNA files are emulator-dependent. They are of little use to anyone using another emulator
  3. For the above two reasons, I do not want to contribute to saturation of SNA files on the web, when much better alternatives (ROM, tape and disk images) are readily available
  4. Treating SNA files as regular image files means supporting save states for the SNA file. This just seems recursively silly

This decision is final (sorry); however, if you absolutely insist on loading SNA files, feel free to add such functionality by downloading and compiling your own copy (ah, the beauty of open source software).

I am aware of CPC’s inflexibility with regard to disk loading, however, and as mentioned before, there will be a more sensible way to load, say, Gryzor, and instantly see the title screen, instead of having to cat and run your way through BASIC. So pull up a chair and stick around, this should be interesting, if not fun and (gasp!) useful :)

Future of Caprice32

Friday, November 23rd, 2007

Thanks to those who submitted feedback about Caprice32, ZIP and multi-disk support will be added in the next release.

SNA files, on the other hand, will not be supported, and here’s why. SNA files are not proper cartridges or disk images – they’re save state files containing a “snapshot” of memory and CPU registers. The Save State tab provides the same functionality (except as an added bonus, it GZip’s the save states, making them a lot smaller).

If you want to convert an existing SNA file to Caprice32 PSP’s save state format, here’s how to do it:

  • Compress the SNA file with GZip
  • Pick some PNG image (any in-game screenshot made with Caprice32 PSP will do)
  • Concatenate the PNG image with the GZipped SNA file in the following order: PNG image, SNA file
  • Rename the resulting file so that it’s composed of the full name of the disk image (including the extension), plus ‘.sXX’ as an extension, where XX is an integer between 00 to 10. Example: 1943.dsk.s00
  • Place the file in the SAVEDATA directory, and it will be available when the DSK file is loaded.

The infernal question

Thursday, November 22nd, 2007

One question that I’ve been asked time and time again (and most recently by zx-81) is “why bother porting an emulator when there are other ports already?” This question was beaten to death when SMS Plus PSP was first released, and still comes up occasionally.

The number one reason is simply that I enjoy porting software to PSP, especially classic computer emulators. I like pushing the limits and capabilities of the (yet unnamed) psp library that I’ve been developing since the first fMSX release. The fact that another emulator may already exist (and may, in fact, be better) is a non-issue for me, as I don’t do it for any reason other than my personal satisfaction.

Second reason is that I believe having a choice in emulators is great. The only reason I got into programming for PSP is because I thought that the MSX emulators of the time could be a lot better.

I attempt to port in a manner that makes it possible to merge the PSP port with the main branch of the emulator, and I’m happy to let any interested maintainer of the emulator merge my code with theirs. I don’t generally touch emulation code, unless it results in significant optimization—the only exception to this rule has so far been fMSX and inclusion of SCC/MSXMusic/MSXAudio – and it’s largely thanks to the efforts of Vincent van Dam and his excellent fMSX SDL port.

When possible, I attempt to port a different emulator than one that’s already available. For example, as mentioned earlier, Caprice32 was not my first choice for a CPC emulator. Unfortunately, Arnold’s performance was nowhere near “acceptable,” so Caprice was my second choice.

And finally, there are a number of ported, working, but unfinished emulators that are currently littering my svn repository’s trunk branch, some of which may eventually see the light of day.

Hope this was enlightening. Comments are welcome.

Linking and suggestions

Wednesday, November 21st, 2007

If you’re a site admin and post news about a new or updated emulator release, please link to the weblog article’s permalink (by right-clicking the title and selecting ‘Copy Link Location’) and not to the weblog’s root address (0xff.akop.org). Alternatively, you can link to the page of the emulator directly.

For those who’d like to leave comments or suggestions, please leave them at the weblog. I’m unable to read comments at other sites (there are simply too many).

Thanks!

Caprice32 PSP

Wednesday, November 21st, 2007

Caprice32 4.2.0.0 is the latest addition to the collection of emulators. It’s an Amstrad CPC emulator, and is my second choice for a port. My initial attempt was to port Arnold, which is a (arguably) more accurate emulator, but due to its poor performance on the PSP (~15 fps), the idea was scrapped.

Caprice32 is a lot faster, though the rendering subsystem used in the current version is from version 4.1.0, for performance reasons. If/when the renderer is optimized, the PSP port will be updated to reflect the change.

Current version is also missing ZIP file support – this will be implemented if enough people express interest.

Download