ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ h u g i s i z e c o d i n g c o m p e t i t i o n # 24 infofile v1.3 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The Tortiose and the Hare The task for Hugi Compo 24, is to create a program that when given a stream of bytes, will draw to the screen a set of pixels. This stream of data will be a set of commands to move the Torriose around the screen, drawing pixels as he goes. The Tortiose will be able to draw single pixels, lines, circles, etc., using 256 colors. Since we have had many compos get a filename from the command line, I have decided that your entry will prompt the user for a filename instead. These are the rules: - Your entry will prompt the user for a filename. - The user will enter a 8.3 DOS filename and press ENTER. - You can assume the filename is valid and exists in the current directory. - You will read the bytes from the file, either all at once, then draw the screen, or a byte at a time, while drawing the screen. You may do it as you please. - You will be sure to close the file before exiting. - You can not use the DOS EXIT service to close the file for you. You will see why a little later. - Once you have drawn the screen as the data describes, you will loop back to the first of the program to accept another filename. - If the filename is empty, i.e.: The ENTER key was pressed with no name given, you will exit to DOS. - Since you will be looping through like this, you must close the file handle before you loop. - You can assume that the Tortiose will start at coord's 0,0 on the first filename, but will remain at the last position of the last command on any consecutive files entered. i.e.: the coord's for the Tortiose will only be at 0,0 on the first command unless a command through out the stream places the tortious back at that coor'd. - Starting color is zero (0) - Pen is off at start of app. - On Exit of app, you must change back to screen mode 03h - When you loop back to get the filename, you must save the current contents of the mode 13h video screen, go to mode 03h get the filename, then if not "empty", go to mode 13h and restore the video screen from saved memory. The video screen mode *must* be mode 13h. You can not use a compatible VESA mode and set/clear the "clear video screen" bit. You must save and restore the 64000 bytes of data yourself. - There is no limit on the count of times this loop will take place. About the data: - You can assume that it is a consecutive stream of bytes and each command is a single byte. - You can not assume that any parameters for the commands are single bytes, and if they are larger than bytes, they will be in Intel little-endian order. - You must complete one command before moving on to the next command in the data stream. - You may *NOT* "draw" the data to a buffer before sending to the screen. You *MUST* draw each command to the screen before moving on to the next command. - On any movement command that would move the Tortoise off the edge of the screen, you simple stop at the edge. i.e.: If the Tortious is three (3) positions from the right side and the command is to move four (4) steps to the right, you ignore the last step and stay at the screens right edge. - The screen mode will be mode 13h (320x200 256 colors) and will be at physical address 0x0A0000 - Only command 8 changes the pen color. Any other command that has a trailing color byte uses that color, but the next command uses the orignal pen color if applicable. - Only commands 1, 2, 3, and 4 care if the pen is on or off. All other commands draw to the screen whether the pen is on or off. - Commands 1, 2, 3, and 4 draw a line to the given position. i.e.: a series of pixels are written in horizontal/vertical line count times. For example: If command 4 is given with a count word of 10, you draw 10 pixels to the right if the pen is on. If it is of, you do not change the color of the current pixels as you move 10 pixels to the right. - Unless anyone objects, let us assume that all memory from CS:0000 to the EBDA (Extended BIOS Data Area) at 0x9FC00 is available to your entry. Unless you have a wierd TSR or DOS setup, all memory above CS:0000 should be available until the EBDA is encountered. ** please correct me if I am wrong. It has been a while ** - You may assume that the command file contains only valid commands. The data commands are: 00h - nop 01h - Move Up 02h - Move Down - A trialing byte will be the distance to move. - The offset will be zero based from the current position. If the offset is zero (0), no movement is made. 03h - Move Left 04h - Move Right - A trialing 16-bit word will be the distance to move. - The offset will be zero based from the current position. If the offset is zero (0), no movement is made. 05h - Move to coord's - A trailing 16-bit word pair will be the actual coord's - the first 16-bit word is the X (horz) coord and the second is the Y (vert). All coord's are zero based. - No drawing is done from current position to new position. - You may assume that the coord's are within the boundarys. i.e: 0 <= X <= 319 0 <= Y <= 199 This means that the second 16-bit word will have a zero as its high byte. 06h - Pen on - Simply tells the processor to draw when movement is made. 07h - Pen off - Simply tells the processor to not draw when movement is made. 08h - Change color - A trialing byte will be the new color to use. 09h - Pause for user key press. - Pause and wait for the user to press a key. - No drawing or processing of any further commands will be performed until the key is removed from the INT 16h buffer. - The key code will be ignored. 10h - Draw a circle - Draw a circle with the center at this position and a trialing byte as the radius. This means no circle larger than a radius of 255. - again, if the circle will be drawn off the screen, you do not draw the pixels that would be beyond the boundarys. - You may use the FPU to do the calculations, but it is not mandatory. However, you *must* use five (5) decimal places of Pi (3.14159) when calculating the distance to draw your circle. - the trailing by will not be zero. 11h - Fill an area - A trailing 8-bit byte denotes the color. - You will replace the current positions colored pixels with the newly given color with out passing a different colored boundary. - i.e: You must change the current positions pixel color to the newly given color, and all of the ones next to it as long as they match the firsts original color. (That wasn't very clear, was it? (Ask me is you don't quite understand that. It is the typical "fill" tool of most graphic applications.) I have left the Circle Drawing command in the rules. The rule will be: *If your circle draw routine creates a circle on the screen with the same pixel count and positions as the example does, your circle draw routine passes the test suit.* This means you can use any type of circle draw algo/routine you would like as long as it draws the same circle as the test suit does. I have left out the line draw command. I wanted either/or. Not both. :) -------------------------------- [SUBMISSION] ------------------------------- You have to send () the sourcecode of your entry () the executable of your entry ("entry.com") to Adok so that he can analyse and evaluate your entry. Send your entries to: fys@frontiernet.net It would be best if you could submit your entry as early as possible. Then Adok can inform you about bugs, if he finds any, and you have enough time to fix them. Attention: if he finds no bugs, this doesn't automatically mean that your entry is bug-free. You can submit updates to your entries all the time till the deadline. Entries that do not agree with these rules will be disqualified. Their coders will be informed about the mistake, and they can re-submit a bugfixed version unless the compo is over. If the compo is over and a hidden flaw is found in one of the originally accepted entries during the public judgement period, the best older entry of this competitor that fits all the rules will qualify instead. ------------------------------- [PRE-RESULTS] ------------------------------- Preliminary results of this compo will be released on the compo-web-site and always updated after receiving a new entry. In this way the compo will hopefully be exciting. Compo-web-site URL: http://www.frontiernet.net/~fys/hugi/hcompo.htm --------------------------------- [SCHEDULE] -------------------------------- July 01, 2005 Compo starts Sept 30, 2005, 11:59 pm mst Deadline for entry submission, compo is over Oct 01, 2005 Entries and beta results will be released, Start of public judgement Oct 08, 2005, 11:59 pm mst End of public judgement Oct 09, 2005 Final results will be released ----------------------------- [PUBLIC JUDGEMENT] ---------------------------- After the deadline for entry submission, as soon as the entries and the beta results are released, the public judgement starts. During this week you can discuss and object to the entries that seem to break some rule. Please send your objections to the compo-mailinglist (see below). Adok and/or a jury formed by him will check if your objections are according to the rules. If they are, the invalid entry will be disqualified. ---------------------------------- [PRIZES] --------------------------------- I'm sorry if I disappoint you, but there are no material prizes. Everything is just a matter of honor and fame. Moreover, all competitors will get points and be listed in the 'World League Table of Assembly' situated at the compo-web-site. Reaching a good place at a compo and even more in the World League Table of Assembly is a good visiting-card and recommendation for every competitor! ------------------------------- [MAILINGLIST] ------------------------------- The purpose of the Hugi Compo Mailinglist is to inform about new compos and provide a discussion forum for the competitors. At the moment there are about 325 subscribers. To subscribe send a mail to hugi-compo-subscribe@egroups.com. You'll get an automatically generated mail which confirms your subscription within a few hours. Then you start getting the mails the others have posted to this mailinglist. Mails for the list have to be sent to: hugi-compo-subscribe@yahoogroups.com If you want to unsubscribe, send a mail to: hugi-compo-unsubscribe@yahoogroups.com -------------------------------- [ADDRESSES] -------------------------------- Send your entries to: hugi@netway.at [Adok/Hugi] Compo-homepage (pre-results, world league table, etc.) http://www.frontiernet.net/~fys/hugi/hcompo.htm Subscribe to the mailinglist: hugi-compo-subscribe@egroups.com ----------------------------------------------------------------------------- Thanks for reading this info file!