VOGONS

Common searches


Reply 83 of 343, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I agree searching isn't always working the way you expect it to work.
Anyway I stickified the thread so it should be more visible as many will probably want to try it with the next version.

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

Reply 84 of 343, by vasyl

User metadata
Rank Oldbie
Rank
Oldbie

New version of the patch is up. The diff is against current CVS tree. This version adds Paradise PVGA1A emulation. The emulation is very basic but I could not find anything that used "advanced" functions of that card. In any case, Wonderland works in 800x600 (for some reason the installer left "-disp v" in wonderla.bat -- that needs to be changed to "-disp p"). I've also cleaned Tseng emulation source code, it was too messy with all those quotes from VGADOC.
I don't have plans for any updates now. There are quite a few items there that are not working yet but I don't have any games or other software that uses those features, and I don't want to put "theoretically working" changes -- that patch is already big and complex. If it gets integrated into the mainline then changes become easier. For now I will just continue maintaining it to be up to date with CVS state.

Reply 86 of 343, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

An error occured when I applied your new patch.

if g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../include -I/usr/local/include/SDL -Dmain=SDL_main  -g -O2 -MT dosbox.o -MD -MP -MF ".deps/dosbox.Tpo" -c -o dosbox.o dosbox.cpp; \
then mv -f ".deps/dosbox.Tpo" ".deps/dosbox.Po"; else rm -f ".deps/dosbox.Tpo"; exit 1; fi
g++ -g -O2 -o dosbox.exe dosbox.o cpu/libcpu.a debug/libdebug.a dos/libdos.a fpu/libfpu.a hardware/libhardware.a gui/libgui.a ints/libints.a misc/libmisc.a shell/libshell.a -lSDL_sound -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows -lpng -lz -lSDL_net -lopengl32 -lwinmm
hardware/libhardware.a(vga_svga.o)(.text+0x423): In function `Z15write_p3cf_svgajjj':
c:/dosbox/src/hardware/vga_svga.cpp:136: undefined reference to `write_p3cf(unsigned int, unsigned int, unsigned int)'
hardware/libhardware.a(vga_svga.o)(.text+0x488): In function `Z14read_p3cf_svgajj':
c:/dosbox/src/hardware/vga_svga.cpp:145: undefined reference to `read_p3cf(unsigned int, unsigned int)'
collect2: ld returned 1 exit status

How to solve this problem
Open vga_gfx.cpp with wordpad.
and remove 'static' from two lines

static void write_p3cf(Bitu port,Bitu val,Bitu iolen) {
->
void write_p3cf(Bitu port,Bitu val,Bitu iolen) {

static Bitu read_p3cf(Bitu port,Bitu iolen) {
->
Bitu read_p3cf(Bitu port,Bitu iolen) {

Thanks, vasyl. Your patch is very great. 😀

Attachments

  • Filename
    error.txt
    File size
    59.35 KiB
    Downloads
    57 downloads
    File comment
    compile error
    File license
    Fair use/fair dealing exception

Reply 87 of 343, by vasyl

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for testing this for me. That's what happens if you prepare complex patches at 2am. The fixed version is up on sf.net. There is a little more than just non-removed statics there, you may want to reapply the patch.

Reply 88 of 343, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

I saw the following sentence.
- Improved .conf file handling. Now it is enough to write
just the chipset name (et3000/et4000/pvga1a/trio64/none);

But the default value that you wrote in source was 's3 trio64', not 'trio64'
So you need to change it properly.

Adding a message 'svgachipset -- et3000,et4000,pvga1a,trio64,none.' into dosbox.conf can be helpful for people to know how to use 'svgachipset'.

@@ -258,9 +258,16 @@
secprop->AddInitFunction(&FPU_Init);
#endif
secprop->AddInitFunction(&DMA_Init);//done
- secprop->AddInitFunction(&VGA_Init);
secprop->AddInitFunction(&KEYBOARD_Init);

+ secprop=control->AddSection_prop("vga",&VGA_Init);
+ /* Defaulting to S3 Trio64. */
+ secprop->Add_string("svgachipset","trio64");
+ secprop->Add_int("videoram",2048);
+ MSG_Add("VGA_CONFIGFILE_HELP",
+ "svgachipset -- The type of chipset tries to emulate Super VGA .\n"
+ " Supported are none,trio64,et3000,et4000,pvga1a.\n"
+ );
secprop=control->AddSection_prop("mixer",&MIXER_Init);
secprop->Add_bool("nosound",false);
secprop->Add_int("rate",22050);

SVGA for DOSBox is very good but sometimes makes emulation slower.
I hope that it be optimized later.😀

Last edited by ykhwong on 2005-07-04, 15:50. Edited 1 time in total.

Reply 89 of 343, by vasyl

User metadata
Rank Oldbie
Rank
Oldbie

My description was a little vague on that topic. The code will accept both "tseng et4000" and "et4000". If no driver recognized the line then the code falls back to current implementation which is S3 Trio64. It is not 100% clean but usable.
Can you elaborate on performance? Do you mean that non-SVGA modes get significantly slower with this patch? How do you measure and what is the reference? If you just refer to the fact that SVGA modes are slower, that's expected -- the amount of video ram to handle is much higher. There is another patch in SF (smart updates) that may eventually help. Not sure if it is working yet, there were some issues with it.

Reply 90 of 343, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

I used surface as an output and 8500 cycles with dynamic core. I ran mario.exe. http://ykhwong.x-y.net/mario.exe
Holding Ctrl, press arrow key. Mario's movement was a little bit slow when I am using your patch (s3trio64, et4000, or none).
The amount of video ram didn't affect the speed of game.
You can test my two compiled versions in my page.

Reply 91 of 343, by vasyl

User metadata
Rank Oldbie
Rank
Oldbie

That, my friend, is not an optimization issue but a true bug. It does not have adverse side effects in most casees except hitting debug output statement way too often. I don't see slowdown on my system but I can see the problem. I will fix it tonight. For now just a background. Two files are affected (vga_crtc.cpp and vga_seq.cpp). In write_xxx functions the code correctly goes into generic VGA section first but then enters S3 section every time. Low crtc (or seq) index values are not present in that section so it falls through to 'default' clause. There is debug statement there, and it executes many times per frame as a result.
Thank you very much for testing the patch. Now back to coding.

Update: The fix is in. Please test it and let me know how well it works. I've also fixed a few spurious CRTC warnings caused by S3-specific code in int10_modes. In theory all S3 code needs to be separated in a module just like Tseng or Paradise to properly clean all of these but for now just "if(vga.chipset == M_SVGA_S3)" will do. As I said, this patch is too complex already.

Reply 92 of 343, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

When I ran debugger-enabled build, some vgamisc error logs are still created. Playing games that use graphics, it also generates lots of vgamisc error logs.
(Too many logs are likely to speed down the program)

VGAMISC:VGA:CRTC:Write A0 to unknown index F
VGAMISC:VGA:CRTC:Write A4 to unknown index F

Can you correct that error? Is it a good idea to remove the vga-crtc loggings from vga_crtc.cpp?
(Of course, I can manually disable it by setting vgamisc=false in dosbox.conf. That is, however, just a temporary solution)

Though I patched 'dosbox-svga-patch-20050703.diff', the problem still exists. (ah.. the speed is still somewhat slow in general build, too)

Last edited by ykhwong on 2005-07-04, 16:46. Edited 1 time in total.

Reply 94 of 343, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

moe : Is that vgamisc log just for a debugging output? There was no problem related to vgamisc unless I applied svga patch.
robertmo : I'm sorry but I dunno what 'real parcel' means. Is it a package or patch?^^:

Reply 95 of 343, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Well, a compilation using --enable-debug was originally meant for getting games working that didn't work before, which in turn means it's for finding emulation bugs. Now, those unhandled register writes are, technically speaking, emulation bugs - which just don't matter. Dosbox is full of such simplifications, that's why it runs way faster than Bochs. Imagine some SVGA game needs these VGA registers. It's much easier to find such issues when not-yet-implemented features log a message upon use. If other games access them but work anyways, that is just fine, since slowdown due to log messages are only in debug mode, which is not meant for actual playing.

Reply 96 of 343, by vasyl

User metadata
Rank Oldbie
Rank
Oldbie

My last fix was incomplete -- the patch still caused debug traces in S3 implementation only ("doh!"). Version 20050704 should work much better. I did not remove any debug trace statements, I just made sure the code does not go where it should not. Let me know how well this one works.
On a different subject. I was reviewing this thread and I found mention of Terminal Velocity not working with my patch. So, I've investigated. I don't have the full game but shareware version provided enough info. So, the game runs in S3 mode but shows black screen in Tseng mode... Nice piece of coding -- it expect VESA and it does not check if VESA is actually available! I would not be surprised if there are quite a few games like that released around 1995. I tried TLIVESA driver (found one in Flight of Amazon Queen but it was very common file), and Terminal Velocity works just fine. I would say everything works as expected there.

Reply 99 of 343, by vasyl

User metadata
Rank Oldbie
Rank
Oldbie

Can't wait till the next official release.

You can already use that build from DOSBox Daum Cafe (http://ykhwong.x-y.net). The caption looks odd on English systems but all features are there and work just fine. If by any chance that Mahjong game is Hong Kong Mahjong Pro, make sure that your Soundblaster IRQ settings are correct otherwise the game does not start.
BTW, I've tried Windows for Workgroups 3.11 with "proper" Tseng ET4000 driver ("Turbo" v.3.1, datestamp 4/16/1992) and it worked just fine in 1024x768x256. As ugly as I remember it, especially with large fonts. Tseng drivers had one oddity on Win3.x -- standard colors were quite off for some reason (darker and more saturated), it is also there. I did not see any issues but I did not dig deep. There was some problem -- the keyboard stops working after exiting Windows but my guess that it is some known issue.