SunVox for ZGE

Use of external libraries (DLLs) from ZGE.

Moderator: Moderators

User avatar
VilleK
Site Admin
Posts: 2355
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: SunVox for ZGE

Post by VilleK »

Ok but that looks interesting.

It should say "checking args: II" or similar and it should not say "fail" :)

Please double check you generate the binary with the updated ZDesigner I committed yesterday.
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: SunVox for ZGE

Post by Ats »

So I do it again, step by step :lol:
  • Download zge sourcecode
  • Modify ZExpression.pas:
    Comment out line 575 that still prevents the build on linux
    Add your two debug lines
  • Compile Player_linux.bin (x86_64)
  • Build ZEditor.exe from source
  • Build SunVox example
But the result is the same...

Edit:
And I'm also getting the same results with the sunvox debug library NightRadio just provided:
https://warmplace.ru/forum/viewtopic.ph ... 170#p20167
User avatar
VilleK
Site Admin
Posts: 2355
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: SunVox for ZGE

Post by VilleK »

I made some more changes.

Please try it all again. When you feel up to it :)

Specifically check that you are definitely using ZDesigner built from latest sources (so you don't have some old copy of the sources around that it builds from). And that you use "Project - Build" in Delphi (if you are using Delphi to build ZDesigner) so it actually does a full rebuild.
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: SunVox for ZGE

Post by Ats »

I really feel up to it, and I'm deleting the old folders each time I update source code.
And... WELL DONE!

Music is working on x86_64 !
And there's no more error on line 575 during compilation.

Code: Select all

checking args: CBBB
checking args: CBBB
checking args: CBBB
checking args: CBBB
Desired audio buffer size: 2048 frames
ALSA: pulse
ALSA HW Default rate: 44100
ALSA HW Rate: 44100 frames
ALSA HW Buffer size: 4096 frames
ALSA HW Period size: 227
ALSA HW Periods: 0
ALSA SW Avail min: 227
ALSA SW Start threshold: 1
ALSA SW Stop threshold: 4096
checking args: B
checking args: BJB
checking args: BJB
checking args: BJB
checking args: B
checking args: B
checking args: B
SOUND: sundog_sound_deinit() begin
SOUND: sundog_sound_deinit() end
Max memory used: 2530965
I'm doing a few more tests to verify everything is fine :wink:
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: SunVox for ZGE

Post by Ats »

Unfortunately, it doesn't work on raspberry aarch64.
Again, everything is compiled from scratch.

Code: Select all

Desired audio buffer size: 2048 frames
ALSA: pulse
ALSA HW Default rate: 44100
ALSA HW Rate: 44100 frames
ALSA HW Buffer size: 4096 frames
ALSA HW Period size: 227
ALSA HW Periods: 0
ALSA SW Avail min: 227
ALSA SW Start threshold: 1
ALSA SW Stop threshold: 4096
Wrong slot number -55809360! Correct values: 0...15
Wrong slot number -55809360! Correct values: 0...15
Wrong slot number -55809360! Correct values: 0...15
Wrong slot number -55809408! Correct values: 0...15
Wrong slot number -55809408! Correct values: 0...15
SOUND: sundog_sound_deinit() begin
SOUND: sundog_sound_deinit() end
Max memory used: 244612
Could this be a bad combination of $ifndef ?
I'm trying with another song.

Edit:
Nope, the problem doesn't come from the song.
User avatar
VilleK
Site Admin
Posts: 2355
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: SunVox for ZGE

Post by VilleK »

Good progress!

For aarch64 specifically, I forgot to make a change in ZExpressions. Please update again.

Then also try insert this debug line ZExpressions:

line 2660, insert line with "writeln('checking args: ' + argtypes);"

Then try Raspberry build again.
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: SunVox for ZGE

Post by Ats »

Now Raspberry is working too:

Code: Select all

(2660) checking args: CBBB
Desired audio buffer size: 2048 frames
ALSA: pulse
ALSA HW Default rate: 44100
ALSA HW Rate: 44100 frames
ALSA HW Buffer size: 4096 frames
ALSA HW Period size: 227
ALSA HW Periods: 0
ALSA SW Avail min: 227
ALSA SW Start threshold: 1
ALSA SW Stop threshold: 4096
(2660) checking args: B
(2660) checking args: BJB
(2660) checking args: B
(2660) checking args: B
(2660) checking args: B
(2660) checking args: 
SOUND: sundog_sound_deinit() begin
SOUND: sundog_sound_deinit() end
Max memory used: 6510693
And it hasn't broke x86_64:

Code: Select all

checking args: CBBB
checking args: CBBB
checking args: CBBB
checking args: CBBB
Desired audio buffer size: 2048 frames
ALSA: pulse
ALSA HW Default rate: 44100
ALSA HW Rate: 44100 frames
ALSA HW Buffer size: 4096 frames
ALSA HW Period size: 227
ALSA HW Periods: 0
ALSA SW Avail min: 227
ALSA SW Start threshold: 1
ALSA SW Stop threshold: 4096
checking args: B
checking args: BJB
checking args: BJB
checking args: BJB
checking args: B
checking args: B
checking args: B
SOUND: sundog_sound_deinit() begin
SOUND: sundog_sound_deinit() end
Max memory used: 6533089
:D :D :D

I'm not testing i386, I'm going to drop that one. Unless you need it...
User avatar
VilleK
Site Admin
Posts: 2355
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: SunVox for ZGE

Post by VilleK »

Perfect :).

Please post a photo of a working ZGE application running on a Rasperry, would be cool to see.
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: SunVox for ZGE

Post by Ats »

Sorry, but sunvox isn't working anymore on Windows... :?

I'm on a Win10 x86_64 computer, and I don't know when it broke with the last updates as I was focused on Linux...

Just in case, I tried with both versions of the dll:

sunvox.dll 64 -> error dialog box with "sunvox"
sunvox.dll 32 -> error dialog box with "CBBB"

And if I run it as a preview, the clipboard says:
Hardware stack error after call to sv_init. Check argument count and sizes, and calling convention.

It's working good with the version of ZGE I kept before all those recent changes.

And just to be sure, it's working on linux 64.

Edit:
Just one thing, I'm using the Player.bin that is in the current zip of ZGameEditor download. Is it up to date ?
I never tried to build it myself.
User avatar
VilleK
Site Admin
Posts: 2355
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: SunVox for ZGE

Post by VilleK »

I rebuilt player.bin and ZGameEditor.exe for this release: http://www.zgameeditor.org/files/ZGameEditor_beta.zip

Please check if it makes a difference.
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: SunVox for ZGE

Post by Ats »

Thanks :D
Player.bin is working, but ZDesigner preview still crash and log:
Hardware stack error after call to sv_init. Check argument count and sizes, and calling convention.

Is there a bat file somewhere to compile Player.bin, or should I make mine, the same as linux?
Or maybe it is Zzdc.exe that I have to rename to Player.bin ?
User avatar
VilleK
Site Admin
Posts: 2355
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: SunVox for ZGE

Post by VilleK »

Does it make a difference if you try switching calling convention?

Yes player.bin is simply zzdc.exe that has been renamed :)
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: SunVox for ZGE

Post by Ats »

You're right, everything is working with Stdcall :D
Preview, Windows and linux !
Post Reply