Silverfrost Forums

Welcome to our forums

Porting old DBOS calls

25 Nov 2023 4:45 #30785

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

26 Nov 2023 2:06 #30789

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..

26 Nov 2023 6:51 #30790

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.

27 Nov 2023 7:30 #30791

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.

27 Nov 2023 10:21 #30793

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.

27 Nov 2023 10:27 #30794

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.

27 Nov 2023 11:03 #30795

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.

27 Nov 2023 11:07 #30796

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.

27 Nov 2023 11:27 #30797

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

27 Nov 2023 12:31 #30798

Ryan

They all need a terminating @ (or sometimes $) for ClearWin+.

27 Nov 2023 12:44 #30799

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.

Please login to reply.