VOGONS


First post, by Ictoagh

User metadata
Rank Newbie
Rank
Newbie

I have a couple questions:

I downloaded the source to dosbox (wanted to see if I could debug/correct some problems I found w/ Firehawk (sierra) and the emulator, but, I can't seem to get it to build in VC6, I have dev-c++, but not sure where to start to build it from there.

Also, when running firehawk straight through windows, it seems to use the emulator driver, but fails to send the sysex messages, causing the wrong patches to be played, through dosbox (setting the midi device to win32), it seems to play through the GM Wavetable synth, no matter what.

So far, the emu is very nice indeed, glad to see a stay of sorts in the legal troubles... It appears to me that there's a problem with pitch slides (they don't) I've attached the files for comparison.

Attachments

  • Filename
    fhmscprob.zip
    File size
    4.32 MiB
    Downloads
    401 downloads
    File license
    Fair use/fair dealing exception

Reply 1 of 9, by canadacow

User metadata
Rank Member
Rank
Member

Yeah, at the present moment the pitch slides are emulated, but emulated incorrectly. I don't know of a fast/good sounding way to slide between two notes.

That aside, I've been meaning to post a new update but again, my attention has been detained elsewhere. Don't worry, I haven't forgotten about the emulator!

As for compiling it, I use Visual Studio .NET for most of my development and haven't used VC6. Exactly what errors are you getting? Send me some compiler output and I'll see what I can do to help you.

Last edited by canadacow on 2004-03-11, 11:48. Edited 1 time in total.

Reply 2 of 9, by vladr

User metadata
Rank Oldbie
Rank
Oldbie

Yeah, the .dsp is way out of step, files are missing from it etc. I attached mine, it may work better (I know for sure it compiles, just change the paths to SDL and zlib in the proj. properties.)

Attachments

  • Filename
    dosbox.dsp.zip
    File size
    2.35 KiB
    Downloads
    422 downloads
    File license
    Fair use/fair dealing exception

Reply 3 of 9, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Actually the vc6 workspace will be removed from the cvs.
as vc6 creates broken code in the cpu core.

Water flows down the stream
How to ask questions the smart way!

Reply 4 of 9, by vladr

User metadata
Rank Oldbie
Rank
Oldbie

I failed to mention, get the latest SP for VC (SP5 IIRC) and the CPU pack (for the MMX optimisations in the MT-32 code.) And some hacks will be necessary in the scaling (2x, 2xsai etc.) cdoe because VC6's parser has serious problems with pointers to "templatized" functions.

Reply 5 of 9, by Srecko

User metadata
Rank Member
Rank
Member

I have problems compiling emulator with VS.NET 2003 (7.1). Compiler gives:

\VS\dbcvs\mt32cvs\CSynthMT32.cpp(2531) : error C2666: 'pow' : 7 overloads have similar conversions
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(620): could be 'long double pow(long double,int)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(618): or 'long double pow(long double,long double)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(572): or 'float pow(float,int)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(570): or 'float pow(float,float)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(534): or 'double pow(int,int)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(532): or 'double pow(double,int)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(195): or 'double pow(double,double)'
while trying to match the argument list '(int, double)'

About 10-15 occurrences.
It also complains about cases with (double,float) and (float, double) combinations.
This doesn't happen with VS.NET 2002. It seems that declarations in "math.h" are changed.

Reply 6 of 9, by Ictoagh

User metadata
Rank Newbie
Rank
Newbie

vladr:

Yep, this was the main thing VC was choking on was the templates (also, a couple defineguid statements in one of the CD-ROM header files. (Commented out, and the complaints dissapeared.... )

I wound up hacking together some pretty ugly macros that "look like" templates, It appears now I have a problem linking curses, and it appears the MT-32 files weren't included in the dsp, so I will have to add those.

Also, IIRC I have the latest SP for Visual Studio, but can't remember if I installed the processor pack or not... I know I can at least build programs with MMX ASM, but browsing the MT-32 source file, I don't know about SSE & 3DNow... If all else fails, I suppose I could just #define those out, and use the non-sse filter functions.

Does anyone know exactly what the broken code is in CPU, when building under VC6?

Reply 8 of 9, by Ictoagh

User metadata
Rank Newbie
Rank
Newbie

I got it to build, however, I get an access violation at this line:

		tpoly->pStatus[x].pulsewidth = pcache[x].pulsewidth + pwveltable[pcache[x].pwsens][vel];

Here's the contents of pcache[x] (x = 3 in this case, it seems that there's not enough room allocated for the variable:

-	&pcache[x]	0x03e6aa78
rawPCM 0x00000000
+ convPCM {...}
playPartial 0x00 ''
usePartial 0x00 ''
PCMPartial 0x00 ''
waveform 0xcd 'Í'
pulsewidth 0xcdcdcdcd
pwsens 0xcdcdcdcd
pitchshift 0xcdcdcdcd
fineshift 0xcdcdcdcd
sustain 0xcd 'Í'
lfodepth 0xcdcdcdcd
lforate 0xcdcdcdcd
lfoperiod 0xcdcdcdcd
modsense 0xcdcdcdcd
keydir 0xcdcdcdcd
pitchkeyfollow 0xcdcdcdcd
pitchkeydir 0xcdcdcdcd
filtkeyfollow 0xcdcdcdcd
tvfbias 0xcdcdcdcd
tvfblevel 0xcdcdcdcd
tvfdir 0xcdcdcdcd
+ ampbias 0x03e6aad8
+ ampblevel 0x03e6aae0
+ ampdir 0x03e6aae8
ampdepth 0xcdcdcdcd
ampenvdir 0xcdcdcdcd
amplevel 0xcdcdcdcd
tvfdepth 0xcdcdcdcd
prevsample 0xcdcdcdcd
useBender 0x00 ''
+ pitchEnv {...}
+ ampEnv {...}
+ filtEnv {...}
ampsustain 0xcdcdcdcd
pitchsustain 0xcdcdcdcd
filtsustain 0xcdcdcdcd
partCount 0xcdcdcdcd
+ padding 0x03e6ab44 "ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ"

Reply 9 of 9, by vladr

User metadata
Rank Oldbie
Rank
Oldbie

Nope, you still need the CPU pack even with SP5. There is a "CPU pack for SP5". Anyhow, for the GUID you need the latest platform SDK (and change VC6's "directories" to point ot it - I have whatever was "latest" one year ago, when I needed it for XP themes in LaunchPad.) This may also solve the math.h "out of the box". Other than that, disable debug and screenshots etc. if you don't want to link with libcurses and libpng. Unless you want debug.

Oh, and I also built my own SDL with DX6 support enabled for notifications, much cleaner sound output under load, it's worth the extra effort. 😀

For the access violation: see my "TODO" post in this forum.

V.