Jump to content
IGNORED

Strange Playfield issue... :(


PacManPlus

Recommended Posts

Hi:

 

I recently started a new project, but I'm having a bit of an issue with the playfield.

 

I am using the 32kSC Kernel option (because I need smaller playfield rows, *and* I need to change the playfield color with each row, *and* I need the playfield to be async).

I have a pfrowheight of 32 and a pfres of 3.

 

The issue I am having, is that there are *large* gaps between each playfield row - the gaps are just as wide as the playfield row itself. I understand that there is a scanline or two between each playfield normally, and that is fine - but these gaps are *way* too big...

Does anyone know why this would happen?

 

If it isn't an obvious answer, I'll post the sourcecode when I get home tonight.

 

Thanks!

Bob

Edited by PacManPlus
Link to comment
Share on other sites

Hi:

 

I recently started a new project, but I'm having a bit of an issue with the playfield.

 

I am using the 32kSC Kernel option (because I need smaller playfield rows, *and* I need to change the playfield color with each row, *and* I need the playfield to be async).

I have a pfrowheight of 32 and a pfres of 3.

 

The issue I am having, is that there are *large* gaps between each playfield row - the gaps are just as wide as the playfield row itself. I understand that there is a scanline or two between each playfield normally, and that is fine - but these gaps are *way* too big...

Does anyone know why this would happen?

 

If it isn't an obvious answer, I'll post the sourcecode when I get home tonight.

 

Thanks!

Bob

 

I´m not sure about *just as wide*, but then again you are using a high-res playfield, so...

 

Try pasting this code to the top of your program.

 

set kernel_options no_blank_lines

 

Take note that if you already have a set kernel_options line in your program you should just paste the no_blank_lines part into it. Additionally, you will have to give up missile 0 to use this feature.

Link to comment
Share on other sites

Thanks!

 

I'll give it a shot - I didn't want to lose missile 0, but if I have no choice... ;)

 

BTW: Here's a screen shot (the gaps are pretty wide): :-P

 

EDIT - I found it - I think the colors were alternating between blue and black for some reason!

 

But now I have another issue :(

post-1787-1192495180_thumb.png

Edited by PacManPlus
Link to comment
Share on other sites

If you are using pfcolors, then you need to define a pfcolors table with 32 values, one for each line. If you don't, you'll get alternating blue and black bars. I have no idea why you are getting the half solid and half random colors after doing that, though. I'm pretty sure that the highest value you can have for pfres is 31, and the highest suggested by me is 24. You might want to check your cycles.

Link to comment
Share on other sites

Thanks - I've seen other examples that use 32, so I'm hoping that is valid.

 

But this is getting *very* strange here. I have stripped everything out but the playfield, and I'm still getting the odd colors at top and black stripe in the middle. Here is the code:

 

 set kernel_options pfcolors
set romsize 16kSC

const pfres=32
const pfrowheight=3
const screenheight=84

mainroutine
pfcolors:
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
66
end

playfield:
................................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
................................
................................
................................
................................
XXXXXXXXXX...XXXXXX...XXXXXXXXXX
................................
................................
................................
................................
XXXXXXX...XXXXXXXXXXXX...XXXXXXX
................................
................................
................................
................................
XXXX...XXXXXXXXXXXXXXXXXX...XXXX
................................
................................
................................
................................
XXXX...XXXXXXXXXXXXXXXXXX...XXXX
................................
................................
................................
................................
XXXX...XXXXXXXXXXXXXXXXXX...XXXX
................................
................................
................................
................................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end

drawscreen
goto mainroutine

 

and this is the screenshot I get:

post-1787-1192673401_thumb.png

 

There's a *large* area of black in the middle of the screen I'm getting - you can see by the code that there should be more bars there.

what am I doing wrong? :?

 

Thanks,

Bob

Edited by PacManPlus
Link to comment
Share on other sites

There's a *large* area of black in the middle of the screen I'm getting - you can see by the code that there should be more bars there.

what am I doing wrong? :?

When I compile and run it, it looks fine, so I'm wondering if there's a problem with your include files. Which version of batari Basic are you using, and did you install it from scratch, or install it on top of an older version?

 

You may want to edit your 2600bas.bat file, find the lines that start with dasm.exe (there should be two of them), and add the following to them:

 

-l%1.lst

 

This should generate an assembly listing when DASM assembles your program. The listing will have the same name as your program, but with a .lst extension. Zip up the listing and post it, so I can compare it to the one I got when I compiled.

 

Michael

Link to comment
Share on other sites

There's a *large* area of black in the middle of the screen I'm getting - you can see by the code that there should be more bars there.

what am I doing wrong? :?

When I compile and run it, it looks fine, so I'm wondering if there's a problem with your include files. Which version of batari Basic are you using, and did you install it from scratch, or install it on top of an older version?

 

You may want to edit your 2600bas.bat file, find the lines that start with dasm.exe (there should be two of them), and add the following to them:

 

-l%1.lst

 

This should generate an assembly listing when DASM assembles your program. The listing will have the same name as your program, but with a .lst extension. Zip up the listing and post it, so I can compare it to the one I got when I compiled.

 

Michael

 

Hi, Michael

 

I am using what looks like version 1.05 (as far as I know - I downloaded it directly off of the site). This wasn't an upgrade - I installed it to C:\bBasic

Here is the listing

 

Thank you very much :)

Bob

pap.txt.zip

Link to comment
Share on other sites

Okay, there are definitely differences between your .lst and mine:

 

(1) Your .lst doesn't include the "superchip.h" file. It was accidentally left out of the bB v1.0 installation package, and I had corrected that problem in my own bB installation, although a corrected bB installation package hasn't been released yet. However, this doesn't have anything to do with your problem, because the only thing the "superchip.h" file does is define a bunch of additional variable names in the Superchip RAM area (e.g., "w000," "r012," etc.). Your program isn't trying to use any of those variable names (and if it did, you would have gotten compile errors indicating that the variable names couldn't be resolved), so this has no impact on your current program. Nevertheless, I'm attaching the "superchip.h" file, along with an updated version of the "superchipheader.asm" file (the only difference between this updated version and the version that was in 1.0 is that this version tells DASM to include the "superchip.h" file).

 

(2) The *real* problem is that the "pfcolors:" statement didn't compile the same way. This means that you aren't using the same version of the "2600basic.exe" file that I am. This is the actual bB compiler, which looks at the bB code in your program and converts the bB statements into the necessary 6502 assembly statements. The date on my "2600basic.exe" file is 05/26/2007, which is about 3 and 1/2 months *after* the version 1.0 installation package was released, so batari must have corrected this file and posted it in the AtariAge forums. I'm also including it in the attachment.

 

Here's the post (and thread) where batari posted the corrected "2600basic.exe" file:

 

http://www.atariage.com/forums/index.php?s...t&p=1314595

 

And for the record, here's the specific difference that's causing the problem:

 

; the bad code...
 45  1100			  .L05 ;  pfcolors:
 46  1100
 47  1100	   a9 42	  lda	  # 66
 48  1102	   85 08	  sta	  COLUPF
 49  1104	   a9 f6	  lda	  #>(pfcolorlabel5-84)
 50  1106	   85 f1	  sta	  pfcolortable+1
 51  1108	   a9 04	  lda	  #<(pfcolorlabel5-84)
 52  110a	   85 f0	  sta	  pfcolortable
 53  110c			  .
 54  110c				   ;
 55  110c

 

; and the good code...
 46  1100			  .L05 ;  pfcolors:
 47  1100
 48  1100	   a9 42	  lda	  # 66
 49  1102	   85 08	  sta	  COLUPF
 50  1104			   ifconst pfres
 51  1104	   a9 f6	  lda	  #>(pfcolorlabel13-132+pfres*4)
 52  1106			 - else
 53  1106			 -	lda	  #>(pfcolorlabel13-84)
 54  1106			   endif
 55  1106	   85 f1	  sta	  pfcolortable+1
 56  1108			   ifconst pfres
 57  1108	   a9 1e	  lda	  #<(pfcolorlabel13-132+pfres*4)
 58  110a			 - else
 59  110a		  -	lda	  #<(pfcolorlabel13-84)
 60  110a			   endif
 61  110a	   85 f0	  sta	  pfcolortable
 62  110c			  .
 63  110c				   ;
 64  110c

Unzip the attachment. Then move the new "2600basic.exe" file to whichever directory the old "2600basic.exe" file is in. Also, move the new "superchipheader.asm" file to whichever directory the old "superchipheader.asm" file is in, and move the "superchip.h" file there as well. Then recompile your program and run it to verify that this took care of the problem.

 

Michael

2600basic.zip

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