OS/2, eCS & ArcaOS - Technical > Programming
DOSBox-x - infinite loop in configure/make
Dave Yeo:
Hmm, revisited this and compared to DosBox, no EMXism's besides the -Zmt which is unneeded and ignored as kilbc is always muti-threaded. There's just various bad coding I think as DosBox compiles fine, DosBox-X is very strict with its flags and various of the OS/2 parts fail to compile.
Dave Yeo:
As an example. this code compiles fine with DosBox,
--- Code: --- FSINFO fsinfo;
ULONG drivenumber = drive[0];
if (drivenumber > 26) { // drive letter was lowercase
drivenumber = drive[0] - 'a' + 1;
}
APIRET rc = DosQueryFSInfo(drivenumber, FSIL_VOLSER, &fsinfo, sizeof(FSINFO));
if (rc == NO_ERROR) {
bool cdrom = false;
--- End code ---
Whereas with DosBox-x, the error is,
--- Code: ---drive_cache.cpp: In member function 'void DOS_Drive_Cache::SetBaseDir(const char*, DOS_Drive*)':
drive_cache.cpp:159:32: error: cannot convert 'DOS_Drive' to 'ULONG' {aka 'long unsigned int'} in initialization
159 | ULONG drivenumber = drive[0];
| ~~~~~~~^
| |
| DOS_Drive
drive_cache.cpp:161:32: error: no match for 'operator-' (operand types are 'DOS_Drive' and 'char')
161 | drivenumber = drive[0] - 'a' + 1;
| ~~~~~~~~ ^ ~~~
| | |
| | char
| DOS_Drive
--- End code ---
Mentore:
--- Quote from: Dave Yeo on November 07, 2024, 07:03:01 am ---As an example. this code compiles fine with DosBox,
--- Code: --- FSINFO fsinfo;
ULONG drivenumber = drive[0];
if (drivenumber > 26) { // drive letter was lowercase
drivenumber = drive[0] - 'a' + 1;
}
APIRET rc = DosQueryFSInfo(drivenumber, FSIL_VOLSER, &fsinfo, sizeof(FSINFO));
if (rc == NO_ERROR) {
bool cdrom = false;
--- End code ---
Whereas with DosBox-x, the error is,
--- Code: ---drive_cache.cpp: In member function 'void DOS_Drive_Cache::SetBaseDir(const char*, DOS_Drive*)':
drive_cache.cpp:159:32: error: cannot convert 'DOS_Drive' to 'ULONG' {aka 'long unsigned int'} in initialization
159 | ULONG drivenumber = drive[0];
| ~~~~~~~^
| |
| DOS_Drive
drive_cache.cpp:161:32: error: no match for 'operator-' (operand types are 'DOS_Drive' and 'char')
161 | drivenumber = drive[0] - 'a' + 1;
| ~~~~~~~~ ^ ~~~
| | |
| | char
| DOS_Drive
--- End code ---
--- End quote ---
Thanks a million for all of these contributions on your side, Dave. It seems DosBox-x is not viable - too bad, but hey, I did try at least 8)
Now back to RetroArch. I'll try to delve deeper into the network part and see if I can go a little further than my first attempt (there are some interesting TLS libraries, I shall try them all).
Mentore
Jochen Schäfer:
In DOSBOX, drive is a char array, but on DOSBOX-X it seems to be a struct or object. So, there is some work to do.
Lars:
So why not like this:
bool cdrom = drive->isRemovable() ? true : false;
Because that is a method that the "DOS_Drive" class offers (should offer, it's a virtual method that needs to be filled "with life").
Then, you do not need all that other test nonsense to test for CDROM yes/no.
In the end, all that #ifdef'ed code is nonsense as "labellocal" is not used anywhere.
I think all the (outer) //Get Volume label #ifdef block can therefore go away.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version