Shiru wrote:Always greet to see new software for old systems, though I'd like to see version of this game for SMD, not 32X (it has Doom already).
About the music:
Chilly Willy wrote:Well, I'm going to try the "standard" fmopl emulation code and see if the slave SH2 can handle it.
This game uses MIDI files. Isn't simple YM2612 MIDI player on SMD side will be much simpler to do than handle OPL emulation?
No, it doesn't use MIDI. It uses an array of OPL register writes as the music. Here's the main loop that plays the music:
Code: Select all
while (MusicCount <= 0) {
dat = *MusicData++;
MusicCount = *MusicData++;
MusicLength -= 4;
OPLWrite(OPL, dat & 0xFF, dat >> 8);
}
But the SH2 really isn't powerful enough to use the "regular" YM3812 emulation. It would have to be something written in assembly with shortcuts all over the place. I don't feel like doing that. I'm thinking of trying to use the 2612 to simulate the 3812.
Another approach would be to actually use tracker files and ignore the OPL music altogether.
By the way, the game uses about 180 KB of bss space. Even if you take out the graphics buffer, that's still more than twice the total ram in the MD. There's no way you can do Wolf3D on the MD without gutting the level data to toss out enough to get it into 64 KB of ram.
The stats on Wolf32X were:
~115 KB code (which is in the rom)
~14 KB of data (copied from rom to ram)
~180 KB of bss
The rest of the rom image is static data left in the rom and the uncompressed data from the files. The code and static data in the rom is not a problem with a MD version of W3D. The data copied to ram could probably be pruned a little, but the bss is the killer. 16 KB is used to store the level info. 64 KB is used to store the frame buffer drawn into (this could be worked around), and the bulk of the rest is storing object and actor info for the stuff that populates the level.
I might take a crack at it later, but right now I'm more interested to see if I can get it to run on the CD. The big problem with running it on the CD is storing all the texture data in ram. We just can't dump it all in the rom - there isn't one. Actually, now that I think about it. The IDEAL way to do Wolf3D and Doom would be a combination of cart and CD: have all the textures and junk like that in the cart, and load the level data from the files off the CD.