Jump to content

Photo

The Celery Game (was:"Screen rolls at the start")


148 replies to this topic

#126 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Sat Jan 7, 2017 1:42 PM

I had an idea. Why not make a title screen song? This proved to be way way harder since every time I put stuff in, it kept breaking or not working right. I think I finally got it working okay after 4 hours of work. Let me know if you see any bugs in this version. I know the title screen isn't all that great, I plan to redo it, the one in here is just temporary.

Attached Files



#127 tschak909 OFFLINE  

tschak909

    Stargunner

  • 1,771 posts
  • Location:USA

Posted Sat Jan 7, 2017 1:55 PM

good first try :) You've run into what has been famously called "the Atari VCS musical scale...or lack thereof" :)

 

A lot of time is spent on making music that sounds in-tune, and it's done by deliberately avoiding the "off" notes.

 

-Thom 



#128 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Sat Jan 7, 2017 2:47 PM

This web page really helps a lot:

http://www.randomter...-and-sound.html

Here is my first try.

EDIT: I also made the vegetarian and celery move up or down slightly, randomly determined.

Attached Files


Edited by atari2600land, Sat Jan 7, 2017 5:38 PM.


#129 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Mon Jan 9, 2017 11:07 AM

Now I need help with randomness. It likes to do certain unbreakable patterns. One of which is:

celery down

celery down

vegetarian down

vegetarian unchanged

vegetarian up

repeat the Y positions exactly the same. I've cleaned the code up some, removing unnecessary blank lines and changing swear words and stuff. I just get so angry when things don't work.

Attached Files



#130 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Mon Feb 6, 2017 3:43 AM

How is this possible?

whathowisthispossible.png

In the bottom picture, the black space at the bottom is clearly more, yet the scanline counter counts 262 for BOTH of them. How would I fix this so it doesn't display an obvious fluctuation of black space at the bottom? I've tried for at least a few hours and can't figure it out.

 

Attached Files



#131 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Mon Feb 6, 2017 7:21 AM

I think I solved the problem I was having. Not only that, it seems random except that every time you turn the game on, The first thing is always a vegetarian going down. Other than that, it seems good.

Attached Files



#132 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Mon Feb 6, 2017 9:29 AM

Fixed the random problem I had at the beginning.

I still want to know about the thing I was having about that picture I showed earlier.

 

Attached Files



#133 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Thu Feb 9, 2017 2:25 PM

I want to add a value on the left side of a PF0 which would have a one-digit lives digit. I tried for hours and I just couldn't do it. Any help?



#134 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 11,210 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Fri Feb 10, 2017 5:02 PM

Was going to take a look but the zip in #132 contains the listing instead of the source.



#135 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 11,210 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Fri Feb 10, 2017 6:15 PM

Nevermind, I see you posted the source here.  I like the look of the new incinerator, well done  :thumbsup:

 

I took a look and there's not enough time in the score kernel as written; but, you have plenty of RAM left so I do have a solution!  I'm working late this evening though, so won't be able to make the changes until this weekend.



#136 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 11,210 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Fri Feb 10, 2017 7:48 PM

Didn't work as late as I expected, was even able to squeeze in a color change:

celery44adgs.png

 

Attached File  cellery44adgs.zip   10.14KB   19 downloads



#137 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Sat Feb 11, 2017 9:40 AM

Thank you so much! I made a few changes and now the lives counter goes down instead of up. And I didn't even have to ask for help on that one! I also made it so the song only plays when the game is over. If you lose a life, you'll hear a small unpleasant beep noise.

Attached Files



#138 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Sun Feb 12, 2017 6:36 PM

Help time again. I wanted to see if I could make the game decide randomly if the character changes direction or not when it hits the y position boundary. I introduced a new variable called Bouncing. I did this:

        jsr Random
        sta Bouncing

        lda Bouncing
        cpx #127
        bcs Do_not_bounce
 
        ;code that happens for it to bounce

But it always either bounces or doesn't (and doesn't choose one), no matter what I do. What am I doing wrong?

This code problem begins at line 1,321 in this code. The Bouncing variable is chosen at line 1,365-6.

Attached Files


Edited by atari2600land, Sun Feb 12, 2017 6:36 PM.


#139 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Mon Feb 13, 2017 5:39 PM

Problem solved.



#140 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Sun Feb 19, 2017 10:33 PM

OK, help time again. I was playing the game with paddles on my Harmony cart and noticed when the paddle is at one pixel below the upmost position, it disappears. Why would it be doing that, and how do I fix it?

Attached Files



#141 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 11,210 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Thu Feb 23, 2017 5:31 PM

Made some minor changes to make it easier to diagnose the problem.

  • added hex digits A-F and revised the score to show the paddle reading on the left and the converted value on the right.  
  • Disabled the movement of the human/celery

In order to do this I had to bump up the ROM size to 4K.
 
Highest paddle reading is $A1 which is converted to $30
celery50dgs.png
 
"Lowest" paddle reading is $1E which is converted to $5A
celery50dgs_1.png
 
"Lowest" because turn the paddle a little further and the reading jumps to $31 with a converted value of $0B
celery50dgs_2.png
 
Looking in the comments I see:
 

; Paddle1 will have a value from 49-164
; We need to convert it to 11-49

 
49-164 is $31-$A4 in hex.
11-49 is $0B-$31 in hex

So something happened that changed the range of paddle readings from $31-$A4 to $1E-$A1.  Plus there's a "hiccup" that occurs causing the reading to jump from $1E to $31.  


What you need to do now is a binary search to figure out in which version of Celery the problem first appeared.  To do a binary search establish your MIN and MAX versions, then test the one in the middle. With 50 versions the MIN=1 and MAX=50.  
 
(MIN+MAX)/2 = 25 - so the first version to test is 25.
 
Does 25 have the problem?

  • Yes - your new MAX is 24
    next search is (1+24)/2 = 12
     
  • No - your new MIN is 26
    next search is (26+50)/2 = 38

Repeat the process until you find the version the problem first appeared.  Then compare that source with the one before it - so if the problem is in version 40, compare versions 39 and 40.  Use a tool like WinMerge to make it easier to figure out what changed.
 
 
Source
Attached File  celery50dgs.asm   45.89KB   16 downloads
 
ROM
Attached File  celery50dgs.bin   4KB   18 downloads



#142 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Thu Feb 23, 2017 6:53 PM

The change happened between the versions 32 and 33, but I can't figure out what I did to change it. I used WinMerge and everything and it's a total mystery to me. Versions 32 and 33 are here. I noticed the big change is that I rounded the celery. Could that have something to do with it?

Attached Files



#143 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 11,210 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Thu Feb 23, 2017 9:10 PM

That was fast! I'm heading to bed soon, will compare the 2 tomorrow

#144 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 11,210 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Fri Feb 24, 2017 8:57 AM

If you happen to look at this some more before I do tonight, remember that this macro is what does the paddle reading:
 
       MAC READ_PADDLE_1 ; DGS macro to read the first paddle
        lda INPT0         ; 3   - always 9
        bpl .save         ; 2 3
        .byte $2c         ; 4 0
.save   stx Paddle1       ; 0 3
        ENDM
 
and that it relies on the value in the X register - so take a closer look at any changes involving the X register.

#145 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 11,210 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sat Feb 25, 2017 10:43 AM

Found the "jump" problem. This bit of code used to be this:
    cpx #50         ; are we at line 
    bne EyeDot      ; No, so do another
    lda #49         ; DGS - set paddle low value
    sta Paddle1     ; DGS
 
it's now this:
    cpx #30         ; are we at line 	
    sta RESM1	    ; reset missile1 position						
    bne EyeDot      ; No, so do another	
    lda #49         ; DGS - set paddle low value
    sta Paddle1     ; DGS
 
The sampling of the paddle starts immediately after this routine, and the initial value of X changed from 50 to 30 which is causing the problem. Because of that the low value for the paddle needs to be changed, it should be set to 29 (1 less the 30).
    cpx #30         ; are we at line 	
    sta RESM1	    ; reset missile1 position						
    bne EyeDot      ; No, so do another	
    lda #29         ; DGS - set paddle low value
    sta Paddle1     ; DGS
 
Once that's been changed the raw paddle range becomes 29-161 ($1D-$A1):
celery50dgs.png celery50dgs_1.png

Once that's fixed we need to update the UsePaddle routine to convert the range to 11-49($0b-$31).
UsePaddle:  ; DGS
; Paddle1 will have a value from 29-161
; We need to convert it to 11-49
; and store it in ObjectY+1

    sec
    lda Paddle1     ; A = 29-161 ($1D-$A1)
    sbc #29         ; A = 0-132
    
; divide by 3 routine by Omegamatrix, from:

; http://atariage.com/forums/blog/563/entry-10805-unsigned-integer-division-routines/  
    clc
    sta  Temp
    lsr
    adc  #21
    lsr
    adc  Temp
    ror
    lsr
    adc  Temp
    ror
    lsr
    adc  Temp
    ror
    lsr             ; A = 0-44
; end divide by 3    
    cmp #38         ; need to be 0-38
    bcc RangeOK     ; if A < 38 than then we are OK
    lda #38         ; else force it to 0-38
    
RangeOK:
    bit SWCHB       ; this tests the difficulty switches.  BVC (switch=B) or BVS (A) for the left switch, and BPL (B) or BMI (A) for the right.
    bvc SkipReverse ; do not reverse range if Left Difficulty = B

    sta Temp        ; reverse the range
    sec
    lda #38
    sbc Temp        ; A= 38-0
    
SkipReverse:
    clc             
    adc #11         ; A = 49-11 (or 11-49 if not reversed)
    
ConvertDone:
    sta ObjectY+1   

    rts ;   DGS end of UsePaddle
 
celery50dgs_2.png celery50dgs_3.png

#146 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Sat Mar 4, 2017 8:58 AM

Tim Duarte of 2600 Connection and I are going to release a limited number of these carts. 10 first. If you want one of the ten, please PM me, and I'll start a list. I also designed a manual to go along with the game. No box, though.



#147 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Wed Mar 15, 2017 2:23 PM

I made a video of it. Sorry about the quality, VHS is the only way I could do this while playing on a real TV set.



#148 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 11,210 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Wed Apr 12, 2017 11:21 AM

Thanks Chris! :)

IMG_8560.jpg

#149 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,655 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Wed Apr 12, 2017 12:16 PM

You're welcome






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users