VOGONS


First post, by taiken7

User metadata
Rank Member
Rank
Member

(Not sure who originally posted that GB2 became stuck after Vigo's
speech, but here's a brief outline of what is going wrong:)

It appears the game enters an infinite loop ..
To help it along, after firing up a copy;
Wait until the Vigo's screen/speech...
Wait some more..

then press "-" ; debug mode, switch across to the debugger window
press ENTER ; a prompt "->" appears about mid-screen then enter:
SR CX 0
press F5 and it continues to load!

Note that this doesnt quite "fix" the game .. you'll be doing this
for each 'digitised' sound clip.

Details:
It appears that the game enters and infinite loop. at 91C9
For some reason we missed the last step at 91C3, so CX is forever 1.
Setting it to "0" helps it along.

EAX=00000000 ESI=00000000 DS=17A8 ES=17A8 FS=0000 GS=0000 SS=17A8 Real
EBX=00003E97 EDI=00000003 CS=035B EIP=000091C7 C0 Z0 S0 O0 A0 P0 D0 I1 T0
ECX=00000001 EBP=00005272
EDX=0000022C ESP=00005272 78841378

035B:91C3 8B0E953E mov cx,[3E95] ds:[3E95]=0000
-----------------------------------------------------
035B:91C7 0BC9 or cx,cx
035B:91C9 75FC jne 000091C7 ($-4)
--------------------------------------------------------

Reply 1 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Yeah I noticed this as well. I think I nopped the jne 😀
I spend some time on it a while ago and wasn't able who would lower the counter placed there.
The counter is said there just before the dma transfer is started
(set a bpm on the memory location and you will see)

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

Reply 2 of 7, by wiebermensch

User metadata
Rank Newbie
Rank
Newbie

(Sorry, I could not send you email, so I ask here...)
Hi
I read a post titled 'HGC(Hercules Monochrome) WIP report'.
There I saw some source code fragment taiken7 posted,
but I still do not know what to do, how to do.
I really hope to play oldies which only support Hercules Graphic Card.

So I have two questions...

1. When I run the program, it checks my graphic card.
Yes, my graphic card is SVGA.
How can I cheat the program as if I have HGC instead of SVGA ?

2. How can I access video memory ?
Frankly speaking, I don't know much about DOS game programming.
I only know 80x86 instructions and some DOS interrupts.
So please introduce me some good books or good websites 😀
(I went to bookstore, but there was no book about obsolete
DOS game programming... I really want to get some information
about HGC, CGA, DMA - Sound in DOS.)

And I will really appreciate it if you let me get DOSBox version
in which I can play hercules games...

Bye

Reply 3 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

the next version of dosbox will have a configfile option which is called machine
there you can set it lower then vga.

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

Reply 4 of 7, by taiken7

User metadata
Rank Member
Rank
Member

(NOPing, now why didnt I think of that .. ! .. Thats an even better
solution than I was using since it only requires 2 debugs
(Intro / Ingame) as compared to per sample.
Nice one Qbix .. )

Hmm.. after further analysis it appears the PIC is masked
just before running the sample.

I get the impression what the program has done is set some
sort of watchdog timer interrupt. (Which returns CX=0).
Dosbox might be missing the timeslice OR its taking a really long time.

But thats as far as I can take things at the moment,
..hopefully Fizzban will take a look..

Reply 5 of 7, by Srecko

User metadata
Rank Member
Rank
Member

Loop seems wrong. Instruction above it moves data from 17A8:3E95 to CX.
That place in memory is set to 1 while sound is playing and when sound
blaster runs IRQ, it's set to 0.
CX is pushed at the beginning and popped at the end of interrupt, with a value 1 (i.e it is unchanged). Then interrupt ends and returns to 035b:91c9 (JNE $-4 instruction in a loop).

Either interrupt returns to wrong instruction (wrong eip) or something is wrong with that JNE.
Maybe I'll look what exactly happens in DOS if I can get SBLive to work with the game.

Reply 6 of 7, by taiken7

User metadata
Rank Member
Rank
Member

The process hangs independent of the output medium.

So you could run it from PC speaker and it will still authentically crash.
(I think you're right about the return address being incorrect, if it were
just 4 bytes earlier then it would "set CX=0"..);

There are 2 seperate but identical code segments matching the
loop (one for the intro, one for in-game "phone calls"/"Nice shooting")
.. so it seems consistent. Wrong, but consistent.

might also possibly be problem in i386 decode instruction buffer -
that JNE ($-4) might be $ relative to before the instruction.. I will have
to look it up...

Reply 7 of 7, by Srecko

User metadata
Rank Member
Rank
Member

No, it uses sound blaster for digtized sound even if pc speaker is used for the rest.
At least in my version. If I disable sblaster in dosbox.conf game doesn't hang.
Unfortunately, I couldn't get digitized sound in DOS, so I can't even check if it runs properly there.

Btw., to get it working properly, find string 0B CD 75 FC in both shell.exe and gb.exe and replace FC with F8. (It is that JNE's operand 😀

edit:
I tested it with vdmsound; game has same problem.