Wolfenstein 3D SDL

This is a forum for discussing the feasibility of getting emulators, games, or other applications that have had their source released ported to the Dreamcast. Please read the Porting FAQ before starting a topic in this forum!
LyingWake
DCEmu Super Poster
DCEmu Super Poster
Posts: 1342
Joined: Thu Aug 26, 2004 4:05 am
Contact:

Post by LyingWake » Wed Jan 18, 2006 1:12 pm

Christuserloeser wrote:Do you think you could get save state compression implemented somehow - like in NesterDC ?
He mentioned he will try. If he doesn't get it working, we at least have the saves. That's all that really matters.
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Wed Jan 18, 2006 3:12 pm

I think they should be around 8 - 10 blocks per save with bzip2 compression. I'm pretty sure I have that working. My Spear of Destiny save just now was 8 blocks, but that's without an icon. If I can keep it under 10 blocks per save, then you can have 10 saves for each full version plus a config file for each to save your high scores and whatnot. I have to run out for a few hours right now, but I'm making decent progress toward a preliminary release. I'll hopefully have something soon, but no promises on a date.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am

Post by BlackAura » Wed Jan 18, 2006 6:30 pm

You might want to try gzip compression too. For small files, gzip often compresses better than bzip2, because it has far lower overhead.
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Thu Jan 19, 2006 11:16 pm

BlackAura wrote:You might want to try gzip compression too. For small files, gzip often compresses better than bzip2, because it has far lower overhead.
Thanks for the tip. I tried writing a program yesterday to decompress the bz2 saves and save them again with zlib so I could compare the sizes, but for some reason it doesn't work. I'll give that another go when I finish the other things on my list.
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Sun Jan 22, 2006 3:48 am

I don't have anything to release quite yet, but here's a quick status update:

Sound is about 90% done. I have to tweak how I'm playing back the digitized sounds, (and figure out how to turn off the music without turning off the fake AdLib sound card completely). In Steven Fuller's oss sound driver for Linux, the stereo placement was fine. There was a simple math calculation, and the given sound effect was played back at a certain volume on the left channel and a different volume on the right. I'm uploading all of the sound effects (except for the AdLib sounds, for reasons I'll explain below) to the DC sound hardware in one shot, and playing them back at the right time. The closer a sound source is to the camera, the louder it will be, if it's to the camera's left, it'll be panned left, etc. The problem is that some sounds that are far away sound too far away. It should be a simple fix, but I've got more important things to worry about now.

Music plays back great, except I can't get it to turn off without having the last note keep ringing out, which is annoying. I could just silence the streaming channel, but the music code is still the same code the Linux version uses, and the AdLib sound effects get mixed with the music automatically. What I may do is just kill the volume on the streaming channels and automatically switch to the PC speaker sounds if the user kills the music.

Another funny thing about the music... It sounded like crap until I said, "aw, hell, anything is worth a try..." and forced it to play in stereo. Once I did that, it sounded really good. It plays at 22,050 Hz. Because I had to generate the music, which is mono, and then make a copy of every sample to make it play back in stereo, I figured I should make it good for something. There will be an easter egg in the sound menu, and if you have your DC hooked up through a Dolby ProLogic reciever, you'll know when you've found it.

I finally got PC speaker sounds working, thanks to some code I jacked from the GP32 port (which is really good, by the way). I'm not sure exactly what I did different this time than the last time, but the only problem was that they were way too loud until I lowered the volume on them.

So... fix the music-hanging-on-the-last-note thing and the volume on the digitized sound effects, and the sound is as good as I'm going to get it.

Saving works, like I said before. With bz2 compression, the saves I've done have taken anywhere from 6 to 20 blocks. I still have to try gzip compression to see if that's any better, because 20 blocks is probably not as large as they'll get. Without compression, they would take up (iirc) 54-58 blocks each depending on if you're playing Wolf3D or SoD.

Right now, I'm working on the controls. In-game, the controller works fine. I based most of that code on the GP32 port since I like how the controls work, and we've got one extra button that the GP32 doesn't have, so we'll have a dedicated "run" button whereas the GP32 has one button which will open doors if you press it and run if you hold it down. Both the D-pad and the analog stick will move you around, "A" will fire a bullet/stab, "B" will open doors, "X" will run, "Y" will cycle through the weapons, and the triggers will strafe. "Start" will bring you back to the menu.

What I have to do now is make the controller work in the menus and input stuff that you'd normally need a keyboard for. For that, I plan on borrowing more code/ideas from the GP32 port.

After I'm done with controls, there are one or two things that I need to rewrite (my code to load saved games from the VMU tries to read files whether they're there or not, which I really shouldn't do) and I need to make a splashscreen or something with the credits and stuff like that. I'd like to promise I'll get a "finished" version done this week, but the Spring semester starts in two days and I really have no idea how busy I'm going to be. I will keep working on it as time permits, and once I'm happy enough with it (ie, it may be less than the best I can do as long as it's reasonably good) and I decide on a format for saves (bz2 or gzip), I'll release something.
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7482
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Contact:

Post by Quzar » Sun Jan 22, 2006 3:10 pm

to stop the last note from ringing, just upload a blank buffer (all 0s) into the stream before stopping it.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Sun Jan 22, 2006 7:51 pm

Quzar wrote:to stop the last note from ringing, just upload a blank buffer (all 0s) into the stream before stopping it.
If I stop the AdLib altogether, that will work just fine but the problem is if I keep the FM synth going to play the AdLib sound effects. The Adlib sound effects and the music get mixed together automatically into the same buffer, so I can't turn off one without turning off both, and if the music is off but I keep the FM synth on, it will keep refilling the buffer with the last note no matter how many times I fill it with 0's.
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7482
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Contact:

Post by Quzar » Mon Jan 23, 2006 1:21 am

well, that means that the fm synth just wasn't designed to do that, and so what you'll need to do is dive into the fm emulation, find where the two are mixed, and write something in along the lines of "if music mute, don't mix".
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Mon Jan 23, 2006 3:47 am

I'll figure it out. I can probably just reinitialize the FM synth if a new song starts or the user turns off the music. I'm pretty sure what I have to mess with is my own code and not the synth itself, but you're right. I have to dig through there and figure out what's what.
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Mon Jan 23, 2006 8:22 pm

Yup... All I had to do was add about six lines of code.

Code: Select all

vode SD_MusicOff()
{
     sqActive = false;
       // everything below here is new
    OPLResetChip(OPL);
    OPLWrite(OPL, 0x01, 0x20); // Set WSE=1
    OPLWrite(OPL, 0x08, 0x00); //Set CSM=0 & SEL=0
   sound_reset = true; /* in the sound thread, if there's a new sound effect to play OR if sound_reset==true, it will write some info to the proper registers... which accounts for the other two new lines of code. */
}
I may or may not do a proper release soon because school just started, but once I decide on which kind of compression to use for the saves and make sure there aren't any seriosly major issues (the "Read This" screen in Wolf3d Shareware is a pretty big problem now for anyone without a keyboard... you're stuck there) I'll bundle up an sbi or four and upload them someplace.
LyingWake
DCEmu Super Poster
DCEmu Super Poster
Posts: 1342
Joined: Thu Aug 26, 2004 4:05 am
Contact:

Post by LyingWake » Mon Jan 23, 2006 8:58 pm

Congrats on figuring it all out.

:cheers:
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Mon Jan 23, 2006 9:34 pm

Thanks. :D It certainly took long enough, although for most of that time it just sat on my hard drive for months while I was bogged down with school work.
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Wed Jan 25, 2006 11:18 pm

So, uh, anyone interested in Spear of Destiny Missions 2 and 3? I'm pretty sure I just got those working as well. (I just played the first level of Mission 2, but haven't tried Mission 3 or made sure I didn't break Mission 1) In addition to that, I have Good News, which will preceeded with some Bad News.

The Bad News: I can't remember my password for the Storm!Studios ftp (I've tried all the ones I can think of), so I won't be able to make a webpage or anything for this until I get in touch with Will Sams. I'm not sure if that will be difficult or not, as I haven't tried to contact him yet, but if he's really busy or something it could delay a "proper" release.

The Good News: I think I'm almost done with this port, so (fingers crossed) this weekend/next week, I may be able to upload files some place so you guys can have some fun (but no promises, since my schoolwork has to take priority).
LyingWake
DCEmu Super Poster
DCEmu Super Poster
Posts: 1342
Joined: Thu Aug 26, 2004 4:05 am
Contact:

Post by LyingWake » Wed Jan 25, 2006 11:41 pm

There's room at Consolevision if you need some webspace, OneThirty8. I can set you up with 10-20 MB which should be plenty enough for your Wolfenstein ports.
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Wed Jan 25, 2006 11:59 pm

That would be cool if I find that I can't get them up on Storm! Studios, but I'd hate to just pick up and move on Will when he was cool enough to keep my site up even though I haven't updated it in well over a year.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Contact:

Post by emptythought » Thu Mar 02, 2006 4:22 am

Any progress?
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Thu Mar 02, 2006 9:26 pm

There should be test builds floating around which should work fairly well. I think all three SoD missions are playable (haven't had time to play very far in them) and sound is about as good as I'm going to get it. If you saw that, that's pretty much what the "final product" is going to be. I'll try to get a public build out soon, but between school and work I simply haven't had the time to clean up the source code and whatnot. There was more I wanted to do with it, but I haven't had the time and I probably won't any time soon. I'm starting to get old, and I really need to put my head down and get through school without my GPA falling so I can get a TA appointment when I start grad school next year. Suddenly dawned on me recently that time to grow up was about 5 years ago. I'll be 30 before I know it, and I need to get into a job that doesn't suck the life out of me.

So... basically, I'll release source code and "official" binaries when I have a moment, but I'm not going to cry bloody murder if the "unofficial" bins get passed around since I don't know when I'll get back to this project. It could be next week, or it could be a few months from now. I just really don't know.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Contact:

Post by emptythought » Thu Mar 02, 2006 10:33 pm

Well I don't wanna send them out if they weren't meant for public. I'll wait until then.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Contact:

Post by emptythought » Mon Apr 24, 2006 8:18 pm

Bored, made a front cover.

Image
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Post by OneThirty8 » Mon Apr 24, 2006 11:52 pm

Looks good! I feel bad for not releasing anything publicly. I've made absolutely no progress since January. I believe that I have all three SoD missions working acceptably. The SoD demo can be played to completion, but I haven't had time to play that far into the full version or Wolf3D. Final exams are in a few weeks, and then I have a few days off before summer session starts. I'll try to dust off my source code, make sure it still compiles, and get it uploaded someplace when I have some time, although I don't think I'll be able to make any improvements over the last build I passed around. I know there are bugs, but I doubt I'll have time to fix them before I get swamped with work again.

I'll hopefully have more time for coding again at some point, but right now I'm really eager to finish school and get some stories published (in which ever order I can make those two things happen).
Post Reply