Jump to content
IGNORED

Strange error


MausGames

Recommended Posts

When I include a vblank routine in my games, I sometimes get the error:

--> vblk2 f674

 

Any idea what this means?

If it doesn't prevent DASM from creating a working BIN, then it isn't an error. Here's an example:

 

   rem * test vblank

  a = 0
  b = $00

loop
  drawscreen
  goto loop

  vblank
  a = a + 1
  if a = 30 then a = 0 : b = b + 1
  COLUBK = b
  return

This simple little program is just a display loop, but it uses a vblank routine to increment the background color. This is the output I get when I compile it with version 1.01 of batari Basic:

 

---------- Capture Output ----------
> "C:\Atari2600\bB\2600bas.bat" "C:\Atari2600\bB\Projects\test_vblank.bas"
batari Basic v1.01 (C)2005-2007
User-defined default.inc found in the current directory
2600 Basic compilation complete.
User-defined 2600basicheader.asm found in current directory
User-defined std_kernel.asm found in current directory
User-defined startup.asm found in current directory
User-defined pf_drawing.asm found in current directory
User-defined pf_scrolling.asm found in current directory
User-defined std_routines.asm found in current directory
User-defined std_overscan.asm found in current directory
User-defined score_graphics.asm found in current directory
User-defined 2600basicfooter.asm found in current directory
DASM V2.20.07, Macro Assembler (C)1988-2003
  bytes of ROM space left
--> vblk2 f468				  
  2793 bytes of ROM space left
  2793 bytes of ROM space left
Complete.

> Terminated with exit code 0.

Notice the line that says "--> vblk2 f468," which is very similar to what you posted (just a different address). Despite the presence of this line in the output, the BIN is successfully created and it runs as expected. Then again, I'm using Crimson Editor rather than Visual bB, and I don't know if Visual bB might interpret that line as some kind of error.

 

Michael

Link to comment
Share on other sites

It does still compile just fine, I was just wondering if this error meant that the main loop and vblank were clashing in some way that would cause issues on real hardware. If it's something to ignore, that's good, but it's still annoying because with vbB it garbles the "ROM space left" section so I can't tell how much space I have left in some of the banks.

Link to comment
Share on other sites

It does still compile just fine, I was just wondering if this error meant that the main loop and vblank were clashing in some way that would cause issues on real hardware. If it's something to ignore, that's good, but it's still annoying because with vbB it garbles the "ROM space left" section so I can't tell how much space I have left in some of the banks.

I did try compiling the code for my little example with Visual bB, but I couldn't figure out how to capture the output. :(

 

Michael

Link to comment
Share on other sites

It does still compile just fine, I was just wondering if this error meant that the main loop and vblank were clashing in some way that would cause issues on real hardware. If it's something to ignore, that's good, but it's still annoying because with vbB it garbles the "ROM space left" section so I can't tell how much space I have left in some of the banks.

I did try compiling the code for my little example with Visual bB, but I couldn't figure out how to capture the output. :(

 

Michael

Right-click copy doesn't work for you?

 

-Jeff

Link to comment
Share on other sites

Doesn't all the info you need appear under the "messages" tab? Or am I misunderstanding what you mean by output?

You say "the 'messages' tab" as if it's something I have on my screen. :) But I don't have any such tab. :(

 

Oh wait. You mean the button at the bottom of the screen. Duh, it's already selected, but I didn't have the bottom pane raised high enough to see any messages. :dunce: Never mind!

 

Thanks fur helpin me git ejykated.

 

Michael

Link to comment
Share on other sites

  • 3 weeks later...

Without vblank:

2600 Basic compilation completed.

DASM V2.20.07, Macro Assembler ©1988-2003

bytes of ROM space left in bank 1

bytes of ROM space left in bank 2

bytes of ROM space left in bank 3

bytes of ROM space left in bank 4

3878 bytes of ROM space left in bank 1

3921 bytes of ROM space left in bank 2

4052 bytes of ROM space left in bank 3

2331 bytes of ROM space left in bank 4

Compilation completed at 2/21/2009 1:49:57 PM

view output file:///C:/Atari2600/bB/bin

Post compilation files deleted

 

With vblank:

2600 Basic compilation completed.

DASM V2.20.07, Macro Assembler ©1988-2003

bytes of ROM space left in bank 1

bytes of ROM space left in bank 2

bytes of ROM space left in bank 3

bytes of ROM space left in bank 4

3878 bytes of ROM space left in bank 1

3921 bytes of ROM space left in bank 2

4052 bytes of ROM space left in bank 3

--> vblk2 f52c

Compilation completed at 2/21/2009 1:49:07 PM

view output file:///C:/Atari2600/bB/bin

Post compilation files deleted

 

You can see why this is bad...

Link to comment
Share on other sites

Without vblank:

2600 Basic compilation completed.

DASM V2.20.07, Macro Assembler ©1988-2003

bytes of ROM space left in bank 1

bytes of ROM space left in bank 2

bytes of ROM space left in bank 3

bytes of ROM space left in bank 4

3878 bytes of ROM space left in bank 1

3921 bytes of ROM space left in bank 2

4052 bytes of ROM space left in bank 3

2331 bytes of ROM space left in bank 4

Compilation completed at 2/21/2009 1:49:57 PM

view output file:///C:/Atari2600/bB/bin

Post compilation files deleted

 

With vblank:

2600 Basic compilation completed.

DASM V2.20.07, Macro Assembler ©1988-2003

bytes of ROM space left in bank 1

bytes of ROM space left in bank 2

bytes of ROM space left in bank 3

bytes of ROM space left in bank 4

3878 bytes of ROM space left in bank 1

3921 bytes of ROM space left in bank 2

4052 bytes of ROM space left in bank 3

--> vblk2 f52c

Compilation completed at 2/21/2009 1:49:07 PM

view output file:///C:/Atari2600/bB/bin

Post compilation files deleted

 

You can see why this is bad...

Fred, if you're reading this, I was looking in the source where it prints the bytes free, and saw this in 2600bas.c:

 

  printf("	   echo \"	\",[(scoretable - *)]d , \"bytes of ROM space left");
 if (bs == 8) printf(" in bank 2");
 if (bs == 16) printf(" in bank 4");
 if (bs == 32) printf(" in bank 8");
 printf("\")\n");
 printf(" \n");
 printf(" \n");
 printf(" \n");

I'm no C programmer, but that first printf after the third if definitely looks bad to me-- there are three quotation marks in it. I'm not looking at the latest, greatest source code, so you may have corrected this already; but I think I've got the latest source you posted.

 

Michael

 

Edit: Actually, I just realized that the first printf has five quotation marks in it. Does C let you use an odd number of quotation marks? In every other language that I'm familiar with, quotation marks must occur in pairs. Anyway, I don't have the latest source, and I don't want to try my hand at tinkering with the source and recompiling it.

Edited by SeaGtGruff
Link to comment
Share on other sites

printf("\")\n");

 

 

I'm no C programmer, but that first printf after the third if definitely looks bad to me-- there are three quotation marks in it. I'm not looking at the latest, greatest source code, so you may have corrected this already; but I think I've got the latest source you posted.

 

Michael

 

Edit: Actually, I just realized that the first printf has five quotation marks in it. Does C let you use an odd number of quotation marks? In every other language that I'm familiar with, quotation marks must occur in pairs. Anyway, I don't have the latest source, and I don't want to try my hand at tinkering with the source and recompiling it.

The second quote has a backslash in front of it so that quote is an escaped quote (one way to actually print out a quote).

So the one print statement above prints a quote, a right parenthesis, and a new line.

Link to comment
Share on other sites

The second quote has a backslash in front of it so that quote is an escaped quote (one way to actually print out a quote).

So the one print statement above prints a quote, a right parenthesis, and a new line.

Thanks, kenfused. I Googled "printf c quotation" after I posted, and saw what it said about /", so I went over the lines again carefully, and I see what they're doing-- cobbling together an echo statement with quotation marks in it. But there *is* an extra character in one of the printf statements-- an extraneous right parenthesis-- although it has no negative effect as far as I know, it just causes an unnecessary ) to appear at the end of the echo statement.

 

Mausgames, I've modified the 2600bas.bat file to "sed out" the vblk2 message, along with a few other messages that came up in my test program after I took out the vblk2 message. Save or rename your existing 2600bas.bat file so you don't lose it (just in case), then unzip this one and try it.

 

Michael

2600bas.zip

Link to comment
Share on other sites

That gets me:

2600 Basic compilation completed.

DASM V2.20.07, Macro Assembler ©1988-2003

bytes of ROM space left in bank 1

bytes of ROM space left in bank 2

bytes of ROM space left in bank 3

bytes of ROM space left in bank 4

1006 bytes of ROM space left in bank 1

3923 bytes of ROM space left in bank 2

4052 bytes of ROM space left in bank 3

Possible duplicate label: L079 f553

2242 bytes of ROM space left in bank 4

1006 bytes of ROM space left in bank 1

3923 bytes of ROM space left in bank 2

4052 bytes of ROM space left in bank 3

2242 bytes of ROM space left in bank 4

Compilation completed at 2/22/2009 6:31:39 PM

view output file:///C:/Atari2600/bB/bin

Post compilation files deleted

 

 

Thanks, now I can tell how many bytes are left in every bank, with or without vblank routine. It still seems like it would be able to put out something in a nicer format, this would do:

DASM V2.20.07, Macro Assembler ©1988-2003

1006 bytes of ROM space left in bank 1

3923 bytes of ROM space left in bank 2

4052 bytes of ROM space left in bank 3

2242 bytes of ROM space left in bank 4

Possible duplicate label: L079 f553

Compilation completed at 2/22/2009 6:31:39 PM

Edited by MausGames
Link to comment
Share on other sites

When I switch it to a 32k bin, I get:

 

2600 Basic compilation completed.

DASM V2.20.07, Macro Assembler ©1988-2003

bytes of ROM space left in bank 1

bytes of ROM space left in bank 2

bytes of ROM space left in bank 3

bytes of ROM space left in bank 4

bytes of ROM space left in bank 5

bytes of ROM space left in bank 6

bytes of ROM space left in bank 7

bytes of ROM space left in bank 8

3973 bytes of ROM space left in bank 1

3923 bytes of ROM space left in bank 2

4052 bytes of ROM space left in bank 3

4052 bytes of ROM space left in bank 4

4052 bytes of ROM space left in bank 5

4052 bytes of ROM space left in bank 6

1006 bytes of ROM space left in bank 7

Possible duplicate label: L084 f4dd

Compilation completed at 2/24/2009 9:30:36 PM

view output file:///C:/Atari2600/bB/bin

Post compilation files deleted

Link to comment
Share on other sites

When I switch it to a 32k bin, I get:

 

2600 Basic compilation completed.

DASM V2.20.07, Macro Assembler ©1988-2003

bytes of ROM space left in bank 1

bytes of ROM space left in bank 2

bytes of ROM space left in bank 3

bytes of ROM space left in bank 4

bytes of ROM space left in bank 5

bytes of ROM space left in bank 6

bytes of ROM space left in bank 7

bytes of ROM space left in bank 8

3973 bytes of ROM space left in bank 1

3923 bytes of ROM space left in bank 2

4052 bytes of ROM space left in bank 3

4052 bytes of ROM space left in bank 4

4052 bytes of ROM space left in bank 5

4052 bytes of ROM space left in bank 6

1006 bytes of ROM space left in bank 7

Possible duplicate label: L084 f4dd

Compilation completed at 2/24/2009 9:30:36 PM

view output file:///C:/Atari2600/bB/bin

Post compilation files deleted

Can you post the generated asm file? There's a possibility you're running into the DASM branch bug, and I've fixed this with a private build and can try out the asm file here with the old and new versions.

 

EDIT: Is the binary building properly? If so, disregard some of what I said - If you encounter the branch bug, DASM will not produce a valid binary. I thought I'd mention that my DASM build does address what you mentioned above about a nicer output format. I don't know if I've ever posted the new DASM build, so I might as well do it here. I think this is the new build, anyway.

bBdasm.zip

Edited by batari
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...