Page 1 of 1

JFDuke3D in MiSTer FPGA

Posted: Fri Nov 08, 2024 11:45 am
by jordi

Hi!

I've successfully compiled jfduke3d in the past for as Raspberry pi 3 and it worked flawlessly.
Yesterday night I wondered if I could achieve the same on our misters :lol:
So I compiled disabling OPENGL and all the graphics cards stuff.

Code: Select all

make USE_POLYMOST=0  USE_OPENGL=0 RELEASE=1

I've been inspired by the great work of bbond007 and I added this script and the attached binary (no data/copyrighted material is included):

Code: Select all

#!/bin/bash
vmode -r 640 480 rgb32
taskset 03 /media/fat/jfduke32/duke3d

But I got an strange error upon execution:

Whats-App-Image-2024-11-08-at-12-40-15.jpg
Whats-App-Image-2024-11-08-at-12-40-15.jpg (67.79 KiB) Viewed 1718 times

Is it the way I executed it?


Re: JFDuke3D in MiSTer FPGA

Posted: Fri Nov 08, 2024 1:34 pm
by RealLarry

Nice try and thanks for your effort! But by "disabling all graphics cards stuff", is it still using and compiling the SDL part?


Re: JFDuke3D in MiSTer FPGA

Posted: Fri Nov 08, 2024 2:39 pm
by jordi
RealLarry wrote: Fri Nov 08, 2024 1:34 pm

Nice try and thanks for your effort! But by "disabling all graphics cards stuff", is it still using and compiling the SDL part?

yes! I had to manually compile SDL2 and static link it to jfduke3d


Re: JFDuke3D in MiSTer FPGA

Posted: Fri Nov 08, 2024 2:47 pm
by RealLarry

Let me see if I can find another (older) RPi in my stuff to provide some help. May take a day ow two...


Re: JFDuke3D in MiSTer FPGA

Posted: Fri Nov 08, 2024 3:11 pm
by jordi

I compiled by using Mister toolbox docker

docker run -it --rm -v $(pwd):/mister misterkun/toolchain /bin/bash


Re: JFDuke3D in MiSTer FPGA

Posted: Fri Nov 08, 2024 3:26 pm
by RealLarry

Very useful hint! I'm creating my static binaries for the MiSTer with a normal RPi most of the time. This toolchain should make many jobs easier!


Re: JFDuke3D in MiSTer FPGA

Posted: Fri Nov 08, 2024 4:54 pm
by Bas

SDL seems to want a GL surface. If you disabled everything, not even software rendering may be available.


Re: JFDuke3D in MiSTer FPGA

Posted: Sun Nov 10, 2024 10:04 am
by jordi

Bas wrote: Fri Nov 08, 2024 4:54 pm

SDL seems to want a GL surface. If you disabled everything, not even software rendering may be available.

Sdl should work with Linux framebuffer isn't it?


Re: JFDuke3D in MiSTer FPGA

Posted: Sun Nov 10, 2024 12:55 pm
by jordi
RealLarry wrote: Fri Nov 08, 2024 3:26 pm

Very useful hint! I'm creating my static binaries for the MiSTer with a normal RPi most of the time. This toolchain should make many jobs easier!

one little suggestion, the linux distribution is outdated and thus you need to use archived debian sources to make apt-get to work: https://www.howtoforge.com/using-old-de ... urces.list

so change deb.X by archive.X


Re: JFDuke3D in MiSTer FPGA

Posted: Sun Nov 10, 2024 6:01 pm
by bbond007
jordi wrote: Sun Nov 10, 2024 10:04 am

Bas wrote: Fri Nov 08, 2024 4:54 pm

SDL seems to want a GL surface. If you disabled everything, not even software rendering may be available.

Sdl should work with Linux framebuffer isn't it?

I believe SDL2.0 deprecates framebuffer support and needs OpenGL or native RPi video.

Can JFDuke3D be compiled using SDL 1.2?

EDIT:

https://www.jonof.id.au/jfduke3d/readme.html

maybe Chocolate Duke3D?


Re: JFDuke3D in MiSTer FPGA

Posted: Sun Nov 10, 2024 10:27 pm
by jordi
bbond007 wrote: Sun Nov 10, 2024 6:01 pm
jordi wrote: Sun Nov 10, 2024 10:04 am

Bas wrote: Fri Nov 08, 2024 4:54 pm

SDL seems to want a GL surface. If you disabled everything, not even software rendering may be available.

Sdl should work with Linux framebuffer isn't it?

I believe SDL2.0 deprecates framebuffer support and needs OpenGL or native RPi video.

Can JFDuke3D be compiled using SDL 1.2?

EDIT:

https://www.jonof.id.au/jfduke3d/readme.html

maybe Chocolate Duke3D?

good idea with chocolate duke3d. I will have to find right package versions.


Re: JFDuke3D in MiSTer FPGA

Posted: Mon Nov 11, 2024 1:12 am
by dickhardpill
jordi wrote: Fri Nov 08, 2024 3:11 pm

I compiled by using Mister toolbox docker

docker run -it --rm -v $(pwd):/mister misterkun/toolchain /bin/bash

sweet! now I have a couple programs I've been missing on the MiSTer platform


Re: JFDuke3D in MiSTer FPGA

Posted: Mon Nov 11, 2024 4:41 am
by bbond007

Just to test:

I compiled Chocolate Duke3D under the LXDE environment. https://github.com/fabiensanglard/chocolate_duke3D

It shows promise...

CTL-ALT-F1 out of LXDE and starting it makes it run full screen on framebuffer.

Framerate is good, but sound is glitchy. Maybe sound will be better under HPS Linux.

Here is the EXE:

chocolate-duke3d.zip
(826.78 KiB) Downloaded 70 times
20241110_233609.jpg
20241110_233609.jpg (587.58 KiB) Viewed 1045 times

Re: JFDuke3D in MiSTer FPGA

Posted: Mon Nov 11, 2024 8:39 am
by RealLarry
bbond007 wrote: Mon Nov 11, 2024 4:41 am

Just to test:

I compiled Chocolate Duke3D under the LXDE environment. https://github.com/fabiensanglard/chocolate_duke3D

It shows promise...

CTL-ALT-F1 out of LXDE and starting it makes it run full screen on framebuffer.

Framerate is good, but sound is glitchy. Maybe sound will be better under HPS Linux.

Here is the EXE:
chocolate-duke3d.zip

Thanks for the headup. Just tried to start it under normal conditions, copied the Libs of libSDL_mixer, libmikmod and libopenal to the LD_LIBRARY_PATH but getting

...
Checking sound inits

followed by a segmentation fault :(


Re: JFDuke3D in MiSTer FPGA

Posted: Mon Nov 11, 2024 9:12 am
by jordi
bbond007 wrote: Mon Nov 11, 2024 4:41 am

Just to test:

I compiled Chocolate Duke3D under the LXDE environment. https://github.com/fabiensanglard/chocolate_duke3D

It shows promise...

CTL-ALT-F1 out of LXDE and starting it makes it run full screen on framebuffer.

Framerate is good, but sound is glitchy. Maybe sound will be better under HPS Linux.

Here is the EXE:
chocolate-duke3d.zip

20241110_233609.jpg

what was your secret sauce to compile it?
eduke32 at least also supports sdl 1.2 and it is possible to remove initial window. https://wiki.eduke32.com/wiki/Building_EDuke32_on_Linux

it runs ouf of memory compiling, though
make SDL_TARGET=1 USE_OPENGL=0 POLYMER=0 HAVE_GTK2=0 STARTUP_WINDOW=0 USE_LIBVPX=0


Re: JFDuke3D in MiSTer FPGA

Posted: Mon Nov 11, 2024 4:51 pm
by jordi
bbond007 wrote: Mon Nov 11, 2024 4:41 am

Just to test:

I compiled Chocolate Duke3D under the LXDE environment. https://github.com/fabiensanglard/chocolate_duke3D

It shows promise...

CTL-ALT-F1 out of LXDE and starting it makes it run full screen on framebuffer.

Framerate is good, but sound is glitchy. Maybe sound will be better under HPS Linux.

Here is the EXE:
chocolate-duke3d.zip

20241110_233609.jpg

I tried your build and... it works!

I've uploaded both my build and yours (chocolate-duke3d) here:
https://github.com/jsmolina/mister-duke3d

Both work ok and without glitchy sound. ;)


Re: JFDuke3D in MiSTer FPGA

Posted: Mon Nov 11, 2024 6:32 pm
by bbond007
jordi wrote: Mon Nov 11, 2024 9:12 am

what was your secret sauce to compile it?
eduke32 at least also supports sdl 1.2 and it is possible to remove initial window. https://wiki.eduke32.com/wiki/Building_EDuke32_on_Linux

it runs ouf of memory compiling, though
make SDL_TARGET=1 USE_OPENGL=0 POLYMER=0 HAVE_GTK2=0 STARTUP_WINDOW=0 USE_LIBVPX=0

Nothing I can recall?

Which one runs out of memory?


Re: JFDuke3D in MiSTer FPGA

Posted: Mon Nov 11, 2024 6:35 pm
by jordi
bbond007 wrote: Mon Nov 11, 2024 6:32 pm
jordi wrote: Mon Nov 11, 2024 9:12 am

what was your secret sauce to compile it?
eduke32 at least also supports sdl 1.2 and it is possible to remove initial window. https://wiki.eduke32.com/wiki/Building_EDuke32_on_Linux

it runs ouf of memory compiling, though
make SDL_TARGET=1 USE_OPENGL=0 POLYMER=0 HAVE_GTK2=0 STARTUP_WINDOW=0 USE_LIBVPX=0

Nothing I can recall?

Which one runs out of memory?

My docker instance. Anyway I got it compiled at the end and now it works :mrgreen:
See my previous post


Re: JFDuke3D in MiSTer FPGA

Posted: Tue Nov 12, 2024 2:22 am
by bbond007
jordi wrote: Mon Nov 11, 2024 6:35 pm

My docker instance. Anyway I got it compiled at the end and now it works :mrgreen:
See my previous post

Both seem to work pretty well, but I do think the Chocolate one seem to be smoother as far as framerate. Maybe it is just my imagination...

What do you think?

I also tried them in rgb16 and idx8 mode, not sure if that helps performance or not.

Can't seem to get the mouse to work in either one...


Re: JFDuke3D in MiSTer FPGA

Posted: Tue Nov 12, 2024 9:50 am
by jordi
bbond007 wrote: Tue Nov 12, 2024 2:22 am
jordi wrote: Mon Nov 11, 2024 6:35 pm

My docker instance. Anyway I got it compiled at the end and now it works :mrgreen:
See my previous post

Both seem to work pretty well, but I do think the Chocolate one seem to be smoother as far as framerate. Maybe it is just my imagination...

What do you think?

I also tried them in rgb16 and idx8 mode, not sure if that helps performance or not.

Can't seem to get the mouse to work in either one...

I feel both similar. But maybe because I used duke nukem on a Pentium 120 Mhz which struggled sometimes :lol:

Edit: bbond007 one performs much better than eduke32