Recent posts

#1
Launchpad Projects / Re: DX9Lib
Last post by Dabzy - Dec 27, 2024, 12:45 AM
Oh aye, and I've documented the DX9Lib comments and implemented my own online documentation system don't you know... How very PHP of me:

https://launchpad-ide.com/launchpad/doc/index.php

:)

Dabzy
#2
Launchpad Projects / Re: DX9Lib
Last post by Dabzy - Dec 26, 2024, 11:53 PM
Managed to test it on a clean Win11 machine, updated the GFX driver, installed this:

https://www.microsoft.com/en-us/download/details.aspx?id=8109&msockid=15eb4e948a36630f1dba5aaa8bd662ae

Which I've plonked in the $LaunchpadDir$/DX9redist folder as a zip because the downloaded version is one of them crappy "Extract to here" things, where, you have to run it, dump the contents somewhere, with no option to create a new folder, (so you have to create a new folder before you extract the actual setup files otherwise you'll probably soil an existing folder) navigate to where ever it was dumped and then run the DX9SETUP.exe file from there... How very MS! :/

Anyhoo, once I had the driver/DX files installed, everything was tickety boo! \o/ yay

Dabzy
#3
Launchpad Projects / DX9Lib
Last post by Dabzy - Dec 20, 2024, 02:14 PM
Newest addition to the family, my DX9Lib of old! \o/

Okay, I've added a bit more too it, tidied it up some what, discovered a few little buggeries which weren't there before.

Now, this was going to be added as a 2D renderer to LUI, because obviously, LibSGD was the meat, but, now, this is the meat, hence some of the updates I've given it, like input, the odd bit collision is to go in and probably other stuff.

Anyway, people out there may be screaming "Why DirectX9? Why didn't you just go for the throat and use a newer API"... Honest answer... There really really isn't anything wrong with DirectX 9, okay, it's over 20 years old, but, it works fine, the likes of your DirectX 11 and 12 bring a lot to the 3D party, tons, but, do I need all that? No!!! And if you do need all that, well, you probably wouldn't be here really.

For myself, and probably beginners, DirectX9 is perfectly fine, I had code there, so, I may as well use it! ;)

But then I'll hear "But, Microsoft may drop it or GPU cards/drivers may not support it", but then, who said anything about relying on a graphics card or it's drivers to support the API, thankfully, MS have thought about it, realised that there is a ton of software out there that relies on it, and as such, they've included mappings of Direct9 WITHIN DirectX12, it's called the D3D9On12 mapping layer, it maps D3D9 commands to D3D12 by acting as the D3D9 Device Driver Interface (DDI). Now, I'm not sure how far this mapping spans and how far they have with got with it, but, I have read that in some case's, a newer redistributable is required to be installed to cover some stuff that is missing. Unfortunately, at the moment, I don't have an extra (clean) Win11 PC to test on.

Anyway, nifty stuff, so in theory, DirectX9 has been around for over 20 years, and as such, given the support, there is no excuse not to be around for another 20. Which is why I find this a perfect solution for my needs... DirectX9 is going nowhere it seems! <---- Famous last words.

Right, like I did with Lui, here is a list of what's there currently:

DX9_Cls()
DX9_CopyImage%(image%)
DX9_CreateTargetImage%(imageWidth%,imageHeight%)
DX9_DegreeToRadian#(degrees%)
DX9_DrawAnimImage(image%,x%,y%,cellNumber%)
DX9_DrawAnimImageRect(image%,x%,y%,top%,left%,width%,height%,frame%)
DX9_DrawImage(image%,x%,y%)
DX9_DrawImageRect(image%,x%,y%,top%,left%,width%,height%)
DX9_DrawText(text$,x%,y%,centre,font%)
DX9_End()
DX9_Flip()
DX9_GetFPS%()
DX9_GetFontHeight%(font%)
DX9_GetFontWidth%(font%)
DX9_GetImageCellCount%(image%)
DX9_GetImageHeight%(image%)
DX9_GetImageWidth%(image%)
DX9_GetMouseX%()
DX9_GetMouseY%()
DX9_Graphics%(resWidth%,resHeight%,resFormat%,synced%,windowed%)
DX9_HidePointer()
DX9_IsFontAvailable%(sysFontName$)
DX9_IsKeyDown%(vKeyCode%)
DX9_IsKeyHit%(vKeyCode%)
DX9_IsMouseDown%(vmButtonCode%)
DX9_IsMouseHit%(vmButtonCode%)
DX9_LoadAnimImage%(filePath$, cellWidth%, cellHeight%, cellAmount%)
DX9_LoadAnimImageMasked%(filePath$,cellWidth%, cellHeight%, cellAmount%, red%,green%,blue%)
DX9_LoadFont%(font$,width%,height%,italic)
DX9_LoadFontRGB%(font$,width%,height%,r%,g%,b%,italic%)
DX9_LoadImage%(filePath$)
DX9_LoadImageMasked%(filePath$,red%,green%,blue%)
DX9_SetAlpha(alphaLevel#)
DX9_SetClsColor(r%,g%,b%)
DX9_SetDefaultRenderTarget()
DX9_SetEventMode(mode%)
DX9_SetImageMidOrigin(image%)
DX9_SetImageMidRotOrigin(image%)
DX9_SetImageOrigin(image%,x%,y%)
DX9_SetImageRotOrigin(image%,x%,y%)
DX9_SetRenderTarget(image%)
DX9_SetRotation(radians#)
DX9_SetScale(scaleX#,scaleY#)
DX9_SetWindowTitle%(title$)
DX9_ShowMessage(title$,message$)
DX9_ShowPointer()

DX9Lib.DLL Command Count: 46

Initial FPS comparison between B3D's DX7 (Running from Blitz3D IDE), and DX9Libs DX9 render (Running from Launchpad IDE) speed is thus:

B3D (DX7)
2700ish - Windowed
120 - Full screen  <---- VSync seems to be locked on my system in regards to DX7!?!

DX9
5300ish - windowed
6350ish - Full screen

Baring in mind, there is a residue DX7 DC running behind DX9!

Dabz
#4
Launchpad Projects / Re: LUI
Last post by Dabzy - Dec 15, 2024, 05:52 PM
Blackadder was brill, one of them series that started off a little slow, but when they all got into the swing of it... That was, pure TV gold! :)

You don't get much in the way of TV from days gone by like that now, too many people get offended by the slightest thing, more so, the people who are the butt of jokes that are aimed at tend to love it, it's the ones that get offended because they think others are offended are the issue... You know, the miserable b[WAHOOO]ds out there! :D lol

Anyway, yeah, I've seen the work your doing on your emulator, looks magic mind, I tend not to use emulators much, not that I'm not big on retro, I just like using the proper hardware. I'm an Amstrad CPC man, and I have an Amstrad CPC 6128 on the desk upstairs for them 8-bit micro kicks, also a few consoles of old, the likes of your Megadrive etc etc.

I just prefer gaming on the real gear really.

Anyway... I need to square this site up, now that Mark has passed away, the angle it was aimed at has past with him, if I was to continue on with what was in mind, I'd have to take up LibSGD, and I'll be honest, I don't think the programmer is in me to do that, or at least, the time to learn his code, then expand it with Dawn, which in turn, I'd have to learn that, it's all too much.

He was a skilful programmer, when I've been digging about in some of his sources, there is stuff in there, when I figure what he's done, it's really impressive and another level of what I'm capable of... He was a professional developer, I'm just a hobbyist that stumbles along with it until it works.

Still cannot believe he's gone like, yeah, I never met the man... But to be fair, New Zealand isnt a "pop", but he's always been around making his great wares and I've always been a massive fan of them, granted I've never been a fan of some of his decisions, but they were his to make at the end of the day... I'll have to see whats what, but yeah, end of an era really, which is a sad thought too! :(

Dabz



#5
Launchpad Projects / Re: LUI
Last post by Baggey - Dec 14, 2024, 07:07 PM
I love the black adder and baldrick.

I loved it when he was looking through the telescope thingy!

Adder say's what do you see!?

I dunno my lord!? But there appears to be a large GINGER hedge coming this way!? LOL

Adder says RUN!

I always wished they did a world war II version

Ive got three weeks as well! hoping to get into my emulators! The SID is coming along nicely!
#6
Launchpad Projects / Re: LUI
Last post by Dabzy - Dec 09, 2024, 08:07 PM
Cheers me dears, and thanks for the offer, not often people want to do the mundane stuff, rarer then hens teeth actually, lol, but, it's one of them process which, you do pick up on bugs, so as I'm chewing, and something isnt right, I can fixxy it uppy there and then! :)

I'm also waiting for the reappearance of Mark as he seems to have disappeared. He's been off the LibSGD forums for over a month now, and there's been no recent commits to the projects GIT repository for the same length of time. Not sure what to make of it, but previously he said he was wasnt very well for a week. I hope everything is alright, but I know meself something can knock you sideways from nowhere, or maybe he just hit the wall with coding.

He was coding like an absolute nutter, and it's unsustainable really, we've all done, excited AF, you just hit that wall, it can make you ill. I wouldn't blame him if that was the case too.

My plan over the Christmas period, as I've given myself three weeks off, was to implement live auto-complete in Launchpad, as in, it will track your variables, objects and their members and pop it all up... All very Visual Stuff, but, on the chance he's dropped the project all together, that might become a false errand.

I've been looking at the 2D renderer side of things I mentioned with LUI, and got a pleasant surprise, I have DirectX 9 code from many many moons ago, 2D of course, why a pleasant surprise? Because I've learnt DirectX12 has mappings for DirectX 9, which means, even though DirectX 9 is ancient, it's still being supported by MS through DirectX12... You don't even need the GFX card to have DirectX 9 support, it'll work as expected, good call by MS really as this will allow games from days gone by to work fine with no DX9 runtimes needing to be installed! \o/

How cool is that! ;)


So yeah, that's what I may be doing instead over the Christmas, then if we hear nothing, well, I'm eyeing up Nim as Launchpads target language:-

https://nim-lang.org/

Not sure how long it will take to implement that due to having to write a wxScinilla lexer for it, then the glue for the DLL...


Update: After thinking about it, in the voice of Baldrick from Blackadder... Ahem... I have a cunning plan which shouldnt require the amount of work involved to jiggle it all! :)

And I'll stop typing now due to it's just never ending! :D lol

Anyhoo, I'm sure all things will end well, and, will see where we are, like I said, I hope everything is okay with Mark, so I'll wait and see how it goes before turning the rudder! ;)

Dabzy
#7
Launchpad Projects / Re: LUI
Last post by Baggey - Dec 09, 2024, 07:32 PM
If i can help in anyway? I don't mind doing boring things.
#8
Launchpad Projects / Re: LUI
Last post by Dabzy - Dec 08, 2024, 09:42 AM
Right, 83 new commands in, and in the most part, it is done! \o/

Well, bit of a tidy like pre-mentioned, but, what I had in my minds eye is there... Now the crap bit... Writing some docs and example for it!!! BOOOOOOOOO!!!! :(

Dabz
#9
Launchpad Projects / Re: LUI
Last post by Dabzy - Dec 07, 2024, 06:37 PM
Right, treeviews... [famous last words]... Are done, and multi tree view are working, it all seems to be working, which is nice, proof will be in the pudding when I actually start using them properly, developer bias is the demon of all developers, and it's a guarentee someone else gets a hold of it, and they'll break it in minutes! :D

I've also shuffled a bit here and there too, which was nice, bit of a tidy, but more needs to be done, like, naming the functions maybe a bit better, inline with LibSGD's convention, but, that's syntax decoration, nothing major.

Anyway, I have a few more things to do with LUI, but one thing I did spy was this over on syntaxbomb...

https://www.syntaxbomb.com/showcase/a-small-side-project/msg347063165/#msg347063165

All very "Mmmmmmm", as in, I'm sure I could include something in LUI to help achieve the same, will have a think, but, adding an external 2D based renderer to proceedings which doesn't eat into the LibSGD scene would be a nice thing, I'm just not sure of how nice it will all play together, maybe something GDI+ based or DirectX, obviously it needs to be something that uses the least resources possible.

Food for thought! ;)

Dabz
#10
Launchpad Projects / Re: LUI
Last post by Dabzy - Dec 01, 2024, 08:31 PM
Well, just updated the list at the top again, so I thought I'd drop some thoughts in how it's going... And, it's going very well. The little exception was tree views, now what I call "funny little buggers" :D

They can get a bit mind bending when shuffling them up for an integer based wrapper... I've never had much to do with them really, but for what I have in mind, thought I'd have a go, and yeah, two rewrites later on the code that surrounds them, and little edit is forthcoming sometime.

You see, I was getting all a bit lost in how they worked which was complicating things when trying to wrap them, my own fault really because I thought it would be a smash and grab like other controls [Gizmos ;)], but, nope!

I started writing the code, and was running into the odd niggle, I was building the tree view okay, but then, for some reason, I was running into issues collecting the events, like, the source event was going missing from the windows procedure to the DLL function LUI_GetEventSource() when double clicking. And even double clicking was hitty missy when trying to figure it out. Then once I could sort of get that through, LUI_EventData() started playing up...

It wasnt returning what I was expecting and not running inline with the creation of nodes. It was all getting a bit messy as I was trying to figure it out, so the whole lot went for a burton and I tried again. Then looking to get it running inline, I discovered I could use a lParam field from TVITEM as a way of keeping the handshakes going inbetween the DLL and Blitz, so, I started surrounding the code with that in mind, and yet, I could not for the life of me get it grafting, basically, me not understanding what was going on, so, I had another go at another angle of the dangle.

Everything I was reading on MSDN, google etc etc was all suggesting that was an angle that could make what I wanted possible, I just didnt feel I had it all knitting right. So, two days... Two bloody days of looking, being more cautious with the code, and then I saw a snippet which included something that hit me in the face like a size 11 foot with the big toe going up me nose for good measure... What was that little snippet... Ahem... This ---> TVIF_PARAM

Yep, once I added that to the nodes item mask, voila... It all worked, because you see dear reader, without that flag set, lParam is ignored, which is why I was getting nothing instead of a value I was expecting... The b[BEEP]d!!! :D

After that, it all settled down a bit, and I was happy tapping away, still, I had to read about somethings, or poke about getting stuff to work as expected, like, just inserting a new node at a position within the tree view isnt just InsertNode(newnode, position), you have to create the node, put it, say, on the end or start of the tree view, then copy it into the new position by specifying an existing node, the copy is superficial, so you have to copy the node items properties such as lParam to the same as the original, then, remove the original node, which in turn, sort out the internal vector element I'm using for some of the handshaking.

It can get all a bit spicy mind! :D

But, I managed to untangle the spaghetti and yeah, finally implemented a decent (I think so anyway) tree view implementation I can use in my little endeavours! :) hehehe

At the moment for sanity sake, you can only have one tree view in the project, but this one is all I want, and I will do an edit to suit, but as I'm sitting here, I can honestly say... I'm fooking sick of tree views! :D lol

Dabz