RedBeard Posted November 26, 2011 Share Posted November 26, 2011 (edited) Hey, all. I've decided to try again to program a VCS game. I wanted to use Assembly, but I decided that maybe I could use bB for a couple of small projects until I feel more comfortable. Maybe I could even do a complete (but small) project in this four day weekend... So, I set up Visual Batari Basic as best I could using some of the tutorials around to guide me. (I don't remember exactly which... Fred Quimby, Random Terrain, KIsrael...) Then I found a video which walks through VBB and followed along with it. I even downloaded the code from his website, to be sure that I hadn't mistyped anything. ("OK, RedBeard, you're rambling...") Long Story Short: the code appears to compile properly, but will not run in the emulator. When compiled, VBB says, Compilation completed at 11/25/2011 4:49:58 PM view output file:///C:/AtariVCS/bB/Projects/GAME1/bin If I hit the RUN button and choose Stella, I get nothing. If I choose z26, it (z26) appears to launch a default binary with vertical blue lines, a series of rising tones and ends with "Starpath @ 5253"... but not the binary that I just created. (I have double-checked the paths in the prefs tab, too.) If I navigate to it from Stella, I get "Not a valid ROM file" and it refueses to load. I would even be willing to use VBB as a first step, then take the .asm file it would create and manually run it through DASM. Would that work? Honestly, I just want to make a couple of small projects, it shouldn't be too difficult... any help is appreciated. :wq! UPDATE: I just used the Create New Project Wizard and compiled it. It created a 0kb file. Shouldn't that be 4k no matter what is inside there? When I went to Stella and tried to launch it, I got: "Error creating console (check ROM file)" Edited November 26, 2011 by RedBeard Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted November 26, 2011 Share Posted November 26, 2011 It will help others identify/fix your problem(s) enormously if you include your code as an attachment and capture any errors during the build process. Quote Link to comment Share on other sites More sharing options...
RedBeard Posted November 26, 2011 Author Share Posted November 26, 2011 Sure, sorry about that. As I said, no errors at compile time, output as follows C:\AtariVCS\bB\Projects\GAME3>dasm "GAME3.bas".asm -f3 -o"GAME3.bas".bin DASM V2.20.10, Macro Assembler (C)1988-2004 Compilation completed at 11/25/2011 6:01:34 PM view output file:///C:/AtariVCS/bB/Projects/GAME3/bin I will try downloading some more known/working code to test, but meanwhile-- The code (all generated by the New Project Wizard) is here: rem ************************************************************************** rem generated 11/25/2011 5:59:15 PM by Visualdb Project Wizard Version 1.0.0.3 rem ************************************************************************** set tv ntsc set romsize 4k playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..............................X X...XXXXX.XXX.XXXXX.X....XXXX..X X.....X....X....X...X....X.....X X.....X....X....X...X....X.....X X.....X....X....X...X....XXX...X X.....X....X....X...X....X.....X X.....X....X....X...X....X.....X X.....X...XXX...X...XXXX.XXXX..X X..............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end title COLUBK = $D0 COLUPF = $1C drawscreen if joy0fire || joy1fire then goto skiptitle goto title skiptitle playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X.............................X X.............................X X.............................X X.............................X X.............................X X.............................X X.............................X X.............................X X.............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end COLUBK = $D0 missile0height = 4 : missile0y = 255 NUSIZ0 = $00 score = 10000 : scorecolor = $08 m = 0 main COLUP1 = $80 COLUP0 = $40 COLUPF = $1C if f=00 then f=0 if g=00 then g=0 checkfire if missile0y>240 then goto skip missile0y = missile0y - 2 : goto draw skip if joy0fire then missile0y=player0y-2:missile0x=player0x+4 draw drawscreen if collision(missile0,player1) then score=score+1:player1x=rand/2:player1y=0:missile0y=255 if collision(player0,player1) then score=score-1 if m = 1 && collision(player0,playfield) then player0y = player0y + 1 : goto skipmove if m = 2 && collision(player0,playfield) then player0x = player0x + 1 : goto skipmove if m = 3 && collision(player0,playfield) then player0y = player0y - 1 : goto skipmove if m = 4 && collision(player0,playfield) then player0x = player0x - 1: goto skipmove if joy0up && !collision(player0,playfield) then player0y = player0y - 1 : m = 1 : goto skipmove if joy0left && !collision(player0,playfield) then player0x = player0x - 1 : REFP0 = 8 : m = 2 : goto skipmove if joy0down && !collision(player0,playfield) then player0y = player0y + 1 : m = 3 : goto skipmove if joy0right && !collision(player0,playfield) then player0x = player0x + 1 : m = 4 : REFP0 = 0 : goto skipmove skipmove goto main Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted November 26, 2011 Share Posted November 26, 2011 (edited) rem ************************************************************************** Indent this first line like the rest of the rem lines and it should compile and run (did for me anyway). Edited November 26, 2011 by SeaGtGruff 1 Quote Link to comment Share on other sites More sharing options...
RedBeard Posted November 26, 2011 Author Share Posted November 26, 2011 Howdy, SeaGtGruff. Long time, no chat. Well, I checked the indentation of the REM lines, deleted them altogether. Still No Go. I even downloaded the code for L.E.M. and 50 Foot Celery which we know work, but I still end up with a "Error creating console (check ROM file)". Makes me wonder if local setting are OK. As I said: I think that my paths are set correctly. It appears to find DASM and SED and STELLA and Z26 just fine. I'm running WinXP, so I needed to check the .NET Framework. It said my version was newer, so did not install over top, maybe that is something? Does it make any sense to go back to an older version of bB? I don't NEED all the bells and whistles of Visual bB, I suppose. So isn't there an older version (without the word "Visual", IIRC) that might be worth checking out? :wq! Quote Link to comment Share on other sites More sharing options...
jwierer Posted November 26, 2011 Share Posted November 26, 2011 Try replacing the default bB.bat file with this one. -Jeff Quote Link to comment Share on other sites More sharing options...
+Philsan Posted November 26, 2011 Share Posted November 26, 2011 L.E.M. is not a good program for testing purpose, because you need other files to compile it (score_graphics.asm for custom hi-score font - other files for titlescreen). Quote Link to comment Share on other sites More sharing options...
RedBeard Posted November 26, 2011 Author Share Posted November 26, 2011 Try replacing the default bB.bat file with this one. -Jeff It looks like you meant "2600bas.bat" file...I have tried it and now the compiler gives me this Compile started at 11/26/2011 8:58:27 AM Compiling C:\AtariVCS\bB\Projects\GAME3\GAME3.bas and then just sits there. What it the "ALT Batch File" for? Should I put something in there? Oh, and thanks Philsan. I'll remember that. But it seems to give up no matter what code I put in. Also: the binary that it produces (when working) should be 4k, right? If I see another 0k file, I know it's bad, correct? :wq! Quote Link to comment Share on other sites More sharing options...
jwierer Posted November 26, 2011 Share Posted November 26, 2011 What is happening to you is that bB is not creating a valid ASM file so DASM never creates the binary. I would try compiling from the commandline first to see what the problem is with your bB installation. -Jeff Quote Link to comment Share on other sites More sharing options...
RevEng Posted November 27, 2011 Share Posted November 27, 2011 ...I don't NEED all the bells and whistles of Visual bB, I suppose. So isn't there an older version (without the word "Visual", IIRC) that might be worth checking out? :wq! You do know that you need the regular bB in addition to Visual bB, right? ZZ Quote Link to comment Share on other sites More sharing options...
RedBeard Posted November 27, 2011 Author Share Posted November 27, 2011 OK. Update. I decided to start over, sort of... I went to the bB web site and downloaded the files over again, making sure everything is in my bB folder. I then set up Crimson Editor as the tutorial explains. I figured that I could use Visual bB, with the sprite editor, etc. to make up the source, then copy/paste into Crimson for final compilation. I used the zombie.bas test file as instructed but it errors out as follows: ---------- Capture Output ---------- > "C:\AtariVCS\bB\2600bas.bat" C:\AtariVCS\bB\zombie_chase.bas bB environment variable not set. Compilation failed. > Terminated with exit code 0. I am down to three more things to try: FIRST) If you will tell me how to compile it with the command line, I will give that a try. B) I will try that "other" 2600bas.bat file again. 3) I could trash the folder and start over from scratch as there isn't really anything I cannot replace. Thanks, all, I really do appreciate your help. :wq! Quote Link to comment Share on other sites More sharing options...
RedBeard Posted November 27, 2011 Author Share Posted November 27, 2011 ... You do know that you need the regular bB in addition to Visual bB, right? ZZ Yes. I went to bataribasic.com and double-checked that I have ALL of those files in my folder. I also checked that I have ALL of the VbB files in there. I am really considering deleting the folder and starting over, but it seems like such a waste... :wq! Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted November 27, 2011 Share Posted November 27, 2011 I even downloaded the code for L.E.M. and 50 Foot Celery which we know work, but I still end up with a "Error creating console (check ROM file)". Kind of a little late now, but the 50 Foot Celery code wouldn't compile on your computer unless you either tried the version without the title screen or had the title screen kernel files installed on your computer, which I doubt you do since you're having trouble. Anyway, I had trouble doing the same thing you are, and if I had to get another computer, I would be asking for help just like you are! I am just wondering, have you read the READ-ME file for bB yet? Would that help? Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted November 27, 2011 Share Posted November 27, 2011 ---------- Capture Output ---------- > "C:\AtariVCS\bB\2600bas.bat" C:\AtariVCS\bB\zombie_chase.bas bB environment variable not set. Compilation failed. > Terminated with exit code 0. That means you haven't set the bB environment variable yet. There are (at least) two ways you can do this-- (1) set it in your Windows environment variables so it will be there at all times; or (2) set it inside the 2600bas.bat file so it will be available for the batch file each time but will (probably) be removed after the batch completes. I find the second method to be useful if you've got more than one version of bB installed, since the compile batch for each version can set the bB variable the way it needs. To set it in Windows, go to your system properties (right-click on My Computer and select Properties, or go to the Control Panel and select System), then click on the Advanced tab and click the Environment Variables button. You then have a choice of adding it to either the User Variables or System Variables. Adding it to the User Variables will make it available for your user login but not for any other user logins. Adding it to the System Variables will make it available for all users on the computer. I'll assume you're adding it to the System Variables. First click Add (in the bottom half of the window) and add an entry for bB. The value should be whatever your bB installation directory is, including the drive letter and full path to the directory. Then click OK to save the new bB variable. Next, scroll until you see the Path variable and double-click it. Be sure to go to the end of the existing entry (the entire entry will be selected automatically) rather than wiping it out, type a semicolon, then add %bB% after the semicoln. Click OK, OK, and OK to save and close each window. To add it directly into the batch file, right-click on the 2600bas.bat file and select Edit, then add the following two lines at the beginning (or edit them as needed if they're already there): set bB=whatever set Path=%Path%;%bB% where "whatever" is the full directory path to your bB installation. Then save and close the 2600bas.bat file and try to compile again to see if it works now. Quote Link to comment Share on other sites More sharing options...
RedBeard Posted November 27, 2011 Author Share Posted November 27, 2011 I believe that the one I tried was an early version, like 2 or 3. I did not realize that so many things like title screens wouldn't be within the source code itself. But anyhow, I will be more careful. Rereading the READ-ME file did help, however, thanks. (Funny thing, Notepad came up with some garbage characters, but Crimson editor they came out fine...crazy.) So now I am testing zombie_chase.bas, which is the official, known-to-work test file from bB. I got the command line command from the READ-ME file and now I get different errors. I typed in "2600bas zombie_chase.bas" and I got this error (at least it is telling me that it errored-out. That's better than before when it was telling me everything was fine...) - <87>: Error: Unknown keyword: player1color Compilation failed So, I have decided to rename my C:AtariVCS folder to C:Atari_OLD and start over. First, grab the bB version 1.0 from the bB website. Then grab the Visual bB from the post here at Atari Age. I have already checked that my .NET framework is up to date, so I'm just afraid that one of my files is missing or corrupt. Then again, I never underestimate Operator Error! :wq! Quote Link to comment Share on other sites More sharing options...
jwierer Posted November 27, 2011 Share Posted November 27, 2011 VisualbB can also make sure the path and environment variable is added automatically. Just make sure those checkboxes are checked in the setting tab. If you don't do that then bB won't find all the library files (hence the unknown keyword error), won't create a valid assembly and DASM will create a 0 byte file. If you go throug the bB readme, it covers these necessary steps. -Jeff Quote Link to comment Share on other sites More sharing options...
RedBeard Posted November 27, 2011 Author Share Posted November 27, 2011 You all rule! ISSUE SOLVED! Basically, I started over. A fresh download of bB into a brand new C:\AtariVCS\bB folder, used the above steps to put it into the Windows System Variables, fresh download/unzip of Visual bB into the same (new) folder... I have since successfully compiled from the Command Line, Crimson Editor and Visual bB! OK. So now I must do the actual work of making a game...setup/goof-off time is over. I think I can still do it within this four day weekend, too - nothing fancy, just a little project to prove that I can... :wq! Quote Link to comment Share on other sites More sharing options...
RedBeard Posted November 27, 2011 Author Share Posted November 27, 2011 (edited) Post Scriptum: I used the Game Wizard to begin my game and kept working on it last night. I need to put some more work into it today, though I had church earlier and a couple other things later this evening. If it turns out to be any good, I'll share it here. Otherwise, at least, I know that I did, indeed, create an Atari game this weekend! Many thanks to y'all here at Atari Age. A pair of screenshots, just for fun... :wq! Edited November 27, 2011 by RedBeard 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.