forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Porting old DBOS calls

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
Ryan



Joined: 25 Feb 2016
Posts: 110

PostPosted: Sat Nov 25, 2023 5:45 pm    Post subject: Porting old DBOS calls Reply with quote

Hi all,

I am trying to find modern equivalents of the following two DBOS calls, but the function the documentation suggests to use is undocumented and not showing up in any searches.

Can anyone advise if these are safe to remove now as the help files suggest this kind of stuff was only needed for VGA?

Both SET_PALETTE@ and SET_VIDEO_DAC@ are now recommended to use SET_COLOURS@ but it is not documented.

I also have the following to migrate but these should be easier;
ELLIPSE@
FILL_ELLIPSE@
DRAW_TEXT@
GET_MOUSE_POSITION@
RECTANGLE@
FILL_RECTANGLE@
DRAW_LINE@
CLEARWIN_MODE@
COMMAND_LINE@

Regards

Ryan
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Sun Nov 26, 2023 3:06 pm    Post subject: Reply with quote

The FTN95 help file FTN95.chm has a section ClearWin+ -> Functions ported from DBOS -> Table of alternative routines.

This says, for example, use DRAW_ELLIPSE@ for ELLIPSE@ etc..
Back to top
View user's profile Send private message AIM Address
Ryan



Joined: 25 Feb 2016
Posts: 110

PostPosted: Sun Nov 26, 2023 7:51 pm    Post subject: Reply with quote

Yes, I saw those and that's why I did not think they would be a problem.

However, the documentation for SET_COLOURS does not exist and neither does the function. It was mostly about that one function that I was asking.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Mon Nov 27, 2023 8:30 am    Post subject: Reply with quote

Ryan

SET_COLOURS@ is available via INCLUDE <clearwin.ins> or USE clrwin. It sets the colours for the VGA palette. Otherwise a default palette is used.

For %gr, the ClearWin+ library now uses RGB colours, rather than VGA colours by default. VGA colours can be restored, for example, via the option %gr[vga_colours].

I don't remember what CLEARWIN_MODE@ does and I can't see it anywhere in the ClearWin+ library. I would try commenting it out.

For 64 bits, GET_MOUSE_POSITION@ requires INCLUDE <dbos.ins>. You will have to see if it does anything useful.

For 64 bits, COMMAND_LINE is available (without the @). It gives you the whole command line.
Back to top
View user's profile Send private message AIM Address
Ryan



Joined: 25 Feb 2016
Posts: 110

PostPosted: Mon Nov 27, 2023 11:21 am    Post subject: Reply with quote

Thank you Paul.

It's all compiling now.

32 bit still works with the same source but the 64 bit is complaining it cannot find an entry point.

Do you know why these might differ? Neither has a 'program main', I expect the 32 bit has inferred the first code as the entry point but the 64 bit does not.
Back to top
View user's profile Send private message
Ryan



Joined: 25 Feb 2016
Posts: 110

PostPosted: Mon Nov 27, 2023 11:27 am    Post subject: Reply with quote

A bit more information.

After adding a main, I still receive a message box with;

Entry Point Not Found

The procedure entry point get_file_size could not be located in the dynamic link library c:\program files(x86)\Silverfrost\FTN95\SIMDEM64.DLL

So it seems it is not the main app entry point but something else.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Mon Nov 27, 2023 12:03 pm    Post subject: Reply with quote

Ryan

There seems to be a conflict with simdem64.dll and I presume that you are not using simdem.

To fix this, go to your FTN95.exe folder (usually C:\Program Files (x86)\Silverfrost\FTN95) and rename or delete simdem64.dll.
Back to top
View user's profile Send private message AIM Address
Ryan



Joined: 25 Feb 2016
Posts: 110

PostPosted: Mon Nov 27, 2023 12:07 pm    Post subject: Reply with quote

Odd, we do not mean to use SimDem64.dll but now I've renamed those DLLs, I'm getting 'The code execution cannot proceed because SIMDEM64.DLL was not found. Reinstalling the program may fix this problem.

I think I'll have to use Dependency Walker to see what is being referenced.
Back to top
View user's profile Send private message
Ryan



Joined: 25 Feb 2016
Posts: 110

PostPosted: Mon Nov 27, 2023 12:27 pm    Post subject: Reply with quote

It seems that the linker has chosen simdem64 as the source for those DBOS calls. Perhaps it's missing a use clrwin statement that is implied in 32 bit.

I'll have to investigate further.

DRAW_ELLIPSE
DRAW_FILLED_ELLIPSE
DRAW_CHARACTERS
DRAW_RECTANGLE
DRAW_FILLED_RECTANGLE
DRAW_LINE_BETWEEN

All of the above have been resolved to SIMDEM64.DLL
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Mon Nov 27, 2023 1:31 pm    Post subject: Reply with quote

Ryan

They all need a terminating @ (or sometimes $) for ClearWin+.
Back to top
View user's profile Send private message AIM Address
Ryan



Joined: 25 Feb 2016
Posts: 110

PostPosted: Mon Nov 27, 2023 1:44 pm    Post subject: Reply with quote

I did try that and the linker complained again.

I've now got it working, it was using an old 'include mywin.ins' which must have been confusing it. Using the proper module seems to resolve it correctly.

I'll try with the @ suffix again now that it is pointing at hopefully the correct module.

Thank you Paul for all of your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group