Jump to content
IGNORED

Need starter help with intyBasic


dalves
 Share

Recommended Posts

That is great. Thanks so much for that. The more I look at code examples the more I realize I have LOTS to learn.

 

I know that we've been taking a lot for granted. Especially when it comes to IntyBASIC program structure. However, I expect many of these questions to be answered once we start the tutorial series.

 

For the moment, just take a look at the examples and see how they work. Feel free to ask questions about anything you do not understand or find confusing. Remember, there are no stupid questions, only stupid people asking them. Oh wait! :lol:

 

Just kidding! Make sure to ask any question at all. :)

 

-dZ.

Link to comment
Share on other sites

I do have one follow up question. I'm using NotePad for entering code. There are some code examples that I can only open in WordPad. If I either copy and paste the code into NotePad or put the code that only opens in WordPad directly in my projects folder and then use INTYBUILD, I'll get a bunch of erros and the compiling fails. Just tried that with the code you sent and the same thing happened. Am I missing something?

Edited by dalves
Link to comment
Share on other sites

I'll try Notepad ++. When I was trying this out the one .bas that I had this trouble with was a version of "Apple Catcher" that was not the one in the Contributions folder. Maybe there is some translation to NotePad that file doesn't like.

 

I don't think there's a translation in NotePad, since it's a pretty stupid program. If the error is when you compile then perhaps IntyBASIC for windows does not properly read lines if they are separated by UNIX line terminators.

 

If this is the case, you'll have to "fix" the program by opening it in WordPad (or NotePad++) and resaving it, making sure it is saved as a "PC" (DOS) text file (not RTF!).

 

-dZ.

Link to comment
Share on other sites

If you want to convert end of line formats you can use edit.com (its an old DOS editor). It should be in your \windows\system32 folder. If its there, just load the file into it and then save it out. It'll convert the line endings for you. If you want it on your sedktop so you can drag files onto it, follow the instructions here :-

 

http://www.techrepublic.com/blog/windows-and-office/configure-windows-xps-ms-dos-editor/

Link to comment
Share on other sites

If you want to convert end of line formats you can use edit.com (its an old DOS editor). It should be in your \windows\system32 folder. If its there, just load the file into it and then save it out. It'll convert the line endings for you. If you want it on your sedktop so you can drag files onto it, follow the instructions here :-

 

http://www.techrepublic.com/blog/windows-and-office/configure-windows-xps-ms-dos-editor/

 

I will also make sure to fix the line terminators in the Windows and Mac versions. I had already noticed a few issues myself, but I will make sure that all source files use the appropriate terminator for the platform.

 

-dZ.

Link to comment
Share on other sites

  • 4 weeks later...
Hey, dalves, I'm a little late to the party, but might have something to head you off into the right direction. This is a hello world program which I got somewhere else from this site, and have tweaked around in my spare time, hope this helps. I had the same questions as you, but dug through this website abit which gave me some clues.


main:

cls

wait

PRINT AT 84 COLOR 6,"HELLO SYDNEY"

PRINT AT 106 COLOR 5,"HELLO SUN"

PRINT AT 124 COLOR 4,"HIT THE SURF"

PRINT AT 144 COLOR 1,"AND STAY COOL"

PRINT AT 0 COLOR 1, "\69"

for c=1 TO 79

PRINT COLOR 1, c

next c

end:

goto end





  • Like 2
Link to comment
Share on other sites

 

Alright, see attached.

 

attachicon.giftitle-classic.bas

 

Notice that there are four "placeholder variables" in that file that you will need to replace with the proper values. In the new SDK, these are injected automatically by the INTYNEW tool when creating the new project.

 

These placeholder variables are:

  • %%TITLE_LENGTH%%
  • %%AUTHOR_LENGTH%%
  • %%TITLE_NAME%%
  • %%AUTHOR_NAME%%

Just look for them in the source code and replace them with your own values. (The "LENGTH" variables are the actual lengths of their corresponding strings. This is because the previous version of IntyBASIC did not support the "LEN" function.)

 

The output looks like this:

attachicon.gifshot0000.gif

 

Let me know if you have any questions.

 

I've decided to give IntyBASIC a try, but I've not attempted any programming in 25+ years...

 

I tried the title-classic.bas file that was attached, but was getting these errors:

Error: not a constant expression in CONST in line 16

Error: not a constant expression in CONST in line 20

Error: not a constant expression in CONST in line 24

Error: not a constant expression in CONST in line 30

Error: not a constant expression in MODE in line 76

and then a whole slew of errors there after...

 

So I created a new project and looked in it and found INCLUDE "constants.bas" as the first real command line, and this was missing in the title-classic.bas file.

 

After adding this the IntyBuild was successful and I was able to run the project successfully.

 

When the project ran, the window was very large and was too large (too tall) for my laptop display. My display resolution is 1920x1080. Is there a way to reduce the overall size of the window when I run a project? I think if the window size was reduced by 10% or so, then the window should fit.

Link to comment
Share on other sites

 

I've decided to give IntyBASIC a try, but I've not attempted any programming in 25+ years...

 

I tried the title-classic.bas file that was attached, but was getting these errors:

Error: not a constant expression in CONST in line 16

Error: not a constant expression in CONST in line 20

Error: not a constant expression in CONST in line 24

Error: not a constant expression in CONST in line 30

Error: not a constant expression in MODE in line 76

and then a whole slew of errors there after...

 

So I created a new project and looked in it and found INCLUDE "constants.bas" as the first real command line, and this was missing in the title-classic.bas file.

 

After adding this the IntyBuild was successful and I was able to run the project successfully.

 

When the project ran, the window was very large and was too large (too tall) for my laptop display. My display resolution is 1920x1080. Is there a way to reduce the overall size of the window when I run a project? I think if the window size was reduced by 10% or so, then the window should fit.

 

 

Sorry about that. In the actual demo, the "constants.bas" file is included in the main source as well. I should have mentioned this, my apologies.

 

As for the window size, the emulator window should be opening in 1024x768 mode, so it should still fit within your viewport. (It will be rather large, though).

 

Unfortunately, this size is set in the IntyBASIC SDK tools, but the next version should allow it to be changed. Also, unfortunately, the sizes are not arbitrary; the emulator supports only the following:

  • 0: 320x200, 8bpp
  • 1: 640x480, 8bpp
  • 2: 320x240, 16bpp
  • 3: 1024x768, 8bpp
  • 4: 1680x1050, 8bpp
  • 5: 800x400, 16bpp
  • 6: 1600x1200, 32bpp
  • 7: 3280x1200, 32bpp

 

To change the resolution at which it opens, look for the file "INTYEXEC.BAT" in the "bin" folder within the SDK installation.

C:\...\Documents\IntyBASIC SDK\bin\INTYEXEC.BAT
 

NOTE: Don't double-click it, open it instead in a text editor like Notepad.

 

 

 

In the file, look for line #51; it looks like this:

REM ========================================
REM Execute Emulator
REM ========================================
:EXEC
	REM Stay in the current working directory
	"%EMUL%" -e miniexec.bin -g minigrom.bin --displaysize=3 %2 %3 %4 %5 %6 %7 %8 %9 -v1 "%FFULL%"
	IF ERRORLEVEL 1 GOTO ERROR-EXEC
	GOTO END

Then, change the number assigned to the "--displaysize" parameter. I recommend for your laptop to use #2:

"%EMUL%" -e miniexec.bin -g minigrom.bin --displaysize=2 %2 %3 %4 %5 %6 %7 %8 %9 -v1 "%FFULL%"

And finally, save the file and you're ready to rock-n-roll. In the next version of the SDK, it'll support the ability to configure the value.

 

Once again, I apologize for the inconvenience and I hope that it doesn't detract you too much from your actual game making experience. :)

 

Cheers!

-dZ.

Link to comment
Share on other sites

Or you could just omit "--displaysize=xx" and it'll open in a small window. Click on the window and hit F9 and it'll go to full screen.

 

Nah, thanks. I'll keep it there, but let the user override it. I think #3 (1024x768) is perfectly acceptable for most cases to play with.

Link to comment
Share on other sites

Thanks guys. I tried displaysize = 2 and the window was fairly small. Then I did as GroovyBee suggested and removed it completely, but the full screen is a bit undesirable at this stage and something causes the display to change to garbage.

 

So I tried displaysize = 1 and for now it is good enough to move forward. It is larger than 2 and smaller than 3. I'd like it a bit larger, but there doesn't seem to be anything between 1 and 3

 

If your curious I can post some screenshots later today.

Link to comment
Share on other sites

Thanks guys. I tried displaysize = 2 and the window was fairly small. Then I did as GroovyBee suggested and removed it completely, but the full screen is a bit undesirable at this stage and something causes the display to change to garbage.

 

So I tried displaysize = 1 and for now it is good enough to move forward. It is larger than 2 and smaller than 3. I'd like it a bit larger, but there doesn't seem to be anything between 1 and 3

 

If your curious I can post some screenshots later today.

Sorry, I actually meant to say #1(640x480), not #2 (320x240) which is obviously smaller. I'm glad you figured out a way to make it work for you.

 

-dZ.

Link to comment
Share on other sites

 

the emulator supports only the following:

  • 0: 320x200, 8bpp
  • 1: 640x480, 8bpp
  • 2: 320x240, 16bpp
  • 3: 1024x768, 8bpp
  • 4: 1680x1050, 8bpp
  • 5: 800x400, 16bpp
  • 6: 1600x1200, 32bpp
  • 7: 3280x1200, 32bpp

 

I've probably asked this before, but... do those higher color depths actually do anything on a system with a 16 color palette? Or is that just a side-effect of the display modes?

Link to comment
Share on other sites

 

I've probably asked this before, but... do those higher color depths actually do anything on a system with a 16 color palette? Or is that just a side-effect of the display modes?

 

I think it's just a side-effect of the display mode. There is no difference in how they look.

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

  • Recently Browsing   0 members

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