Author Topic: C# AGILE  (Read 87647 times)

0 Members and 1 Guest are viewing this topic.

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #135 on: October 29, 2022, 06:11:13 PM »
Thanks, I've just merged it.

Mark Yu found another bug, this time seen in KQ1, where, after a restart, none of the controllers were working. Turns out that AGILE was clearing the key to controller mappings as part of a restart, whereas the original AGI interpreter clears only the current state of the controllers, not the key mappings. I think I misread the original AGI interpreter source code fragments when I first wrote that bit. Anyway, that issue is now fixed and recently pushed to master.

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #136 on: October 29, 2022, 07:17:59 PM »
Made one slight addition. I added a call to AdjustGameScreen after the form gets last settings for the
context menu aspect correction to sync Agile's window with selected aspect setting.

I've just pushed a small change inside the ToggleFullscreen method, as I noticed it wasn't updating the full screen option in the context menu. So when using ALT-ENTER to toggle full screen, the tick in the context menu wasn't reflecting that. I've added a line inside ToggleFullscreen to set the context menu option to match the full screen state after the toggle.

Offline Collector

Re: C# AGI Interpreter
« Reply #137 on: October 29, 2022, 08:07:11 PM »
Looks like all of the features are coming together. Now if we could get a few more testers to play through some of the games to squash some of the bugs. I could ask on some of the Sierra Facebook groups to see if there are any takers.
KQII Remake Pic

Offline MusicallyInspired

Re: C# AGI Interpreter
« Reply #138 on: October 30, 2022, 12:10:25 PM »
Trying SQ2 with the latest build Collector posted on the SHP forums. The sound of the sweeping is still wrong (though it sounds like the truncation problem is solved). I decided to test between AGILE, ScummVM, and DOSBox to see how they all measured up. To my surprise it seems like ScummVM doesn't produce the sound correctly either. So while ScummVM has the best tone emulation (until now) with its volume envelope on the notes, DOSBox has the best noise emulation. I took a screen capture. The first one (top left) is AGILE, the second one (top right) is ScummVM, and the bottom one is DOSBox.

https://drive.google.com/file/d/1tFzwrzeT_8URmg6C_f_Lv3VTWRibc-zZ/view?usp=share_link

EDIT: I decided after to do a tone comparison as well and was surprised again at the result. AGILE's tone generation sounds perfect and crisp. ScummVM's tone is great but it sounds like it's also aliasing. And DOSBox's sounds like there's a filter over it so the crispness is lost. Or perhaps the tones generated are not perfect square waves? The tone falloff is also not as noticeable. Just thought it'd be an interesting share. So AGILE's tone generation is the crispiest of them all! :D

https://drive.google.com/file/d/1JZJG1Unfuh8oIXblXZHeJhgaKqIBrknT/view?usp=sharing
« Last Edit: October 30, 2022, 01:40:41 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline Collector

Re: C# AGI Interpreter
« Reply #139 on: October 30, 2022, 04:26:26 PM »
Agree on the noise channel. DOSBox does it more like what you would want, at least without hearing it on an actual Tandy.

Yeah, you can hear the difference with tone, petty much as you inscribed. SVM does sound as if it is using some sort of smoothing and DOSBox sounds muffled.
KQII Remake Pic

Offline Collector

Re: C# AGI Interpreter
« Reply #140 on: October 30, 2022, 06:15:29 PM »
Was testing with Donald Duck's Playground. There is a hacked version of either the booter or Amiga version, I forget which, to run in DOS. If you run the game in DOS and press the Escape key it crashes with:

"Bad action: 161
Press ESC to quit."

In Agile it does not crash. However, I realized that the menubar is not hidden when you press ESC again. This is true of this hacked version as well as v1.50 int2.440. This does not occur in DOSBox. Going to a new room does reset the menubar in AGILE. This is not an issue with SQ1. I'll have to see if this occurs in any other game.

Lance, do you need either DDPG to check it out?
KQII Remake Pic

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #141 on: October 30, 2022, 07:26:45 PM »
Trying SQ2 with the latest build Collector posted on the SHP forums. The sound of the sweeping is still wrong (though it sounds like the truncation problem is solved). I decided to test between AGILE, ScummVM, and DOSBox to see how they all measured up. To my surprise it seems like ScummVM doesn't produce the sound correctly either. So while ScummVM has the best tone emulation (until now) with its volume envelope on the notes, DOSBox has the best noise emulation. I took a screen capture. The first one (top left) is AGILE, the second one (top right) is ScummVM, and the bottom one is DOSBox.

https://drive.google.com/file/d/1tFzwrzeT_8URmg6C_f_Lv3VTWRibc-zZ/view?usp=share_link

Thanks for sharing that. Yeah, I can definitely hear that all three sound different.

Did I mention yet that I managed to find the full SQ2 game playing on an IBM PC JR and Tandy 1000 on Youtube? We could add that as a 4th and 5th comparison.

There's this one:



which says IBM PC in the title, but it is playing the 4 voice sound, so I think it must be the IBM PC JR. Edit: It doesn't really look like a PC JR though. Could standard PCs have the PC JR sound added?

There are a few Tandy 1000 videos as well of SQ2.

EDIT: I decided after to do a tone comparison as well and was surprised again at the result. AGILE's tone generation sounds perfect and crisp. ScummVM's tone is great but it sounds like it's also aliasing. And DOSBox's sounds like there's a filter over it so the crispness is lost. Or perhaps the tones generated are not perfect square waves? The tone falloff is also not as noticeable. Just thought it'd be an interesting share. So AGILE's tone generation is the crispiest of them all! :D

https://drive.google.com/file/d/1JZJG1Unfuh8oIXblXZHeJhgaKqIBrknT/view?usp=sharing

Cool! Nice to know  :D
« Last Edit: October 30, 2022, 07:35:05 PM by lance.ewing »

Offline Collector

Re: C# AGI Interpreter
« Reply #142 on: October 30, 2022, 10:07:39 PM »
Just noticed that if you minimize the Agile Window when you restore it the window is unusably tiny.
KQII Remake Pic

Offline Collector

Re: C# AGI Interpreter
« Reply #143 on: October 31, 2022, 09:14:56 AM »
I found and fixed the problem with the restoration of the minimized window, but it won't let me do a pull request. Don't know if it is because of my previous request has not been commited or not. It was a simple fix. In the form resize method I added a FormWindowState check state before it allows the AdjustGameScreen. It no longer fires if the window has been minimized.
KQII Remake Pic

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #144 on: October 31, 2022, 07:15:00 PM »
Thanks. I have merged your PR now, so both of those changes are now on master.

Initially it didn't compile after the merge, due to the generated settings designer file being out of sync with the new setting, but I fixed that on master by regenerating the designer class. It is compiling fine now.

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #145 on: October 31, 2022, 07:21:49 PM »
Was testing with Donald Duck's Playground. There is a hacked version of either the booter or Amiga version, I forget which, to run in DOS. If you run the game in DOS and press the Escape key it crashes with:

"Bad action: 161
Press ESC to quit."

In Agile it does not crash. However, I realized that the menubar is not hidden when you press ESC again. This is true of this hacked version as well as v1.50 int2.440. This does not occur in DOSBox. Going to a new room does reset the menubar in AGILE. This is not an issue with SQ1. I'll have to see if this occurs in any other game.

Okay, thanks. I will hopefully have some time today to take a look. Just working my way through the pull requests that have been submitted from Mark. He has been finding and fixing a few more things.

I think the hacked version of DDP might be the one for download on Al Lowe's website, and if so, then I guess that is a version that is going to be quite common, perhaps even the most common these days.

Lance, do you need either DDPG to check it out?

I have both already (Edit: Assuming the one on Al Lowe's website is the hacked one)

Offline Collector

Re: C# AGI Interpreter
« Reply #146 on: October 31, 2022, 07:50:58 PM »
I grabbed the one for Al's site and it did seem to be the same, but Agile didn't ID it as an AGI game. Turns out that the game data files are read only, but turning that attribute off allows Agile to recognize it as AGI.

It is the same. Note that the logdir hash is that of the Amiga version.
KQII Remake Pic

Offline Collector

Re: C# AGI Interpreter
« Reply #147 on: October 31, 2022, 08:05:05 PM »
A follow up to MI's observation on the noise channel. The crashing waves sound on the beach of KQ2 in Agile has a weird reverb. I DOSBox there is next to no reverb. SVM has this reverb, too, but slightly more muted than Agile.
KQII Remake Pic

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #148 on: October 31, 2022, 08:07:29 PM »
Turns out that the game data files are read only, but turning that attribute off allows Agile to recognize it as AGI.

That's strange, about the read only. Oh, I think I know why. I'm using the AGI Library, built for Visual AGI, so it probably opens all files in read/write mode, regardless of whether it is for reading or writing. There would be no need for AGILE to open for writing. I might be able to change that in the Library.

Offline MusicallyInspired

Re: C# AGI Interpreter
« Reply #149 on: November 01, 2022, 02:11:19 AM »
It's been confirmed by a friend of mine that DOSBox actually does impose a filter over the Tandy 3-voice tones after some digging he did in the past to find out why it sounded different. His quote:

Quote
I believe it's because pure squarewaves sound "weird" when played through what amounts to high-end stereo equipment (our modern speakers)...
(high-end from the point of view of 80s gear)
So it's doing a sort of simulation of "cheap speaker buried in a metal box"
Brass Lantern Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.076 seconds with 22 queries.