VOGONS


First post, by wiebermensch

User metadata
Rank Newbie
Rank
Newbie

DOSBox 0.61's HGC/CGA support is improved a lot comparing to 0.60
But, it still doesn't completely emulate HGC.
Open DOSBox.conf and change machine=... line to machine=hercules.
Then run SIMCGA40.COM on DOSBox.
Then you will only see this error message.
"ERROR - SIMCGA will not work with an Enhanced Graphics Adapter."

Reply 1 of 23, by canadacow

User metadata
Rank Member
Rank
Member

This strikes me as the equivalent to trying to compile Cygwin under Wine using a Cygwin version of Wine running under Cygwin in Wine. Why, after you've got a real choice of emulated Hercules or CGA, would you want to force DosBox to internally try to emulate CGA using the Hercules emulation?

Reply 2 of 23, by Srecko

User metadata
Rank Member
Rank
Member

Game can use same method to detect hercules or ega (theoretically) 😖

Reply 3 of 23, by wiebermensch

User metadata
Rank Newbie
Rank
Newbie

To tell the truth, I want to analyze SIMCGA.
Does anybody know how SIMCGA works?
Besides, I am curious about WHY.
Because of what does DOSBox can not emulate real hercules perfectly?

Reply 4 of 23, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

well analyze it then.
It's not that hard. Actually dosbox can even do it. Just make a debbugger enabled version of dosbox.

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

Reply 5 of 23, by taiken7

User metadata
Rank Member
Rank
Member

From the debugger:

00DF:038D B4C1 mov ah,C1
00DF:038F CD10 int 10
00DF:0391 3DAAAA cmp ax,AAAA
00DF:0394 7512 jne 000003A8 ($+12)
... (where 3A8 gets the message "Enhanced Graphics...", and exits)

So we set (int10/ah=c1) returns 0xAAAA if (machine==MCH_HERC).
ie. add the following to int10.cpp

	case 0xc1:
if (machine==MCH_HERC) reg_ax=0xaaaa;
break;

Then it will load.

Reply 6 of 23, by wiebermensch

User metadata
Rank Newbie
Rank
Newbie

Thanks, taiken7.
I used debug.exe in windows (previous version of DOSBox didn't support
debug.exe, but on DOSBox0.61 it's fine.)
and stopped execution before check-routine(G 0391), changed AX value(R AX AAAA), and continued(G).
Then I played King's Valley. It was the same as CGA. 😀

p.s. C:\Windows\command\debug.exe (in Win9x)
or C:\WinNT\System32\debug.exe (in Win2k) does ONLY support
8086 instructions and 16-bit addressing! It does NOT support 80386, 80486 instructions NOR 32-bit addressing!
So now I attach DEBUG32, which is from Larson Computing and much better than default debugger. The interface is also improved.

Reply 7 of 23, by canadacow

User metadata
Rank Member
Rank
Member

taiken7 was refering to the DosBox specific debugger that is built into it. There is a build that has such facilities running all the time, though its breakpoint abilities are far greater than what Debug or Debug32 can do.

Reply 8 of 23, by wiebermensch

User metadata
Rank Newbie
Rank
Newbie

canadacow, can you please attach debugger-included DOSBox0.61 if you have?
I have DOSBox0.50, 0.56.1, 0.56.2, but I don't have DOSBox0.61
If you know where I can download executive or source file, please let me know.

Reply 10 of 23, by wiebermensch

User metadata
Rank Newbie
Rank
Newbie

Do you have binary(EXE) file?
I have source files, but I don't know how to change option when compile
in order to make Debugger-Enabled DOSBox.exe
So if somebody has (debugger-enabled) DOSBox.exe,
please upload and attatch that.
p.s. I have Visual C++ 6.0
I don't have any other compiler.

Reply 11 of 23, by Harekiet

User metadata
Rank DOSBox Author
Rank
DOSBox Author

That 0xc1 test in int10 is it's own test for seeing if simcga is already loaded. It tests again later on 0xc000:0 if the word there is 0xaa55 and if it is it assumes it's an ega. Change that and it starts up, but doesn't really seem to do a good job at emulating cga though 😜

Reply 12 of 23, by wiebermensch

User metadata
Rank Newbie
Rank
Newbie

Well, I found DOSBox 0.61 debugger-included version.
So I attach that.

Reply 13 of 23, by taiken7

User metadata
Rank Member
Rank
Member

... It tests again later on 0xc000:0 if the word there is 0xaa55 and if it is it assumes it's an ega ...

Interesting. 0xC000 = Video Ram area, 0xaa55 is a "magic number" bios uses to signify a device loader is at that offset. ( bios scans memory (from memory at 4k segment intervals) for that magic number, and runs any code there, which is how we end up with the bootstrap procedure; video-int 10 loader, network card etc, finally bootdisk..).

Reply 14 of 23, by jal

User metadata
Rank Oldbie
Rank
Oldbie
taiken7 wrote:

Interesting. 0xC000 = Video Ram area, 0xaa55 is a "magic number" bios uses to signify a device loader is at that offset.

C000:0000 is the start of the EGA/VGA ROM BIOS chip. Since the CGA and Hercules do not have their own BIOS, the presence of a ROM chip at that particular location is taken as an indication that an EGA card is present. Of course, it could be some other expansion card, so it's a rather error prone test...

Reply 15 of 23, by Harekiet

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Working on some new changes to use crtc6845 emulation when running in hercules,cga,tandy mode. This helps simcga a bit since it at least gives some kind of decent output now.

Reply 16 of 23, by taiken7

User metadata
Rank Member
Rank
Member

Nice work Harekiet! Are the changes in CVS yet -- I found that
Electronic Arts' WORLD TOUR GOLF has a few issues with Hercules
at the moment (black screen, unsupported Int 10 / crtc6845 features).

Reply 17 of 23, by Harekiet

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Hmm no not yet comitted, lot's more testing to be done 😀 And checked world tour golf, that seems to think it's it's running on a color system instead of monochromo, must be some bios flag somewhere i think

Reply 18 of 23, by Harekiet

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Hmm that world tour golf doesn't even detect hercules, if you want to use hercules you need to supply a /h command line, that's the only place it sets a certain variable to run in hercules mode.

Reply 19 of 23, by taiken7

User metadata
Rank Member
Rank
Member

Sorry, I should have mentioned the "/h" option, but from there the screen
remains blank.. although it could be some hacking Ive done my side..
If its working for you thats good news 😁