JFDuke3D in MiSTer FPGA

jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

JFDuke3D in MiSTer FPGA

Unread post 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 1699 times

Is it the way I executed it?

Attachments
duke3d.zip
compiled jfduke3d, no copyrighted assets are included
(753.89 KiB) Downloaded 77 times
User avatar
RealLarry
Top Contributor
Posts: 881
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 120 times
Been thanked: 385 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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?

Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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

User avatar
RealLarry
Top Contributor
Posts: 881
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 120 times
Been thanked: 385 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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...

Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: JFDuke3D in MiSTer FPGA

Unread post by jordi »

I compiled by using Mister toolbox docker

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

User avatar
RealLarry
Top Contributor
Posts: 881
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 120 times
Been thanked: 385 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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!

Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
Bas
Top Contributor
Posts: 622
Joined: Fri Jan 22, 2021 4:36 pm
Has thanked: 80 times
Been thanked: 324 times

Re: JFDuke3D in MiSTer FPGA

Unread post by Bas »

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

jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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?

jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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

bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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?

jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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.

User avatar
dickhardpill
Posts: 285
Joined: Tue Apr 09, 2024 9:28 pm
Location: Not Portland, OR
Has thanked: 73 times
Been thanked: 59 times
Contact:

Re: JFDuke3D in MiSTer FPGA

Unread post 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

I has a you tube
Analog IO
USB board
VGA > Component
HDMI > FPM

bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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 69 times
20241110_233609.jpg
20241110_233609.jpg (587.58 KiB) Viewed 1026 times
User avatar
RealLarry
Top Contributor
Posts: 881
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 120 times
Been thanked: 385 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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 :(

Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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

jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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. ;)

bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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?

jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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

bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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...

jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: JFDuke3D in MiSTer FPGA

Unread post 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

Post Reply