Wolf32X - finally in beta!
Moderator: Mask of Destiny
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Wolf32X - finally in beta!
Okay, after a LOT of work, here's beta 1 of Wolf32X. I completely reworked the "file" handling so that everything is in ROM, with no memory allocated other than static arrays used for things that change. No more memory corruption! This also slimmed things down a bit - Wolf32X now has 19 M Power!! That's 2.5 MB for those of us that laugh at the Mbit unit.
The other major addition is working digital sound - this is fully tested on a real 32X. The sound is great and doesn't slow the game at all. I'll probably take a break before working on FM audio.
As usual, all the source is included. That includes the new unpacker I wrote to fully process the data files. It should work on the Wolf3D full files, as well as Spear of Doom shareware and full files. If there's a call for it, I'll compile a version of the SOD shareware.
EDIT: Went ahead and compiled SOD Shareware. The second link has BOTH Wolf3d and SOD Shareware.
EDIT 2009-02-21: Minor update - fixed six button controller support. Thanks to snake for the help!
EDIT 2009-03-09: Major update! Added FM sound effects and Load/Save!
EDIT 2009-03-11: Added auto-map. Read the new readme file for details.
EDIT 2009-06-07: Added mouse support.
Wolf32X-b1.zip
w3d-sod-sw-b1.zip
w3d-sod-sw-b2.zip
w3d-sod-sw-b3.zip
w3d-sod-sw-b4.zip
w3d-sod-sw-b5.zip
Oh, here's the "official" test platform.
The other major addition is working digital sound - this is fully tested on a real 32X. The sound is great and doesn't slow the game at all. I'll probably take a break before working on FM audio.
As usual, all the source is included. That includes the new unpacker I wrote to fully process the data files. It should work on the Wolf3D full files, as well as Spear of Doom shareware and full files. If there's a call for it, I'll compile a version of the SOD shareware.
EDIT: Went ahead and compiled SOD Shareware. The second link has BOTH Wolf3d and SOD Shareware.
EDIT 2009-02-21: Minor update - fixed six button controller support. Thanks to snake for the help!
EDIT 2009-03-09: Major update! Added FM sound effects and Load/Save!
EDIT 2009-03-11: Added auto-map. Read the new readme file for details.
EDIT 2009-06-07: Added mouse support.
Wolf32X-b1.zip
w3d-sod-sw-b1.zip
w3d-sod-sw-b2.zip
w3d-sod-sw-b3.zip
w3d-sod-sw-b4.zip
w3d-sod-sw-b5.zip
Oh, here's the "official" test platform.
Last edited by Chilly Willy on Sun Jun 07, 2009 6:08 am, edited 5 times in total.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
http://www.fileden.com/files/2008/4/21/ ... SOD32X.jpg
http://www.fileden.com/files/2008/4/21/ ... OD32X2.jpg
What a mess
http://www.fileden.com/files/2008/4/21/ ... CHMESS.jpg
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
this is really impressive job
about 6 button support, do you use the same routine as in official games ?
I think there need to be a delay between TH transitions, Gens (and most emulators) immediately swap the returned button values as soon as TH state is changed.
Also, in Gens, the TH cycle counter is reseted at the start of each line AND when a bus request is issued...
On real hardware, this would mean the pad logic resets its internal state if TH has not changed after a certain amount of time, you probably have to deal with timings here...
about 6 button support, do you use the same routine as in official games ?
I think there need to be a delay between TH transitions, Gens (and most emulators) immediately swap the returned button values as soon as TH state is changed.
Also, in Gens, the TH cycle counter is reseted at the start of each line AND when a bus request is issued...
On real hardware, this would mean the pad logic resets its internal state if TH has not changed after a certain amount of time, you probably have to deal with timings here...
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
I didn't use the SEGA code. I used something simplified, but should work. Seriously, I never believed it was that strict as I had no trouble at all making 6 buttons sticks work on the Amiga. What's REALLY weird is that the six button code doesn't work on Kega Fusion - I'd REALLY like to know why that fails. timing shouldn't really be a consideration at all on emulators. It's not like two nops instead of three makes ANY difference to an emu.Eke wrote:this is really impressive job
about 6 button support, do you use the same routine as in official games ?
I think there need to be a delay between TH transitions, Gens (and most emulators) immediately swap the returned button values as soon as TH state is changed.
Also, in Gens, the TH cycle counter is reseted at the start of each line AND when a bus request is issued...
On real hardware, this would mean the pad logic resets its internal state if TH has not changed after a certain amount of time, you probably have to deal with timings here...
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:
About the music:
This game uses MIDI files. Isn't simple YM2612 MIDI player on SMD side will be much simpler to do than handle OPL emulation?Chilly Willy wrote:Well, I'm going to try the "standard" fmopl emulation code and see if the slave SH2 can handle it.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
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: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:
This game uses MIDI files. Isn't simple YM2612 MIDI player on SMD side will be much simpler to do than handle OPL emulation?Chilly Willy wrote:Well, I'm going to try the "standard" fmopl emulation code and see if the slave SH2 can handle it.
Code: Select all
while (MusicCount <= 0) {
dat = *MusicData++;
MusicCount = *MusicData++;
MusicLength -= 4;
OPLWrite(OPL, dat & 0xFF, dat >> 8);
}
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.
What's this then? It copyrighted by original author, does not look like remake.Chilly Willy wrote:No, it doesn't use MIDI.
I'm sure, good direct port of original code to SMD isn't possible, it probably require completely new engine to achieve good results.Chilly Willy wrote: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.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Those are probably from something like the Apple version. They're certainly not part of the original file set.
The digital sound effects are in the vswap file. The synth sound effects and music are in the audiot file. There is no midi in either one. That's why most open source conversions of Wolf3D don't have any music. It's only recently that the FMOPL emulation was taken from MAME to use in new conversions to play the synth effects and music.
The source for the Apple version was never released, so it's rare that you find a conversion using the Apple version files. Those files would be better for a MD version since they're also especially designed for 16 color systems with low memory as well.
The digital sound effects are in the vswap file. The synth sound effects and music are in the audiot file. There is no midi in either one. That's why most open source conversions of Wolf3D don't have any music. It's only recently that the FMOPL emulation was taken from MAME to use in new conversions to play the synth effects and music.
The source for the Apple version was never released, so it's rare that you find a conversion using the Apple version files. Those files would be better for a MD version since they're also especially designed for 16 color systems with low memory as well.
-
- Very interested
- Posts: 256
- Joined: Tue Sep 11, 2007 9:10 pm
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Exactly. There are times when "ports" are really just entirely new games with (remotely) similar graphics and game play.tomaitheous wrote:Like what they did on a stock SNES (the wolf3D port).Shiru wrote: I'm sure, good direct port of original code to SMD isn't possible, it probably require completely new engine to achieve good results.