Jump to content
IGNORED

Help the Noob! Intellivision


PCU2

Recommended Posts

I apologize in advance if I do anything wrong here; this is my first post on my first forum account..lol

About a week ago I started revisiting the current homebrew scenes for old consoles, and was pleasantly surprised by the wealth of information and positive atmosphere that exists for the Intellivision!  I revisited my old model 2 and after playing a few games and seeing some of the homebrew videos available on YouTube, I really felt the urge to try and learn coding through Oscar's IntyBasic language.  I planned to purchase both of his books on the subject, but figured I would use GRay Defender's video walk-through of the first two chapters before I committed.  So that leads to the current issues I'm facing:

 

1.) When copying files into the "intybasic" folder, "SDL.dll" and "libwinpthread-1.dll" don't appear in the latest download of JZINTV   (as1600 and jzintv were both present)

-went ahead and tried to continue following the video anyway-

2.) Opened up my notepad (text editor in Linux I'm running) and wrote the hello world program down, but when I try to compile said program (hello.bas hello.asm), I receive the error of "intybasic: command not found".

 

I admittedly lack much of any prior experience with programming.  I took (and passed!) a C++ intro class in college, but felt lost the entire time.  As much as I love the nerd culture, I'm pretty ignorant when it comes to this aspect of it.  I really would like to give this foray into IntyBasic my best shot, though I do wonder how much hand-holding it will take before I build a solid foundation...

Anyway, if anyone with a bit of free time feels like teaching the greenie, I'd greatly appreciate it!

Edited by PCU2
Link to comment
Share on other sites

8 minutes ago, mmarrero said:

I'm a casual Linux user, I think that's an error from the shell/terminal and not IntyBasic. I'd guess it's not in the same directory, or didn't type ./intybasic

You can also try the IntyBasic SDK in a Virtual Machine, I don't know if it installs/runs via Wine.


The Mac version should work on Linux.

  • Like 1
Link to comment
Share on other sites

1 hour ago, PCU2 said:

Many thanks!  I'll check my command typing and give the Mac sdk a download after work today. 


If you set up the environment as described in the setup instructions, the SDK will handle all the command lines for you, even to setup the symbol tables for IntyBASIC source-level debugging.

 

It includes a guide for the SDK tools, but ask any questions you may have.

 

    dZ.

  • Like 1
Link to comment
Share on other sites

@DZ-Jay @mmarrero Alright, so got home and gave it a go; looks like I don't naturally have a way to open .dmg files for mac.  Looked online and ran a command line to mount the image for use, but I'm receiving syntax error...

 

I threw Linux on this tower for lightweight use due to it's age, but I realize compatibility can be an issue.

 

cmdLINEerror4DMG

Link to comment
Share on other sites

1 hour ago, PCU2 said:

@DZ-Jay @mmarrero Alright, so got home and gave it a go; looks like I don't naturally have a way to open .dmg files for mac.  Looked online and ran a command line to mount the image for use, but I'm receiving syntax error...

 

I threw Linux on this tower for lightweight use due to it's age, but I realize compatibility can be an issue.

 

cmdLINEerror4DMG 66.19 kB · 0 downloads

Sorry, I'll send you the package in a ZIP.

 

Sorry, as I look into this I see that the SDK won't work for you.  It includes only the dependencies for Mac (or for Windows in that version), but not the ones for Linux.

 

The SDK itself is a bundle that sets up everything.  I guess if you want to use it in Linux, I could prepare a package for you that includes the compiler, assembler, and SDL libraries specific for Linux.  The instructions would be the same, since the environment in Linux is POSIX, just like the one of Mac.

 

Let me know if you are interested.  Or, if you can get your hands on Windows, the SDK for that platform installs and configures itself with a simple click-and-run installer.

 

    -dZ.

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

1 hour ago, PCU2 said:

@DZ-Jay I really appreciate that you'd go through the trouble; let me see if I can save the work and grab a windows rig by the end of the week.  I'll reply with an update. 

Sure, no worries.

 

Some time ago, we were planning a Linux release.  There was someone that was going to help me test it, but it never came to pass.


It may not be a bad idea to do one.

 

   dZ.

Link to comment
Share on other sites

On 8/20/2022 at 5:14 PM, PCU2 said:

I apologize in advance if I do anything wrong here; this is my first post on my first forum account..lol

About a week ago I started revisiting the current homebrew scenes for old consoles, and was pleasantly surprised by the wealth of information and positive atmosphere that exists for the Intellivision!  I revisited my old model 2 and after playing a few games and seeing some of the homebrew videos available on YouTube, I really felt the urge to try and learn coding through Oscar's IntyBasic language.  I planned to purchase both of his books on the subject, but figured I would use GRay Defender's video walk-through of the first two chapters before I committed.  So that leads to the current issues I'm facing:

 

1.) When copying files into the "intybasic" folder, "SDL.dll" and "libwinpthread-1.dll" don't appear in the latest download of JZINTV   (as1600 and jzintv were both present)

-went ahead and tried to continue following the video anyway-

2.) Opened up my notepad (text editor in Linux I'm running) and wrote the hello world program down, but when I try to compile said program (hello.bas hello.asm), I receive the error of "intybasic: command not found".

 

I admittedly lack much of any prior experience with programming.  I took (and passed!) a C++ intro class in college, but felt lost the entire time.  As much as I love the nerd culture, I'm pretty ignorant when it comes to this aspect of it.  I really would like to give this foray into IntyBasic my best shot, though I do wonder how much hand-holding it will take before I build a solid foundation...

Anyway, if anyone with a bit of free time feels like teaching the greenie, I'd greatly appreciate it!

 

The devil is in the details, of course you are mentioning Linux. Most people uses Windows or Mac OS X.

 

For Linux, I recommend to create a directory to keep your IntyBASIC file, but you could also work from your home directory.

 

Anyways, in this directory you should copy intybasic_linux (this is the right executable for linux), and jzintv, and as1600 from the jzintv linux distribution.

 

And from this directory you should type:

 

    ./intybasic_linux game.bas game.asm

 

This should be enough.

 

Link to comment
Share on other sites

@nanochess Thanks so much for the guidance!  As it stands I went ahead and was able to wipe back to windows 10, and seem to have gotten the SDK from @DZ-Jay running 😁😁 now when I get a moment more to actually play with it (just opened a few of the example games so far) I'll follow GrayDefender's video, write my first program, and get to ordering your book! 🤙

  • Like 1
Link to comment
Share on other sites

3 hours ago, PCU2 said:

@nanochess Thanks so much for the guidance!  As it stands I went ahead and was able to wipe back to windows 10, and seem to have gotten the SDK from @DZ-Jay running 😁😁 now when I get a moment more to actually play with it (just opened a few of the example games so far) I'll follow GrayDefender's video, write my first program, and get to ordering your book! 🤙

 

👍

 

Be sure to check out the "Usage Guide" that comes with the SDK, which shows you how to use the tools that come with it.  The SDK tools should take care of all the command-line stuff, so it's one less thing to worry about when working on your project.

 

Although the book does not mention or refer to the SDK at all, you can still take advantage of the SDK tools when following the example programs in the book.

 

Below is my recommendation when following the book and using the IntyBASIC SDK.  I will use the "Monkey Moon" example from the book in this illustration.

 

To create a new IntyBASIC SDK project:

  • Create a new project for the book example using the "intynew" tool, without a default title screen.  (The "-n" option suppresses the default title screen; the "-f" option sets the full name of the program.  The full name will then be included in the ROM metadata.)
intynew monkey -n -f "Monkey Moon"
  • This will create a new folder with the standard project template source files to get your started.

 

To start writing the program code from the book:

  • Using the Windows File Explorer, find the new project folder.  Your new project should be in the "Projects" folder within the IntyBASIC installation folder.
  • Open the default project source file with your source code or text editor of choice (e.g., Notepad, VisualCode, EditPlus, Sublime, Notepad++, etc.).  The default source file will have the name of your project with the ".bas" extension -- in this example, "monkey.bas".
  • The default source file includes simple common pieces to get you started.
  • Look within the source file for a section containing the comment "<Your code goes here...>" and replace it with the code provided by the book.
	OPTION EXPLICIT

	' Include useful predefined constants
	INCLUDE "constants.bas"

	'
	' <Your code goes here...>
	'

InfiniteLoop:
GOTO InfiniteLoop
  • Alternatively, if you find it simpler, just delete all the lines in the default file and start anew with the code from the book.

 

To build your program:

  • Build your program using the "intybuild" tool.
intybuild monkey
  • This will assemble, compile, and generate all the necessary symbol mapping files for the debugger.

 

To run your program:

  • Run your program using the "intyrun" tool.
intyrun monkey
  • This will run the built project using the jzIntv emulator.

 

Some additional caveats to look out for:

  • The SDK default source file includes the directive "OPTION EXPLICIT".  This is a very useful feature of the IntyBASIC compiler that requires all variables to be declared using "DIM" before using them.  It is generally good practice to do this, because it not only lets you know in a simple way the memory usage of your program, but also because it can help your track typos in variable names that are hard to troubleshoot in a larger program.

    In any case, the book does not use this feature, so be aware that if you leave the "OPTION EXPLICIT" directive in your source file, the code from the book will not compile unless you also declare all variables at the top of your program.

    My recommendation is always to declare variables anyway, but it is up to you.  If you just want to type what's on the book, you may want to just remove the "OPTION EXPLICIT" line from your source file.
     
  • If the book calls for adding additional files, make sure to save them in the same project folder.
     
  • The tools in the SDK to build and run your program rely on the name of your project to do their job.  They will look for a folder with that name within the "Projects" folder, and will then look for a source file with the same name inside.  If you rename either the source file or the project folder, but not both, the tools will not work correctly.

 

Feel free to ask any questions.

 

    -dZ.

 

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

Alright @DZ-Jay, here's what I got trying to run the instructions and following Graydefender's vid:

 

image.thumb.png.5de0c17a8a32b2a6c65f58f4b1fabf13.png

 

Followed by this...

 

image.thumb.png.e01df81215460bc7edde764f2848db0b.png

When I run the program, I get this:

image.thumb.png.919c01ae11974274991e41688134c594.png

If I hit shift and move on, it's just a blank screen with no text appearing.  Feel like I'm missing something simple here...

 

Link to comment
Share on other sites

1 hour ago, PCU2 said:

Alright @DZ-Jay, here's what I got trying to run the instructions and following Graydefender's vid:

 

image.thumb.png.5de0c17a8a32b2a6c65f58f4b1fabf13.png

 

Followed by this...

 

image.thumb.png.e01df81215460bc7edde764f2848db0b.png

When I run the program, I get this:

image.thumb.png.919c01ae11974274991e41688134c594.png

If I hit shift and move on, it's just a blank screen with no text appearing.  Feel like I'm missing something simple here...

 


Read my comment above for reference, but here are a few pointers:

  • The "-n -f" options are for the "intynew" command to create a new project, not for the "intybuild" command to compile.
  • It seems that the order of the options was wrong when you ran the "intynew" command first, and it mistook the "-n" as the author name (LOL!), so the title screen was still included.  Never mind, it just means you get the default title screen.  You must hit any controller key to continue.
  • Check out the documentation of the SDK for guidance on how to use the tools.
  • To remove the title screen, comment the line:
        INCLUDE "title.bas"
  • Your "PRINT" statement is commented.  Remove the apostrophe symbol at the beginning of the line.
  • The "WHILE 1 : WEND" part is not needed, because the "InfiniteLoop" below it takes care of it.  (I mentioned that the SDK handles a few common things for you.)

 

 

  • Like 1
Link to comment
Share on other sites

The tutorials and the book show you how build your program by hand:  how to compile the IntyBASIC source file, how to assemble the resulting assembly file, how to run the built binary using the emulator, etc.  Along the way, they give you the basic command line strings that you must use in order to do any of it.

 

The SDK offers some tools to make those tasks easier.  These tools "hide away" the command line and their options, because to get you started it is not really important to understand what they do nor how they work underneath -- not even the book bothers in teaching you what each argument is or does.

 

Of course, if you want to know the full set of options that the compiler, assembler, and emulator have and you wish to learn their more advanced features (and it is never a bad idea to do so once you are comfortable with the basics), you can always read their individual documentation.

 

The philosophy of the IntyBASIC SDK is this:  Programming is hard.  Making games is even harder still.  So , let us get you up and running as quickly as possible, and let us hide away all the generic boilerplate stuff that gets you there, so that you can focus on the fun part:  writing the code for your own game.

 

If you are following the book and using the SDK, you can skip the whole set up section where it tells you were to find the assembler and the ROMs and all that, and how to write the command lines for each.  You should read them over, so that you are aware of them, but you won't need any of it with the SDK -- you can go straight to the part where you write your first program.

 

You will notice in the book that some examples end with "WHILE 1 : WEND".  This is because a BASIC program typically runs from top to bottom and is done on the last statement.  However, the Intellivision CPU is always running while the console is up, so it needs something to do.  When all your program does is print "HELLO WORLD," you still need something to keep the CPU engaged and busy.

 

The "WHILE 1 : WEND" is an "infinite loop" -- it tells the CPU "loop while '1' is true," which it interprets as "repeat this line while 1 is not equal to zero."  As you can imagine, "1" will never be zero, so the CPU will just loop there indefinitely, not doing anything, forever.  (Well, until you turn off the console or exit the emulator.)

 

The SDK takes this into account, so when you create a brand new project, it automatically includes such an infinite loop.  The idea being that you just write your code above it and you won't have to worry about the CPU running out of stuff to do.  :)

 

     -dZ.

  • Like 1
Link to comment
Share on other sites

@DZ-Jay I can't express in the forum how grateful I am for all the information you've already sent my way on this.  I can see a bit of that "programming is hard, but here's a way in" ideology at play here and know that if I'm going to accomplish any dive into the coding world, this could very well be the surest bet.  I don't plan to give up anytime soon with it, though I'll be working at my own pace (aren't we all?) and am excited at the thought of posting progress as well as questions on this site! 

  • Like 1
Link to comment
Share on other sites

No worries.  Ask all the questions you want.  There are plenty of knowledgeable people here willing to help — including, as you’ve see, the creator of the IntyBASIC language and compiler himself, @nanochess.

 

A lot of us got started precisely because others were kind enough to hold our hands when we needed it, so we do not mind paying it forward.  :) 

 

    dZ.

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...