The IENJINIA Devkit is the developer kit you use to write video games for the IENJINIA Virtual Console.
Where can I download the IENJINIA Devkit?
You can download it here.
How do I install the IENJINIA Devkit?
First you must unzip the file you downloaded (this is done automatically on Mac OS X when the download finishes). On Windows you can use a program like WinZip. On Linux you can use the unzip command in a shell window.
The IENJINIA Devkit is a Java program so you also need to have Java installed in your machine. You must have Java version 1.4.2.
On most modern Windows computers Java is already preinstalled. If it isn't you can download it here.
On Mac OS X you always have Java. If you don't have the correct version (1.4.2) click on the apple at the left of your menu bar and select Software Update... to install the latest version.
On Linux you can download Java from here.
How do I run the IENJINIA Devkit?
The program for the IENJINIA Devkit is in a file named devkit.jar. In Windows and Mac OS X just double click on it, to run the IENJINIA Devkit (you might want to drag the file to your desktop to make it easier to find later on).
On Linux, type this command in a shell window:
java -jar devkit.jar
The IAVC is the Integrated Audio and Video Controller. It is the, simulated, audio and video hardware for the IENJINIA Virtual Console.
Its main features are:
Where can I find a complete description of the IAVC?
You can find a quick reference for the IAVC here.
What are the different parts of the IENJINIA Devkit window for?
On the upper left side you have the output of the IAVC video signal. This is were you can see the image generated by the video hardware.
On lower left side you have an area for typing interactive commands. You can use it to interact directly with the IAVC, or to debug your program by displaying the current value of global variables.
On the right side you have the editor to write your programs.
Where does the IENJINIA Devkit place my project files?
All your project files are placed in a directory named your-project-name.proj (replacing your-project-name with the name of your project). All projects are in the IENJINIA Devkit projects directory.
On a Windows machine that folder should be C:\Documents and Settings\username\ienjinia\projects (replacing username with your Windows user name (login name)).
On Mac OS X that folder should be /Users/username/ienjinia/projects (replacing username with your Mac OS X user name (login name)).
On Linux that folder should be $HOME/ienjinia/projects (where $HOME is the path to you home directory).
It resets the IAVC and starts your game by executing the program in the main.ipl file in your project directory.
What does the Package button do?
It packages all the files in your project directory into a .cart file ready to be used in the IENJINIA Virtual Console. This file will have the same name as your project with a .cart extension, and it will be placed in the games directory.
If you have a runtime error in your vbi() method this button will be enabled. Clicking on it will display a window with a description of the error.
If you have a runtime error in your sfi() method this button will be enabled. Clicking on it will display a window with a description of the error.
It interrupts the execution of your program when it was run by clicking on the Play or Execute buttons.
To stop a program executed from the interactive command area you must use Ctrl-C.
What does the Execute button do?
It executes the current contents of the editor area. You don't need to save it to a file before clicking on Execute.
What are the special keystrokes I can use in the IENJINIA Devkit's editor area?
Ctrl-Z: UndoCtrl-S: SaveCtrl-E: ExecuteTAB: Shift right current line one tab stopShift-TAB: Shift left current line one tab stopCtrl-G: Goto line #Ctrl-F: FindShift-Ctrl-F: Find againCtrl-R: Global find and replaceWhat programming language is used to write games for the IENJINIA Virtual Console?
Games are writen in IPL programming language. You can find everything about IPL here.
Isn't an interpreted language too slow to write a video game?
The IENJINIA Virtual Console is designed to emulate 20 year old hardware, at that time processors had clock speeds of one or two megahertz. Modern machines are over a thousand times faster!
If you need extra speed you can write some of the time-critical methods in Java and compile them with the Java compiler. Just place the compiled .class files in your project directory and you will be able to access them from your IPL program.
At runtime the Java environment will load your .class and translate them into machine language.
Note: You must not place your Java classes in a named package. Just use the default package.
Yes. You can then use the source("filename") method to read into the IPL interpreter the contents of the file you want to include.
How can I write a value to an address of the IAVC?
You must use the poke(address, value) method. For example if you type in the interactive command area:
poke(0, 65);And then press the
enter key, you will store a 65 at address 0 in the IAVC. This will display an "A" in upper left corner of the IAVC video output.
How can I read a value from a an address of the IAVC?
You must use the peek(address) method. For example if you type in the interactive command area:
print(peek(0));And then press the
enter key, you will see the value stored at address 0 of the IAVC (by default it should be 32, the ASCII value for a space).
What is the fastest way to copy data from an array of numbers into the IAVC?
Use the arrayPoke(address, array, offset length) method.
Where:
address is the starting address in the IAVC where you want to store the numbersarray is the array that contains the numbers you want to copyoffset is the offset in your array of the first number you want to copylength is how many numbers you want to copyFor example by typing in the interactive command area:
data = new array[1536];
for (var i = 0; i < 1536; i++)
data[i] = 0;
arrayPoke(0, data, 0, 1536);
You will fill the IAVC screen RAM with zeroes (fill the image with hearts).
If I write something to address 32 nothing appears on screen. Why does that happen?
Each screen row is 32 characters wide, and each row starts at an address that is 64 bytes after the start of the previous row. This means that for each 64 bytes int the IAVC screen RAM you can only see on screen the first 32 bytes.
To display a character in a certain row and column you can write a method like this one:
displayChar(row, col, ch) {
poke(row * 64 + col, ch);
}
I have the data for my game in a file. How can I read it?
Place your data file in your project directory, then use the readFile("filename") method to read it. This method returns the content of the file as an array of numbers (one for each byte in the file).
What is the refresh rate for the video output of the IAVC?
The screen is redrawn 25 times per second.
The IAVC generates a Vertical Blank Interrupt (VBI) when it finishes drawing a frame on the screen. You can have your code executed at that time by placing it in a method named vbi().
If you type this in the interactive command area:
n = 0;
vbi() {
poke(0, n++);
}
You will see a character changing 25 times per second.
No. The IAVC simulation does its best to redraw the screen 25 times per second and it manages to do it well enough for a video game animation, but it is not accurate enough for audio.
The sound generator hardware (simulation) synthetizes audio in Sound Frames, at a rate of 25 sound frames per second. After each sound frame it generates a Sound Frame Interrupt (SFI). You can have your code executed at that time by placing it in a method named sfi().