Which platform do I taaaaaaeeeeeek?

Posted by
August 19th, 2015 10:36 pm

I’m probably in.

Toolkit will be VIM, GIMP and/or pixra, SchismTracker, f3m, and either gcc-arm or clang.

Target platform will be one of these:

  • GBA: I’m comfortable with this.
  • DS: I have a toolchain, but it’s incomplete and I’m not sure how VRAM behaves on this. But my toolchain is complete enough to draw a spinning cube.
  • PSX: I have a rather fragile toolchain which uses clang + binutils-mips + some glue scripts written in Python, and it requires me to mess with the -O flag until the damn thing behaves. I’m mostly keen on giving this a crack, though, even though it’s harder to do 3D on it than the DS (there’s no Z buffer).

DS and PSX both have hardware sound mixing (16 and 24 channels respectively), so ideally I’d have to modify f3m to take advantage of this – while I could do the mixing on the CPU, it would be a bit silly. However, while the DS can accept raw 8-bit sound data, for the PSX there’s a snag: Samples are compressed using some form of ADPCM not too dissimilar to BRR but rather dissimilar to IMA ADPCM.

This form of ADPCM requires that loops align to a 28-sample boundary. Dammit. I’d probably have to apply some resampling to ensure that this is the case. Not sure whether I should bastardise the s3m format or implement the compressor in the game code itself – as I like the music to be easily rippable I’d probably go for the latter… and probably just not use loops.

Or I could just softmix it and bang it into the streaming audio buffers. Not sure how to do that though.

As for “filesystem” access, I don’t quite have sufficient tools for generating a bin/toc pair (ultimately I’d need to generate the P/Q subchannels properly), and even if I did have suitable tools I don’t have code for accessing the filesystem, so I’d be stuck with a PS-X EXE file. This will limit me to the 2MB of RAM available. Seeing as I’ve managed to do entries for 32KB ROM cartridges on a system with 8KB of RAM, this shouldn’t be an issue.

I’d also have to deal with inputs. The DS shouldn’t be an issue, as long as I just simply don’t bother with the touchscreen. The PSX handles its controllers via some serial protocol which I will need to mess around with. Shouldn’t be too hard though.

Finally, I need to get vblank timing working. As I don’t have working interrupt code yet, this will be a tad problematic.

Ultimately though, even with just video and input I should be all good.


Leave a Reply

You must be logged in to post a comment.

[cache: storing page]