Win3x.Org
http://www.win3x.org/win3board/

Dos game development
http://www.win3x.org/win3board/viewtopic.php?t=27130
Page 1 sur 1
Auteur :  Nikita [ 13 juil. 2021 21:37 ]
Sujet du message :  Dos game development

Hello everyone.
Now I'm developing a DOS game. I'm using Allegro4.4 as a game library, and DJGPP as a compiler.
I'm working on Ubuntu 20.04.
The game runs well on Linux, but when I run it on Dosbox in Windows 10, it freezes or exits unexpectedly.
Anyone can help me? I'm so confused about this and wondering if I have to go on this job.
The screen resolution is 800 * 600, and this is a 2D RTS game.
I think it's because the game uses too much CPU and RAM when it loads and draws images. Furthermore, whereas standard resolution of DOS game is 320 * 240 or 640 * 480 it uses 800 * 600, I think this is another reason.
I tried to draw compiled images, but CPU and RAM usage increases, and it gets worse in Dosbox.

Auteur :  Deksor [ 14 juil. 2021 19:04 ]
Sujet du message :  Re: Dos game development

Some DOS games had the possibilty to use 800x600 res, but yes it's not the most standard res used by DOS games.
Actually none of the res you listed are the most used ones, most DOS games ran at 320x200 ;)
Unlike what you may think, this is still a 4:3 mode, it's just that the pixels aren't square.

I've never used Allegro by the way, but I don't think DOSBox should crash if the CPU usage is too high. Does DJGPP report any warning when compiling ? Do you have access to a real DOS computer ? Have you tried another emulator ?
When you run your game on Ubuntu, is it also using DOSBox or do you run it somehow natively ?

Auteur :  Nikita [ 14 juil. 2021 20:23 ]
Sujet du message :  Re: Dos game development

When I modified the code, I make 2 built binaries for both Ubuntu and Dos.
Ubuntu build runs well on real or VM Ubuntu.
Sometimes I test the build on a real Dos machine, and it runs well, but a little slow.
However, testing on real Dos is uncomfortable, so I wanted to do on Dosbox. But it always freezes there.
When I run it on Ubuntu(2 CPUs, 1GB RAM), it uses only 15 % of CPU and 4 % of RAM. But when it runs on Dosbox, it freezes as soon as started.

Auteur :  Deksor [ 14 juil. 2021 20:32 ]
Sujet du message :  Re: Dos game development

If it works on a real machine but not in Dosbox, then Dosbox is to blame. It's not an accurate emulator so it could crash for many reasons.


You could try with another build of Dosbox (Dosbox SVN, Dosbox-X, etc) or another, more accurate, emulator (PCem, 86box)

Auteur :  Nikita [ 14 juil. 2021 21:25 ]
Sujet du message :  Re: Dos game development

I tried using other emulators you mentioned, but the only one which can just run the game is Dosbox I'm using.
Others also start the game, but it freezes in first loading screen.
I attached the error string when dosbox is stopped due to sigsegv error.

Shutting down Allegro
Exiting due to signal SIGSEGV
General Protection Fault at eip=001765bb, error=000c
eax=00000000 ebx=0000002f ecx=00000000 edx=00000000 esi=00000000 edi=0036c07c
ebp=0036c058 esp=0036c050 program=C:\SEAS.EXE
cs: sel=00a7 base=00400000 limit=018effff
ds: sel=00af base=00400000 limit=018effff
es: sel=00b7 base=00400000 limit=018effff
fs: sel=00af base=00400000 limit=018effff
gs: sel=00bf base=00400000 limit=018effff
ss: sel=00af base=00400000 limit=018effff
App stack" [0036c2b0..002ec2b41] Exceptn stack: [002ec200..002ea2c0]

Call frame traceback EIPs:
0x001765bb
0x001762f3
0x0000adbd

Please let me know what kind of error it is.

Auteur :  Deksor [ 15 juil. 2021 10:27 ]
Sujet du message :  Re: Dos game development

Citation :
Exiting due to signal SIGSEGV
This seems to be a segmentation fault.

Maybe check your program for memory leaks or the use of a something in RAM that was already freed ?

Auteur :  Nikita [ 16 juil. 2021 19:30 ]
Sujet du message :  Re: Dos game development

Well, I tested in real DOS machine, but it runs really well and fast.
I don't know why DOSbox can't run it.

Auteur :  Joet BERNARD [ 16 juil. 2021 22:27 ]
Sujet du message :  Re: Dos game development

If the game is too fast, try using AT-SLOW

Auteur :  Deksor [ 17 juil. 2021 02:22 ]
Sujet du message :  Re: Dos game development

What are the specs of your DOS machine ?

Auteur :  kitsune [ 21 nov. 2021 21:45 ]
Sujet du message :  Re: Dos game development

Nikita a écrit : *  13 juil. 2021 21:37
Hello everyone.
Now I'm developing a DOS game. I'm using Allegro4.4 as a game library, and DJGPP as a compiler.
I'm working on Ubuntu 20.04.
The game runs well on Linux, but when I run it on Dosbox in Windows 10, it freezes or exits unexpectedly.
Anyone can help me? I'm so confused about this and wondering if I have to go on this job.
The screen resolution is 800 * 600, and this is a 2D RTS game.
I think it's because the game uses too much CPU and RAM when it loads and draws images. Furthermore, whereas standard resolution of DOS game is 320 * 240 or 640 * 480 it uses 800 * 600, I think this is another reason.
I tried to draw compiled images, but CPU and RAM usage increases, and it gets worse in Dosbox.
Hi,
Something I don't understand that the last Allegro library for DOS seem to be the version 4.2.3, also have you tried to compile it directly in a DOS environment?
I advice to compile it and run it in a real MS-DOS environment before run it in Dosbox for compatibility issue.

You can use PCem or Qemu I think it's also good but maybe low for the Sound Blaster emulation.

Page 1 sur 1 Fuseau horaire sur UTC+01:00
Développé par phpBB® Forum Software © phpBB Limited
Traduction française officielle © Qiaeru