Re: [Freedos-devel] Compiling PowerPaint

2016-07-29 Thread Rugxulo
Hi,

On Fri, Jul 29, 2016 at 10:45 PM, David McMackins  wrote:
>
> Indeed, the msdos target exists, but it's not in the distribution on the
> FreeDOS host.

Go32v2 (32-bit DPMI, COFF) is the main DOS target (since the '90s!).
The i8086-msdos (OMF) target is new to 3.0.0.

> I've changed to using the TP compatibility mode, and that has resolved
> most of the problems. Now, my biggest problem is getting far pointers to
> work, since they're only enabled for msdos.

Read the docs.

> I'm attempting to compile the msdos compiler, but fpcmake is failing due
> to a missing Makefile.fpc in the utils directory in the source tree.

Uh, why are you doing that? Don't do that, you don't need to bootstrap
(and it probably won't work like you want).

Are you trying to use the Win32-hosted cross-compiler in actual DOS?
Snapshots for 3.1.1 are found on the FTP here:

ftp://ftp.freepascal.org/pub/fpc/snapshot/v31/i8086-msdos/

--
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Compiling PowerPaint

2016-07-29 Thread Rugxulo
Hi,

On Fri, Jul 29, 2016 at 9:54 PM, Ralf Quint  wrote:
>
> NASM would be another show stopper in that case, as it too has a
> different syntax than the inline assembler of Turbo Pascal.

Not sure exactly, but FPC can output various assembly formats, and it
must convert internally between various ones. So it's not "only" NASM
syntax supported here.

> And yes, there is no native FreePascal compiler [targeting i8086-msdos] on 
> DOS,

Yet.

> you have to use either a Windows or a Linux based cross-compiler.

Although it's not a perfect solution, you can use the Win32 snapshots
under HX in raw DOS.

> The best chances for him would be to get the Turbo Pascal 5.5 compiler
> from the oldies section at Embarcadero or try and get a copy of Borland
> Pascal on EBay, if those are still around...

TP 5.5 is okay but fairly weak in some areas. eBay is probably useless
(EDIT: can't find anything useful). If he just wants to build once, he
can ask someone who has TP (who?) to build for him. If he wants to do
further development, he's going to have to learn more anyways, so FPC
isn't out of the question.

--
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Compiling PowerPaint

2016-07-29 Thread David McMackins
Indeed, the msdos target exists, but it's not in the distribution on the
FreeDOS host.

I've changed to using the TP compatibility mode, and that has resolved
most of the problems. Now, my biggest problem is getting far pointers to
work, since they're only enabled for msdos.

I'm attempting to compile the msdos compiler, but fpcmake is failing due
to a missing Makefile.fpc in the utils directory in the source tree.


Happy Hacking,

David E. McMackins II
Associate Member, Free Software Foundation (#12889)

www.mcmackins.org www.delwink.com
www.gnu.org www.fsf.org

On 07/29/2016 09:43 PM, Rugxulo wrote:
> Hi,
> 
> On Fri, Jul 29, 2016 at 7:52 PM, Ralf Quint  wrote:
>> On 7/29/2016 5:04 PM, David McMackins wrote:
>>
>>> I have some modifications I'd like to make to PowerPaint as hosted on
>>> the FreeDOS archives, but I'm unable to compile the source. I'm
>>> attempting to use FreePascal to do the job, but it's failing to compile
>>> some of the units due to assembler syntax errors.
>>
>> Well, I can tell you exactly what the problem is: It is a Turbo Pascal
>> program, using the BGI (Borland Graphics Interface) library for the
>> graphics. That simply won't fly to compile in FreePascal, which is from
>> the get-go a 32bit compiler that can't handle the BGI graphics drivers.
> 
> Dunno. Are you trying to use Go32v2 or i8086-msdos target?
> 
>> Furthermore, any inline assembler, beside being 32bit, is by default in
>> AT syntax and not the Intel like syntax used in the Borland compilers...
> 
> I thought Intel was default for {$mode tp}? But it's not 100%
> compatible (yet?), no, so any low-level stuff might indeed have to be
> reworked. See the online docs:
> 
> http://www.freepascal.org/docs.var
> 
> http://www.freepascal.org/docs-html/current/prog/progch3.html#x144-1450003
> 
>> For all practical purposes, even there is now a 16bit x86 target option
>> for FreePascal, just trying to compile the sources without significant
>> re-working simply won't work...
> 
> The 16-bit "msdos" target is finally officially released/supported as
> of 3.0.0, but it's a cross-compiler only (and you still need NASM,
> WLINK, WLIB). Trunk (which has Win32 snapshots) doesn't need those
> tools anymore and also supports "huge" model. It's meant to be mostly
> (even binary??) compatible with TP, in theory, but so far it lacks in
> a few ways. (The only supported calling convention, last I heard from
> the wiki, is "pascal", not Delphi's "register" nor "cdecl").
> 
> http://wiki.freepascal.org/DOS
> 
> "[Large] is the memory model used by Turbo Pascal version 4 and above"
> "[Pascal] is the default calling convention. It strives for
> compatibility with Turbo Pascal 7"
> 
> --
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
> 

--
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Graphics APIs

2016-07-29 Thread Jayden Charbonneau
I made a rather ATARI looking maze game a while back,written in QBASIC.
(Source code is buried in my terrabyte drive somewhere...)

I ended up making different functions to create an API.

The Window Library drew windows pixel by pixel (It's QBASIC,remember),and
were called dynamically as a library file.

Wouldn't be that hard to make an API,it would just require you to make it
from scratch.

On Fri, Jul 29, 2016 at 10:32 PM, Rugxulo  wrote:

> Hi,
>
> (FYI, I've personally never done a lot of heavy graphics programming,
> so I'm just giving general advice here.)
>
> On Fri, Jul 29, 2016 at 9:11 PM, David McMackins 
> wrote:
> > Some web searching has yielded no useful results for my query.
>
> What did you search for? CGA/EGA? MCGA/VGA? SVGA/VESA?
>
> > I'm considering developing some graphical programs for FreeDOS, but I'm
> > not sure what graphics APIs are available and documented for it.
>
> The BIOS is fairly limited, IIRC to 640x480x16. You can do better with
> VESA, but there is little (if any) hardware acceleration support (e.g.
> old VBE/AF via FreeBE/AF [DJGPP]).
>
> > My expertise is in C, but if I can achieve it in Pascal, I'm open to
> > getting deeper into it.
>
> For C, it depends on the compiler, naturally. So for something like
> DJGPP you can use (old but excellent) Allegro. For C++ (DJGPP) you can
> probably use FLTK. There's also a VESA lib for Pacific C (mirrored on
> iBiblio).
>
> EDIT: Also found this link, if it helps any:
>
> http://www.delorie.com/djgpp/doc/ug/graphics/vesa.html
>
> Pascal? Dunno, there's tons of third-party external units, if TP's
> "Graph" isn't good enough. But I'm not sure if they work with all TP
> versions (e.g. freeware 5.5 since TPU is usually incompatible). Not
> honestly sure what (extra libs) FPC supports, but FPC is probably
> preferred overall. (Blocek had some good libs bundled with it.)
>
> http://ftp.lip6.fr/pub/pc/garbo/pc/turbopas/
>
> > What interfaces are available, and/or what documents can I review to
> learn more about
> > graphics programming on DOS?
>
> VESA is probably your best bet:
>
> http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos/programming/specs/00index.html
>
> P.S. A lot of old games comes with sources (e.g. Boboli), so you could
> study those. Specifically, I mean old '90s-ish DOS games written with
> DJGPP, but there are others too, of course (Wolf 3D, Doom, Quake,
> Hexen2, ROTT, Duke 3D, Descent).
>
> http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos/programming/gamesrc/
>
>
> --
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>
--
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Compiling PowerPaint

2016-07-29 Thread Ralf Quint
On 7/29/2016 7:43 PM, Rugxulo wrote:
> Hi,
>
> On Fri, Jul 29, 2016 at 7:52 PM, Ralf Quint  wrote:
>> On 7/29/2016 5:04 PM, David McMackins wrote:
>>
>>> I have some modifications I'd like to make to PowerPaint as hosted on
>>> the FreeDOS archives, but I'm unable to compile the source. I'm
>>> attempting to use FreePascal to do the job, but it's failing to compile
>>> some of the units due to assembler syntax errors.
>> Well, I can tell you exactly what the problem is: It is a Turbo Pascal
>> program, using the BGI (Borland Graphics Interface) library for the
>> graphics. That simply won't fly to compile in FreePascal, which is from
>> the get-go a 32bit compiler that can't handle the BGI graphics drivers.
> Dunno. Are you trying to use Go32v2 or i8086-msdos target?
Irrelevant. The BGI drivers won't work in either one. And only the 16bit 
version could have even a remote chance to ever support that.
>
>> For all practical purposes, even there is now a 16bit x86 target option
>> for FreePascal, just trying to compile the sources without significant
>> re-working simply won't work...
> The 16-bit "msdos" target is finally officially released/supported as
> of 3.0.0, but it's a cross-compiler only (and you still need NASM,
> WLINK, WLIB). Trunk (which has Win32 snapshots) doesn't need those
> tools anymore and also supports "huge" model. It's meant to be mostly
> (even binary??) compatible with TP, in theory, but so far it lacks in
> a few ways. (The only supported calling convention, last I heard from
> the wiki, is "pascal", not Delphi's "register" nor "cdecl").
NASM would be another show stopper in that case, as it too has a 
different syntax than the inline assembler of Turbo Pascal. And yes, 
there is no native FreePascal compiler on DOS, you have to use either a 
Windows or a Linux based cross-compiler.

The best chances for him would be to get the Turbo Pascal 5.5 compiler 
from the oldies section at Embarcadero or try and get a copy of Borland 
Pascal on EBay, if those are still around...

Ralf

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Compiling PowerPaint

2016-07-29 Thread Rugxulo
Hi,

On Fri, Jul 29, 2016 at 7:52 PM, Ralf Quint  wrote:
> On 7/29/2016 5:04 PM, David McMackins wrote:
>
>> I have some modifications I'd like to make to PowerPaint as hosted on
>> the FreeDOS archives, but I'm unable to compile the source. I'm
>> attempting to use FreePascal to do the job, but it's failing to compile
>> some of the units due to assembler syntax errors.
>
> Well, I can tell you exactly what the problem is: It is a Turbo Pascal
> program, using the BGI (Borland Graphics Interface) library for the
> graphics. That simply won't fly to compile in FreePascal, which is from
> the get-go a 32bit compiler that can't handle the BGI graphics drivers.

Dunno. Are you trying to use Go32v2 or i8086-msdos target?

> Furthermore, any inline assembler, beside being 32bit, is by default in
> AT syntax and not the Intel like syntax used in the Borland compilers...

I thought Intel was default for {$mode tp}? But it's not 100%
compatible (yet?), no, so any low-level stuff might indeed have to be
reworked. See the online docs:

http://www.freepascal.org/docs.var

http://www.freepascal.org/docs-html/current/prog/progch3.html#x144-1450003

> For all practical purposes, even there is now a 16bit x86 target option
> for FreePascal, just trying to compile the sources without significant
> re-working simply won't work...

The 16-bit "msdos" target is finally officially released/supported as
of 3.0.0, but it's a cross-compiler only (and you still need NASM,
WLINK, WLIB). Trunk (which has Win32 snapshots) doesn't need those
tools anymore and also supports "huge" model. It's meant to be mostly
(even binary??) compatible with TP, in theory, but so far it lacks in
a few ways. (The only supported calling convention, last I heard from
the wiki, is "pascal", not Delphi's "register" nor "cdecl").

http://wiki.freepascal.org/DOS

"[Large] is the memory model used by Turbo Pascal version 4 and above"
"[Pascal] is the default calling convention. It strives for
compatibility with Turbo Pascal 7"

--
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Graphics APIs

2016-07-29 Thread Rugxulo
Hi,

(FYI, I've personally never done a lot of heavy graphics programming,
so I'm just giving general advice here.)

On Fri, Jul 29, 2016 at 9:11 PM, David McMackins  wrote:
> Some web searching has yielded no useful results for my query.

What did you search for? CGA/EGA? MCGA/VGA? SVGA/VESA?

> I'm considering developing some graphical programs for FreeDOS, but I'm
> not sure what graphics APIs are available and documented for it.

The BIOS is fairly limited, IIRC to 640x480x16. You can do better with
VESA, but there is little (if any) hardware acceleration support (e.g.
old VBE/AF via FreeBE/AF [DJGPP]).

> My expertise is in C, but if I can achieve it in Pascal, I'm open to
> getting deeper into it.

For C, it depends on the compiler, naturally. So for something like
DJGPP you can use (old but excellent) Allegro. For C++ (DJGPP) you can
probably use FLTK. There's also a VESA lib for Pacific C (mirrored on
iBiblio).

EDIT: Also found this link, if it helps any:

http://www.delorie.com/djgpp/doc/ug/graphics/vesa.html

Pascal? Dunno, there's tons of third-party external units, if TP's
"Graph" isn't good enough. But I'm not sure if they work with all TP
versions (e.g. freeware 5.5 since TPU is usually incompatible). Not
honestly sure what (extra libs) FPC supports, but FPC is probably
preferred overall. (Blocek had some good libs bundled with it.)

http://ftp.lip6.fr/pub/pc/garbo/pc/turbopas/

> What interfaces are available, and/or what documents can I review to learn 
> more about
> graphics programming on DOS?

VESA is probably your best bet:

http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos/programming/specs/00index.html

P.S. A lot of old games comes with sources (e.g. Boboli), so you could
study those. Specifically, I mean old '90s-ish DOS games written with
DJGPP, but there are others too, of course (Wolf 3D, Doom, Quake,
Hexen2, ROTT, Duke 3D, Descent).

http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos/programming/gamesrc/

--
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


[Freedos-devel] Graphics APIs

2016-07-29 Thread David McMackins
Some web searching has yielded no useful results for my query.

I'm considering developing some graphical programs for FreeDOS, but I'm
not sure what graphics APIs are available and documented for it.

My expertise is in C, but if I can achieve it in Pascal, I'm open to
getting deeper into it. What interfaces are available, and/or what
documents can I review to learn more about graphics programming on DOS?

Happy Hacking,

David E. McMackins II
Associate Member, Free Software Foundation (#12889)

www.mcmackins.org www.delwink.com
www.gnu.org www.fsf.org

--
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Compiling PowerPaint

2016-07-29 Thread Ralf Quint
On 7/29/2016 5:04 PM, David McMackins wrote:
> I have some modifications I'd like to make to PowerPaint as hosted on
> the FreeDOS archives, but I'm unable to compile the source. I'm
> attempting to use FreePascal to do the job, but it's failing to compile
> some of the units due to assembler syntax errors.
>
> I can't exactly tell what the problem is; the syntax looks fine to me,
> but it's throwing 'Unknown identifier "DX"' and similar for vga2.pas
>
> Is there another assembler or compiler I need to be using for this program?
Well, I can tell you exactly what the problem is: It is a Turbo Pascal 
program, using the BGI (Borland Graphics Interface) library for the 
graphics. That simply won't fly to compile in FreePascal, which is from 
the get-go a 32bit compiler that can't handle the BGI graphics drivers.

Furthermore, any inline assembler, beside being 32bit, is by default in 
AT syntax and not the Intel like syntax used in the Borland compilers...

For all practical purposes, even there is now a 16bit x86 target option 
for FreePascal, just trying to compile the sources without significant 
re-working simply won't work...

Ralf

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


[Freedos-devel] Compiling PowerPaint

2016-07-29 Thread David McMackins
I have some modifications I'd like to make to PowerPaint as hosted on
the FreeDOS archives, but I'm unable to compile the source. I'm
attempting to use FreePascal to do the job, but it's failing to compile
some of the units due to assembler syntax errors.

I can't exactly tell what the problem is; the syntax looks fine to me,
but it's throwing 'Unknown identifier "DX"' and similar for vga2.pas

Is there another assembler or compiler I need to be using for this program?

Happy Hacking,

David E. McMackins II
Associate Member, Free Software Foundation (#12889)

www.mcmackins.org www.delwink.com
www.gnu.org www.fsf.org

--
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel