[Turbo Pascal] Q&A official thread

Page 10/13
3 | 4 | 5 | 6 | 7 | 8 | 9 | | 11 | 12 | 13

By Francisco Gálvez

Rookie (28)

Francisco Gálvez's picture

24-07-2018, 20:54

"I must say I never had any problems with 3.3f... and I used Kari's libraries. " Arrrggh ... How I envy you! XD

I've tried everything... I'm not new at programming (CSharp, Java, PHP, JavaScript...) but this... drive me nuts.
May be the Pascal versión... but it's really frustrating.
But i'm optimistic and this weekend i'm gonna give it the last shot. Cross fingers. Running Naked in a Field of Flowers

By Manuel

Ascended (15763)

Manuel's picture

24-07-2018, 22:07

I only used Kari's libs under MSX-DOS2 though, so that could make a difference. At least some of the modules really require DOS2.

By Manuel

Ascended (15763)

Manuel's picture

24-07-2018, 22:07

Did you try to compile and run the examples that come with Kari's libs?

By Francisco Gálvez

Rookie (28)

Francisco Gálvez's picture

30-07-2018, 21:25

Yes I did. Same results.

I put an example to explain myself:
https://www.dropbox.com/s/tgxeoanitbe3om5/source.zip?dl=0

There are two programs... with one sprite it compliles with no problem and the other source with two has nonsense errors.

Well... It's time to try C. I made my first hello world in MSX not much libraries but not so dificult as I thought/remember neither. Let's see

Ps: I didn't know how MSX.org community was but I've seen there are a lot of awesomew people...

By Manuel

Ascended (15763)

Manuel's picture

30-07-2018, 23:05

I also made a program in TP with Kari's libs with sprites, which worked fine. It had 2 sprites, as it was a 2-player game. No problems there. Let's see what I did back then:

      SpriteArray: Array [1..4] Of Sprite8Type = ((16,56,56,16,0,0,0,0),
          (48,120,48,0,0,0,0,0),(0,16,56,56,16,0,0,0),(96,240,96,0,0,0,0,0));
                                  {The 'head'-sprites, for all four directions}
PROCEDURE DefineSprites;
VAR HelpDir:DirectionType;
    Player,Number: Byte;
    HelpArray: SpriteColorArrayType;
BEGIN
     FOR HelpDir:=North TO West DO           {Put N,E,S,W-spriteshapes in VRAM}
                    SetSpritePattern(Ord(HelpDir),SpriteArray[Ord(HelpDir)]);
     FOR Player:=1 TO 2 DO
     BEGIN                                         {Put Sprite-colours in VRAM}
          FOR Number:=0 TO 15 DO HelpArray[Number]:=HeadColour[Player];
          SetSpriteColors(Player,HelpArray)
     END;
END;

and

PROCEDURE PutSprites;
VAR Player:Byte;
BEGIN
     FOR Player:=1 TO 2 DO
     CASE Direction[Player] OF
         North :PutSprite(Player,Ord(North),(X[Player]-6) SHR 1,Y[Player]-2);
         East  :PutSprite(Player,Ord(East),(X[Player]-6) SHR 1,Y[Player]-2);
         South :PutSprite(Player,Ord(South),(X[Player]-6) SHR 1,Y[Player]-4);
         West  :PutSprite(Player,Ord(West),(X[Player]-2) SHR 1,Y[Player]-2);
     END;
END;

I compiled it with TP 3.3f on my real MSX2, under MSX-DOS2.

By SdC

Resident (38)

SdC's picture

31-07-2018, 18:10

I've narrowed the problem down to the DOSBox step unfortunately.
The file compiles fine on an older Windows (Vista, can you believe it?) system through command line and with msxpad. As soon as DOSBox is involved, compilation fails dramatically, both on old and new pc. What could possibly be wrong in that tiny simple little text file? Is it a specific sequence of bytes that triggers something inside DOSbox's little brain? Aaarrrggg...

By SdC

Resident (38)

SdC's picture

31-07-2018, 19:51

It appears TP3's calls to read the PAS file are being returned by DOSBox with apparently random lines; I'm compiling now directly from the DOSBOx console to catch the actual verbose output from TP3, and as you move code around in the file, the error changes, and the indicated line is a jumble of pascal code snippets from both before and after the indicated line number. I've played around with just about every DOSBox configuration setting, without result.

By Manuel

Ascended (15763)

Manuel's picture

31-07-2018, 23:22

so, apparently file access from dosbox is not working as it should?
Instead of dosbox it should also be possible to use openMSX to run the TP3.3f compiler (from MSX-DOS). But it is a little tricky (a limit of 712kB per folder); still, with some careful setting up, it would definitely be workable.

By ToriHino

Champion (371)

ToriHino's picture

01-08-2018, 00:17

Or try an alternative to DOSBox like vDos

By SdC

Resident (38)

SdC's picture

01-08-2018, 07:47

ToriHino wrote:

Or try an alternative to DOSBox like vDos

Good idea, i'll give it a try.

Page 10/13
3 | 4 | 5 | 6 | 7 | 8 | 9 | | 11 | 12 | 13