Homebrew Who wants Duke Nukem 3D (JFDuke?) on the DSi?

Would you like to play Duke Nukem 3D on DSi, in a version with good quality graphics and sound?

  • Yes, certainly, I have always dreamed of it and I can't wait!

    Votes: 36 90.0%
  • No. I don't care. Duke is too vulgar and violent. And it's too difficult for me. I'm not up to it.

    Votes: 4 10.0%

  • Total voters
    40

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,034
Country
United States
Also this version seems not to support addon episodes. :cry:
I tried DukeDC.grp in jfduke3d folder and launched the .argv file via TWL++. This time in the lower screen we can read that at the beginning it loads the addon .grp file (but does not load the related .con file) but selecting the 4 episodes the replacement does not result. Any port of jfduke3d supports expansion grps, what the hell! .......
:nayps3:
this worked for me - DUKEDC.argv
Code:
jfduke3d.nds
-gDUKEDC.GRP -xDUKEDC.con

as a note - I have the grp and the con file in the same folder as the nds file
 
  • Love
Reactions: Nikokaro

Nikokaro

Lost philosopher... searching for a way out...
OP
Member
Joined
Feb 3, 2020
Messages
2,190
Trophies
1
Location
Nautilus (under) Lake Como, Italy 🇮🇹
XP
6,773
Country
Italy
this worked for me - DUKEDC.argv
Then "-" should have been used instead of "/." Yet generally the latter is used for GRP files (Duke3d or Shadow Warrior). Thank you for the suggestion. Now I can finally die with a peaceful heart....lol.
 
Last edited by Nikokaro,

JhulkerCraft

Active Member
Newcomer
Joined
Jul 19, 2022
Messages
33
Trophies
0
Age
17
Location
Lara
XP
73
Country
Venezuela
I was able to pass the first episode, the boss battle was very slow but not enough to be impossible to finish it and another thing when they pass an episode, they close and open the game so it doesn't crash in the middle of another episode
 

Nikokaro

Lost philosopher... searching for a way out...
OP
Member
Joined
Feb 3, 2020
Messages
2,190
Trophies
1
Location
Nautilus (under) Lake Como, Italy 🇮🇹
XP
6,773
Country
Italy
Regarding Duke Caribbean, I believe there is a conflict between the default .con files and those contained in this addon: in fact during loading in the lower screen you will read a series of errors due to this incompatibility.
Too bad. I've been dying to splash some aliens with a water gun.... 🤣
 

CrashMidnick

Well-Known Member
Member
Joined
Jul 22, 2015
Messages
733
Trophies
0
Age
41
XP
2,850
Country
France
Use the command line specified by elhobbs above. For all mods, usually the .CON file is attached to the .GRP file.
He who seeks, finds. 🤓

Nah, this one is not attached, at least not on my official megaton edition. Eduke32 only need the GRP file, not .con file.
I searched for that damn file for almost 2 hours without any success.
 

CrashMidnick

Well-Known Member
Member
Joined
Jul 22, 2015
Messages
733
Trophies
0
Age
41
XP
2,850
Country
France
Here it is.
Thanks but unfortunately it gives me an error :

Version 20211225-5-g21a615a. Built Jul 31 2022 13:17:31 using GCC 12.1. 32-bit word size. Detecting video modes: - 256x192 8-bit fullscreen Scanning for GRP files... Checksumming dukedc.grp GRP file: DUKE3D.GRP Using group file DUKEDC.GRP. Compiling: DUKEDC.con (151193 bytes) Including: DEFS.CON (35992 bytes) * ERROR!(L29 DUKEDC.con) Could not find 'DC_USER.CON'. * ERROR!(L128 DUKEDC.con) Parameter 'TOUGH' is undefined. * ERROR!(L134 DUKEDC.con) Parameter 'TOUGH' is undefined. * ERROR!(L140 DUKEDC.con) Parameter 'SWEARFREQUENCY' is undefined. * ERROR!(L244 DUKEDC.con) Parameter 'SQUISHABLEDISTANCE' is undefined. * ERROR!(L249 DUKEDC.con) Parameter 'MINXSTRETCH' is undefined. * ERROR!(L249 DUKEDC.con) Parameter 'MINYSTRETCH' is undefined. * ERROR!(L275 DUKEDC.con) Parameter 'MAXXSTRETCH' is undefined. * ERROR!(L275 DUKEDC.con) Parameter 'MAXYSTRETCH' is undefined. * ERROR!(L294 DUKEDC.con) Parameter 'SHARKSTRENGTH' is undefined. * ERROR!(L297 DUKEDC.con) Parameter 'SHRUNKDONECOUNT' is undefined. * ERROR!(L299 DUKEDC.con) Parameter 'SHRUNKCOUNT' is undefined. * ERROR!(L308 DUKEDC.con) Parameter 'SHRUNKDONECOUNT' is undefined. * ERROR! Too many warnings or errors. Found 0 warning(s), 13 error(s).

EDIT : I extracted the grp from the SSI and now it is working :) The con file is not needed :

jfduke3d.nds
-gDUKEDC.GRP
 
Last edited by CrashMidnick,

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,034
Country
United States
Are you talking about "déjà vu" map ? I completed it without any problem (except of course the fact that I cannot change weapons since the last update :))
The last update made the controller setup menu the way to customize buttons. Instead of the keyboard. I am able to assign alt-dpad-left to previous weapon and alt-dpad-right to next weapon. The “alt” button being the “x” button.
I have the onscreen keyboard mostly working but I got a little side tracked trying to figure out why some of the addon maps won’t load. And I finished neither …
 
  • Like
Reactions: CrashMidnick

Nikokaro

Lost philosopher... searching for a way out...
OP
Member
Joined
Feb 3, 2020
Messages
2,190
Trophies
1
Location
Nautilus (under) Lake Como, Italy 🇮🇹
XP
6,773
Country
Italy
Important update about Duke Caribbean and other faulty addons

@elhobbs , I think I found why some addons are not working.

1) First of all, I tested all maps of Caribbean via user map option: only the sixth one is loaded, less than 200kb in size (verified through GrpStudio).

To get confirmation I tested 4 more user mini-episodes, again via user map option:

2) MSSP: the third map does not load because it is greater than 200kb, the first two (smaller ones) work:

3) One4All: already the first one does not work because greater than 200kb;

4) Orbital2: All are not loaded except the last one, which is the only one less than 200kb;

5) Vermin: none of the maps work since they are all much larger than 200kb.

In my country they say that, in criminal law, 5 clues make a proof, and then I don't feel like trying any others.
So I don't think I am wrong.
I do not know exactly what is the maximum size allowed, above which the software returns to the initial menu, stating "*.map not found" (as it is not loaded).
Is it perhaps a RAM problem?: at this point only the true expert on the subject can confirm or deny this assumption of mine and find a solution.

P.S. as a last confirmation I tried SlayDuke, an old addon of no less than 4 episodes, with maps of size more or less 100kb each: they all work!
 
Last edited by Nikokaro,
  • Like
Reactions: CrashMidnick

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,034
Country
United States
Important update about Duke Caribbean and other faulty addons

@elhobbs , I think I found why some addons are not working.

1) First of all, I tested all maps of Caribbean via user map option: only the sixth one is loaded, less than 200kb in size (verified through GrpStudio).

To get confirmation I tested 4 more user mini-episodes, again via user map option:

2) MSSP: the third map does not load because it is greater than 200kb, the first two (smaller ones) work:

3) One4All: already the first one does not work because greater than 200kb;

4) Orbital2: All are not loaded except the last one, which is the only one less than 200kb;

5) Vermin: none of the maps work since they are all much larger than 200kb.

In my country they say that, in criminal law, 5 clues make a proof, and then I don't feel like trying any others.
So I don't think I am wrong.
I do not know exactly what is the maximum size allowed, above which the software returns to the initial menu, stating "*.map not found" (as it is not loaded).
Is it perhaps a RAM problem?: at this point only the true expert on the subject can confirm or deny this assumption of mine and find a solution.

P.S. as a last confirmation I tried SlayDuke, an old addon of no less than 4 episodes, with maps of size more or less 100kb each: they all work!
This is unlikely a direct available ram issue. I suspect this may be related to some changes that I made allow stuff to compile. I effectively disabled map version for file formats 7 and 8 - which allow support for larger maps. The maps structures in the are very large static arrays. That exceed the binary size requirements of the ds and dsi. Switching these to dynamic allocation is non trivial as some of them have more than one dimension. It is possible to do but requires some specific non trivial remediations.
 

Nikokaro

Lost philosopher... searching for a way out...
OP
Member
Joined
Feb 3, 2020
Messages
2,190
Trophies
1
Location
Nautilus (under) Lake Como, Italy 🇮🇹
XP
6,773
Country
Italy
I effectively disabled map version for file formats 7 and 8 - which allow support for larger maps..
I see. So we must resign ourselves to giving them up, or am I wrong? Every addon, apart from the older and spartan ones, contains one or more 200kb maps: they would therefore be unplayable; too bad!!! Let's hear the opinion of others: if no one cares about the issue, then let's drop it and keep things as they are. *sigh*
 

mrparrot2

Well-Known Member
Member
Joined
Nov 29, 2021
Messages
106
Trophies
0
Age
29
Location
SP, Brazil
XP
568
Country
Brazil
If the problem is just the size of the static structures but not memory, the following transformation can be done:

Single dimensional arrays can be redeclared as
int A[MAX];
to
int *A;

Multidimensional arrays can be redeclared from:
int B[M][N];
to
int (*B)[N]; // M can be discarded as only the array's pitch is necessary.

Then allocation can be done in

void __attribute__((constructor)) Initialize_Static_Data(void) {
static bool initialized = false;

if (!initialized) {
A = (int *) malloc(MAX * sizeof(int));
B = ((int (*)[N]) malloc(M * N * sizeof(int));
initialized = true;
}
}


The trick here is is to create a function that will be placed on the C++ initialization section and, since this is C code, it will run before everything (even main). And C11 (maybe even C99?) and above allows casting a pointer to a matrix, although this isn't really widespread knowledge. Then B[ i][j] will automatically remaps to (B address) + (i*N + j) * sizeof(int).
 
  • Wow
Reactions: Nikokaro

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,034
Country
United States
If the problem is just the size of the static structures but not memory, the following transformation can be done:

Single dimensional arrays can be redeclared as
int A[MAX];
to
int *A;

Multidimensional arrays can be redeclared from:
int B[M][N];
to
int (*B)[N]; // M can be discarded as only the array's pitch is necessary.

Then allocation can be done in

void __attribute__((constructor)) Initialize_Static_Data(void) {
static bool initialized = false;

if (!initialized) {
A = (int *) malloc(MAX * sizeof(int));
B = ((int (*)[N]) malloc(M * N * sizeof(int));
initialized = true;
}
}


The trick here is is to create a function that will be placed on the C++ initialization section and, since this is C code, it will run before everything (even main). And C11 (maybe even C99?) and above allows casting a pointer to a matrix, although this isn't really widespread knowledge. Then B[ i][j] will automatically remaps to (B address) + (i*N + j) * sizeof(int).
This bit handles the whole initialization?
B = ((int (*)[N]) malloc(M * N * sizeof(int));
You don’t need assign each B for each N?
Also this breaks DS and the a lot of the bounds are defines. So there are a few more considerations. I was not trying to say that it is possible, just not easy.
 

mrparrot2

Well-Known Member
Member
Joined
Nov 29, 2021
Messages
106
Trophies
0
Age
29
Location
SP, Brazil
XP
568
Country
Brazil
This bit handles the whole initialization?
B = ((int (*)[N]) malloc(M * N * sizeof(int));
You don’t need assign each B for each N?

Yes, It handles the whole initialization, and no, you must not initialize each B[ I]. Matrixes are allocated in a contiguous line of memory. That is different from an array of pointers, that is

int *B[N] // array of N pointers to int
int (*B)[N] // pointer to a matrix of int of N colunms.

You can see this question in stackoverflow for more information, although I consider the third answer the correct answer for the problem, not the one selected by the user: https://stackoverflow.com/questions/14450123/c-pointer-to-a-matrix


Also this breaks DS and the a lot of the bounds are defines. So there are a few more considerations. I was not trying to say that it is possible, just not easy.

I can't see why would It break DS. It shouldnt matter for any of the defines as long as they all evaluate to a constant (which they do since the memory is allocated in compile time) The pitch (N) will still be the same so the macros will all expand to the correct positions.[/I][/I]
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/Hn-gx9VjRt8?t=153