Jump to content
IGNORED

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


Recommended Posts

Your code needs some sanity, either you have a main loop of like:

 

Start:

CLEAN_START ; Handy macro that sets up the VCS

MainLoop:
        jsr VCNTRL
        jsr VBLANK
        jsr CHECKSWITCHES
        jsr DOMOTION
        jsr PREPSCOREFORDISPLAY
        jsr KERNEL
        jsr OVERSCAN
        jmp MainLoop

or you literally arrange the main part of your code to be synchronous with the TV beam, with each of these routines unrolled.

 

-Thom

Edited by tschak909
Link to comment
Share on other sites

OK, I put them in a main loop like you suggested and a comb line appeared! I don't know why. So not wanting that in there, I changed the COLUBK to 0 to "cover" it up, and changed the eye around. Player 1 (the incinerator) will have to be white now instead of blue since missile0 is now the whites of his eye instead of the dot.

 

celery7.zip

Link to comment
Share on other sites

I'm using this code to make the player0 move right. But when I put the player1 in, it was moving left. How do I stop that from happening?

 

PositionSprites

        ; Set the horizontal position of the two sprites, based upon their coordinates
        ; This uses the tricky 2600 method of positioning (RESPx, HMPx, etc)

        ; Algorithm invented a looong time ago by persons unknown
        ; Re-invented Feb2001 by yours truly, then optimised according to code by Thomas Jenztsch

        sta WSYNC
        sta HMCLR                       ; clear any previous movement

        ldx #2                   ; sprite index
PosSP   
        lda Player1X-1,x

        tay

        lsr
        lsr
        lsr
        lsr
        
        sta PS_temp

        tya
        and #15

        clc
        adc PS_temp

        ldy PS_temp

        cmp #15
        bcc NH
        sbc #15
        iny
NH

                ; Use remainder for fine adjustment
        eor #7
        asl
        asl
        asl
        asl

        sta HMP0-1,x                      ; fine movement
        sta WSYNC

    

        jsr Ret
        bit 0                           ; 15 cycles = 3 loops 

Jiggle  dey
        bpl Jiggle

        sta RESP0-1,x


        dex
        bne PosSP
        

        

        sta WSYNC
        sta HMOVE
        sta WSYNC




Ret
        rts
Link to comment
Share on other sites

Let me ask you a question. Why would this work sometimes:

  ; Clear RAM and all TIA registers



                ldx #0

                lda #0



Clear           sta 0,x

                inx

                bne Clear

Up until a certain point. I thought I was going insane because this new version was working well on Stella but didn't display anything on real hardware. So I tried replacing that bit of code with CLEAN_START and it suddenly started displaying it correctly on a real 2600 with Harmony cart. Anyway, a lot has changed. I had to move the celery down since he was apparently taking up too much room. Now he's lurking at the bottom looking upwards at you playing the game. You can move the incinerator up and down with the joystick. That's pretty much what I have so far. It is really really hot in here, even at 11:30pm, so I'm going to quit for today.

 

post-9475-0-56425000-1468391135_thumb.png

celery9a.zip

Link to comment
Share on other sites

And this: Sorry.

LDA #0		;Put Zero into A, X is at $FFClearMem 	STA 0,X		;Now, this doesn't mean what you think...	DEX		;decrement X (decrease X by one)	BNE ClearMem	;if the last command resulted in something 			;that's "N"ot "Equal" to Zero, branch back			;to "ClearMem"
Link to comment
Share on other sites

Even though my hand hurts, I worked on this a little bit adding the reset switch in to start new games.

I do have a question though. When I go to compile the game, it always has a message saying NO_ILLEGAL_OPCODES is an unrecognized symbol. Nowhere in the code did I type in NO_ILLEGAL_OPCODES, and the game works, but I would like to have some idea as to how much free space I have left.

celery13.zip

Edited by atari2600land
Link to comment
Share on other sites

I stared at the computer for so long I'm sick. Nevertheless, I finally figured out how to take the "jump" out of the beginning. Let me know what you think. If all looks good, then the score is next. I can't do a score, so it would be really helpful if someone could help me with that.

celery13a.zip

Link to comment
Share on other sites

Score added. But it's a two digit score. I see that there would be room for a third digit after the second one (or is that before the second one?), but not enough room for a fourth digit. Could anyone explain how to make a third digit appear after the second one (preferably after the score reaches 99). After the score is done, I'll try to work on increasing the vegetarian's speed as time goes on. After all, I don't want it to be really easy (and boring) to get 999 points.

celery15a.zip

Edited by atari2600land
Link to comment
Share on other sites

So what I've decided to do is make a four-digit score. The first two digits are the thousands and hundreds, while the second two are the tens and ones. Unfortunately, there's a big huge gap between the numbers. I tried and failed to try to get the second set of numbers closer to the first two using PF2. I read that PF2 is backwards, so I put in a second set of backwards numbers to use for PF2, but I can't figure it out. I'm hoping that someone can look at the code and revise it so that the four-digit number is a four digit number with no huge gap between the numbers. (I've made the score start at 98 just to test to see if it would go to 100).

celery15b.asm

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