Go32v2 DOS: Compilation of HW Acceleraded GraphiX Lib lazarus / 68-Other OS ---------------------------------------------------------------------- tol · 2024-03-20 12:10 Is anybody able to compile the (hardware accelerated) GraphiX Lib vor Go32v2? ( http://downloads.freepascal.org/fpc/contrib/gxfp405.zip ). It seems to be made for an older FPC version but not available any more. I finally got parts of it to compile (graphix.pp), by simply commenting out (hopefully not needed parts) parts that won't compile anymore. But I get stuck now when trying to compile gxdemo.pas Current Errors: gximg.pp(1368,31) Error: You cannot reach COSTAB from that code gximg.pp(1424,31) Error: You cannot reach COSTAB from that code gximg.pp(5660,18) Error: function header doesn't match the previous declaration "Read(var ;LongInt);" gximg.pp(5771,18) Error: function header doesn't match the previous declaration "Read(var ;LongInt);" If someone somehow manages to create/obtain the compiled units, or tell me how to fix this error, that would be a great help to me. ---------------------------------------------------------------------- cdbc · 2024-03-20 13:18 Hi At least I can tell you that these Quotegximg.pp(5660,18) Error: function header doesn't match the previous declaration "Read(var ;LongInt);" gximg.pp(5771,18) Error: function header doesn't match the previous declaration "Read(var ;LongInt);" errors are to do with the function declaration in interface section doesn't match the function implementation in the implementation section of the unit. Have you changed one or the other?!? Should be easy to fix  The rest... I dunno. Regards Benny ---------------------------------------------------------------------- tol · 2024-03-20 13:57 I've not changed anything. This is the implementation within gximg.pp: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i TYPE PMyStream=^TMyStream;     TMyStream=OBJECT(TStream)       f:file;     buffer,curbufferpos:pointer;       buffersize:longint;       bufferstartpos,bufferendpos,bytesinbuffer:longint;       io:longint;       fmode:word;       CONSTRUCTOR Init(name:string;mode,size:word);     DESTRUCTOR Done;virtual;       PROCEDURE read(var buf;count:sw_word);virtual;       PROCEDURE seek(pos:longint);virtual;       FUNCTION getpos:longint;virtual;     FUNCTION getsize:longint;virtual;     END; According to this the proc read(..) is a new overloaded proc ( besides Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function Read(var Buffer; Count: LongInt) : LongInt; Virtual; Overloadof the TStream base class. Or do I misunderstand this? Maybe I should just change the parameter LongInt to override the base implementation? ---------------------------------------------------------------------- cdbc · 2024-03-20 14:30 Hi 1) QuoteMaybe I should just change the parameter LongInt to override the base implementation? Yes you should, the overriding method MUST match exactly the virtual overridden method!!! 2) This function: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function Read(var Buffer; Count: LongInt) : LongInt; Virtual; Overload has got nothing to do with the same-named method of "TMyStream" if anything it would look like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i PROCEDURE TMyStream.read(var buf;count:sw_word);begin  ...end; in the implementation section that is... It seems to me, that you need to read up on your /old-school/ Object- framework(s) to fet more acquanted with the workings of it/them... I can recommend the programming guides and manuals from Borland on TP 5.5, they're available allover the place to download for free. I even think 'Embarcadero' has one for download at their site  If you feel adventurous, you can have a 'looksee' at our own 'Free Vision' framework, you'll find it in the fpc source-tree, under 'fv' ...and there's even a version for unicode. Regards Benny ---------------------------------------------------------------------- tol · 2024-03-20 17:21 If I understand correctly, declaring a method with different parameter(s) does not create a new (overloaded) method in FP? (Because then the error message would be wrong). ( Keine Ahnung ob im Code der Lib die Methode read überschrieben werden soll oder eine neue Methode read eingeführt werden sollte, von daher die Verwirrung ) ---------------------------------------------------------------------- marcov · 2024-03-20 17:22 I think TP was simply more forgiving because it didn't have any form of procedural overloading. Anyway, the best solution seems to simply correct and move on. ---------------------------------------------------------------------- cdbc · 2024-03-20 18:07 Hallo Eine Lösung wäre:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i TYPE PMyStream=^TMyStream;     TMyStream=OBJECT(TStream)       f:file;       buffer,curbufferpos:pointer;       buffersize:longint;       bufferstartpos,bufferendpos,bytesinbuffer:longint;       io:longint;       fmode:word;       CONSTRUCTOR Init(name:string;mode,size:word);       DESTRUCTOR Done;virtual;       PROCEDURE read(var buf;count:sw_word);virtual;       ///// ein neuer Funktionsname /////       function ReadBuffer(var Buffer; Count: LongInt) : LongInt; Virtual;       PROCEDURE seek(pos:longint);virtual;       FUNCTION getpos:longint;virtual;     FUNCTION getsize:longint;virtual;     END; Und dann die neue Funktion zu implementieren:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function TMyStream.ReadBuffer(var Buffer; Count: LongInt) : LongInt;begin  ...end;HTH Regards Benny ---------------------------------------------------------------------- tol · 2024-03-22 15:52 I finally got everything to compile, including the FreeType lib. (I simply quickly removed the JPEG support). Unfortunately, everything was for nothing: the program crashes deep in the assembler code when initializing the graphics mode. (Dosbox-X, for all emulated graphics cards). Unfortunately I'm out here. Does anyone know of another graphics lib that offers hardware acceleration for the first 2D accelerator cards? (This offered hardware support for graphics cards in the mid-90s, which would be exactly my historical goal PC). If necessary also in C via DJGPP, adding a Pascal interface is not the world. ---------------------------------------------------------------------- dbannon · 2024-03-23 08:47 You can still download the source code for FPC 2.6.4 from github, thats the one mentioned on the wiki page. I wonder of someone can tell us when you can download either a compiled version or a boot compiler to build 2.6.4 ? The link to old compilers on the main FPC website is broken. Davo ---------------------------------------------------------------------- tol · 2024-03-23 10:30 I'm afraid I need a 1.X version of Free Pascal. And even then it doesn't seem clear whether the runtime errors that I get after compiling with 3.2.0 when running in Dosbox-X don't have something to do with dosbox-x's hardware emulation.