Jump to content
jwierer

Visual bB 1.0 - a new IDE for batari Basic

Recommended Posts

Hi This Is A question I'm sure anyone Atari can answer! I'm making a game for somebodies birthday and I was on it when I get a syntax error on the end of the line of code when I mess around it moves a little but if anybody could please help thanks! ps. the birthdays in 3 weeks...

Share this post


Link to post
Share on other sites

Hi This Is A question I'm sure anyone Atari can answer! I'm making a game for somebodies birthday and I was on it when I get a syntax error on the end of the line of code when I mess around it moves a little but if anybody could please help thanks! ps. the birthdays in 3 weeks...

 

You might want to create your own thread and attach your code.

Share this post


Link to post
Share on other sites

Thanks to you I got the best idea since Space Invaders! In this very question: "What if Bomberman... Was on Atari?" Wish me luck!

  • Like 1

Share this post


Link to post
Share on other sites

I installed Visual Batari basic (using the version in the first post in this thread) and I'm having a little problem. Every time I start the application, it thinks I'm starting it for the first time and makes me enter paths. It is also not saving my project folders.

 

Once I enter all of the correct paths and open my project file, my game will compile and run correctly, so it doesn't seem to be the version of bB that I'm using. It just seems like Visual bB is not saving my settings.

 

I'm using Windows 8 64-bit. Has anyone else had this problem, and how did you solve it?

 

Thanks!

Share this post


Link to post
Share on other sites

I installed Visual Batari basic (using the version in the first post in this thread) and I'm having a little problem. Every time I start the application, it thinks I'm starting it for the first time and makes me enter paths. It is also not saving my project folders.

 

Once I enter all of the correct paths and open my project file, my game will compile and run correctly, so it doesn't seem to be the version of bB that I'm using. It just seems like Visual bB is not saving my settings.

 

I'm using Windows 8 64-bit. Has anyone else had this problem, and how did you solve it?

 

Thanks!

 

I ran it for the first time on my new Windows 8 PC the other day and I did not click on the variable thing or the path thing. I did everything but that. I double clicked on install_win.bat instead. Everything has been working fine since then.

 

When I used VbB on a Vista computer, I had to make sure I was running it as the administrator. Maybe you're having a similar problem.

Share this post


Link to post
Share on other sites

got some issues since I had to switch to W7 64Bits.

I have to reconfigure the path for Stella and 2600basic.exe each time I open VisualBb. I've changed the propriety of Visualbb so that it should always open as admin but still doesn't work.

Once I do that, a strange message pop-up telling me that there is an issue in the script of this page

post-26627-0-78167900-1434717488_thumb.jpg

I click Yes and continue.

 

I try to compile samples included . Draw.bas and sample.bas work fine but not zombiechase.

I got this message:

--- Unresolved Symbol List
pfcenter 0000 ???? (R )
mul8 0000 ???? (R )
kernelmacrodef 0000 ???? (R )
pfhalfwidth 0000 ???? (R )

Did I messed up something?

 

post-26627-0-78167900-1434717488_thumb.jpg

Share this post


Link to post
Share on other sites

this line creates problem under VisualBB 554 or 566 under win7 64 bits:

2600 Basic compilation failed!
LINE --> if !joy0 && !a{0} && !b{1} then b{1} = 1 : VelX = 0.01

 

Under another old computer running old XP service pack 3, it says there was errors during assembling but the game compile anyway.

Edited by abaudrand

Share this post


Link to post
Share on other sites

this line creates problem under VisualBB 554 or 566 under win7 64 bits:

2600 Basic compilation failed!

LINE --> if !joy0 && !a{0} && !b{1} then b{1} = 1 : VelX = 0.01

 

Under another old computer running old XP service pack 3, it says there was errors during assembling but the game compile anyway.

"joy0" isn't a valid joystick test, if that's what it was meant to be.

Share this post


Link to post
Share on other sites

Hello friends, thanks for the quick reply.

VelX trouble:

I think I've set up it fine as you can see in the attached photo of the listing

post-26627-0-74625600-1434911334_thumb.jpg
Besides, I'm not sure it is the problem here as I got trouble to compile zombiechase who also use the same tricks.
>RT: I've seen that you have updated the page with a lots of examples for the decimal figures. I will study it for the next week.

 

Joy0 trouble: I use the instruction joy0 since the beginning of my project and it is until I had to switch to win7 that it give me a lot of troubles.

 

>RevEng: Guess you're right about it's an illegal check of the joystick. I need idea to think another path to get the same result.

 

 

 

 

I've got two build of visualBb:554 and 566. I've updated batari to 1.1d as I hope to be able to upgrade my game to 64ko or higher...

 

Could I bother you sending my code if I'm still stuck with these 2 issues?

 

post-26627-0-74625600-1434911334_thumb.jpg

Share this post


Link to post
Share on other sites

 

 

Joy0 trouble: I use the instruction joy0 since the beginning of my project and it is until I had to switch to win7 that it give me a lot of troubles.

 

>RevEng: Guess you're right about it's an illegal check of the joystick. I need idea to think another path to get the same result.

 

what is it meant to be (or do)?

Share this post


Link to post
Share on other sites

assuming that's not including the fire switch

 

then (in Stella at least) SWCHA = $FF should do

 

 

edit: maybe RevEng fixed some stuff 'cause it looks like this will work

 

 
 rem  a small demo
 rem  if no joy then black
 rem  else blue
 rem  (joy0)
 
 
 def joy0 = ((SWCHA ^ $F0) & $F0)
 
 COLUPF = $30
 
 var36 = $55
  
 
loop
 
 if !joy0 then COLUBK = $00 else COLUBK = $80
 
 var32 = SWCHA
 
 drawscreen
 
 goto loop 
 

Edited by bogax
  • Like 1

Share this post


Link to post
Share on other sites

Ok Bogax, I get your point. yet I don't understand how you do it with arithmetics...

I understand that SWCHA use 4 bits for each joystick and each bit show an used direction by toggling to 0.

what do you do when you write ((SWCHA ^ $F0) & $F0) ? do you toggle all bits of SWCHA to 0000000 (meaning the joystick is used in all directions) then check if the opposite condition is true (all bit toggled to 1111) ?

(as you can see, I suck at maths)

 

Yet I don't understand it, its beautiful as a poem

Edited by abaudrand

Share this post


Link to post
Share on other sites

The and doesn't seem to be doing anything, the mask for the xor is the same.

SWCHA ^ $F0 = ((SWCHA ^ $F0) & $F0)

Share this post


Link to post
Share on other sites

abaudrand, you basically have the idea. The joystick neutral state is for all bits to be high. The ^ operation flips the state of the top 4 bits. The & operation isolates the top 4 bits (first joystick) and ignores the lower 4 bits. (second joystick)

 

If the first joystick is not pressed, the joy0 test will return 0. (SWCHA=%1111????, after ^$F0=%0000????, after &$F0=%00000000)

If the first joystick is pressed, the joy0 test will return non-0. (e.g. SWCHA=%1011????, after ^$F0=%0100????, after &$F0=%01000000)

Share this post


Link to post
Share on other sites

abaudrand, you basically have the idea. The joystick neutral state is for all bits to be high. The ^ operation flips the state of the top 4 bits. The & operation isolates the top 4 bits (first joystick) and ignores the lower 4 bits. (second joystick)

 

If the first joystick is not pressed, the joy0 test will return 0. (SWCHA=%1111????, after ^$F0=%0000????, after &$F0=%00000000)

If the first joystick is pressed, the joy0 test will return non-0. (e.g. SWCHA=%1011????, after ^$F0=%0100????, after &$F0=%01000000)

RevEng - good explanation! :) You're right, the and makes a difference if it's a two player game. If it's a one player game the second nybble is going to be 0000 by default. This thread caught my interest, I was just working on adding bitwise operators to Virtual World BASIC.

 

Edit: I didn't realise SWCHA has it's bits on by default :)

Edited by Mr SQL

Share this post


Link to post
Share on other sites

I guess I have to rewrite the condition as it seems there are too many items to compare:

I've paste the line

 

def joy0 = ((SWCHA ^ $F0) & $F0)

 

at the beginning of the program but compilation fails:

.L0488 ;  if !joy0  &&  !a{0}  &&  !b{1} then b{1} = 1 : VelX = 0.01

; complex statement detected
    LDA SWCHA
    EOR #$F0
    AND #$F0
    BNE .skipL0488
.condpart64

C:\Users\Jean-du\Desktop\DragonsNightsRepaired>@exit

Post compilation files deleted

 

Share this post


Link to post
Share on other sites

I guess I have to rewrite the condition as it seems there are too many items to compare:

I've paste the line

 

def joy0 = ((SWCHA ^ $F0) & $F0)

 

at the beginning of the program but compilation fails:

.L0488 ;  if !joy0  &&  !a{0}  &&  !b{1} then b{1} = 1 : VelX = 0.01

; complex statement detected
    LDA SWCHA
    EOR #$F0
    AND #$F0
    BNE .skipL0488
.condpart64

C:\Users\Jean-du\Desktop\DragonsNightsRepaired>@exit

Post compilation files deleted

 

Have you tried it without spaces around the equals sign? You might also want to start it with an underscore. Example: def _Joy0=((SWCHA ^ $F0) & $F0)

Share this post


Link to post
Share on other sites

I'll try once back home. I've pasted the line Bogax sent me and his program compiled fine yesterday. I've also removed the VelX to be sure if it was the problem, but its not the issue. I'll try your suggestion and will also try to sperate conditions checking by adding a jump line to break it into pieces.

Share this post


Link to post
Share on other sites

no idea why it doesn't work.

I've tried to break the if ... then line

 def joy0=((SWCHA ^ $F0) & $F0)
   if joy0 then SkipJoy0Test
   if a{0} then SkipJoy0Test
   if b{1} then SkipJoy0Test

   b{1}=1:VelX=0.01

SkipJoy0Test

Compilation output that:

;.joy0. (  ( SWCHA  ^  $F0 )   &  $F0 ) .
.L0487 ;  def joy0 =  (  ( SWCHA  ^  $F0 )   &  $F0 )

.L0488 ;  if joy0 then SkipJoy0Test

; complex statement detected
    LDA SWCHA
    EOR #$F0
    AND #$F0
 if ((* - .SkipJoy0Test) < 127) && ((* - .SkipJoy0Test) > -128)
    BNE .SkipJoy0Test
 else
    beq .1skipSkipJoy0Test
    jmp .SkipJoy0Test
.1skipSkipJoy0Test
 endif
.skipL0488
.condpart64

:(

Share this post


Link to post
Share on other sites

I stopped using def because I kept having all kinds of weird problems. When I said bye-bye to def, programming became more fun.

Have you tried something like this?
_

   if !joy0up && !joy0down && !joy0left && !joy0right &&  !a{0}  &&  !b{1} then b{1} = 1 : VelX = 0.01

Share this post


Link to post
Share on other sites

I think the "def" line must be fine as it is, because it seems to be interpreted correctly in the "complex statement detected" section.

 

If the problem didn't start to occur until switching to a 64-bit OS, I'm thinking the cause might be related to the number of bits in a word-- i.e., 32 bits versus 64 bits. If I remember correctly, word size has created some issues in DASM before-- i.e., 16 bits versus 32 bits-- but I can't recall the specifics of when those issues occurred and what had to be done to either fix or work around them.

 

I've been out of the Atari programming loop for well over a year now-- as it happens, ever since I got a 64-bit Windows 8 computer, retired my old 32-bit Windows XP computer, and ran into issues when I tried to get DASM, batari Basic, Crimson Editor, and Visual batari Basic installed and running smoothly. Consequently, I'm out of touch with the current states of DASM, batari Basic, Crimson Editor, and Visual batari Basic (although I am aware that work on DASM was revived recently). It might be necessary to create 64-bit versions of DASM, batari Basic's various executables, and Visual batari Basic, if any of those things haven't been "converted" yet.

 

In the meantime, splitting the "if ... then" is a good idea, but you might want to split "b{1}=1:VelX=0.01" into two lines as well. Then make sure you're creating an assembly listing when you compile, and when (or if) compilation fails you should open up the assembly listing and look for the specific statement where the assembler threw up an error. Once you're able to identify the specific place where the error occurs, it might be possible to figure out some kind of workaround.

 

EDIT: PS-- I noticed a misaligned "rem" in one of the pictures you posted. I can't tell whether that "rem" line is indented or not, since I don't know whether the other lines are indented by only 1 space or more than 1 space. Furthermore, if indeed that line is not indented, it might not cause a problem anyway, since the "rem" will simply be treated as a line label and the apostrophe after the "rem" will be interpreted as a "rem."

 

On the other hand, I recommend that you scrutinize your code for any such misaligned lines and correct them as need be, because they can (and generally do) cause problems. Even if it turns out that there's only one other line which isn't aligned properly, and it just so happens to be another "rem" statement, the other "rem" might not be followed by an apostrophe, and having two line labels which are the same ("rem" and "rem") might cause problems.

 

I always like to indent program code lines by at least 3 spaces so the difference between the program code lines and the line labels is much more obvious.

 

post-7456-0-79303400-1435252976_thumb.png

 

EDIT #2: Also, it's been my experience that whenever you get "Unresolved Symbol List" errors yet the listed symbols are defined, it's usually some other symbol that was unresolved, hence the need to look carefully at the assembly listing to determine the precise statement that caused the batari Basic compiler and/or the DASM assembler to upchuck. And after finding where the error occurred during assembly, you might need to look at the assembly code generated by the batari Basic compiler, since the compiler may have (and probably did) generate some flaky assembly code from your batari Basic code. That's why you can often find the problem by going straight to the compiler-generated assembly code, but I prefer to look at the assembly listing first-- unless the compile process didn't even get that far.

 

Additionally, I notice that "mul8" is one of the symbols that was listed. If I remember correctly, there were times when I needed to specifically declare the "divmul.asm" (or whatever) include file in my batari Basic programs, even though it wasn't supposed to be necessary to do so (i.e., due to the specific multiplications and divisions I was doing in my program). Determine which include file the "mul8" routine is defined in, then try specifically including that include file at the beginning of your batari Basic program.

 

 


--- Unresolved Symbol List
pfcenter 0000 ???? (R )
mul8 0000 ???? (R )
kernelmacrodef 0000 ???? (R )
pfhalfwidth 0000 ???? (R )

Edited by SeaGtGruff
  • Like 1

Share this post


Link to post
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...