Jump to content
IGNORED

Setting up a dev environment for P-Machinery


DZ-Jay

Recommended Posts

Valter,

 

I thought I'd post this guide on how to properly set up a development environment for jzIntv and P-Machinery. I know you had some trouble doing this before, but hopefully this will help others in the future. You may want to take a look also in case it can help you organize your environment a bit.

 

First, I'll assume you are using Mac OS X. Doing this in Windows requires slight modifications, but I can include those in another post.

 

So now, on with the show...

 

 

Part I: Setting up jzIntv

 

 

Step 1: Get development tools

 

Download the latest jzIntv from the web. There is no real installation of the jzIntv tools, so just copy the downloaded archive to the location where you want to install it. I would suggest in your "home" directory, since it is convenient, and it is backed up, and it is retain across OS upgrades.

 

After you find an appropriate location for it, just extract the archive. That's it! jzIntv is installed.

 

You may want to rename the folder to something simple like "jzintv" instead of the default "jzintv-1.0-beta-macosx," just for your convenience in finding it later.

 

You'll end up with something like this:

 

post-27318-0-38440700-1328275331_thumb.png

 

 

Step 2: Set-up environment

 

Now we need to set-up the environment. Open up the Terminal application. We will use a text editor from the command line to modify your local profile to include some global variables useful to jzIntv. A simple to use text editor is nano, which comes with Mac OS X. First, from the Terminal prompt, type the following (note that "$>" represents the prompt):

$> cd ~

 

That will take you to your HOME directory, where all your user profile information resides. Then to edit your profile, you type the following:

$> nano .bash_profile

 

The nano editor will open the file in question. Just use the cursor keys to navigate to the bottom of the file and add the following lines:

export INTV_SDK_PATH="$HOME/jzintv"
export JZINTV_ROM_PATH=$INTV_SDK_PATH/rom
export AS1600_PATH=$INTV_SDK_PATH/library:$INTV_SDK_PATH/macro:$INTV_SDK_PATH/task
export PATH=$PATH:$INTV_SDK_PATH/bin

 

Notice that the path defined for INTV_SDK_PATH should point to the location where you installed jzIntv. I am assuming you used your HOME folder. All other directory paths rely on this one. (Note that multiple paths are separated by colons ":")

 

When all is done, save the file by hitting the CTRL+O keys (WriteOut), followed by the CTRL+X (Exit) keys. You should be back at the prompt.

 

Since the .bash_profile file is loaded when a shell is started, the variables will be ready the next time you open a new Terminal window. For now, you can just close the Terminal window and open it again.

 

To test your environment, from a newly opened Terminal window, type the following:

$> jzintv

 

It should show the copyright and basic information of the emulator, and its command-line usage.

 

To test that the assembler works, type the following:

$> as1600

 

You should get an error stating "as1600: no input file". This is normal, but it lets us know that the assembler was executed.

 

post-27318-0-82102000-1328277516_thumb.png

 

 

3. What did we just do?

 

What we did was install the jzIntv and SDK-1600 into your HOME directory, and set up some global environment variables that allow the emulator/debugger jzIntv and the assembler as1600 to find the SDK library files. From now on, including an SDK library into your game is as simple as adding the INCLUDE directive to your source, without having to qualify where the files reside. For instance:

INCLUDE "gimini.asm"
INCLUDE "print.asm"
INCLUDE "rand.asm"

 

The assembler will find those files in the paths specified in the $AS1600_PATH variable.

 

Likewise, we specified the directory where jzIntv should look for its standard ROMs, like the EXEC or GROM. If you have your own copy of these ROMs you should put them in the "rom" folder within the "jzintv" installation folder.

 

And lastly, we added the emulator, the assembler, and all the binary tools included in the SDK to your computer's executable path. This allows you to just invoke them from the Terminal app without qualifying their specific location. In the future, assembling a program should be as simple as just invoking the assembler with the name of the source file:

$> cd /path/to/my/game
$> as1600 game.asm

 

That's it for now. Next post will show how to set up P-Machinery to work within this environment.

 

-dZ.

 

 

Updated: Link to jzIntv points to latest build.

Edited by DZ-Jay
  • Like 1
Link to comment
Share on other sites

Download the latest jzIntv from the web.

What is the link for the Windows people?

 

I'd strongly recommend getting a more recent build of jzIntv. The most recent build which includes the development tools is here:

And the most recently release set of source examples, etc. are here: http://spatula-city....14-examples.zip

 

The most recent builds of jzIntv have better debugging features (such as the ability to do "source level" debugging through smap files), and the most recent version of the library files have been placed into the public domain where possible. (Notable exception is the SP0256-AL2 data, which I have a license to redistribute, but is still owned by Microchip.)

Link to comment
Share on other sites

Download the latest jzIntv from the web.

 

What is the link for the Windows people?

 

The Windows distro can be found here. The official jzIntv page contains all distributions.

 

-dZ.

 

Yeah, it's time for me to get off my fat arse and push a new release, isn't it? See my comment above with the latest work-in-progress build.

 

The current version in the repository is slightly broken. (I broke the dirty rectangle update stuff.) I need to get that all sorted, and then maybe I'll make an actual 1.0 release that doesn't have "beta" in the name. :-)

Edited by intvnut
Link to comment
Share on other sites

Download the latest jzIntv from the web.

 

What is the link for the Windows people?

 

The Windows distro can be found here. The official jzIntv page contains all distributions.

 

-dZ.

 

Yeah, it's time for me to get off my fat arse and push a new release, isn't it? See my comment above with the latest work-in-progress build.

 

The current version in the repository is slightly broken. (I broke the dirty rectangle update stuff.) I need to get that all sorted, and then maybe I'll make an actual 1.0 release that doesn't have "beta" in the name. :-)

 

Good thing you posted those links! Since I only use the bleeding edge stuff you send me directly, I wasn't aware that the repo was not up to date.

 

Thanks!

 

-dZ.

Link to comment
Share on other sites

Download the latest jzIntv from the web.

What is the link for the Windows people?

 

I'd strongly recommend getting a more recent build of jzIntv. The most recent build which includes the development tools is here:

And the most recently release set of source examples, etc. are here: http://spatula-city....14-examples.zip

 

The most recent builds of jzIntv have better debugging features (such as the ability to do "source level" debugging through smap files), and the most recent version of the library files have been placed into the public domain where possible. (Notable exception is the SP0256-AL2 data, which I have a license to redistribute, but is still owned by Microchip.)

 

OK, I updated the link in the original post.

 

-dZ.

Link to comment
Share on other sites

Here are the necessary instructions to set it up in Windows XP.

 

First, lets assume you downloaded and "installed" jzintv in your "My Documents" folder, so that the path to the jzIntv installation is,

 C:\Documents and Settings\USER\My Documents\jzintv

 

 

Substitute "USER" with your actual Windows username. If you used a different folder, just substitute it below.

 

1. Right-Click "My Computer" and choose "Properties".

 

2. Go to the "Advanced" tab and click the "Environment Variables" button at the bottom. You should see two sections. At the top, "User variables for USER"; and at the bottom, "System Variables". We're going to work on the "System Variables" section only.

 

3. Look for an existing variable called "Path" in the list. Double-Click this entry and a pop-up will appear:

Variable name:  Path
Variable value: [whatever]

 

4. We are going to append a path to the end of the "Variable value" field. Move the cursor to the end of the field by hitting the "End" key and type the following:

;C:\Documents and Settings\USER\My Documents\jzintv\bin

 

Notice that I started with a ";" symbol. This symbol separates multiple paths, and we are adding a new one to the list. Also, substitute the path with whatever location you installed your jzIntv distribution. Make sure it points to the "bin" sub-directory.

 

Click "OK" when done.

 

5. Now we'll add 2 more variables used by the emulator and assembler. For each one, just click the "New" button and enter the following:

Variable name:  JZINTV_ROM_PATH
Variable value: C:\Documents and Settings\USER\My Documents\jzintv\rom

 

Variable name:  AS1600_PATH
Variable value: C:\Documents and Settings\USER\My Documents\library;C:\Documents and Settings\USER\My Documents\jzintv\macro;C:\Documents and Settings\USER\My Documents\jzintv\task

 

(Remember to replace "C:\Documents and Settings\USER\My Documents\jzintv" with the actual path to your installation.)

 

Click "OK" all the way down when done.

 

There, your environment should be set up. The next time you open a Command Console, you should be able to use the tools without qualifying their location.

 

6. Click "Start", then "Run", and type "CMD" and hit "OK". This will open a Command Console. To test the jzIntv tools, type in the command prompt the following:

C:\> jzintv

 

and

C:\> as1600

 

You should see the appropriate output as described in the AA post.

 

That's it.

 

-dZ.

Link to comment
Share on other sites

Download the latest jzIntv from the web.

 

What is the link for the Windows people?

 

The Windows distro can be found here. The official jzIntv page contains all distributions.

 

-dZ.

 

Yeah, it's time for me to get off my fat arse and push a new release, isn't it? See my comment above with the latest work-in-progress build.

 

The current version in the repository is slightly broken. (I broke the dirty rectangle update stuff.) I need to get that all sorted, and then maybe I'll make an actual 1.0 release that doesn't have "beta" in the name. :-)

 

Hum... I just realized that the version of the SDK that I've been carrying along for about 4 or 5 years now is different than the latest one you posted in the "examples" link. I don't recall if it was because we extended some libraries during the development of Pac-Man and Christmas Carol and the changes never made it to the latest distribution, or if the distribution itself has changed.

 

If anybody is having trouble following the steps I provided, please post here and I'll try to clear up as best as possible. Sorry for the confusion.

 

-dZ.

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...

As I have an aversion to permanent alterations of my environment, I decided to make a batch file that sets up my development environment. This can easily be adapted to other shells, I'm sure. This is for a Windows .bat file:

@ECHO OFF
@title Intellivision Development Environment
ECHO.
ECHO ===================== jzIntv Development Environment Setup =====================
ECHO Setting up jzIntv Development Environment...
ECHO.
set INTV_SDK_PATH=%CD%
ECHO   INTV_SDK_PATH=%INTV_SDK_PATH%
ECHO.
set JZINTV_ROM_PATH=%INTV_SDK_PATH%\rom
ECHO   JZINTV_ROM_PATH = %JZINTV_ROM_PATH%
ECHO.
set AS1600_PATH=%INTV_SDK_PATH%\library;%INTV_SDK_PATH%\macro;%INTV_SDK_PATH%\task
ECHO   AS1600_PATH now contains:
ECHO     %INTV_SDK_PATH%\library
ECHO     %INTV_SDK_PATH%\macro
ECHO     %INTV_SDK_PATH%\task
ECHO.
set PATH=%PATH%;%INTV_SDK_PATH%\bin
ECHO   System PATH includes jzIntv binaries in:
ECHO     %INTV_SDK_PATH%\bin
ECHO.
ECHO Finished!
ECHO.

It will set the title bar of your command prompt to 'Intellivision Development Environment' and displays the values of the environment variables it sets (aside from PATH).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...