Jump to content

Chocolate Doom version 2 beta

Recommended Posts

The setup tool has an option to select MIDI backend, always has. I'm curious as to what source code changes you needed to make to get what you wanted.

Share this post

Link to post

Mix_SetMusicCMD in SDL_Mixer:

       // Load the MIDI

        music = Mix_LoadMUS(filename);
        if (music == NULL)
            // Failed to load

            fprintf(stderr, "Error loading midi: %s\n", Mix_GetError());

        // remove file now

    //    remove(filename);

    //    Z_Free(filename);

        return music;
Same kind of thing was done to eternity and a patch was made by mp2e: http://www.mediafire.com/download/k8f1b2tw2do46ey/eternity_sound.tar.xz

Only problem is a 1 second halt every time a track changes; and when exiting chocolate-doom, /tmp/doom.mid remains.

What this does is make an environment variable so *NIX users (and possibly Windows) can choose any midi backend they want (timidity++, amidi, fluidsynth, pmidi, hardware midi, etc.). No dependencies required what so ever. Way better than sdl_mixer's internal midi emulation IMO.

Share this post

Link to post
Holering said:

All that's needed is an environment variable and *NIX users can choose any midi backend (timidity++, amidi, pmidi, etc.). No dependencies what so ever. Better than sdl_mixer's internal midi emulation IMO.

Not sure if that is what you are talking about, but since sdl-mixer version 1.2.12 users can choose to use the Fluidsynth midi renderer by setting the SDL_SOUNDFONTS=/path/to/soundfont1:/path/to/soundfont2 and SDL_FORCE_SOUNDFONTS variables. If you are using Debian and have either the "musescore-soundfont-gm" and/or "fluid-soundfont-gm" packages installed, manually setting the variables should not be necessary anymore from sdl-mixer1.2 (1.2.12-6) onward.

Share this post

Link to post

Fluidsynth is broken in sdl_mixer; sadly.

SDL developers seem to neglect midi rendering as best they can. Fluidsynth actually sounds great outside of sdl_mixer (running as daemon or whatever), but inside sdl_mixer it's totally messed up. I'm not even joking. Wouldn't be surprised if the original timidity sounded normal outside sdl_mixer.

For the record, fluidsynth doesn't emulate all the various midi modules that timidity++ does (Roland SC-55, Sound Blaster Live!, XG, etc). It doesn't even support XG mappings AFAIK. It's a wonderful soundfont renderer but it can suck at times without having .pat support (you can make pat sets sound better than most soundfonts out there with just a text editor; I actually have vocals in Final Fantasy VII XG midi soundtrack working which is impossible without proper XG emulation and a custom 1GB pat set).

It wasn't really what I was talking about, but what you brought up shows off sdl_mixer's bad midi development (at least for *NIX users). You can't even use a real hardware midi module with sdl_mixer on Linux, unless you're using OSS (and that's a maybe).

Share this post

Link to post

There's a neat little bugger in 'i_video.c' - report here, because I do not have a git-uar account.

The game's dot "performance visualizer" doesn't draw all 20 dots when the difference in tics would require it to.
The active dot drawer only draws 10 because tics doesn't get scaled by 4 but 2 - capping the delay dot count at 10 instead of 20.
Black dots, removers, get drawn correctly.

i_video.c/line 1092 -> for (i=0 ; i<tics*2 ; i+=4) -> 2 should be 4.

Share this post

Link to post

Chocolate Doom already has native PC speaker support.

Share this post

Link to post

Maybe should've said Linux Chocolate-doom? My pc-speaker doesn't do a thing with chocolate-doom but it clearly works with other Linux programs. It also works with Doom 1.9 in win9x. Haven't tried Chocolate-Doom in Windows... PC speaker emulation works fine however.

Share this post

Link to post
plums said:

I don't know if this is outside the scope of "vanilla compatibility", but I have a joystick with 28 buttons, and chocolate doom doesn't seem to recognize the higher ones. I'm not sure how far up it will read. chocolate-doom-setup.exe does recognize all buttons, and I can move with the joystick, so I'm pretty sure it's not the fault of the hardware.

Took me a while to get round to it, but this is now fixed.

The solution I implemented was to use a virtual->physical joystick button mapping; the game code itself only supports up to 20 (virtual) buttons, but these virtual buttons can each map to any physical button as desired. Maybe the game sees you pressing button 1 to fire, but that's actually "button 50" on your super-duper controller.

If this all sounds a bit complicated then don't worry - the setup tool conveniently hides all of the details for you.

I've been doing quite a bit of work on the joystick code over the past few days, and it's now much improved.

Share this post

Link to post

I'm having some devbuild issues on Win32.

* I tried following the instructions for building Chocolate Doom on Windows with Cygwin. Some of the packages have changed versions or even names. (I think 'gcc-mingw-core' is now 'mingw-gcc-core' for instance.) SDL fails to build with the message Your compiler (gcc) does not produce Win32 executables! I can find a lot of references to this online, and how gcc no longer supports the '-mno-cygwin' flag, but no real solutions. Do I have to go back to gcc3?

* The latest non-gl branch build here is 113, which doesn't have the joystick fixes (I assume they work fine but I thought I should verify anyhow).

* The GL build here quits immediately on starting. stderr.txt reports IOperm_InstallDriver: Failed to start service (2). Unsure of whether GL development is at the point where putting this on the issue tracker is useful or not.

Also, there are two Chocolate Doom threads here on DoomWorld. Which is the preferred one?

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now