The Interactive Engineer
Volume 4, Number 5, 1995
| In This Issue: | CD-i info through "Asset" and email. |
| Media Mogul 2.2. Tips |
Table of Contents
| How to Load and Save Media Mogul Variables to a file | 1 |
| Quick RL7 Buttons | 3 |
| PIMC mailserver | 3 |
| How to connect to Email | 5 |
| Asset, the new CD-i developers newsletter | 5 |
| CD-i Training Courses | 6 |
| Something to tell to the CD-i community? | 7 |
| CD-i Training Courses Planning until end '95 | 7 |
| New Media Mogul 2.2 | 8 |
In the next issue:
¥ The new FPD Document & Disc
¥ Yearly index of Interactive Engineer: Keep all your Interactive Engineer Issues together and you'll get a genuine reference work about CD-i development.
How to Load and Save Media Mogul Variables to a File
Richard van de Laarschot & Marcel Verhoeven
Philips Interactive Media Centre
Many people have a problem with the fact that if you save your variables in Media Mogul, this will always be saved in a file named 'variables'. This means that if an other Media Mogul title saves its variables, the saved variables of the previous Media Mogul disk get overwritten.
To solve this, the following plug-in was written.
It will save or load the Media Mogul variables A-Y in/from a file with a specified name.
E.g.
Call cdi_vars MY_FILE_NAME SAVE
or
Call cdi_vars MY_FILE_NAME LOAD
On the following pages, you can find the source code of the Media Mogul plug-in that will do this.
/***************************************************************************
* Filename: cdi_vars.c
* Purpose: MeMo plug-in to load/save MeMo vars in random filename
* Arguments: 1) string containing the name of the file
* you want var's to be loaded from
* 2) The command in capitals 'SAVE' or 'LOAD'
*
* Returns: On Error it will exit with error code 1 AND
* will set the Media Mogul variable Z to 999.
* e.g. The case when the file doesn't exists.
*
* This plug-in loades or saves MeMo vars from a file with the
* name given in the first argument. The second argument should be
* 'SAVE' or 'LOAD'.
* Only variables A-Y are saved/loaded (Z is used by this plug-in).
*
* Author: Richard van de Laarschot
* based on 2 programmes of M. Verhoeven
* Date: 10-07-95
*
***************************************************************************/
#include
#include
#include
#include
#include
#include
#define SYSERR (-1)
/* globals */
int var_buf[25];
char cat_string[50];
char hlp_string[6] = "/nvr/";
/*******************
* Function to set the Media Mogul Variable 'Z' to '999'.
* This is done to let Media Mogul know the plugin failed.
* It will return a 1 on Error.
*******************/
Set_MeMo_varZ()
{
int zd, value_z, result;
zd = _ev_link("Z");
if (zd == SYSERR)
{
return(1);
}
value_z = 999;
result = _ev_set(zd, value_z, 0);
if (result == SYSERR)
{
return(1);
}
result = _ev_unlink(zd);
if (result == SYSERR)
{
return(1);
}
return(0);
}
Empty_Buf()
{
int i;
int id, result, ev_value;
char link_var[2];
link_var[0] = 'A';
link_var[1] = '\0';
for (i=0; i<25; i++)
{
id = _ev_link(link_var);
if (id == SYSERR)
{
Set_MeMo_varZ();
exit(1);
}
ev_value = *(var_buf + i);
result = _ev_set(id, ev_value, 0x0000);
if (result == SYSERR)
{
Set_MeMo_varZ();
exit(1);
}
result = _ev_unlink(id);
if (result == SYSERR)
{
Set_MeMo_varZ();
exit(1);
}
link_var[0]++;
}
return(0);
}
Fill_Buf()
{
int i;
int id, result;
char link_var[2];
link_var[0] = 'A';
link_var[1] = '\0';
for (i=0; i<25; i++)
{
id = _ev_link(link_var);
if (id == SYSERR)
{
Set_MeMo_varZ();
exit(1);
}
link_var[0]++;
*(var_buf + i) = _ev_read(id);
result = _ev_unlink(id);
if (result == SYSERR)
{
Set_MeMo_varZ();
exit(1);
}
}
return(0);
}
/***************************************************************************
* main()
***************************************************************************/
main( argc, argv )
int argc;
char **argv;
{
int i;
FILE *fp;
/* check parameters */
if (argc != 3)
{
i = Set_MeMo_varZ();
exit(1);
}
if ((strcmp(argv[2], "SAVE") != 0) && (strcmp(argv[2], "LOAD") != 0))
{
i = Set_MeMo_varZ();
exit(1);
}
/* set file name */
for (i =0; i < 6; i++)
{
cat_string[i] = hlp_string[i];
}
strcat(cat_string, argv[1]);
/* load variables from file */
if (strcmp(argv[2], "LOAD") == 0)
{
fp = fopen( cat_string, "r");
if ( fread(var_buf, sizeof(int), 25, fp) == 0)
{
fclose(fp);
Set_MeMo_varZ();
exit(1);
}
Empty_Buf();
}
/* save variables to file */
if (strcmp(argv[2], "SAVE") == 0)
{ /* if file already exists it is truncated to zero lenght */
fp = fopen( cat_string, "w");
Fill_Buf(var_buf); /* fille buffer with values MeMO variables */
if ( fwrite(var_buf, sizeof(int), 25, fp) == 0)
{
unlink(argv[1]);
fclose(fp);
Set_MeMo_varZ();
exit(1);
}
}
fclose(fp);
/* succes */
exit(0);
}
Quick RL7 Buttons
Many developers always use CLUT buttons. This is not necessarily the best choice. RL-7 buttons are also an option, take less disk space and consequently load much faster. (Tip from David Ward, Philips NSO Northern Europe).
PIMC Mailserver
CD-i information by email
Bob Deblier & Hein Zegers
Philips Interactive Media Centre
Would you like to get the source codes of Interactive Engineer in electronic form? Do you want to browse through information about CD-i development? Do you want to download sample programs? Just get in touch with Òmailserv@pimc.beÓ, and youÕll get what you want.
To serve you in the best possible way, PIMC is already using some of the enormous possibilities of electronic communication. The newly installed PIMC mailserver is a first step in this evolution.
The PIMC mailserver allows you to browse through a PIMC directory especially aimed at registered CD-i developers. This directory contains tools, sample programs, clarifying texts, and any other item that might be useful to you. If you have contributions or suggestions, please do not hesitate to contact us at the addresses mentioned below.
At the moment, the communication runs through regular email. So it does not matter whether you use CompuServe or Internet, any connection through email will suffice. You just send a command to Òmailserv@pimc.beÓ, and the mailserver will respond to your command by email. (If you are using CompuServe, just mail to the address: "INTERNET:mailserv@pimc.be").
Just start by sending an Email to this address, with the command "help" in the body of your text. The mailserver will send a help-file to you. For your information, you find an sample mailserver communication sequence on the following pages.
If, for instance, you need the source code on p. 2-3 of this very issue of Interactive Engineer, just send the following mail:
from: myself@company.xx
subject: none
to: mailserv@pimc.be
cd ie
get ie95_5.txt
and you'll receive the ASCII text of the issue you are reading right now, including the source codes.
Please do not hesitate to contact hein@pimc.be or bob@pimc.be in case of problems or access denial.
The mailserver program was written by Bob Deblier.
from: myself@company.xx
subject: none
to: mailserv@pimc.be
help
From: mailserv@pimc.be
Subject: MAILSERV: HELP
Apparently-To: myself@company.xx
Welcome to the PIMC Support mailserv program.
The function of this program is to allow you to browse in our library of public files without having to use FTP or similar means.
You can issue commands in the body of an e-mail message.
Since the system is implemented on a UNIX server, most commands will have the feel of UNIX shell commands.
The commands are not case sensitive, but parameters and file names are. Be sure to keep this in mind.
The commands that are recognized are:
HELP : produces this message
CD : changes directory to the requested path
LS [ -abcCdfFgilLmnopqrRstux ] : execute an ls command in the current directory. For DOS users, 'ls -l' is similar to DIR. Use 'ls -lR' to get a recursive subdirectory list.
GET [ ] : transmits a file to you
You must keep in mind that electronic mail is intended to transmit only text files. So we've provided an optional parameter called mode which enables you to convert binary files in such a way that they can be transmitted through e-mail. Unless you know for sure that the file you want to get is an ASCII file, use one of the parameters.
is either UU, UUCOMP or UUGZ
UU : uuencode the file before transmission
UUCOMP : compress the file, then uuencode and transmit it
UUGZ: GNUzip the file, then uuencode and transmit it
Most e-mail systems have a message size limit of less than 64Kbytes so the system will split your files in chunks smaller than this limit.
If you have contributions, send them to mailserv-contrib@pimc.be
If you have questions left, send them to owner-mailserv@pimc.be
Good luck on behalf of the PIMC Support crew.
from: myself@company.xx
subject: none
to: mailserv@pimc.be
ls
From: mailserv@pimc.be
Subject: LS (Part 1 of 1)
Apparently-To: myself@company.xx
------- cut here -------
DIR [/]; LS
gnu
ie
interactive_engineer
pimc
sources
tools
------- cut here -------
from: myself@company.xx
subject: none
to: mailserv@pimc.be
cd ie
ls
From: mailserv@pimc.be
Subject: LS (Part 1 of 1)
Apparently-To: myself@company.xx
------- cut here -------
DIR [/ie]; LS
ie95_1.txt
ie95_2.txt
ie95_3.txt
ie95_4.txt
------- cut here -------
from: myself@company.xx
subject: none
to: mailserv@pimc.be
cd ie
get ie95_4.txt
Now you get an email with the ascii text of Interactive Engineer nr. 4 .
How to connect to Email
There are still CD-i Developers who do not have an email address. However, electronic communication is very useful.
COMPUSERVE
CompuServe is one of the several electronic networks. It entails a lively forum about CD-i (Multimedia Forum, section 17: "CD-i"). CompuServe is also one of the easiest ways to communicate with the Support department at Philips Interactive Media Centre.
To connect to CompuServe you just need a modem and a Mac or PC. Simply order subscription software at one of the phone numbers below:
US: +1 614 457 0802/ 800 848 8199 (toll-free)
UK: +44 272 760680/ 0800289378 (toll-free)
Germany: +49 89 66550 111/ 01303732 (toll-free)
Switzerland: 155 3179 (toll-free)
Israel: +972 3 290466
INTERNET
Internet is growing more and more popular. It is especially widespread among academic people and computer scientists. The number of Internet providers is growing rapidly. Your local yellow pages can give you the best information about Internet providers.
An internet address typically has the form of "name@company.ctry". A CompuServe address typically looks like "12345,6789".
¥ PIMC SUPPORT EMAIL
from Internet:
support@pimc.be
from CompuServe:
INTERNET:support@pimc.be
¥ MAILSERVER
from Internet:
mailserv@pimc.be
from CompuServe:
INTERNET:mailserv@pimc.be
¥ PIMC SUPPORT PHONE:
+32 11 242546
¥ PIMC SUPPORT FAX:
+32 11 242273
¥ PIMC SUPPORT MAILING ADDRESS:
Philips Interactive Media Centre
Support
Maastrichterstraat 63
3500 Hasselt
Belgium
Asset
The CD-i Newsletter
The world of CD-i developers has a new valuable source of information. ÒAssetÓ is a newsletter from PIMC for the whole CD-i community.
Asset will inform you about: ÒwhatÕs new, whatÕs hot and whatÕs to come. (...) You will find all basic information from PIMC in one basic piece of paper: a list of
authoring tools and training courses, news about all the things that are affecting the CD-i platform and everything else we think is important to let you knowÓ
Asset gives the information from PIMC that everyone in the world of CD-i should know. Asset gives indispensable basic information for every CD-i developer.
How to get ÒAssetÓ
If you donÕt receive Asset, please contact your local distributor or one of the following persons:
Erik Beerten, tel. +32 11 241201, fax. +32 11 242168, email sales@pimc.be
Marcel Debets, tel. +31 40 736786, fax. +3140733512,Êemail: debetsm@nlevnims.snads.philips.nl
Hein Zegers, tel. +32 11 242546, fax. +32 11 242168, email: hein@pimc.be
Interactive Engineer
Interactive Engineer, the magazine you are reading right now, is more specialized. It is especially aimed at engineers that are really sitting in front of the screen of the development setup. Interactive Engineer wonÕt be afraid to give source code, although psychologists have proven that you lose more than half of your readers even when your text contains only one program line or formula. It is this technicality, however, that makes Interactive Engineer invaluable to the multimedia engineer.
CD-i Training Courses
PIMC organizes special courses for CD-i developers. The CD-i Training Courses are meant for managers, designers, producers, programmers and other people who are interested in CD-i production. Courses are generally held in Hasselt, Belgium. For prices in your country please contact your local Philips representative. For registration and more information please contact:
PIMC Training
Ann Holsteyns
Maastrichterstraat 63
3500 Hasselt - Belgium
tel.: +32 11 242546
fax: +32 11 242273
Email: ann@pimc.be
CD-i Design Principles
The workshop (3 days) handles dessign issues of Multimedia applications from storyboard to asset gathering, providing the insight necessary to successfully produce a CD-i title. Experienced Senior Designers will help participants to produce a CD-i title at the end of the workshop.
Media Mogul
CD-i Development with MediaMogul (4 days course) handles with hands-on instruction the process of authoring a MediaMogul application.
Balboa
CD-i Programming with Balboa (4 days workshop) is meant for experienced programmers and offers the basics of development with Balboa Libraries.
Digital Video Principles
Digital Video Principles (1day course) gives a general overview of the Digital Video production process and of the MPEG1 encoding process.
Digital Video hands-on Delta Vx
Digital Video hands-on Delta Vx (1 day workshop) presents and compares the systems SUN/Androx and Optimage/Delta V series, specifying the advantages and limits of both systems.
Something to tell to the CD-i community?
Did you develop a nice authoring tool and would you like to show it to the developers community? Did you discover some new technique? Or did you make a nice-looking title that you would like to present to other developers?
Anything like this can be included in Interactive Engineer. No problems if you donÕt like writing a text about it: If you just give us the topic and/or some information material, we can write it for you and, after your correction, put the article in Interactive Engineer mentioning your name and the name of your company.
If you want your text, material or announcement put into Interactive Engineer, please note that the deadline is 14 days before printing, so the next deadline is October 15th.
You can send any contributions and ideas to Hein Zegers, PIMC, tel. +32 11 242546, fax. +32 11 242168, Email hein@pimc.be.
CD-i Training Courses Planning
Sept. 12 - 15 1995 (C03)
CD-i Programming With Balboa
Sept. 19 1995 (C04)
Digital Video Principles
Sept 20 1995 (C05)
Digital Video Hands-On Delta Vx
Sept. 26 - 29 1995 (C02)
CD-i Programming With MediaMogul
Oct. 10 - 13 1995 (C03)
CD-i Programming With Balboa
Oct. 17 1995 (C04)
Digital Video Principles
Oct. 18 1995 (C05)
Digital Video Hands-On Delta Vx
Oct. 24 - 27 1995 (C02)
CD-i Programming With MediaMogul
Nov. 08 - 10 1995 (C01)
CD-i Design Principles
Nov. 14 - 17 1995 (C03)
CD-i Programming With Balboa
Nov. 21 1995 (C04)
Digital Video Principles
Nov. 22 1995 (C05)
Digital Video Hands-On Delta Vx
Nov. 28 - Dec. 01 1995 (C02)
CD-i Programming With MediaMogul
Dec. 12 - 15 1995 (C03)
CD-i Programming With Balboa
Dec. 19 1995 (C04)
Digital Video Principles
Dec. 20 1995 (C05)
Digital Video Hands-On Delta Vx
New Media Mogul 2.2
Improvements, Do's and Don'ts
Richard van de Laarschot & Hein Zegers
Philips Interactive Media Centre
The new version of Media Mogul (version 2.2 ) is now available. The first titles are being produced with it. This is a short account of the first experiences with using this new version.
Digital Video: really useful features
Most of the really useful improvements of the new Media Mogul are Digital Video features. Generally speaking, DV with Media Mogul 2.2 has more possibilities and is also easier to work with.
You can now easily use commands such as curtain, cut and wipe in combination with DV. The functions wait until the first MPEG image is encoded before getting started, so you won't have any unwanted black screens any more.
You can implement commands such as stop, fast forward and fast backwards without problems.
You can start or stop the DV stream, at any given entrypoint or time code. So you don't have to take notice of the given I-frames or any other constraints.
You can use the loop function. If for instance you state loop=3, the DV sequence will loop three times. When loop=0, the sequence will loop endlessly. This is very useful for attrack loops in retail shop or kiosk applications.
"Never switch to Media Mogul 2.2 in the middle of a project"
Media Mogul 2.2. is compliant to the FPD, the Final Production Delivery document of Philips. This document states several guidelines about how you should submit a title to Philips for distribution. As an example, all executables now start with "cdi_", as required by the FPD. Memo 2.2. also automatically aligns all sectors on the disc with padding bits. This makes the application run more smoothly. With the previous versions, you had to do this with a separate executable sector_align.
The change in filename conventions has a very important consequence: never switch to Media Mogul 2.2 in the middle of a project. Since Media Mogul 2.2 uses other filename conventions, these filenames are incompatible with Media Mogul 2.1. and below.
The Interactive Engineer
| Editor | Hein Zegers |
|
| Contributors | Bob Deblier |
| Marc De Krock |
| Ann Holsteyns |
| Richard Van De Laarschot |
| Marcek Verhoeven |
| David Ward |
The Interactive Engineer
is a publication of Philips Interactive Media. Its purpose is to provide up-to-date information on CD-i technology to all supported developers and PIM software engineers
11050 Santa Monica Boulevard
Los Angeles, CA 90025
Copyright © 1995 Philips Interactive Media, Inc.
All rights reserved.
Not to be reproduced without the express written permission of
Philips Interactive Media.