+atari2600land Posted July 27, 2006 Share Posted July 27, 2006 I have a question about something. I compiled this program in Batari BASIC in 0.35 and it was fine. However, when I compiled it in the next higher one up, I get this warning: What is scorepointerset? And what is all that other stuff? BTW, the program I'm trying to compile is the .bas file in the Pac-Man thread, so you can try it for yourselves. Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/ Share on other sites More sharing options...
SeaGtGruff Posted July 27, 2006 Share Posted July 27, 2006 I have a question about something. I compiled this program in Batari BASIC in 0.35 and it was fine. However, when I compiled it in the next higher one up, I get this warning: What is scorepointerset? And what is all that other stuff? BTW, the program I'm trying to compile is the .bas file in the Pac-Man thread, so you can try it for yourselves. Here's what I did to find the problem... When you try to compile the *.bas source code, bB creates a *.bas.asm file. Open that file in your editor program (2600IDE or whatever you're using), and search for something in one of the error messages. In this case, it says "Illegal Addressing mode 'lda ='.", so search for "lda =" somewhere in the code. When (or if) you find it, look backward through the code from that point to see if you can figure out what bB was trying to do. In this case, you'll see the following: .114; 114 if joy0down then y = y + 1 REFP0 = 0 lda #$20 bit SWCHA BNE .skip114 ; complex statement detected LDA y PHA LDA #1 PHA LDA REFP0 PHA LDA = CLC ADC #0 STA y .skip114 First bB shows the original bB program statement, then it shows the 6502 assembly code that it generated when compiling that statement. So the problem is in line 114. Looking closer at that line, you'll notice that there's a colon missing between "y = y + 1" and "REFP0 = 0", so try adding the colon where it needs to be, then recompile. It will compile correctly. By the way, I think you should keep Pacman facing left if he was just moving left. bB uses the two players for the score display, and sets the reflect mode off for that, so if you create a variable for remembering which way Pacman is facing, you can set the reflect mode in the loop based on that variable, and change the variable as needed whenever the joystick is pushed left or right. Also, you can greatly simplify your code by adding a variable to keep track of the state of Pacman's mouth-- wide open, a little bit open, or closed-- and then go to subroutines which set the player0 graphics based on the mouth variable. And instead of falling through to another loop when t hits a certain value, you can just reset t to 0, increment the mouth variable, and go back to the top of the loop, so that there's only one loop. After making those changes, the code might look like this: dim facing=f dim mouth=m 10 x=20 : y=81 : facing=0 : mouth=0 11 t=0 12 t=t+1 : COLUBK=128 : COLUP0=26 13 player0x=x : player0y=y 20 if mouth=0 then gosub 1000 43 if mouth=1 then gosub 2000 83 if mouth=2 then gosub 3000 103 if mouth=3 then gosub 2000 REFP0=facing 30 drawscreen 31 if joy0left then x=x-1 : facing=8 if x<20 then x=20 32 if joy0right then x=x+1 : facing=0 if x>130 then x=130 33 if joy0up then y=y-1 if y<30 then y=30 34 if joy0down then y=y+1 if y>81 then y=81 35 if t>5 then t=0 : mouth=mouth+1 if mouth=4 then mouth=0 36 goto 12 1000 player0: %0011100 %0111110 %1110000 %1110000 %1110000 %0111110 %0011100 end return 2000 player0: %0011100 %0111110 %1111111 %1110000 %1111111 %0111110 %0011100 end return 3000 player0: %0011100 %0111110 %1111111 %1111111 %1111111 %0111110 %0011100 end return If you compare the bytes free for both versions, you'll see that the code above takes a lot less ROM than the original code, which leaves you with more ROM space for other things. Michael Rideout Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1108936 Share on other sites More sharing options...
+atari2600land Posted July 27, 2006 Author Share Posted July 27, 2006 (edited) Thanks for the help on the Pac-Man coding. As for compiling it on a later Batari version, it still says (1141) Error: Label mismatch... -->scorepointerset f3d2. Just exactly what is scorepointerset? Do I need to display the score, or do I need to get a new 99 patch file, or do I need to get a newer version of 2600IDE? In 0.35 it compiles it just fine. Edited July 27, 2006 by atari2600land Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1108966 Share on other sites More sharing options...
SeaGtGruff Posted July 27, 2006 Share Posted July 27, 2006 Thanks for the help on the Pac-Man coding. As for compiling it on a later Batari version, it still says (1141) Error: Label mismatch... -->scorepointerset f3d2. Even after adding a colon in line 114? It compiled for me. Just exactly what is scorepointerset? Do I need to display the score, or do I need to get a new 99 patch file, or do I need to get a newer version of 2600IDE? In 0.35 it compiles it just fine. Well, I *am* using the 0.99 patch, but I don't *think* that's the problem. I got the same error with the code you posted in the Pacman thread, but it went away (along with the "lda =" error) when I added the colon in line 114. scorepointerset is a subroutine that sets the zero-page RAM variables for the score. Basically, each position or number place in the score can be any of the ten digits, 0 through 9, so bB looks at the score and figures out which digit needs to be displayed in each of the six positions, then it sets the pointer for that position to point to the address where the graphics for that digit are stored. Just a thought, but... (1) Did you install 0.99 on top of 0.35, or did you install it in a separate folder? Sometimes, if you install a newer version of something on top of an older version, you get files that were left behind from the older version (that aren't used in the newer version), or you might have problems if the older version of a file can't be overwritten by the newer version (due to read/write permissions, etc.), or things like that. So it would be better to install 0.35 in one directory, and install 0.99 in a different directory-- or, if you don't want to do that, delete all the 0.35 files from the directory before you install 0.99 in that same directory. (2) Did you modify any of the includes files, such as with versions related to your timer question? (Remember how I posted some customized versions of a few include files, and/or showed you what changes to make in them?) If you did, then you should probably replace those custom includes files with the original ones, because something in them might be causing a problem. (3) Did you make any changes to the default.inc file (again, related to your timer question)? If so, you might need to change it back to the original version. Michael Rideout Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1108983 Share on other sites More sharing options...
+atari2600land Posted July 27, 2006 Author Share Posted July 27, 2006 I re unzipped 0.99 in a seperate folder and copied 2600IDE into it and a few .bas files for it to compile. When I tried to compile it, the computer basically went crazy, giving me part of a screen that says "or external command" and then had a warning with no words and a button that said OK. Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1108987 Share on other sites More sharing options...
SeaGtGruff Posted July 27, 2006 Share Posted July 27, 2006 I re unzipped 0.99 in a seperate folder and copied 2600IDE into it and a few .bas files for it to compile. When I tried to compile it, the computer basically went crazy, giving me part of a screen that says "or external command" and then had a warning with no words and a button that said OK. That might be something to do with 2600IDE-- or rather, the batch file that's used with it. If 2600IDE can't find its batch file, it will create a new batch file, and it could be that the new batch file isn't able to locate something it's looking for. Try copying the 2600baside.bat file from your other bB setup into your new bB 0.99 setup, and see if that does anything different. Michael Rideout Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1108995 Share on other sites More sharing options...
+atari2600land Posted July 27, 2006 Author Share Posted July 27, 2006 I tried that, and I got a thing saying it needed default.inc, so I put that in there and got this: Is this what the original default.inc says? ---------------- ; ; Inclues go below - order is crucial, since this is also the order in which ; they will appear in the generated assembly file ; ; header file 2600basicheader.asm ; standard kernel: two players, two missiles, a ball and an asymmetric playfield. std_kernel.asm ; standard startup routine. startup.asm ; below are collections of subroutines and functions ; if you have any more to add, put them immediately below this line. pf_drawing.asm pf_scrolling.asm std_routines.asm ; The overscan routine goes below. it sets up sprites for the std_kernel. ; if you have any routines that will not run until the overscan period, ; put them immediately below this line. std_overscan.asm ; below is the generated batari Basic file bB.asm ; below is the footer, which contains the score digits and startup vectors. ; If you want to create your own custom score digits, you may hack the file below, ; but first you should rename it to something else. 2600basicfooter.asm ------------- (I added the lines to this post only.) I don't remember whether we changed it or not. Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1109007 Share on other sites More sharing options...
SeaGtGruff Posted July 27, 2006 Share Posted July 27, 2006 I tried that, and I got a thing saying it needed default.inc, so I put that in there and got this: Okay, it definitely isn't finding things. First, the default batches that come with bB seem to have some spacing issues that certain versions of Windows doesn't like-- things like the spacing around the "<" or ">" or "|" characters in the statements. I know I had to add spaces in some places to make the batch work. Second, the batch file may need to be modified to change the "current" directory, or to look in a different directory for certain commands or files. In particular, it looks like you might need to copy DASM.exe into the directory where you reinstalled bB 0.99, if it isn't already there. As for the "concatenate" error, edit the 2600baside.bat file and put a space on either side of each "<" or ">" or "|" if there's any spaces missing. Then try again. Michael Rideout Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1109018 Share on other sites More sharing options...
SeaGtGruff Posted July 27, 2006 Share Posted July 27, 2006 As for the "concatenate" error, edit the 2600baside.bat file and put a space on either side of each "<" or ">" or "|" if there's any spaces missing. Then try again. I'm sorry, the information about adding any missing spaces is correct, but I forgot that bB 0.35 used a concatenate program, which bB 0.99 doesn't use. Also, 2600IDE uses the 2600baside.bat file that's in the starting directory, so it's possible for there to be two different 2600baside.bat files, only one of which is actually being used by 2600IDE. If you're trying to use 2600IDE with bB 0.99, but it's giving you an error about concatenate not being found, then 2600IDE is looking at a 2600baside.bat file for bB 0.35, rather than the one for bB 0.99. How are you starting 2600IDE? Are you using a shortcut, or are you running it by opening up the new bB 0.99 directory and double-clicking on 2600IDE there? Michael Rideout Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1109029 Share on other sites More sharing options...
+atari2600land Posted July 27, 2006 Author Share Posted July 27, 2006 How are you starting 2600IDE? Are you using a shortcut, or are you running it by opening up the new bB 0.99 directory and double-clicking on 2600IDE there? I copied 2600IDE from the folder where I kept 0.35 version and pasted it into the 0.99 folder, and click on the 2600IDE icon. Now that you mentioned that, it's probably using the 0.35 as the starting thing instead of the 0.99 which it's supposed to be using. If I download a new copy of 2600IDE, could I somehow set it to use 0.99 and still have my 0.35 file with a different version of 2600IDE that uses 0.35 and concatenate and keep it in my 0.35 folder? Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1109033 Share on other sites More sharing options...
SeaGtGruff Posted July 27, 2006 Share Posted July 27, 2006 I copied 2600IDE from the folder where I kept 0.35 version and pasted it into the 0.99 folder, and click on the 2600IDE icon. Now that you mentioned that, it's probably using the 0.35 as the starting thing instead of the 0.99 which it's supposed to be using. If I download a new copy of 2600IDE, could I somehow set it to use 0.99 and still have my 0.35 file with a different version of 2600IDE that uses 0.35 and concatenate and keep it in my 0.35 folder? If you copied and pasted 2600ide.exe from one directory/folder into the other, that should be OK. But if you copied the *shortcut* rather than the actual .exe file, then it probably won't work. If there's a shortcut icon for 2600IDE in the new 0.99 directory, delete it. Make sure you copy (not drag) the 2600ide.exe file that's in the original 0.35 directory, and paste it into the new 0.99 directory. Delete the 2600baside.bat file from the new 0.99 directory. Copy the 2600bas.bat file from the new 0.99 directory, then paste it into the new 0.99 directory (i.e., into the same directory from which you copied it). If you do it correctly, it should paste as "copy of 2600bas.bat". Right-click on "copy of 2600bas.bat" and rename it to "2600baside.bat" (it is essentially the same file as 2600bas.bat, but it has a different name). Right-click on the newly-renamed "2600baside.bat" file and say you want to edit it. If you did that correctly, it should open the batch file in Notepad. Look at all the "<" ">" "|" symbols in the batch file, and make sure there is a space on each side of them. Close and save the batch file. Double-click the 2600IDE icon to restart 2600IDE, load your pacman program, make sure the colon is in line 114 as mentioned previously, and try recompiling it. Michael Rideout Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1109041 Share on other sites More sharing options...
+atari2600land Posted July 27, 2006 Author Share Posted July 27, 2006 There is no 2600bas.bat file. It just occured to me that this folder says bB99b_patch. Would that make a difference, is there a bB99a or something? Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1109052 Share on other sites More sharing options...
SeaGtGruff Posted July 27, 2006 Share Posted July 27, 2006 There is no 2600bas.bat file. It just occured to me that this folder says bB99b_patch. Would that make a difference, is there a bB99a or something? You need to install bB 0.99a and/or 0.99b in that folder first, then install/unzip 0.99c (the patch), because I think the patch only has the files that changed, rather than the entire 0.99 installation. Michael Rideout Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1109054 Share on other sites More sharing options...
+atari2600land Posted July 27, 2006 Author Share Posted July 27, 2006 I downloaded version 99b and everything is fine. Haven't tried bankswitching yet, but I suppose it would work. Quote Link to comment https://forums.atariage.com/topic/91193-weird-warning/#findComment-1109098 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.