@hwnd%

Discussions related to graphics (2D and 3D), animation and games programming
Richard Russell
Posts: 634
Joined: Tue 18 Jun 2024, 09:32

Re: @hwnd%

Post by Richard Russell »

Ric wrote: Sun 15 Mar 2026, 15:26 but i copied it from the original tutorials on D3D11
That demonstrates how old they are. Back then, it may be that it was the recommended way to find a pointer to a string; that hasn't been the case since PTR(strings$) was introduced several years ago, largely to support 64-bits operation!

Earlier in this very thread I wrote: "when I modified BBCSDL from 32-bits to 64-bits there were places where I replaced what are absolute addresses in the 32-bit version with relative addresses in the 64-bit version, so I could continue to use a 32-bit value. The 'pointer' in a string descriptor is an example".

So whilst it is possible (but not recommended) to extract the string pointer from the string descriptor in 32-bits BBC BASIC, it is not possible in 64-bits. It would have been an entirely understandable mistake for you to make had I not drawn attention to this specific issue only a few days ago. :oops:

Unfortunately I don't have the time or the patience to give you the degree of help you need. I have every sympathy with your difficulties in writing what is cutting-edge code that requires a deep understanding not only of BBC BASIC but also of Direct3D 11. Once upon a time there would have been others to share the load (Jon Ripley and Malcolm Marten for example) but they are long gone.

We have a situation in which you are probably one of only a handful of people still programming in BBC BASIC, and the only one doing anything non-trivial. Perhaps you should consider switching to a BASIC (or even another language) which is more popular and better supported.
Richard Russell
Posts: 634
Joined: Tue 18 Jun 2024, 09:32

Re: @hwnd%

Post by Richard Russell »

Richard Russell wrote: Sun 15 Mar 2026, 17:34 We have a situation in which you are probably one of only a handful of people still programming in BBC BASIC
With BBC BASIC for Windows being a paid-for product, it was possible to estimate how many users there were likely to be, based on an assumption of 'half-life', i.e. for how long it would typically be used following purchase. However since BBC BASIC for SDL 2.0 is completely free, I have no statistics to call upon to make even a rough guess (I don't know whether it would be possible to record the number of downloads, but I don't currently).

So just about the only basis on which I can judge the likely user base of BBCSDL is the number of people who ask for support here, and that is small (close to zero if Ric has now given up on BBC BASIC). But of course the small number of queries may reflect the quality of the documentation - making them unnecessary - rather than the number of users (unlikely, but one can dream). :?

I remember that some while ago David Williams attempted to estimate the total number of users, and he came up with a wide range of figures, reflecting the difficulty of the exercise (I've forgotten what the range was, but the low end was a very small number). I think that pessimistic estimate may have contributed to his decision to stop using my BASICs and concentrate on RISC OS.

My current plan is to keep my BASICs (BB4W, BBCSDL, BBCTTY) available for download and supported, to the extent that my own deterioration allows. In some ways it would be tempting to use the likely small number of users as an excuse to discontinue them, but as I don't actually know what that number is, it would be difficult to justify.
Ric
Posts: 297
Joined: Tue 17 Apr 2018, 21:03

Re: @hwnd%

Post by Ric »

I havent given up on BBC BASIC, I am just trying to find solutions to my D3D11 problems without asking for your help. I have managed to get the SwapChain working and a window to appear that I can change the colour of, however, I can not get the triangle to render in the next tutorial. I have put loads of PRINT statements in to try and find the answer, but rather annoyingly the program doesnt fail anywhere (with "number too big" or hRESULT% <> 0, it obviously fails in some way though) and the shader buffer sizes return as none zero. The only difference between what happens when i run the 32bit version and 64bit version (apart from the address sizes) are the buffer sizes which differ from 520(32bit) to 596(64bit), which i assume is due to the 64bit addressing. When i run the 64bit version, whilst trying to render the triangle, the background still changes colour, its just that the triangle doesnt render. In 32bit version the triangle renders.

I feel it is a sad moment that you are contemplating removing support for your BASICS, inevitably the moment will come, but i dont like to think that it is because nobody is using them.

I would like to ask for your help, but i got the impression from the last exchange that you dont want to give it. Here's hoping you'll change your mind.
Kind Regards Ric.

6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
Richard Russell
Posts: 634
Joined: Tue 18 Jun 2024, 09:32

Re: @hwnd%

Post by Richard Russell »

Ric wrote: Tue 17 Mar 2026, 20:39 I feel it is a sad moment that you are contemplating removing support for your BASICS, inevitably the moment will come, but i dont like to think that it is because nobody is using them.
I don't imagine that "nobody" is using them, that would be way too pessimistic, but equally it is probably over-optimistic to think that the reason for so few queries being posted here is because users never have any problems, or the documentation is so wonderful that they never need to ask for help. :?

Other language forums I visit, such as the Liberty BASIC forum, are very busy. So I inevitably conclude that the number of my users must be very small, unless somebody can present convincing evidence to the contrary. :(
I would like to ask for your help, but i got the impression from the last exchange that you dont want to give it.
I didn't mean to give that impression, what I said was that I don't always have the time or the patience to do it. Irrespective, you should always feel free to post here, because that's an invitation for others to help, not just me.

This forum has survived several periods when I wasn't a member or for other reasons couldn't post, so you shouldn't decide whether to post based on my availability, ability or willingness to answer.
Richard Russell
Posts: 634
Joined: Tue 18 Jun 2024, 09:32

Re: @hwnd%

Post by Richard Russell »

Ric wrote: Tue 17 Mar 2026, 20:39 the buffer sizes which differ from 520(32bit) to 596(64bit)
Have you checked that 596 is the correct buffer size when operating in 64 bits? I expect one of the better AI chatbots (e.g. Gemini) would be able to confirm that, or not, if asked.
Richard Russell wrote: Tue 17 Mar 2026, 21:30 I don't imagine that "nobody" is using them, that would be way too pessimistic
It looks as though I will have to revise that belief, and acknowledge that it may indeed be the case that there is not a single active user of BBC BASIC for SDL 2.0 anywhere - unless you count me! :( :shock:

I find that a very depressing thought, especially considering the time and effort I have dedicated to developing BBCSDL over the last ten years or more. :cry:
Ric
Posts: 297
Joined: Tue 17 Apr 2018, 21:03

Re: @hwnd%

Post by Ric »

I have just tried meta ai and copilot, both give the same unsatisfactory answer, that they can not give specific answers and the range for this minimal shader file should be between 200bytes and 2ish kbytes.
I have not really made any progress since i last posted. It has been quite frustrating because the program runs with out an immediate error, thus making error detection difficult. I have checked all the structures have the correct size elements and that all are aligned on an 8byte boundary, but the triangle still does not render!

I am not sure what code i can post for you to have a look at, as without the whole program nothing runs, but i know you dont like wading through other people mire.

If you count me, thats two of us who still use BBCSDL2, all my code for my home hub is written in it and long may it continue.
Kind Regards Ric.

6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
Richard Russell
Posts: 634
Joined: Tue 18 Jun 2024, 09:32

Re: @hwnd%

Post by Richard Russell »

Ric wrote: Fri 27 Mar 2026, 19:05 I have not really made any progress since i last posted. It has been quite frustrating because the program runs with out an immediate error, thus making error detection difficult.
So all of the Direct3D API calls you are making are returning a 'success' result, but are nevertheless failing to render successfully? That seems odd, as I would have expected one or more of the calls to report a failure.