Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AGKorson

Pages: [1] 2 3 ... 8
1
AGI Development Tools / Re: WinAGI Version 2.1.3 Is Available
« on: Yesterday at 10:47:58 AM »
I was fiddling with this a bit, and I noticed that in the Picture Editor, the button for Absolute Line does not function properly. You can click it and it will show Absolute Line selected but the tool will continue to be whatever it was previously. I'm on Windows 7, for what it's worth.

Buggers. The toolbar handler uses the Key property of the pressed button to set the draw mode; I don't know how, but the Key for the absolute line button got deleted, so the button just gets ignored now. I have no idea what I did that caused that, because I haven't worked on that code in a very long time. It's an easy fix. I will try to post an update shortly, since the picture editor is not very functional without it. While it's not very efficient, you could use the trapezoid option to draw a temporary set of lines, then edit the coordinates to be the line you actually want. (use Ctrl+Ins to add new coordinates as needed).

 If you find any other major bugs like this, please let me know.

FWIW, I'm working in C# now, so other than fixes for things that are severely broken, there won't be any more updates to version 2. Maybe by some time this summer, I'll be ready to release a more modern version... with a lot of new bugs... :)

thx,

2
SCI Development Tools / Re: SCI01 interp decompiling
« on: December 10, 2020, 10:05:20 PM »
You might have better luck with Ida Pro. it's a highly capable disassembler. It's a commercial tool, but they have made one of their earlier versions available for free, and it works great on MSDOS programs.

I took a quick look at Reko- it couldn't even figure out the entry point for simple DOS programs. Not sure how well it would do with a program as complex as SCI.

Decompiling (disassembling) is a lot of work, and a bit of an art. I've spent years disassembling AGI. I have Version 2.917 100% disassembled, and other version mostly done (I only go to them when I'm looking for differences).  But it took A LOT of work.

If someone is serious about trying to decompile/disassemble SCI, it can be done, but just be sure you understand what your getting yourself into!

3
AGI Development Tools / Re: WinAGI Version 2.1.3 Is Available
« on: December 07, 2020, 02:43:02 PM »
OK, OK, OK!!!

I know I need to switch. But I'm an old curmudgeon, and frankly it scares me a bit that I have such a steep learning curve awaiting. I have Visual Studio (and have had it for years) installed, but every time I open it up, I just get discouraged at how complicated even simple tasks seem. I know it's just a matter of buckling down and learning it, but like I said, I'm old and stuck in my ways. It's not rational, but I can't help it. Some day...

Regarding the problem with the text editor - it's not Windows; it was me. Again. Stupid versioning- the installer had version 3.0.30 of the OCX, but it was supposed to be 3.0.31. So I was installing the wrong one (When I tweaked the OCX, I forgot to copy the new version to the install folder). I fixed the installer, and tested it on a clean Windows 10 system, and it works great - no errors.

You may notice that the first post changed a bit - after getting a special request, I added support for Apple IIgs sound. More fun stuff!

Thx for your support (and for your 'gentle' ;) nudging toward a modern dev platform...)


4
AGI Development Tools / Re: WinAGI Version 2.1.2 Is Available
« on: December 06, 2020, 09:52:38 PM »
Hmm, that's not good. Have you tried to register it manually using regsvr32? Maybe that will work. Also, can you check that the two Type Libraries, 'olelib.tlb' and 'olelib2.tlb' are installed in your system directory (I believe it's actually c:\windows\syswow64)? If they are not, that might be part of the problem. It looks like around version 1.2.9, richedagi.ocx stopped registering normally in some situations. I will do what I can to track it down.

Can you give more specifics on the 'Invalid procedure call' when closing a game? I have never seen that error before. If I can duplicate it, then I should be able to track it down and correct it.


Is anybody else having trouble with logic editor and RichEdAGI.ocx failing to register? Has anybody gotten it to install and work correctly? Feedback would be extremely helpful here.

thx,

5
AGI Development Tools / Re: WinAGI Version 2.1.2 Is Available
« on: December 02, 2020, 10:59:47 PM »
Ugh. No matter how much testing I do, it seems like something always crops up as soon as I release a version. v2.1.1 won't handle saving and opening layout files correctly. The last step when releasing a new version is to update internal version checks- but somehow I missed the layout functions this time.  :-[

So ignore version 2.1.1. I updated the wiki, and the link in the first post to point to version 2.1.2 which fixes the issue.

If anybody notices any other problems, please let me know and I'll try to get them addressed too.

6
AGI Development Tools / Re: WinAGI Version 2.1.2 Is Available
« on: December 02, 2020, 03:34:46 AM »
To demonstrate just how useful and easy WinAGI is to use, here is a set of project files and logic source code files for a fully decompiled version of Gold Rush! I did this decompilation as a way to 'stress test' WinAGI to make sure I fixed as many bugs and glitches as possible. It also helped me identify additional enhancements and improvements.

To use this file, extract its contents, including the src directory, into a folder that has the original Gold Rush AGI files (you have to have your own copy of the game- I can't post that here). Then open the WinAGI project file, GR.wag in WinAGI version 2.1.1. You can then browse through all the logics, observe how the game used global defines throughout the game, and explore the game's room arrangement in the Layout file.

It was really very interesting to go through the entire game's logic code and see how the original programmers were able to make everything work so well in the game. It helped me a lot in understanding AGI programming concepts. Not surprisingly, I also found a few bugs in their code (it's a very large game, so no surprise that a few bugs slipped past their quality checks). There was also a a number of places where you could see how the game changed during development- fragments of code that pointed to different story lines that ended up being abandoned.

The source code logics in this project will generate an exact, byte-for-byte copy of the original compiled logics. The only thing I added were the comments and define names. Keep in mind that all the variable/flag define names and comments are my own- nothing in this project is meant to suggest this is the actual source code used by the original developers.

Anyway, if you are interested in studying the programming techniques used in a full size commercial game, this should be of great help. If you have any questions about the comments that I included in the source files, feel free to ask!


7
AGI Development Tools / WinAGI Version 2.1.3 Is Available
« on: December 02, 2020, 02:48:20 AM »
Here it is - the latest update to WinAGI. This version fixes a TON of bugs, a lot of enhancements, and some new features that I've heard folks asking about. I spent a lot of time testing, re-testing and testing again, so hopefully there aren't too many bugs left! :)


Link to the install file is here: http://agiwiki.sierrahelp.com/images/0/07/WinAGI_2_1_3.zip

Here's a partial list of the new features:
  • Support for Apple IIgs sounds- both types of IIgs sounds (PCM sound samples and embedded MIDI) can now be previewed and exported as their native format (.wav and .mid).
  • A new LISTBOX option to display game resources (similar to the old AGI Studio look)- a number of people commented that they didn't like the tree list; now you can choose whichever display works best for you
  • NAVIGATION BUTTONS - when browsing through in game resources, there are now navigation buttons that let you quickly go back to previously previewed resources, and then forward again
  • improved support for multiple monitors; the program's position/size will now be correctly restored on systems with more than one monitor
  • the logic editor now highlights AGI commands as keywords, for improved readability
  • support for code snippets - shortcuts you can use to insert frequently used blocks of code to make coding go faster
  • ability to open resources for editing from within the logic editor; right-click on any resource ID to show the open command in the context menu
  • global defines (aka the 'defines.txt' included file) can now have individual comments for each define entry
  • option to export picture resources as an animated gif to see the picture drawn step by step
  • layout editor is synched to the resource list, making it easy to find a room on the layout editor when your layout is large and complex
  • DIR files now expand or contract based on number of resources, instead of being automatically expanded to full size; this helps keep memory usage to a minimum, since DIR files are part of the room.0 memory block
  • Much improved Help file, especially in the AGI Reference section; more in-depth analysis of the disassembled interpreter has resulted in a lot more knowledge of how the interpreter really works; the help file is now the real definitive source of information on AGI
  • a lot of other minor enhancements/improvements too numerous to mention

I was also able to do some testing with Linux. WinAGI actually runs virtually bug-free when run in the WINE environment. It does require a configuration fix in WineTricks (due to a bug in WINE's implementation of riched.dll), but once that's done, it runs just fine. So Linux users have access to WinAGI too.

Things seem to have really quieted down around here, especially in the AGI forums. I fear that the golden age of fan games may be at an end. I'm hoping that tools like WinAGI will help people who might be interested in creating their own games, but didn't know where to start.

So if there is anybody out there who still has interest in AGI, please take a look at this latest release. I think you'll be pleased with how much it helps in creating your next AGI masterpiece.

8
AGI Syntax Help / Re: Questions about ROL and anyword
« on: November 10, 2020, 03:27:09 PM »
I realize I'm addressing a post that is EXTREMELY old, but I wanted to make sure that accurate information is provided in case anyone else comes here looking for an answer to the qestion.

The original problem posted is not an issue with AGI's handling of input; it's an issue of where commands are processed in the game's logic.

Code: [Select]
if (said("why", "rol"))
will return TRUE for any input that begins with "why", including "why" by itself, "why" followed by known words, and "why" followed by an unknown word (as long as haveInput[f2] is TRUE, and haveMatch[f4] is FALSE). The reason the original poster is getting the "I don't know X" message is because the check for unknown words is happening BEFORE the check for "why", "rol".

This is easy enough to demonstrate by putting the 'if' block at the beginning of Logic 0. You will get the desired response. As they say, 'timing is everything', and with AGI, it's even more important to know where you place code to make sure you get the results you want. The cyclic and linear nature of AGI programming can result in really strange results if you don't pay attention to the order of things.

(AND, if you also have an unknown word in your input, keep in mind that even after displaying the response to 'why', you may also get the "I don't know X" response, depending on how your game handles unknown words. The templates that have been around for years will show the "I don't know X" response even if a preceding 'said' command finds a match. You will need to either reset the unknown word value (v9) within your code block responding to "why", or you will need to edit your unknown word handler to not respond if a match has been found.)

9
I have a new version of WinAGI mostly ready for release. But I would like some fresh eyes on it before I call it good.

Here's a list of the biggest changes/upgrades:
  • LISTBOX option to display resources (in addition to the original treelist option)
  • DIR files expand/contract as resources are added/removed (instead of staying expanded to full size)
  • application size/position saved correctly on systems with more than one monitor
  • NAVIGATION BUTTONS to allow user to step backward and forward through selected resources in the resource list; right-click/hold to scroll through the list
  • all agi commands are now highlighted as 'keyword' type in logics when using syntax highlighting
  • MANY fixes to the rich text box used in logic editor, so it does a better job of handling selections/edits/highlights
  • right-click on a resource ID in a source file, and you now have the option to open it from within the logic editor
  • SNIPPETS! you can use shortcut codes to insert 'snippets' (code fragments) of frequently used code
  • you can right-click on a word in a 'said' command to show a list of all synonyms of the selected word
  • transparency color of a cel is now shown on palette on view editor (ctrl+click to change transparency color)
  • added comment column to the global editor so you can add comments to each defined term
  • searching for vocab words in logics now has option to include search for all synonyms
  • added setting that syncs the resource list to the layout editor; selecting a resource in the list will automatically scroll the layout view so the selected room is centered in the window
  • hold down shift key with left mouse to drag the entire layout drawing surface
  • Find/Replace supports multi-line values
  • ... plus a TON of other minor enhancements, and countless bug fixes

I would like to have the new version ready for release in the next two weeks. So if you are interested in helping with one last good look to make sure there are no glaring issues, please PM me, and I'll send you a link to the install file.



10
1.
Is there a "recommended IDE" for AGI (like SCICompanion for SCI)?
I may be a bit biased, but I'd say "WinAGI, hands down!"  ;D

2.
Specifically, I want to open KQ4, Apple 2gs version (trying to understand the problem at https://bugs.scummvm.org/ticket/11509)
I have tried some IDEs (honestly, don't remember which, it was a long time ago), and all failed to open logic 54.
Just tried now AGI Studio, and upon opening logic 54 it says:
Code: [Select]
Error decoding logic (position 0x0E4E): Unknown action command (175)
3.
Is there something special with opcode 175?
Something 2gs specific? KQ4?
Some other complication?
Opcode 175 is the discard.sound command. It was added beginning in version 2.938, but only functions in non-MSDOS games. The MSDOS interpreters all have a stub function in place that was intended to ignore the command, but that stub function does not accept arguments. If you try to run that command on a MSDOS interpreter your game will crash, because the argument value passed to discard.sound gets treated by the interpreter as the next opcode instead of the sound you want to discard.

4.
Anyway, I've just found that with latest WinAGI  (http://agiwiki.sierrahelp.com/index.php?title=WinAGI) it opens logic 54 with no problem.
That's great news.

5.
However, when I tried to open any sound resource, it gave an error:
Code: [Select]
Error while loading sound resource

598: Invalid sound data: unable to load sound resource

Is it because of something special with 2gs? or KQ4? or something else?

6.
Any recommendation, suggestion or fixes are welcomed.

Thanks
MusicallyInspired is correct. Since the sounds aren't in the MSDOS format, WinAGI is currently not able to read or play them. I never had access to non-MSDOS versions of any Sierra games, so I haven't been able to decipher them to see how/if support for them could be added to WinAGI.

11
WinAGI has VERY limited support for non-MSDOS versions of AGI games. Right now, I think the only thing I added that specifically supports non-MSDOS is the ability to detect and read Amiga OBJECT files (they use four bytes per object entry instead of the 3 that MSDOS games use).

I don't have any non-MSDOS game files, so I am not able to study them to understand their structure/usage. If you have some game files that you are willing to share, I'd be happy to analyze them to see whether or not I can add support for them to WinAGI.


12
AGI Development Tools / Re: WinAGI help file
« on: October 07, 2020, 10:50:40 AM »
WinAGI help file looks quite impressive.
Is it possible to have it available online?
IMO it deserves more publicity...

Thank you for the compliment! If someone wants to host it online, I'm totally fine with that. It's html-based, so it would be pretty simple to make it a web site. I did update the wiki for all the AGI commands, and made a few corrections in other areas. If I had the time, I would like to do a major overhaul of the wiki to include all the info that's in WinAGI Help. But I just have too many other things I'm working on. Again, if someone else wants to start moving info from the Help file to the wiki, I'm 100% behind that effort!

(And the latest WinAGI update, version 1.3, is coming in a matter of days; the Help file in this new version has added more information, especially on understanding the nuances of the AGI commands, and how to use them most effectively to avoid unwanted results/errors. A beta version will be sent to a few people later this week, and then a release will be out a week or so after that!)

13
AGI Development Tools / Re: WinAGI Version 1.2.5
« on: October 07, 2020, 10:43:59 AM »
Hi.
Please update the "quick" link for WinAGI, at http://sciprogramming.com/scitools.php?id=23
Last I heard, the person who has admin rights to do that is gone, and there's nobody left who has the right access. Maybe that's not the case anymore - the site admins will have to weigh in.

I'd also like to say that I have a new version, WinAGI 1.3 coming out very soon; I have a beta build that I'm planning to send to a few people by end of this week. Adds a lot of improvements and fixes. So keep an eye out for that!

14
This was the points jingle from a Sierra game, I don't recall which, that I converted to MID via I think SV, then edited to have the same four notes as the title screen for The Dating Pool in I think it was MuseScore, then imported back with SCI Companion.

At some point in that process, I suppose, extraneous commands snuck in.

Edit: also the header may not match Ravi's docs because this is not an SCI0 sound?
So I decided to import the midi file into SCI Companion, and then save it as a sound resource. I discovered that SCI Companion is adding the extra control codes. I assume the import function adds them as default settings, even though the imported midi file already has those commands.

When it imports the file, SCI Companion keeps the original ticks per quarter note settings. But when it saves the data as a sound resource, it recalculates the time values to match 30 ticks per quarter note. That's how the 95/1 values get converted to 6/0.

I was surprised that SCI Companion will let you play the MIDI sound, adjust the tempo and add cues. But you can't edit/add MIDI notes, or change channel parameters? (i.e program/instrument, channel volume, etc). Are there editing commands that I'm not aware of? I have never used SCI Companion before.

15
Very interesting. The sound resource is certainly different from SMF. It definitely is using standard MIDI messages though.

The time differences are due to the ticks per quarter note value; for the sound resource, there are 30 ticks per quarter note (or 60 ticks per second); for the MIDI file, there are 480 ticks per quarter note (or 960 ticks per second). So 96 ticks in the MIDI is 0.1 sec; 6 ticks in the sound is 0.1 sec.

The the total sound length of both files is 0.4 seconds, but interestingly, the MIDI file plays each note for 0.99 sec(95 ticks), then has a 0.01 sec (1 tick) delay before starting next sound. The sound resource plays each note for the full 0.1 sec, with zero delay between them.

The sound resource header is not familiar at all to me (I did a cursory read of Ravi's files, but what he describes as the header doesn't seem to make sense for the resource file you posted; it looks to me like it would result in the MIDI events being completely misaligned, but again, I'm no SCI sound expert.)

The sound resource also has a couple of duplicate/unnecessary control messages (it first sets instrument to grand piano, then later sets it to glockenspiel; it calls channel volume and pan levels twice)

I'm curious, which came first here? Was the sound extracted from a game resource, and converted to MIDI? or was the MIDI file converted to a sound resource and then inserted in the game? I would have expected the conversion to duplicate all control codes exactly regardless if which direction you were going. I wonder why they are so different between the two.

(And if you're interested, I've attached annotated versions of both files breaking down exactly what each midi event does. It helped me parse through all the data.)

Pages: [1] 2 3 ... 8

SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.11 seconds with 22 queries.