Author Topic: QB64-SDL 2020  (Read 7825 times)

0 Members and 1 Guest are viewing this topic.

Offline Qbee

  • Newbie
  • Posts: 27
    • View Profile
Re: QB64-SDL 2020
« Reply #15 on: January 09, 2020, 10:08:00 am »
Cleaned up some more of the code to remove further references to the old SDL update procedure.  Back in the day, SDL used to call up [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there], see if a newer version of itself existed, and then, if so, upgrade itself for us.  Now, however, [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] is a hacker's site -- Galleon no longer maintains it and nobody knows who the crap registered it and put it back up on the net -- so it's not a place that one wants to visit ever.  Going there isn't going to update crap -- it'll just lock up the update process as it freezes waiting for a non-existent response to come back to it -- and there's no reason to give that bogus site your IP address, or anything else.
If it is so, then
a) the complete wiki should be searched for links to that site and those links removed; I had one some days/weeks ago
b) this complete Forum should be searched for links to that site and those links removed; I am sure, I saw some links to that site in this forum

To know here are links to hacker-site(s) is no good feeling.

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: QB64-SDL 2020
« Reply #16 on: January 09, 2020, 08:18:06 pm »
Hi Steve,

here are my fixes & additions to the SDL version, see changes.txt in the archive for more details...

EDIT: Download removed, all changes are incorporated into the QB64-SDL 2020 version now, so the provided files should no longer be mixed up with the files from Steve's repository.
« Last Edit: January 20, 2020, 07:18:57 pm by RhoSigma »
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: QB64-SDL 2020
« Reply #17 on: January 10, 2020, 07:35:02 pm »
It took a bit to sort it all out, but I ended up pushing all of Rho's changes into the SDL version.  ;)

>> added support for full path specification in DECLARE LIBRARY
- interestingly it was already implemented for the Linux version,
but not for Windows
>> added my code for array_check() handling, so that it is waived to
whenever $CHECKING:OFF is in effect

Changes in libqbx.cpp:
----------------------
>> fix for the unreliable string compare routines - these I've simply replaced with the correct functions from the v1.2 (probably still the same in v1.3)
>> addition for &B prefix in INPUT(#), DATA and VAL
>> fixed the cmd lines for SHELL calls (added 0-termination) - this was discussed at [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] back in 2010-2012??, it could lead to failure of the SHELL call, or random data (mostly an console error) was written into internal\c in a file which its name was actually the command which was SHELLed out - this happend, as a basic string was used instead of a c-string, AFAIK its replaced by c-strings in the current GL versions
>> fix for the _MEMIMAGE/_COPYIMAGE/_FREEIMAGE memory lock issue - see BUGS board at qb64.org



(The process was more than a little difficult simply because I think Rho might have used the modern libqb.cpp to highlight his changes??  The libqb.cpp which was in his file was about 1,500kb in size, whereas the SDL version of libqbx.cpp is only about 1,000 kb in size -- the difference of which highlights how much the language has grown and expanded since SDL was retired and last updated!)

There's still a long ways to go to help bring the SDL version back up to being as interchangeable as possible with the GL version, but I think we're well on the way to moving forward to getting there!  :D
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: QB64-SDL 2020
« Reply #18 on: January 11, 2020, 06:28:45 am »
Hi Steve,

glad you sorted out things to add.
Actually I used your SDL libqbx.cpp from your mentioned SDL GitHub repo and my SDL libqbx.cpp. But to be able to merge my fixes and additions in, I needed both files in the same format first, as yours was Visual Studio formatted and my was Galleon formatted (i.e. in fact unformatted), so I converted both files with clang-format (from the LLVM package) using the  following command line

     clang-format --style=Microsoft -i libqbx.cpp

This process caused a small increase in size, as it did split many single line IFs into multi line IF blocks, but the main reason for the increase is probably because the file from your repo had Unix style line endings which I converted to Windows line endings when saving the merged version of both files :)

The only thing I've copied 1:1 from the modern libqb.cpp are the fixed string compare routines.

My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: QB64-SDL 2020
« Reply #19 on: January 11, 2020, 10:11:48 am »
Pushed fix to OPEN file FOR BINARY so that it now works with LINE INPUT as it currently does in QB64-GL.

Glad I saw this little nugget.  Binary open for line input works way faster than input mode does.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: QB64-SDL 2020
« Reply #20 on: January 11, 2020, 11:06:54 am »
Hooray! I love it having that faster LINE INPUT routine, too!

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: QB64-SDL 2020
« Reply #21 on: January 11, 2020, 12:36:27 pm »
Hooray!

Pete

Why "Hooray!", you should keep in ICONIC character (Yosemite Sam)
Better line would have been.  “All right now ya wise guy … Dance!”

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: QB64-SDL 2020
« Reply #22 on: January 11, 2020, 01:18:14 pm »
Eat lead ya lily-livered horny toad! If I'd wanted yar carnsarn o-pin-ee-on, I'd ov askt fur it!

 - Sam
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: QB64-SDL 2020
« Reply #23 on: January 11, 2020, 02:44:50 pm »
It's funny how things have to be added to the source one step after the other, as each is basically a building block which the next changes rely on.  :D

Since OPEN file$ FOR BINARY now works with LINE INPUT, I was finally able to swap in the modern "Steve's Config File System", which QB64-GL uses -- but it's only partially implemented at the moment.

Currently only the Display width/height and custom font name/size are using the new config setting system, but I plan on swapping everything else out, over the course of the next few days, but the framework is there now so it's just a simple matter of implementing all the changes as time allows.  ;)

Some options will take longer to implement than others, as the building blocks they rely on aren't a part of SDL yet, but I'll get them in there in time.  Just don't expect any of the following options to work for a bit, as these are the ones which SDL has no implementation to work with, until it's added:

MultiHighlight = TRUE
KeywordHighlight = TRUE
BracketHighlight = TRUE
ShowLineNumbersUseBG = TRUE
ShowLineNumbersSeparator = TRUE
ShowLineNumbers = TRUE
ShowErrorsImmediately = TRUE
EnableQuickNav = TRUE
PasteCursorAtEnd = TRUE
AllowIndependentSettings = FALSE
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: QB64-SDL 2020
« Reply #24 on: January 11, 2020, 07:40:43 pm »
Popping in to say hello QB64 friends, and also thanks for revisiting the SDL version, Steve!   Downloading it now.  One BIG advantage to me with SDL over GL is that SDL compiled EXE's can run on my Windows boot disks, whereas GL's EXE's don't.
 
Belated Merry Christmas and Happy New Year (for the last year too!).

- Dav

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: QB64-SDL 2020
« Reply #25 on: January 11, 2020, 07:47:36 pm »
Popping in to say hello QB64 friends, and also thanks for revisiting the SDL version, Steve!   Downloading it now.  One BIG advantage to me with SDL over GL is that SDL compiled EXE's can run on my Windows boot disks, whereas GL's EXE's don't.
 
Belated Merry Christmas and Happy New Year (for the last year too!).

- Dav

Just be cautious you don’t stick with the current version Dav.  I’m in the middle of swapping out the various options, so only about half of them are implemented yet.  Yesterday’s version was before the swap started; in a few days, I’ll have a version with everything swapped over, but the current version is only partially finished.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: QB64-SDL 2020
« Reply #26 on: January 12, 2020, 03:05:47 am »
Who's there? Dav! Hey, Dav's not here man...

T. C. :D
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: QB64-SDL 2020
« Reply #27 on: January 12, 2020, 06:09:00 am »
"... the cops are listening on the phone!"
"Hey man, did you forget the address? Write it down..."
"No! The cops are listening on the own-phay..."
Logic is the beginning of wisdom.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: QB64-SDL 2020
« Reply #28 on: January 12, 2020, 04:28:21 pm »
Added the following as valid external config settings:
BackupSize
AllowIndependentSettings
AutoPosition
IDE_LeftPosition
IDE_TopPosition
TextColor
QuoteColor
MetaCommandColor
CommentColor
BackgroundColor



These settings are actually proving to be a little more of a PITA to implement than I'd have first imagined them to be.  Since many things *just work* in SDL, and don't work natively in GL, we've had to go in and patch a lot of functionality into the code.  (Case in point is using ALT and the number keys to generate extended ASCII/UNICODE characters -- the SDL libraries support it; our GL keyboard libraries don't.)  A lot of these patches aren't necessary, and in fact, screw up with the normal SDL processes, so I can't just copy/paste these routines from one version of QB64 to the other.  As such, I'm trying to keep things as consistent across versions, as possible, but there are some differences which are beginning to pop up:

When moving the IDE with Auto-positioning turned on, the position isn't actually updated until after you focus back into the IDE in SDL.  This allows you to drag the IDE to the left or right, out of the way of another window (such as your web browser), close it, and then have it pop back up in its original position and not the last position where it was moved to.  If you want it to pop back into that last position, simply click back inside the IDE and let it update itself to store that last position for you.

At the moment, I'm not going to try and implement ALL the color enhancements which the GL version has for us.  I've added coloring for quotes, metacommands, comments, default text color, and the background, but no coloring for keywords or numbers.  Both of these require a lot of code to be ported back and forth (along with a working keyword list), and neither are working 100% as they should in the GL version.  For now, I've decided to just wait on trying to import these color options into SDL.



Next up on the working list is to add support for the following in the config settings:
IDE_AutoFormat
IDE_AutoIndent
IDE_IndentSize
SwapMouseButton
SaveExeWithSource
ShowErrorsImmediately
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: QB64-SDL 2020
« Reply #29 on: January 13, 2020, 07:30:11 pm »
Busy day around the farm here today, so I didn't have a change to update much.  I am trying to make at least a small change every day, to try and get the SDL version to mimic the same behavior as we see in the GL version, but all I got finished today was the ability to indent SUBs/FUNCTIONs in the IDE when auto-spacing is on. 

Hopefully tomorrow will be a better day with a little more free time, but for now, it's still another small step forward.  :P
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!