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 ... 16 17 [18] 19 20
256
Having said that, i think this is really unfortunate news, and means we may never get to see the original sources to Larry or Sierra's other titles.

Hi Peter,
Don't despair. Here's the source for LSL1's Lefty's bar (RM15):

RM15.CG
Code: [Select]
snip

RM15.MSG
Code: [Select]
snip

Where did you get this? It is a really fascinating look at how Sierra coded their games. Some things that I noticed right away:

 - commands are not in the 'dot' format; looks like they used CamelCase. Which is interesting because the debug scripts all used lower case, with a dot separator.
 - looks like they set aside flags and variables from 200 and above as 'local' flags and variables; for example, 'nearJukeBox', defined as 'lf3', decompiles as f203
 - reserved flags and variables have values different than what is currently used in fan based games (for example currentRoom vs room_num, haveInput vs input_received)
 - in 'said' commands, they didn't use quotes around words; and they used dollar sign ($) for spaces

I would really love to have more of this source code to help in decompiling the interpreter and gaining a fuller understanding of how everything works.

257
The Games and other Sierra Adventure stuff / Re: What are we working on?
« on: November 06, 2018, 10:29:02 AM »
Incidentally, the TRS 80 CoCo 3 runs on a 6809 CPU and has a few AGI games available for it.
Do you happen to have any copies of these? My first computer was a 16K CoCo. I wish I had saved it. I have an emulator that I fiddle with from time to time, just to remember the 'good old days'.

258
AGI Community How To's & Tutorials / Fonts in MSDOS AGI
« on: October 02, 2018, 11:11:55 PM »
I'm trying to finish up the help file and iron out the last few bugs (that I know of; I'm sure there are plenty that others will find) in WinAGI v1.2.3. In the meantime, I saw a few posts talking about fonts, so I thought I would share some of what I've learned about how AGI handles fonts. These notes are for MSDOS versions; I have not spent any time studying other platforms.

Where do font glyphs come from?
The 'glyphs' are the actual bitmap representation of each character as it is displayed on the screen. On MSDOS systems using EGA monitors, AGI uses the MSDOS built in fonts, available using standard MSDOS interrupts.

The original font set developed for MSDOS was the 7 bit ASCII standard. Since characters were stored as eight bit numbers, it didn't take long for people to develop an extra set of 128 characters (known as 'extended characters').

The full set of characters (including extended characters) included in MSDOS was known as IBM Code Page 437.  It included letters with diacritics so other languages such as Spanish and French could be represented. There were also a set of characters added that could be used to draw simple boxes and shapes. (Code Page 437 is no longer the standard for extended characters; unicode values for 80h-FFh are not the same. This is why most text editors will show nonsensical characters if you try to display native 8 bit MSDOS text.)

MSDOS stored the character glyph data in two places; for the original 7-bit ASCII characters, glyph data are stored at location F000h:FA6Eh (INT 43h). The extended character glyph data are stored at INT 1Fh.

On the Hercules Graphics Card (HGC) things were significantly different. The HGC only had one text mode (720 x 350 pixels) and one graphics mode (720 x 348 pixels). For technical reasons, in graphics mode, number of rows had to be a multiple of 4. AGI did not use the text mode, because that mode used an 80 x 25 character format to be compatible with the Monocrhome Display Adapter; AGI needed a 40 x 25 text display. So Sierra used the HGC's graphics mode, and wrote custom code to handle display of text.

Since they were not using built-in glyphs, Sierra created a set of custom font glyphs in a file called HGC_FONT, but it only included glyphs for the 7 bit ASCII characters; no extended characters. The format of the HGC_FONT file matches the native format that HGC would use to draw pixels on screen, which was an interleaving format where rows of pixels were not written sequentially. Each glyph used 24 bytes (twelve rows of two bytes, for a 16 wide by 12 high bitmap; interesting choice since each line of text on the HGC display uses 14 pixels). To extract the glyph bitmaps, arrange each character's 24 bytes in this format:
    byte02:byte03
    byte00:byte01
    byte06:byte07
    byte04:byte05
    byte10:byte11
    byte08:byte09
    byte14:byte15
    byte12:byte13
    byte18:byte19
    byte16:byte17
    byte22:byte23
    byte20:byte21

If you do the math, you will see that at 14 pixels high, 25 rows will result in 350 total pixels of height. But as mentioned above, in the graphics mode HGC only displays 348 pixels; Sierra addressed this by clipping the top and bottom rows of text by one pixel. It is almost impossible to detect when visually inspecting the screen output.

How does the character get drawn to the screen?
On HGC screens, AGI included custom built routines in the HGC_GRAF.OVL file that would extract the correct glyph from the HGC_FONT file and draw it directly on the display. If an extended character was encountered, it was just ignored. This means that on an HGC system, it is impossible to display any extended characters.

On EGA screens, Sierra took advantage of the MSDOS built in glyphs. But they didn't keep it simple.

On the text screen (using the text.screen() command) Sierra stuck to using MSDOS interrupts to handle cursor positioning and drawing glyphs; this means that on the text screen, all characters, including the extended characters will draw correctly, regardless of colors chosen for foreground and background. As an example, in Goldrush, extended characters are used to simulated pages in a book when the bible verses are displayed.

On the graphics screen, Sierra decided to complicate things. For one thing, regardless of color values passed with the set.text.attribute (FG, BG) command, background would only be black (if BG == 0) or white (if BG != 0). When the background was white, foreground color would always displayed as black, regardless of the value of FG. If background was black, the displayed foreground color would match the FG value.

In the code that handles character input to the screen, if the background color is black, then AGI uses the standard interrupts to display the character, so all characters including extended characters display correctly. But if the background is not black, AGI does something weird - it copies the character glyph from the MSDOS interrupt for 7 bit ASCII characters (INT 43h), inverts it (creating a black-on-white character, instead of white-on-black) and stores it in a separate location. AGI then reassigns INT 43h so that it will find this new location when the character drawing interrupt (INT 10h AH=09) is called. So if an extended character is encountered, AGI copies glyph data from the place where only the 7 bit characters are stored, reading data that belongs to other functions in MSDOS. This explains why glyphs for extended characters appear garbled when displayed on a non-black background on the graphics screen.

So, why did Sierra do this? It appears to be related to the methods they use to force black-on-white on the graphics screen. I can't figure out why they felt the need to limit color choices though.

Is it possible to get any other color combinations on the graphics screen?
Yes. AGI is notorious for failing to validate the values of arguments used in various commands. Due to a bug in how colors are handled, you can actually get AGI to display black text on non-white backgrounds by passing a FG value is greater than 127 to the set.text.attribute (FG, BG) command. BG must be zero. When you do this, the upper four bits of FG overflow into BG when the character is drawn, resulting in black text on colored background. Extended characters are still garbled in this scenario.

What about character byte values less than 32?
It is not well known, but if you include character values less than 32 in AGI messages, AGI will display the original MSDOS glyphs for these characters. AGI actually does this in order to get the arrow to show up in the save/restore game windows when you are selecting a slot. The only exceptions to this are characters 8,9,10 and 13; AGI moves the cursor as appropriate for these characters.

259
AGI Community How To's & Tutorials / Re: Official AGI Documentation
« on: March 29, 2018, 10:12:08 AM »
I will add that to my list of things to do. Hopefully I'll be able to get to that in next couple of months.

260
AGI Community How To's & Tutorials / Re: Official AGI Documentation
« on: March 29, 2018, 02:44:52 AM »
I think you should clearly indicate that the information is for 2.001 (or whatever version you think it is). There is a significant amount of difference between these specs and what we see in the most commonly used versions for fanmade games. I'm mostly done a full decompile on v2.917 and will be sharing what I've learned in the WinAGI help files. Lots of interesting things I've found by going through all the code.

261
AGI Development Tools / Re: WinAGI is Back
« on: March 29, 2018, 02:13:45 AM »
Hi there klownstein! It's good to hear from you. And I'm glad to hear your positive comments. I've got the next version mostly done. I have been working on the help file, and documenting all the information I have gleaned from decompiling AGI. There has been a TON of new things I've learned that I think will be helpful to those looking for nostalgia, as well as those looking to make AGI games more easily. I don't have an ETA yet; I try to work on it a little bit each night. Hopefully very soon.

thx again for the comments!

262
AGI Development Tools / Re: WinAGI is Back
« on: February 09, 2018, 12:40:38 AM »
From AGI game development point of view, it's good that there's still development applications coming out, but it's also shame to limit them to Windows only, maybe release to Linux as well someday, sources or snap/flatpak? Lance Ewing's Java PICEDIT was step into the right direction, OS independency. Anyway, I have a virtual machine for Windows XP and AGI stuff, thus managed to install the 1.2.2 BETA. Logic editor still lacks options to properly set the colours and theming, very QT AGI Studio's like, bright white background logic editor with no way to change it is no no. Regardless whatever goodies it might include, if logic editor of IDE fails, that's falling back to good old AGI Studio 1.38BETA.
Hi there. I'm aware that several folks would like to see tools available on different platforms. But until I stabilize this last version of WinAGI and then get some time to explore other development platforms, I'm afraid this is the best I can do for now. I have not intentionally "limited" it to Windows, nor do I feel any "shame" in what WinAGI has become.

No one has ever asked for ability to change background color of logic/text editors. Regardless, I certainly don't think it is "improper" to not include such, nor is it a "failure" of the IDE.

The additional features included in WinAGI are (IMHO) tremendously valuable in terms of making AGI game creation easier and faster. If you want to pass on all those benefits because of one single feature, that's certainly your choice.

FWIW, it took me less than five minutes to add a logic/text editor background color setting. The next release will have that feature.


263
AGI Development Tools / Re: WinAGI is Back
« on: January 18, 2018, 10:43:41 AM »
Chris Cromer had a couple of updated template games on his old agigames.com site.

That might be where I got them from. I don't even remember. Regardless, I thought it might be a good idea to go through them to see if there are any improvements that can be made. Probably not me though. I haven't done much actual AGI game writing; I've been focusing on the tool. There are a lot of folks with more experience actually writing a game than me.

264
AGI Development Tools / Re: WinAGI 1.2.2 BETA
« on: January 18, 2018, 12:23:44 AM »
Ugh.

The reason for requiring registration of WinAGI.dll is that it has been updated for this release; if you didn't re-register the correct file, there would be compatibility errors. I forgot about the rich text editor library! Sorry about that.

That's what I get for trying to cut corners. It wasn't that hard to put together a proper install program that handles all library registrations correctly. I'll remove the individual files from first post, and instead include the installer file.

My apologies for making this more complicated than it needed to be. I'll not do that again.

265
AGI Development Tools / WinAGI 1.2.2 BETA
« on: January 17, 2018, 11:59:40 AM »
I'm attaching the most recent WinAGI build. (with a proper installer file so there should not be any problems with file compatibilities)

For some reason, changes to pictures, sounds and views were not enabling the Save option. I have no idea why, because I have not touched any of the code associated with that. Regardless, this version (1.2.2) appears to correct the problem, at least for me on a Windows 10 and a Windows 7 box.

There are a lot of fixes between this version and 1.2.1 that I loaded last spring. I would greatly appreciate as much feedback as possible on this latest version. Let me know what works, what doesn't. (NOTE that I haven't released an updated Help File, so if you are looking for something in the Help File and it's not there, or you find errors in the Help File, be aware that I'm working it, and will release a new Help file with the next version)

Thx for all the help

266
AGI Development Tools / Re: WinAGI is Back
« on: January 17, 2018, 11:49:15 AM »
I will start a new thread with the latest beta release that addresses the save issue.

Quote
And, I would be surprised if your template game intentionally contains errors, anyway.
Don't be! The template games are the old AGI Studio templates. I haven't done any work on them. I was hoping to get some help from this site to go through those template games and clean them up, and include comments to help new AGI programmers.

The specific warnings you mention are there to warn the programmer that messing with some of the reserved variables and flags can cause problems. It doesn't mean don't do it- just be careful. And if you don't want them, you can disable individual warnings, or all warnings by changing error detection level to Low.

267
AGI Development Tools / Re: WinAGI is Back
« on: January 16, 2018, 12:18:02 PM »
OK, so you want to run VB6 (the actual dev tool) on the 95/98 box in addition to installing WinAGI? Is that right? Because you can install WinAGI without installing VB6. I suggest not installing WinAGI until after you have installed the other stuff; if it's the last thing installed, it should make sure you have the correct VB6 runtime DLL.

And OMG, this is so funny - I'm running Windows 7 Enterprise on my work computer (never even noticed it until now!) So I installed WinAGI, and I'm seeing the same problem for sounds and pictures (views too). I will take a look at that first thing tonight.

The errors you listed at the end are not errors; they are compiler warnings. When you compile a logic, WinAGI will examine your source code, and if it finds things that might cause a problem, it will generate warnings. You can double-click on a warning to be taken right to that place in a logic editor window. If you don't want warnings, you can turn them off by using the Settings feature. You can also right-click any warning to disable just that warning.

As soon as I fix the resource Save feature, I will release another beta version and post it here in another thread.

Thanks for the feedback!



268
AGI Development Tools / Re: WinAGI is Back
« on: January 15, 2018, 04:52:28 PM »
Thanks for posting.

I'm about ready to release another version that fixes even more things I've found since rebooting this project. So having this feedback is very timely.

I don't have any experience with Wine, but if it's complaining about WORDS.TOK being open, I should be able to track that down, and find out if it's a bug on my part or not. Can you provide some more specific information? Are you trying to compile a single logic, or are you compiling the entire game? It will help me know where to start looking. Also, I'm not sure exactly what you mean by pictures and sound not saving. The more detail you can give about what you were doing and what happened, the better I can track down potential bugs.

Regarding Windows 7, I honestly don't remember if I ever tested on that. There was a long stretch of time when I didn't do any AGI stuff at all, and it might have coincided with a skip of an OS version or two. I'm surprised that it doesn't work though. I will see if I have a Windows 7 box at home and try it there. But again, if you can give me more specific error information, I might be able to figure out what's going on.

And yes, AGI was started on a Windows 98 box. It does work well on that OS. (At least it did last time I checked it!) When you say nothing happened at all, what do you mean? If you use the installer program, it should make sure you've got the right VB runtime. If you just try copying the files, it's not going to work; the custom DLL needs to be properly registered; the installer does that.

Thanks again for the feedback; I'll do what I can to help you get up and running.

269
AGI Syntax Help / Re: AGI and changing font
« on: December 29, 2017, 06:40:27 PM »
AGI definitely uses the video card font data for fonts. It does some weird stuff with them though, that I haven't been able to fully decipher. According to MSDOS reference material, there are 8x8 font data for characters 00 - 7Fh at INT 43h (memory location F000:FA6E) and 8x8 font data for characters 80h - FFh at INT 1Fh. When AGI puts characters to screen, it looks like it grabs the font data from INT 43h, regardless of the character value (which explains the garbled output, since >7Fh will be using data outside the range for this location). But during startup, when various DOS interrupt vectors are reassigned, AGI does reassign the vector for INT 1Fh (the extended character data) to the location where each character is output before being sent to the screen. I don't know yet why this is being done, or what effect it ends up having.

Regardless, original Sierra AGI does not display/support extended characters.

But NAGI can; I actually wrote a NAGI font editor ten years ago that you can use to edit/create your own NAGI fonts, including creating characters for all 255 byte codes. I'm attaching the install file for NAGI Font Editor if you want to give it a try; just open one of the *.nbf files included in NAGI to change the fonts however you want. I've also attached a 'spanish' version of the 16x16 font file I used for testing.  (You can also get NFE from www.sierrahelp.com - http://www.sierrahelp.com/AGI/Files/Misc/NAGI_Font_Editor/NAGI_Font_Editor_(NFEd_101).zip)

Note that WinAGI can handle messages using extended codes, if you want to create a sample game to test the fonts in NAGI. BUT, the rich text editor used for syntax highlighting reacts a bit goofy when extended codes are involved, so I'm adding a feature to turn off syntax highlighting in case anyone wants to use extended codes.

But just be aware that while you can use NAGI to display extended characters, AGI input is strictly limited to the regular characters; the text input/parsing routines and words encoding in the WORDS.TOK file were written to explicitly preclude the possibility of entering extended characters as input.

270
AGI Development Tools / Re: WinAGI 1.2 BETA available for download
« on: December 28, 2017, 01:59:25 AM »
Hi there! Sorry for delayed response- been busy with the holiday.

Amiga OBJECT support is included in 1.2.1. (I forgot to include that in the list of enhancements)

Would you mind trying it out and let me know if it is ok, or if there are any bugs? And if you have a full set of Amiga files for any Sierra games, I'd love to have a copy to help with decompiling efforts.

Pages: 1 ... 16 17 [18] 19 20

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

Page created in 0.039 seconds with 20 queries.