Author Topic: Dr. Mario  (Read 7171 times)

0 Members and 1 Guest are viewing this topic.

Aurel

  • Guest
Re: Dr. Mario
« Reply #30 on: August 05, 2019, 11:38:17 PM »
Hello boys

OK
i download both versions powerbasic and oxygenbasic 32 bit
and put it on disk C
both run and seems to me that work properly . some sort of tetris game funny  :)
so both run fine on my win7 32 bit

By the way who can explain to me
which version of o2 is under oxygenbasicprogress
because of constant changes i lost the line  ::)

Arnold

  • Guest
Re: Dr. Mario
« Reply #31 on: August 05, 2019, 11:53:42 PM »
You can check this with a simple statement:

print version

Output e.g.:

0.2.5 2019-08-01T10:29:45
« Last Edit: August 07, 2019, 12:46:11 AM by Arnold »

Mike Lobanovsky

  • Guest
Re: Dr. Mario
« Reply #32 on: August 06, 2019, 07:45:02 AM »
Aurel, thank you very much for your prompt feedback!

Brian, excellent! This time the 32-bit version runs smoothly and flawlessly for me under both Win7 and Win10 (no more a few seconds of annoying and suspicious delay for the arguably AV check under Win10).

Unfortunately, the 64-bit version wouldn't run past sfx21 but then freeze and crash. Something must still be wrong with handle declarations, as Charles suggests.

Brian Alvarez

  • Guest
Re: Dr. Mario
« Reply #33 on: August 06, 2019, 10:09:45 AM »
Unfortunately, the 64-bit version wouldn't run past sfx21 but then freeze and crash. Something must still be wrong with handle declarations, as Charles suggests.

 I didnt update the 64 bit version. Let me do that quickly, i will also post the 64bit source code.

 Done. I also posted the PowerBASIC version of it. Its much clearer, but not nearly as organized as
the PluriBASIC code. The original code uses macros, and separate source files to make it more
readable and mantainable. I may post it later as well.

 I was also able to test the 32bit one for like 30 minutes with no crashes. That looks like good news. :)

 However the 64bit one still crashes...  all updates applied. For this one it may not be the download
process crashing it tough. I am looking into what may cause that even the original one crashes in the
same point.

Upodate: It is DIR$ for 64 bits. The workaround was not enough. I will have to wait for a permanent
fix until Charles fixes CHAR arrays for TYPEs. In the meantime i have uploaded a version that just calls
FindNextFile twice before starting file searches. This seems to fix the issue and makes it playable for now.

 In fact that may very well be the reason it was sometimes crashing on 32bit as well. Let's wait and see.
« Last Edit: August 06, 2019, 11:52:59 AM by Brian Alvarez »

Charles Pegge

  • Guest
Re: Dr. Mario
« Reply #34 on: August 06, 2019, 01:20:12 PM »
Just posted o2 version 0.2.6

You will need to use the new RTL32.inc and RTL64.inc to match oxygen.dll.


ox64_drmario appears to be stable with this release.

Brian Alvarez

  • Guest
Re: Dr. Mario
« Reply #35 on: August 06, 2019, 02:24:25 PM »
Thanks Charles! downloading it now.

RTL32.inc and RTL64.inc do not seem to be updated, is that normal? last modification date is from april.

 Anyway... it appears to work fine, i can now compare CHAR strings from UDT members.  :)
« Last Edit: August 06, 2019, 02:32:18 PM by Brian Alvarez »

Mike Lobanovsky

  • Guest
Re: Dr. Mario
« Reply #36 on: August 06, 2019, 06:54:21 PM »
Brian, perfect! 64 bits are working for me now under my Win7 like a charm!

Thanks a lot! :)

Brian Alvarez

  • Guest
Re: Dr. Mario
« Reply #37 on: August 06, 2019, 08:54:50 PM »
You are welcome. :) Im glad you liked it.

Arnold

  • Guest
Re: Dr. Mario
« Reply #38 on: August 07, 2019, 12:49:38 AM »
Hi Brian,

you have shown that you are a very capable developer. In addition, you have rendered valuable services to Charles in the development of Oxygenbasic.

Maybe this could be interesting for prototyping the WinApi functions. If you compare corewin.inc, windata.inc, user.inc, you can see how Charles applied mode64bit to run functions like GetWindowLongPtr/SetWindowLongPtr as well as in 32-bit as in 64-bit. This way you perhaps can use the same code for 32-bit and 64-bit. In my opinion mode64bit is helpful in many cases.

I also noticed that you make a difference of int / sys in Type WNDCLASSEX for the handles; sys would work for 32-bit and 64-bit.

What is the purpose of Wow64DisableWow64FsRedirection? I read the MSDN doc but I suppose I have not yet fully understood this function.

Roland

« Last Edit: August 08, 2019, 12:34:45 AM by Arnold »

Brian Alvarez

  • Guest
Re: Dr. Mario
« Reply #39 on: August 07, 2019, 01:17:39 AM »
Thank you! Im humbled by your kind comments. :)

 Whatever declarations you can suggest, i am willing to try.

 When i added the WNDCLASSEX definition I was very new to Oxygen. Perhaps i can go back to that.

Regarding Wow64DisableWow64FsRedirection, please read this:

https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-findfirstfilea

 Specifically i added it because of this:

Quote
If you are writing a 32-bit application to list all the files in a directory and the application may be run on a 64-bit computer, you should call the Wow64DisableWow64FsRedirectionfunction before calling FindFirstFile and call Wow64RevertWow64FsRedirection after the last call to FindNextFile. For more information, see File System Redirector.

 That is where i based myself for declarations of FindFirstFileA, which shows i am still in need of declarations.

Gah! in other news... i found a pretty nasty bug in PowerBASIC! :o

Charles Pegge

  • Guest
Re: Dr. Mario
« Reply #40 on: August 07, 2019, 09:06:33 PM »
Hi Brian,
I can run ox64-drmario in 32bit and 64bit by snipping off all the protypes from the sdk declares, and a few other minor changes :)

Brian Alvarez

  • Guest
Re: Dr. Mario
« Reply #41 on: August 08, 2019, 07:29:18 AM »
 Yes... that is very good and i dont know how you made it. :D

 Maybe instead of generating full prototypes i should also just trip off parameters from the generated code.

 I would nevertheless like to create a full API for error reporting though. You know, number of parameters, data type, etc.