-
Notifications
You must be signed in to change notification settings - Fork 3
MSX2DAAD Wiki: DAAD Condacts: a quick reference
- Conditions of player locations (4 condacts)
- Conditions of object locations (8 condacts)
- Conditions for values/flags comparation (10 condacts)
- Conditions to check logical sentence (5 condacts)
- Conditions for random (1 condacts)
- Conditions for sub-process success/fail (2 condacts)
- Conditions for object attributes (2 condacts)
- Conditions for player interaction (2 condacts)
- Actions for object position manipulation (20 condacts)
- Actions for object in flags manipulation (5 condacts)
- Actions to manipulate flags (11 condacts)
- Actions to manipulate player flags (3 condacts)
- Actions for screen mode/format flags (3 condacts)
- Actions for screen control and output (20 condacts)
- Actions for listing objects (2 condacts)
- Actions for current game state save/load (4 condacts)
- Actions to pause game (2 condacts)
- Actions to control the parse (3 condacts)
- Actions for flow control (7 condacts)
- Actions for exit tables (3 condacts)
- Actions to call external routines (4 condacts)
- Actions to show pictures (2 condacts)
- Actions miscellaneous (2 condacts)
- New DRC virtual condacts (8 condacts)
Succeeds if the current location is the same as locno.
Succeeds if the current location is different to locno.
Succeeds if the current location is greater than locno.
Succeeds if the current location is less than locno.
Succeeds if Object objno. is carried (254), worn (253) or at the current location [fPlayer].
Succeeds if Object objno. is not carried (254), not worn (253) and not at the current location [fPlayer].
Succeeds if object objno. is worn.
Succeeds if Object objno. is not worn.
Succeeds if Object objno. is carried.
Succeeds if Object objno. is not carried.
Succeeds if Object objno. is at Location locno.
Succeeds if Object objno. is not at Location locno.
Succeeds if Flag flagno. is set to zero.
Succeeds if Flag flagno. is not set to zero.
Succeeds if Flag flagno. is equal to value.
Succeeds if Flag flagno. is not equal to value.
Succeeds if Flag flagno. is greater than value.
Succeeds if Flag flagno. is set to less than value.
Succeeds if Flag flagno 1 has the same value as Flag flagno 2.
Succeeds if Flag flagno 1 does not have the same value as Flag flagno 2 .
Will be true if flagno 1 is larger than flagno 2.
Will be true if flagno 1 is smaller than flagno 2.
Succeeds if the first noun's adjective in the current LS is word.
Succeeds if the adverb in the current LS is word.
Succeeds if the preposition in the current LS is word.
Succeeds if the second noun in the current LS is word.
Succeeds if the second noun's adjective in the current LS is word.
Succeeds if percent is less than or equal to a random number in the range 1-100 (inclusive). Thus a CHANCE 50 condition would allow PAW to look at the next CondAct only if the random number generated was between 1 and 50, a 50% chance of success.
Succeeds if the last table ended by exiting after executing at least one Action. This is useful to test for a single succeed/fail boolean value from a Sub-Process. A DONE action will cause the 'done' condition, as will any condact causing exit, or falling off the end of the table - assuming at least one CondAct (other than NOTDONE) was done.
See also ISNDONE and NOTDONE actions.
Succeeds if the last table ended without doing anything or with a NOTDONE action.
Checks the attribute specified by value is set. 0-15 are the object attributes for the current object. There are also several attribute numbers specified as symbols in SYMBOLS.SCE which check certain parts of the DAAD system flags.
Checks the attribute specified by value is not set. 0-15 are the object attributes for the current object. There are also several attribute numbers specified as symbols in SYMBOLS.SCE which check certain parts of the DAAD system flags.
Is a condition which will be satisfied if the player is pressing a key. In 16Bit machines Flags Key1 and Key2 (60 & 61) will be a standard IBM ASCII code pair. On 8 bit only Key1 will be valid, and the code will be machine specific.
SM12 ("Are you sure?") is printed and called. Will succeed if the player replies starts with the first letter of SM30 ("Y") to then the remainder of the entry is discarded is carried out.
If Object objno. is worn or carried, SM25 ("I already have the _.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is not at the current location, SM26 ("There isn't one of those here.") is printed and actions NEWTEXT & DONE are performed.
If the total weight of the objects carried and worn by the player plus Object objno. would exceed the maximum conveyable weight (Flag 52) then SM43 ("The _ weighs too much for me.") is printed and actions NEWTEXT & DONE are performed.
If the maximum number of objects is being carried (Flag 1 is greater than, or the same as, Flag 37), SM27 ("I can't carry any more things.") is printed and actions NEWTEXT & DONE are performed. In addition any current DOALL loop is cancelled.
Otherwise the position of Object objno. is changed to carried, Flag 1 is incremented and SM36 ("I now have the _.") is printed.
If Object objno. is worn then SM24 ("I can't. I'm wearing the _.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is at the current location (but neither worn nor carried), SM49 ("I don't have the _.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is not at the current location then SM28 ("I don't have one of those.") is printed and actions NEWTEXT & DONE are performed.
Otherwise the position of Object objno. is changed to the current location, Flag 1 is decremented and SM39 ("I've dropped the _.") is printed.
If Object objno. is at the current location (but not carried or worn) SM49 ("I don't have the _.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is worn, SM29 ("I'm already wearing the _.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is not carried, SM28 ("I don't have one of those.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is not wearable (as specified in the object definition section) then SM40 ("I can't wear the _.") is printed and actions NEWTEXT & DONE are performed.
Otherwise the position of Object objno. is changed to worn, Flag 1 is decremented and SM37 ("I'm now wearing the _.") is printed.
If Object objno. is carried or at the current location (but not worn) then SM50 ("I'm not wearing the _.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is not at the current location, SM23 ("I'm not wearing one of those.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is not wearable (and thus removable) then SM41 ("I can't remove the _.") is printed and actions NEWTEXT & DONE are performed.
If the maximum number of objects is being carried (Flag 1 is greater than, or the same as, Flag 37), SM42 ("I can't remove the _. My hands are full.") is printed and actions NEWTEXT & DONE are performed.
Otherwise the position of Object objno. is changed to carried. Flag 1 is incremented and SM38 ("I've removed the _.") printed.
The position of Object objno. is changed to the current location and Flag 1 is decremented if the object was carried.
The position of Object objno. is changed to not-created and Flag 1 is decremented if the object was carried.
The positions of the two objects are exchanged. Flag 1 is not adjusted. The currently referenced object is set to be Object objno 2.
The position of Object objno. is changed to Location locno. Flag 1 is decremented if the object was carried. It is incremented if the object is placed at location 254 (carried).
The position of the currently referenced object (i.e. that object whose number is given in flag 51), is changed to be Location locno. Flag 54 remains its old location. Flag 1 is decremented if the object was carried. It is incremented if the object is placed at location 254 (carried).
If Object objno. is worn then SM24 ("I can't. I'm wearing the _.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is at the current location (but neither worn nor carried), SM49 ("I don't have the _.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is not at the current location, but not carried, then SM28 ("I don't have one of those.") is printed and actions NEWTEXT & DONE are performed.
Otherwise the position of Object objno. is changed to Location locno. Flag 1 is decremented and SM44 ("The _ is in the"), a description of Object locno. and SM51 (".") is printed.
If Object objno. is worn or carried, SM25 ("I already have the _.") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is at the current location, SM45 ("The _ isn't in the"), a description of Object locno. and SM51 (".") is printed and actions NEWTEXT & DONE are performed.
If Object objno. is not at the current location and not at Location locno. then SM52 ("There isn't one of those in the"), a description of Object locno. and SM51 (".") is printed and actions NEWTEXT & DONE are performed.
If Object locno. is not carried or worn, and the total weight of the objects carried and worn by the player plus Object objno. would exceed the maximum conveyable weight (Flag 52) then SM43 ("The _ weighs too much for me.") is printed and actions NEWTEXT & DONE are performed.
If the maximum number of objects is being carried (Flag 1 is greater than, or the same as, Flag 37), SM27 ("I can't carry any more things.") is printed and actions NEWTEXT & DONE are performed. In addition any current DOALL loop is cancelled.
Otherwise the position of Object objno. is changed to carried, Flag 1 is incremented and SM36 ("I now have the _.") is printed.Note: No check is made, by either PUTIN or TAKEOUT, that Object locno. is actually present. This must be carried out by you if required.
All objects which are carried or worn are created at the current location (i.e. all objects are dropped) and Flag 1 is set to 0. This is included for compatibility with older writing systems.
Note that a DOALL 254 will carry out a true DROP ALL, taking care of any special actions included.
A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; here, carried, worn.
i.e. The player is more likely to be trying to GET an object that is at the current location than one that is carried or worn. If an object is found its number is passed to the GET action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM26 ("There isn't one of those here.") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).
Either way actions NEWTEXT & DONE are performed.
A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; carried, worn, here.
i.e. The player is more likely to be trying to DROP a carried object than one that is worn or here. If an object is found its number is passed to the DROP action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM28 ("I don't have one of those.") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).
Either way actions NEWTEXT & DONE are performed.
A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; carried, worn, here.
i.e. The player is more likely to be trying to WEAR a carried object than one that is worn or here. If an object is found its number is passed to the WEAR action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM28 ("I don't have one of those.") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).
Either way actions NEWTEXT & DONE are performed.
A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; worn, carried, here.
i.e. The player is more likely to be trying to REMOVE a worn object than one that is carried or here. If an object is found its number is passed to the REMOVE action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM23 ("I'm not wearing one of those.") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).
Either way actions NEWTEXT & DONE are performed.
A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; carried, worn, here.
i.e. The player is more likely to be trying to PUT a carried object inside another than one that is worn or here. If an object is found its number is passed to the PUTIN action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM28 ("I don't have one of those.") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).
Either way actions NEWTEXT & DONE are performed.
A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; in container, carried, worn, here.
i.e. The player is more likely to be trying to get an object out of a container which is actually in there than one that is carried, worn or here. If an object is found its number is passed to the TAKEOUT action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM52 ("There isn't one of those in the"), a description of Object locno. and SM51 (".") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).
Either way actions NEWTEXT & DONE are performed.
The position of Object objno2 is set to be the same as the position of Object Objno1. The currently referenced object is set to be Object objno2.
This Action bears no resemblance to the one with the same name in PAW. It has the pure function of placing all objects at the position given in the Object start table. It also sets the relevant flags dealing with no of objects carried etc.
The position of Object objno. is copied into Flag flagno. This could be used to examine the location of an object in a comparison with another flag value.
The position of Object objno. is set to be the contents of Flag flagno. An attempt to copy from a flag containing 255 will result in a run time error. Setting an object to an invalid location will still be accepted as it presents no danger to the operation of PAW.
A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; carried, worn, here. This is because it is assumed any use of WHATO will be related to carried objects rather than any that are worn or here. If an object is found its number is placed in flag 51, along with the standard current object parameters in flags 54-57. This allows you to create other auto actions (the tutorial gives an example of this for dropping objects in the tree).
Sets the currently referenced object to objno.
The true weight of Object objno. is calculated (i.e. if it is a container, any objects inside have their weight added - don't forget that nested containers stop adding their contents after ten levels) and the value is placed in Flag flagno. This will have a maximum value of 255 which will not be exceeded. If Object objno. is a container of zero weight, Flag flagno will be cleared as objects in zero weight containers, also weigh zero!
Flag flagno. is set to 255.
Flag flagno. is cleared to 0.
Flag flagno. is set to value.
Flag flagno. is increased by value. If the result exceeds 255 the flag is set to 255.
Flag flagno. is decreased by value. If the result is negative the flag is set to 0.
Flag flagno 2 has the contents of Flag flagno 1 added to it. If the result exceeds 255 the flag is set to 255.
Flag flagno 2 has the contents of Flag flagno 1 subtracted from it. If the result is negative the flag is set to 0.
The contents of Flag flagno 1 is copied to Flag flagno 2.
Same as COPYFF but the source and destination are reversed, so that indirection can be used.
Flag flagno. is set to a number from the Pseudo-random sequence from 1 to 100.
This is a very powerful action designed to manipulate PSI's. It allows the current LS Verb to be used to scan the connections section for the location given in Flag flagno. If the Verb is found then Flag flagno is changed to be the location number associated with it, and the next condact is considered. If the verb is not found, or the original location number was invalid, then PAW considers the next entry in the table - if present.
Changes the current location to locno. This effectively sets flag 38 to the value locno.
Calculates the true weight of all objects carried and worn by the player (i.e. any containers will have the weight of their contents added up to a maximum of 255), this value is then placed in Flag flagno. This would be useful to ensure the player was not carrying too much weight to cross a bridge without it collapsing etc.
This sets Flag 37, the maximum number of objects conveyable, to value 1 and Flag 52, the maximum weight of objects the player may carry and wear at any one time (or their strength), to be value 2. No checks are made to ensure that the player is not already carrying more than the maximum. GET and so on, which check the values, will still work correctly and prevent the player carrying any more objects, even if you set the value lower than that which is already carried!
Allows the current window to have its operation flags changed. In order to calculate the number to use for the option just add the numbers shown next to each item to achieve the required bitmask combination:
1 - Use the upper character set. (A permanent ^G)
2 - SM32 ("More...") will not appear when the window fills.
e.g. MODE 3 stops the 'More...' prompt and causes all to be translated to the 128-256 range.
The 'stream' parameter will set the bulk of input to come from the given window/stream. A value of 0 for 'stream' will not use the graphics stream as might be expected, but instead causes input to come from the current stream when the input occurs.
Bitmask options:
1 - Clear window after input.
2 - Reprint input line in current stream when complete.
4 - Reprint current text of input after a timeout.
Allows input to be set to 'timeout' after a specific duration in 1 second intervals, i.e. the Process 2 table will be called again if the player types nothing for the specified period. This action alters flags 48 & 49. 'option' allows this to also occur on ANYKEY and the "More..." prompt. In order to calculate the number to use for the option just add the numbers shown next to each item to achieve the required combination:
1 - While waiting for first character of Input only.
2 - While waiting for the key on the "More..." prompt.
4 - While waiting for the key on the ANYKEY action.
e.g. TIME 5 6 (option = 2+4) will allow 5 seconds of inactivity on behalf of the player on input, ANYKEY or "More..." and between each key press. Whereas TIME 5 3 (option = 1+2) allows it only on the first character of input and on "More...".
TIME 0 0 will stop timeouts (default).
Selects window (0-7) as current print output stream.
Sets current window to start at given line and column. Height and width to fit available screen.
Sets current window size to given height and width. Clipping needed to fit available screen.
Will ensure the current window is centered for the current column width of the screen. (Does not affect line position).
Clears the current window.
Save print position for current window. This allows you to maintain the print position for example while printing elsewhere in the window. You should consider using a seperate window for most tasks. This may find use in the creation of a new input line or in animation sequences...
Restore print position for current window. This allows you to maintain the print position for example while printing elsewhere in the window. You should consider using a seperate window for most tasks. This may find use in the creation of a new input line or in animation sequences...
Set paper colour acording to the lookup table given in the graphics editors.
Set text colour acording to the lookup table given in the graphics editors.
Set border colour acording to the lookup table given in the graphics editors.
*MSX2 note: *For Screen 8/12 the color value is using a standard EGA palette unless you use the GFX condact to change it. But Screen 5/6/7 are paletted modes and must use the current Picture palette.
Sets current print position to given point if in current window. If not then print position becomes top left of window.
Sets current print position to given column on current line.
Will simply print a space to the current output stream. Shorter than MES a space!
Prints a carriage return/line feed.
Prints Message mesno.
With DRC you can also use the syntax:
MES "This is a message"
Prints Message mesno., then carries out a NEWLINE action.
With DRC you can also use the syntax:
MESSAGE "This is a message"
Prints System Message sysno.
Prints the text for location locno. without a NEWLINE.
The decimal contents of Flag flagno. are displayed without leading or trailing spaces.
Will print the contents of flagno and flagno+1 as a two byte number.
If any objects are present then SM1 ("I can also see:") is printed, followed by a list of all objects present at the current location. If there are no objects then nothing is printed.
If any objects are present then they are listed. Otherwise SM53 ("nothing.") is printed - note that you will usually have to precede this action with a message along the lines of "In the bag is:" etc.
This action saves the current game position on disc or tape. SM60 ("Type in name of file.") is printed and the input routine is called to get the filename from the player. If the supplied filename is not acceptable SM59 ("File name error.") is printed - this is not checked on 8 bit machines, the file name is MADE acceptable!
This action loads a game position from disc or tape. A filename is obtained in the same way as for SAVE. A variety of errors may appear on each machine if the file is not found or suffers a load error. Usually 'I/O Error'. The next action is carried out only if the load is successful. Otherwise a system clear, GOTO 0, RESTART is carried out.
In a similar way to SAVE this action saves all the information relevant to the game in progress not onto disc but into a memory buffer. This buffer is of course volatile and will be destroyed when the machine is turned off which should be made clear to the player. The next action is always carried out.
This action is the counterpart of RAMSAVE and allows the saved buffer to be restored. The parameter specifies the last flag to be reloaded which can be used to preserve values over a restore.
Note 1: The RAM actions could be used to implement an OOPS command that is common on other systems to take back the previous move; by creating an entry in the main loop which does an automatic RAMSAVE every time the player enters a move.
Note 2: These four actions allow the next Condact to be carried out. They should normally always be followed by a RESTART or describe in order that the game state is restored to an identical position.
SM16 ("Press any key to continue") is printed and the keyboard is scanned until a key is pressed or until the timeout duration has elapsed if enabled.
Pauses for value/50 secs. However, if value is zero then the pause is for 256/50 secs.
The parameter 'n' controls which level of string indentation is to be searched. At the moment only two are supported by the interpreters so only the values 0 and 1 are valid.
0 - Parse the main input line for the next LS.
1 - Parse any string (phrase enclosed in quotes [""]) that was contained in the last LS extracted.
Forces the loss of any remaining phrases on the current input line. You would use this to prevent the player continuing without a fresh input should something go badly for his situation. e.g. the GET action carries out a NEWTEXT if it fails to get the required object for any reason, to prevent disaster with a sentence such as: GET SWORD AND KILL ORC WITH IT as attacking the ORC without the sword may be dangerous!
Substitutes the given verb and noun in the LS. Nullword (Usually '_') can be used to suppress substitution for one or the other - or both I suppose! e.g.
> MATCH ON SYNONYM LIGHT MATCH
> STRIKE MATCH SYNONYM LIGHT _
> LIGHT MATCH .... ; Actions...
will switch the LS into a standard format for several different entries. Allowing only one to deal with the actual actions.
This powerful action transfers the attention of DAAD to the specified Process table number. Note that it is a true subroutine call and any exit from the new table (e.g. DONE, OK etc) will return control to the condact which follows the calling PROCESS action. A sub-process can call (nest) further process' to a depth of 10 at which point a run time error will be generated.
Will restart the currently executing table, allowing.
Another powerful action which allows the implementation 'ALL' type command.
1 - An attempt is made to find an object at Location locno. If this is unsuccessful the DOALL is cancelled and action DONE is performed.
2 - The object number is converted into the LS Noun1 (and Adjective1 if present) by reference to the object definition section. If Noun(Adjective)1 matches Noun(Adjective)2 then a return is made to step 1. This implements the "Verb ALL EXCEPT object" facility of the parser.
3 - The next condact and/or entry in the table is then considered. This effectively converts a phrase of "Verb All" into "Verb object" which is then processed by the table as if the player had typed it in.
4 - When an attempt is made to exit the current table, if the DOALL is still active (i.e. has not been cancelled by an action) then the attention of DAAD is returned to the DOALL as from step 1; with the object search continuing from the next highest object number to that just considered.
The main ramification of the search method through the object definition section is; objects which have the Same Noun(Adjective) description (where the game works out which object is referred to by its presence) must be checked for in ascending order of object number, or one of them may be missed.
Use the DOALL to implement things like OPEN ALL must account for fact that doors are often flags only and would have to bemade into objects if they were to be included in a DOALL.
Skip a distance of -128 to 128, or to the specified label. Will move the current entry in a table back or fore.
0 means next entry (so is meaningless).
-1 means restart current entry (Dangerous).
Will cancel any DOALL loop, any sub-process calls and make a jump to execute process 0 again from the start.
SM13 ("Would you like to play again?") is printed and the input routine called. Any DOALL loop and sub-process calls are cancelled. If the reply does not start with the first character of SM31 a jump is made to Initialise. Otherwise the player is returned to the operating system - by doing the command EXIT 0.
If value is 0 then will return directly to the operating system. Any value other than 0 will restart the whole game. Note that unlike RESTART which only restarts processing, this will clear and reset windows etc. The non zero numbers actually specify a part number to jump to on AUTOLOAD versions. Only the PCW supports this feature at the moment. It will probably be added to PC as part of the HYPERCARD work. So if you intend using it as a reset ensure you use your PART number as the non zero value!
This action jumps to the end of the process table and flags to DAAD that an action has been carried out. i.e. no more condacts or entries are considered. A return will thus be made to the previous calling process table, or to the start point of any active DOALL loop.
This action jumps to the end of the process table and flags PAW that NO action has been carried out. i.e. no more condacts or entries are considered. A return will thus be made to the previous calling process table or to the start point of any active DOALL loop. This will cause PAW to print one of the "I can't" messages if needed. i.e. if no other action is carried out and no entry is present in the connections section for the current Verb.
SM15 ("OK") is printed and action DONE is performed.
Calls external routine with parameter value. The address is set by linking the #extern pre-compiler command.
MSX2 Note: this target machine emulates Maluva Extern functions and can't add custom user externs.
Maluva Extern supported function are:
Condact | Description |
---|---|
XPICTURE | Load Raster Graphic |
XSAVE | Save Game on disk |
XLOAD | Load Game on disk |
XMES | Print a external message |
Allows 'address' in memory (or in the database segment for 16bit) to be executed. See the extern secion for more details.
MSX2 Note: Not supported at this momment.
This is a second EXTERN type action designed for Sound Effects extensions.
e.g. It has a 'default' function which allows value 'value1' to be written to register 'value2' of the sound chip on 8 bits machines. This can be changed with #sfx or through linking - see the machine details and extern section for specifics.
An EXTERN which is meant to deal with any graphics extensions to DAAD. On 16 bits and MSX2 (8 bits machine) it is used to implement the screen switching facilities. This can be changed with #gfx or through linking. See the machine details and extern section for specifics.
Routine | Description | MSX2 | PC | Amiga | AtariST |
---|---|---|---|---|---|
0 | Copy Back->Phys | ✔️ | ✔️ | ✔️ | ✔️ |
1 | Copy Phys->Back | ✔️ | ✔️ | ✔️ | ✔️ |
2 | Swap (Phys<>Back) (In CGA this is a bit rough...) | ✔️ | ✔️ | ✔️ | ✔️ |
3 | Graphics Write to Phys | ✔️ | ✔️ | ✔️ | ✔️ |
4 | Graphics Write to Back | ✔️ | ✔️ | ✔️ | ✔️ |
5 | Clear Phys | ✔️ | ✔️ | ✔️ | ✔️ |
6 | Clear Back | ✔️ | ✔️ | ✔️ | ✔️ |
7 | Text Write to Phys -ST only- | ❌ | ❌ | ❌ | ✔️ |
8 | Text Write to Back -ST only- | ❌ | ❌ | ❌ | ✔️ |
9 | Set Palette value (Value is offset of 4 flag data block containing Num,Red,Green,Blue. RGB values are 0-255 | ✔️ | ✔️ | ✔️ | ✔️ |
10 | Read Palette value (Value is offset of 4 flag data block) | ❌ | ✔️ | ✔️ | ✔️ |
128 | Copy current Window Back->Phys | ✔️ | ❌ | ❌ | ❌ |
129 | Copy current Window Phys->Back | ✔️ | ❌ | ❌ | ❌ |
N.B.: SWAP in CGA is so slow as it uses the processor, there is no real page switching so you may want to code for that special case (ScMode=4)
Routines 128 and above are extended and exclusive for MSX2.
Routines 9 and 10 use the first GFX parameter 'param' to point at a four flag data block:
flag offset | Content |
---|---|
0 | palette no |
1 | RED 0-255 |
2 | GREEN 0-255 |
3 | BLUE 0-255 |
Note that most machines only use the most significant bits. E.g PC the top 6, ST (and MSX2) the top 3 and Amiga the top 4! This system allows the same numbers to represent the same colours in each machine.
Will load into the picture buffer the given picture. If there no corresponding picture the next entry will be carried out, if there is then the next CondAct is executed.
If value=0 then the last buffered picture is placed onscreen. If value !=0 and the picture is not a subroutine then the given window area is cleared. This is normally used with indirection and a flag to check and display darkness.
This action in preparation for the hypercard system implements skeleton mouse handler on the IBM.
Length is the duration in 1/100 seconds. Tone is like BEEP in ZX Basic but adding 60 to it and multiplied by 2.
See: http://www.worldofspectrum.org/ZXBasicManual/zxmanchap19.html
Length | Note |
---|---|
200 | Whole note |
100 | Half note |
50 | Quarter note |
25 | Eighth note |
12 | Sixteenth note |
6 | Thirty-second note |
3 | Sixty-fourth note |
Table DAAD BEEP Tones by octave:
Oct C C# D D# E F F# G G# A A# B
==== ===============================================
#1 48 50 52 54 56 58 60 62 64 66 68 70
#2 72 74 76 78 80 82 84 86 88 90 92 94
#3 96 98 100 102 104 106 108 110 112 114 116 118
#4 120 122 124 126 128 130 132 134 136 138 140 142
#5 144 146 148 150 152 154 156 158 160 162 164 166
#6 168 170 172 174 176 178 180 182 184 186 188 190
#7 192 194 196 198 200 202 204 206 208 210 212 214
#8 216 218 220 222 224 226 228 230 232 234 236 238
Example:
BEEP 50 126 ; O4 D#
BEEP 50 154 ; O5 F
BEEP 50 170 ; O6 C#
DRC compiles these condacts depending the platform target/subtarget you use to maintain platform compatibility (ZX, C64, PC, MSX, PCW, etc).
More info here:
https://github.com/daad-adventure-writer/MALUVA/wiki
https://github.com/daad-adventure-writer/DRC/wiki
For MSX2DAAD the equivalences are:
Equivalent to:
PICTURE picno
DISPLAY 0
Equivalent to MESSAGE
but the message text is write to a external disk file to keep free space in the DDB file:
XMESSAGE "This is a message"
Equivalent to MES
but the message text is write to a external disk file to keep free space in the DDB file:
XMES "This is a message"
Equivalent to LOAD opt
. It's used to maintain compatibility.
Equivalent to SAVE opt
. It's used to maintain compatibility.
Equivalent to BEEP length tone
. It's used to maintain compatibility.
This condact expands to the XBEEP
condacts needed to play the mmlString
music.
The mmlString
use a very similar format as MSX Basic PLAY instruction but with just one channel:
Command | Description |
---|---|
A-G#n. |
Notes:CDEFGAB . # /+ sharp, - flat. n is length in 1/n fullnote. . is period. |
Tn |
Specifies the tempo (number of quarter notes per minute) n =32...255 [default: 120] |
On |
Default octave for notes from here. n =1...8 [default: 4] |
Ln |
Default note length for notes from here. n is length in 1/n fullnote.. |
Rn. |
Create a silence of 1/n fullnote length. . is period. |
Nn |
Note pitch. n =0...96. 0=C octave 1. Each number increment halt tone. |
Vn |
Volume. n =0...15 [default: 8] Not supported at this time. |
< |
Decrease one octave. |
> |
Increase one octave. |
Example:
> PLAY PIANO
; Minuet Boccherini
XPLAY "T110O5G16F#16G16A16G8O4G4B4O5D8D8C8C4C16O4B16O5C16D16C8O4D4A4O5C8C8"
XPLAY "T110O4B8B4O5G4.E16D8C#8C#8C#8G4.E16D8C#8C#8C#8G4.E16F#8D8O4B8"
XPLAY "T110O5G8E4.D32E32D4"
MESSAGE "Sounds nice!"
DONE
You can search for a lot of MML files here: https://archeagemmllibrary.com/
Equivalent to Maluva extern call:
EXTERN num 4
Is not implemented/used in MSX2DAAD.