Jump to content
IGNORED

Stacker


atari2600land

Recommended Posts

OK, turns out there is still a pair of bugs. When I tested it on real hardware when playing the game the play area shakes up and down a little like some kinda scanline issue or something. It's really weird cause it doesn't happen at the start screen or when your between levels it only happens when the game is actually being played. This only happens on real hardware also. I can make a video if needed.

 

The other bug is sometimes when you loose a block, say when you have 2 blocks and you go down to 1 block due to not lining them up right the next row will give you your block back! I was able to make this happen in EMU, pic attached.

 

Anyone's help is greatly apprricated. Here is the BIN and BAS files.

 

 

 

 

 

 

Well, when I run the program in Z26 with the scanline count on... yeah, its definitely an issue with the number of scanlines, jumping between 264 and 262 every few frames. Some routine is taking too long to complete. Maybe you should try debugging in Stella, using the "breakif" command.

Link to comment
Share on other sites

OK, turns out there is still a pair of bugs. When I tested it on real hardware when playing the game the play area shakes up and down a little like some kinda scanline issue or something. It's really weird cause it doesn't happen at the start screen or when your between levels it only happens when the game is actually being played. This only happens on real hardware also. I can make a video if needed.

 

The other bug is sometimes when you loose a block, say when you have 2 blocks and you go down to 1 block due to not lining them up right the next row will give you your block back! I was able to make this happen in EMU, pic attached.

 

Anyone's help is greatly apprricated. Here is the BIN and BAS files.

 

 

 

 

 

 

Well, when I run the program in Z26 with the scanline count on... yeah, its definitely an issue with the number of scanlines, jumping between 264 and 262 every few frames. Some routine is taking too long to complete. Maybe you should try debugging in Stella, using the "breakif" command.

 

Moving a few routines to vblank may help.

 

Steve

Link to comment
Share on other sites

Moving a few routines to vblank may help.

 

Steve

 

 

Any idea why the blocks are comming back when they shouldn't Steve?

 

Well, I haven't actually looked at the code that closely. I'll review it when I get some time and let you know if I can find the problem.

 

Thanks,

 

Steve

Link to comment
Share on other sites

OK, turns out there is still a pair of bugs. When I tested it on real hardware when playing the game the play area shakes up and down a little like some kinda scanline issue or something. It's really weird cause it doesn't happen at the start screen or when your between levels it only happens when the game is actually being played. This only happens on real hardware also. I can make a video if needed.

 

The other bug is sometimes when you loose a block, say when you have 2 blocks and you go down to 1 block due to not lining them up right the next row will give you your block back! I was able to make this happen in EMU, pic attached.

 

Anyone's help is greatly apprricated. Here is the BIN and BAS files.

 

 

 

 

 

 

Well, when I run the program in Z26 with the scanline count on... yeah, its definitely an issue with the number of scanlines, jumping between 264 and 262 every few frames. Some routine is taking too long to complete. Maybe you should try debugging in Stella, using the "breakif" command.

 

Moving a few routines to vblank may help.

 

Steve

 

 

I tried moving some things into the vblank, and at first I was getting a constant 266 scanlines, but whenever I added a block to the stack and had a piece "dropoff", the program added more scanlines until it finally destabilizes and crashes. Its hard to diagnose what's going on without commented code or named variables. Atari2600land: Would it be possible to go back and comment the code, and maybe even DIM all the variables you are using in the main loop?

Link to comment
Share on other sites

Hopefully this will be enough remarked. if not, just tell me and i'll do some more. I have a question: What is vblank, and how do i move stuff into it (and why would i?)

 

Here's a good explanation of using vblank in bB: http://www.atariage.com/forums/index.php?s...0&hl=cycles

Link to comment
Share on other sites

Hopefully this will be enough remarked. if not, just tell me and i'll do some more. I have a question: What is vblank, and how do i move stuff into it (and why would i?)

The TV screen is drawn with an electron beam line by line. It goes across the screen, steps down the line and continues. It's doing it so fast your eyes just brain just blends it into one image. The beam draws a line and then is turned off while it jumps back to the left edge of the screen to start another scanline. That period is known as horizontal blanking (Hblank). Line by line is drawn until the beam reaches the bottom right edge of the screen. It then does an overscan period before jumping back to the top of the screen before starting to draw the picture all over again. During this time (Vblank) the electron beam needs to be truned off as it retraces to the top of the screen.

Link to comment
Share on other sites

Here is stacker in ASM form (thanks to Omegamatrix)

 

if anyone is a disassembly guru that wouldn't mind looking to help smack these 2 final bugs:

 

1) the scanline count jumping

2) block(s) coming back after loosing them

 

 

Cheers,

 

Shawn

Edited by Shawn Sr.
Link to comment
Share on other sites

I've speed up a couple of the routines, and with some suggestions from Nukey the scanline is now stable at 262 during gameplay. However there are still some bugs in the scanline count going from the game screen to the title screen. There are also bugs in the reset button, and of course the blocks appearing when they shouldn't. Also this version fixes a bug I introduced myself by screwing up Vsync.

 

I've outlined these in more detail at the top of this latest disassembly. Please have a look there. Also there are many potentials for easy fixes. Lots of rom space (over 1,024 bytes free), lots of unused time in Vblank, etc...

 

 

I really have to take a step back from this though if I'm going to survive the next month of school. Someone else will have to carry the torch from here. If not I will look some more at it in about a month.

 

 

Stack16_rev3c_.zip

Edited by Omegamatrix
Link to comment
Share on other sites

Erm... Dumb question. Is it not easier to modify the batari basic source file and recompile?

 

 

Not a dumb question at all. Yes it would be easier to modify the BB file, and actually it'd be more preferable for ease of use. The key is getting BB to compile in a way that saves cycles and rom. When Shawn asked for help I took a look at the rom to see what it was compiling as, and I found lots areas that could be simplified saving cycles and space. For example:

 

;old code

;	lda	$DC				  ; 3
;	and	#$F7				 ; 2
;	sta	$DC				  ; 3
;	lda	$DC				  ; 3
;	and	#$EF				 ; 2
;	sta	$DC				  ; 3
;	lda	$DC				  ; 3
;	and	#$DF				 ; 2
;	sta	$DC				  ; 3
;	lda	$DC				  ; 3
;	ora	#$02				 ; 2
;	sta	$DC				  ; 3
;	lda	$DC				  ; 3
;	ora	#$04				 ; 2
;	sta	$DC				  ; 3
;	lda	$DC				  ; 3
;	and	#$7F				 ; 2
;	sta	$DC				  ; 3
;	lda	$DC				  ; 3
;	and	#$BF				 ; 2
;	sta	$DC				  ; 3   wastes many bytes and cycles

;new code:
LDA   $DC
AND   #$07
ORA   #$06
STA   $DC

 

Also lot of time the BB code was taking unnecessary branches that slowed down the code (ie the result hadn't changed, but the code kept testing it over and over). Branching directly to where it would end up saved many cycles.

Link to comment
Share on other sites

You can save yourself a lot of time and trouble by always adding:

 

set debug cyclescore

 

You can put it at the beginning of your program from the start, and REM it when you're not using it. It still seems like you haven't learned quite a few of the basics and are trying to fudge and copy/paste your way through making things, you might consider reading the documentation from top to bottom at least once.

 

edit: Are you supposed to be able to add 3-4 layers at once? The newest version plays a lot better, but I don't like the sound effects.

Edited by MausGames
Link to comment
Share on other sites

Here's the problems I see with the latest version:

 

- Piece moves WAY too slow. If I weren't testing this out for you, I'd have been bored to death and quit already.

 

- Piece does not get faster each level. It should. That is how the arcade is. So, I understand how level 1 seems all the same speed, then level 2 is faster, etc. I like that. But within the same level it should get a tad faster I think.

 

- I can press fire really quick and get almost to the top of the game without even trying.

 

- Let's say I have the following.. 3 blocks, 3 blocks, 3 blocks, 2 blocks, 1 block, but somehow on the next level I've got 2 blocks stacked on top of one. This is not possible. Is this what you talked about blocks coming back? I made it to level 3 just now, had 3 blocks, then eventually 2 blocks, then 1 block, then 2 blocks, then 2 blocks, then went to drop another 2 blocker on top and it made me lose.

Edited by yuppicide
Link to comment
Share on other sites

- Let's say I have the following.. 3 blocks, 3 blocks, 3 blocks, 2 blocks, 1 block, but somehow on the next level I've got 2 blocks stacked on top of one. This is not possible. Is this what you talked about blocks coming back? I made it to level 3 just now, had 3 blocks, then eventually 2 blocks, then 1 block, then 2 blocks, then 2 blocks, then went to drop another 2 blocker on top and it made me lose.

This is a known problem and is being looked at.

I will increase the speed of the blocks.

Link to comment
Share on other sites

I kept thinking about this for a few days now closer to a week. I totally forgot about this thread that I was trying to tell if a pfpixel was on or off. You can use the PFREAD function to help with your falling pieces! So much easier than I was making it out to be!

 

http://www.randomterrain.com/atari-2600-me...nds.html#pfread

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Got my game STACKER in the mail today!

 

Thanks to Shawn, Chris, and LAI games :cool:

 

Label and game look great! However, I think I found a minor "bug" in the game?

 

I played a few rounds today right after I opened up the package. It seems that every other game, after I lose all my "lives" the game goes back to the title screen. This is expected, but then if I play again and lose another life, it returns back to the title screen and resets the number of lives to full..

 

Again, this is a minor thing, but wondered if anybody else who has gotten the game already has noticed this?

 

On the plus side, I noticed this final bin version has vertical "lines" on the grapics of each block and the side rails. A cool feature! I wonder is this done using the missles or another technique used on the playfield blocks?

 

Overall, a nice game! :)

Link to comment
Share on other sites

  • 1 year later...
  • 4 weeks later...

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