Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Entries > Release id #216054 : GTUltra V1.0.3
2022-03-29 21:41
spider-j

Registered: Oct 2004
Posts: 455
Release id #216054 : GTUltra V1.0.3

Better take this to discussions to not flood the comments.
Quote:
Can you run it from the win32 folder?

Running the exe through WINE works fine. I'd prefer a native linux build though.
 
... 159 posts hidden. Click here to view all posts....
 
2022-05-13 19:16
Jason Page

Registered: Sep 2015
Posts: 87
I wasn't aware that the cfg wasn't in the same location as the exe in linux...hmm


I do rb, as the default file is stored as binary in the large datafile. So reading the text file should be taken care of, once it actually loads into RAM.
I do a check for LF, etc - it's the code that I use to parse the default palette, which I modified to work with the binary data (it doesn't check for "\n", for example - it checks for 0xd... But we're going off track, I think.. take a look at sgets - I added a comment when I wrote it:

/*
Had to modify this to handle \n manually due to not being able to open "rt".
I add a 0 at the end of the loaded file buffer as a terminator.
I then check for <=0xd for a carriage return to cover 0xd,0xa combinations, rather than =='\n'
*/


This is what I get when running on windows: So the parsing of the binary works.

https://www.dropbox.com/s/ks63dxl2hx1q159/GoatTracker%20Ultra%2..
2022-05-13 20:00
theK

Registered: Oct 2020
Posts: 44
For linux to get to folders there is "./gtpalettes/0_default.gtp".
2022-05-13 20:02
tlr

Registered: Sep 2003
Posts: 1743
Quote: I wasn't aware that the cfg wasn't in the same location as the exe in linux...hmm


I do rb, as the default file is stored as binary in the large datafile. So reading the text file should be taken care of, once it actually loads into RAM.
I do a check for LF, etc - it's the code that I use to parse the default palette, which I modified to work with the binary data (it doesn't check for "\n", for example - it checks for 0xd... But we're going off track, I think.. take a look at sgets - I added a comment when I wrote it:

/*
Had to modify this to handle \n manually due to not being able to open "rt".
I add a 0 at the end of the loaded file buffer as a terminator.
I then check for <=0xd for a carriage return to cover 0xd,0xa combinations, rather than =='\n'
*/


This is what I get when running on windows: So the parsing of the binary works.

https://www.dropbox.com/s/ks63dxl2hx1q159/GoatTracker%20Ultra%2..


I did see the comment, but I'm thinking unless you tested it on the relevant configurations, there are many things that can go wrong.

When I put the gtpalettes dir with the config file and fixed the "\\" it seemed to do loadPalette() on all files, but no palettes appeared in the gui. No error messages.
2022-05-13 20:13
Jason Page

Registered: Sep 2015
Posts: 87
@theK

Thanks. I'll change the code to do this path... But are you seeing the same problem as tlr - the palette's still aren't changing?


Possibly worth seeing if the actual palette load is failing in loadPalette() (it also has a nice comment saying that I knew the RT thing was going to be a pain..:-) )


FILE *handle = fopen(paletteName, "rb"); // Have to use RB instead of RT as the default file is within the binary wad..grrr
if (handle == NULL)
{
2022-05-13 20:18
tlr

Registered: Sep 2003
Posts: 1743
After some more printf() debugging I can see that it's sgets() that does not work correctly with LF line endings.

If I crudely change this:
if (**strp == 0xd){
    s[i] = '\n';

into this:
if (**strp == 0xa){
    s[i] = '\n';
it works with LF (but of course not with CR/LF anymore).

Should be easy enough to verify on your platform with an LF only file as you do a binary read.
2022-05-13 20:21
theK

Registered: Oct 2020
Posts: 44
Yeah, as tlr, I get the "/gtultra
Unable to read directory: No such file or directory"

This indicates that it's searching in the wrong folders. :-(
2022-05-13 20:24
Jason Page

Registered: Sep 2015
Posts: 87
what confuses me is that I know that these files have 0xd,0xa as LF,CF - I can see it in a hex editor, and I'm loading in binary, so this should stay the same. So the code that is there already should handle this correctly...What have I missed here?!
2022-05-13 20:26
tlr

Registered: Sep 2003
Posts: 1743
Quote: what confuses me is that I know that these files have 0xd,0xa as LF,CF - I can see it in a hex editor, and I'm loading in binary, so this should stay the same. So the code that is there already should handle this correctly...What have I missed here?!

You are missing that they are text files. git cloning text files will yield native line endings on the platform the clone is performed on.
2022-05-13 20:48
Jason Page

Registered: Sep 2015
Posts: 87
Hah!
Yes, I missed that!
I had no idea that GIT would mess around with file data! I thought the rb / me parsing the data should mean that the data is 100% the same for you as it is for me. That's pretty shocking... However, how does GIT know that they're text files? Just by a binary search? Surely that's really dangerous? it could just decide that something is a text file, even though it wasn't?...Time for a google search..


(Likelyhood is that I'll ditch the text format and revert to at least having binary data for palette files..)
2022-05-13 20:54
Jason Page

Registered: Sep 2015
Posts: 87
Also - I just wanted to say that I REALLY appreciate your help here!

Thank you
Previous - 1 | ... | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Darkflight
mutetus/Ald ^ Ons
Guests online: 75
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.7)
6 Uncensored  (9.6)
7 Comaland 100%  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Morph  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Offence  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 S!R  (9.7)
5 Fungus  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.048 sec.