Re: [Freedos-user] Ré : New game for DOS using DJGPP - Open Source
Ok, I'll stop nagging after this message for a while. I added to the Makefile: timer.o: $(CC) $(CFLAGS) -mgeneral-regs-only -mno-red-zone $< -o $@ And now it compile. But when run: Page fault CR2=0042 in RMCB at eip 6; flags=3016 ... error=0004 which I believe was what I was receiving when adding iret at the end. Le lun., 02 oct. 2023 13:06:35 -0400 Paul Dufresne via Freedos-user a écrit > I have been able to rebuild the game using prebult cross-compiler from > build-djgpp project. > > When I add __asm__("iret"); > program crash as soon as I launch it. > Sorry not having the error now. > > I am trying to: > __attribute__((interrupt)) > void timer_handler(void *frame) > { > ticks++; > ... > > but getting: > i586-pc-msdosdjgpp-gcc -I. > -I/home/paul/Téléchargements/libmikmod-3.3.11.1/include -c -Wall -Werror > -pedantic -O3 -fomit-frame-pointer -ffast-math -march=i386 vga.c -o vga.o > timer.c: In function 'timer_handler': > timer.c:17:1: sorry, unimplemented: 80387 instructions aren't allowed in an > interrupt service routine > 17 | { > | ^ > make[1]: *** [Makefile:29: timer.o] Error 1 > make[1]: *** Waiting for unfinished jobs > make[1]: Leaving directory '/home/paul/my_gminer/gold-mine-run/src' > make: *** [Makefile:2: all] Error 2 > paul@fedora:~/my_gminer/gold-mine-run2$ > > > Following: > https://stackoverflow.com/questions/55437894/how-to-correctly-compile-interrupt-service-routine-using-gcc > I have tried to add: -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow > -mno-red-zone at the end of CFLAGS > but it does not appears that my changes change the way the file is > compiled... > > I think I am very bad at editing Makefiles! > > > > > > ___ > Freedos-user mailing list > Freedos-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freedos-user > ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Ré : New game for DOS using DJGPP - Open Source
I have been able to rebuild the game using prebult cross-compiler from build-djgpp project. When I add __asm__("iret"); program crash as soon as I launch it. Sorry not having the error now. I am trying to: __attribute__((interrupt)) void timer_handler(void *frame) { ticks++; ... but getting: i586-pc-msdosdjgpp-gcc -I. -I/home/paul/Téléchargements/libmikmod-3.3.11.1/include -c -Wall -Werror -pedantic -O3 -fomit-frame-pointer -ffast-math -march=i386 vga.c -o vga.o timer.c: In function 'timer_handler': timer.c:17:1: sorry, unimplemented: 80387 instructions aren't allowed in an interrupt service routine 17 | { | ^ make[1]: *** [Makefile:29: timer.o] Error 1 make[1]: *** Waiting for unfinished jobs make[1]: Leaving directory '/home/paul/my_gminer/gold-mine-run/src' make: *** [Makefile:2: all] Error 2 paul@fedora:~/my_gminer/gold-mine-run2$ Following: https://stackoverflow.com/questions/55437894/how-to-correctly-compile-interrupt-service-routine-using-gcc I have tried to add: -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mno-red-zone at the end of CFLAGS but it does not appears that my changes change the way the file is compiled... I think I am very bad at editing Makefiles! ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Ré : New game for DOS using DJGPP - Open Source
about: https://git.usebox.net/gold-mine-run/tree/src/timer.c Should the interrupt_handler for 0x1c interrupt, end with an iret?___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Ré : New game for DOS using DJGPP - Open Source
Under VirtualBox, sound works (always... sound never worked for me under QEMU). But always too fast, even if I slow CPU to 1%. I created a gminer.iso file with: mkisofs -o gminer.iso gminer where gminer is the directory where gminer.zip was extracted. Timer code is at: https://git.usebox.net/gold-mine-run/tree/src/timer.c Using interrupt 0x1c under DPMI should be fine: https://www.phatcode.net/res/262/files/dpmi09.html#2.4.2 I find it a bit weird what it does to divide 1 by 5494 to get the usual tick rate of 18.2 ticks per second... as it should be done by 'hardware' I am not expecting to be done in the interrupt handler. Not so sure how well it is supposed to happens under a virtual environment... probably fine I suppose... guess most games use this.___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Ré : New game for DOS using DJGPP - Open Source
Gold Miner game... Note: I was trying under FDT2308... where you was trying under FDT2310 (need to check this new release!). I just tried under MS-DOS 5 (under QEMU with sb16)... like you described... works sometimes... but always extremely too fast.___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Ré : New game for DOS using DJGPP - Open Source
Seems for me, it never run if with sound under QEMU ( -device sb16 ). Esc stop it with an error code. But it run (extremely too fast!) with gminer -ns -ns means no sound Works well under dosbox however... I think I had tested it only under DosBOX... sorry for that! Don't know for other DOS.___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Ré : New game for DOS using DJGPP - Open Source
Juan wrote: > > I used DJGPP back in the 90s, and was a life changing experience for me: > > my first contact with GCC and free software. > > > > I never managed to finish any games back then, but I have released one > > recently, and the source code is available in case anyone is interested: > > > > https://git.usebox.net/gold-mine-run/about/ > > > > There are also binaries available here: > > > > https://www.usebox.net/jjm/gold-mine-run/ > > I'd like to try this game, and maybe demo it on the FreeDOS YouTube channel - but I haven't been able to run this game consistently on FreeDOS. I think I need help. I read the dosbox.conf file so I can see how to run the game. Sometimes when I run it, the game actually runs (but unplayably fast) and other times it just sits there and chews CPU. At first, I thought it was because I tried to run SLOWDOWN, but sometimes the game doesn't run if I have SLOWDOWN running, and sometimes the game doesn't run if I don't have SLOWDOWN running. So it's not SLOWDOWN. I'm running this on QEMU, if that helps: qemu-system-i386 -enable-kvm -m 32 -boot menu=on -device sb16 -device adlib -hda freedos.qcow2 -hdb mystuff.qcow2 The "freedos" drive is my C: drive (installed from T2310) and the "mystuff" drive is my D: drive, where I extracted the gminer.zip file. Jim ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
[Freedos-user] Ré : New game for DOS using DJGPP - Open Source
Le sam., 09 sept. 2023 03:46:59 -0400 Juan a écrit > Hi, > > I used DJGPP back in the 90s, and was a life changing experience for me: > my first contact with GCC and free software. > > I never managed to finish any games back then, but I have released one > recently, and the source code is available in case anyone is interested: > > https://git.usebox.net/gold-mine-run/about/ > > There are also binaries available here: > > https://www.usebox.net/jjm/gold-mine-run/ > > Thank you DJ Delorie for DJGPP! > > Kind regards, > > Juan At first I had ignore your post because I thought you did not publish source code of this game, but finally found it (under MIT license) at: https://git.usebox.net/gold-mine-run/tree/ (was not finding it under https://www.usebox.net/jjm/open-source/ ) [and now reading again your message I see you say source code is available] I took really just a few seconds at the source code, and came to the 'possibly wrong' conclusion it did not use a known VGA game library, and I find it interesting. I played it a few minutes and find it interesting. [sorry for lack of vocabulary] I believe it could be interesting to package it for FreeDOS: https://gitlab.com/FreeDOS/games http://freedos.org/ In theory, I manage DJGPP packages for FreeDOS, but did practically did not touch it for about one year... not sure they have kept my permissions ;-) I am copying to FreeDOS-user mailing list to diffuse the information there. I think a few people will be interested. ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user