Jump to content
IGNORED

Elevator Events (Channel F WIP)


atari2600land

Recommended Posts

While AtariAge was down last night, I decided to work on a new Channel F game. It's called Elevator Events. It's a lot like the Atari 2600 homebrew Elevators Amiss only dumbed down so the Channel F (and I) can handle it. I tried putting six elevators in it but it didn't like that at all. It likes only 3. So I put in three. Any ideas on what I should do next to this? (Besides a score. I am going to put the score on the top. But I don't know how the game keeps score.)

 

elev4.png.2b628225a82fb9b943f774bfdd7f0dfb.png

elev4.zip

  • Like 5
Link to comment
Share on other sites

You could skip the "fix the * coordinate" parts in the drawing routines if you want to speed things up a little. You'll need to compensate all your current coordinates and add 4 to the initial value. Not fixing it in Y should move the screen up 4 pixels - which might be good as it's quite low to avoid TV overscan problems. 

 

A smaller readController routine would be this:
 

readController:
	; see one of the hand controllers is moved, keep data in A
	clr
	outs	0
	outs	1
	ins	1
	pop


That only reads right controller, which is a little bit faster - due to port read speed - than the left.
It doesn't invert the indata, which means you check for 0 when masking with ni %10000000 for push down controller action. (bz instead of bnz and vice versa)
 

I shouldn't butt in too much, have other programming to finish up. ;-)



Hooray for me - I got to the top!

Edited by e5frog
  • Like 1
Link to comment
Share on other sites

lda seed
        beq doEor
         asl
         beq noEor ;if the input was $80, skip the EOR
         bcc noEor
doEor:    eor #$1d
noEor:  sta seed


Something like this perhaps:

 

LFSR:             ; Linear Feedback Shift Register
    clr
    as    1       ; clr and as has same function as "lda" where flags are also set. "ai number" if you want the same seed
    bz    doEor   ; if 0 go to xor function
    sl    1       ; shift one step left
    bz    noEor   ; if it's 0 go to noEor
    bnc   noEor   ; Branch if there's no carry (C=0 or branch carry clear in 6502/6510-ish)
doEor:
    xi    $1D     ; Do the XOR thing
noEor:
    lr    1, A    ; Store back value in same register as from the start


Haven't tried it, let us know how it works. Only thing I'm not 100% certain about is the bnc, if it's not working use bc instead which is the opposite. 

Edited by e5frog
Link to comment
Share on other sites

LFSR:             ; Linear Feedback Shift Register
	clr
	as    1
	bz    doEor
	lr	0, A		; Save original number in r0
	sl	1		; shift one step left
	lr	1, A
	bz	noEor

	; Do XOR if b7 was 1
	lr	A, 0
	ni	%10000000
	bz	noEor	    ; BCC functionality

doEor:
	lr	A, 1
	xi	$2b     ; Do the XOR thing
	lr	1, A
noEor:
	br	LFSR	

Seems to work, I check b7 of the original value to determine if there should be a carry or not. 


XOR value is supposed to be one of these numbers (decimal in parentheses) for a complete 256 number loop.
$1d (29), $2b (43), $2d (45), $4d (77), $5f (95), $63 (99), $65 (101), $69 (105), $71 (113), $87 (135), $8d (141), $a9 (169), $c3 (195), $cf (207), $e7 (231), $f5 (245)

 

If you want to experiment you can set DCI $2800 and then ST values to have a look in the memory window of the debugger.

 

 

Edited by e5frog
Link to comment
Share on other sites

Great! It seems to work now. Is there an easy way to change that code so it only gets a number between 10-48? I put it in register 9. 1 didn't seem to work very well.

EDIT: This seems to work:


    lr A, 9
    ci    48        
    bm    number_too_high

    ci    11    
    bp    number_too_low    

    pi    popk
    pk                            ; return from the subroutine        
    
number_too_low:
    lr A, 9
    ai 30
    lr 9, A

    pi    popk
    pk                            ; return from the subroutine    

number_too_high:
    lr a, 9
    sr 1
    sr 1
    sr 1
    lr 9,a
    
    pi    popk
    pk                            ; return from the subroutine   

 

Link to comment
Share on other sites

I have an idea I want to try but I don't know how to implement it. The idea is to check the right most bit and if it's a 0 then have the elevator start going down and if it's a 1 then have the elevator start going up. Naturally, I changed it so that the elevator directions work that way so that work is done, I just need to learn how to check certain bits. (or is that bytes? I get those two terms mixed up.)

Link to comment
Share on other sites

This seems to work:


    lisu    3        ; certain elevator y
    lisl    5
    lr  S, A

 

    lr  A, S
    ni    %00000001                    ; AND result and only keep the last bit
    lr    8, A                        ; back up result in r8

    lr A, 8
    
    lisu    4        ; put it in same elevator's direction
    lisl    0
    lr  S, A

elev8.bin

Link to comment
Share on other sites

Don't ask me how I got the score working. It took me about 7 or so hours to make it work good.

Scoring is the same as Elevators Amiss, where the timer counts down and once you make it to the side the number left on the timer is the number of points added to your score. Nothing happens when the timer reaches 00 yet. But you do get three lives.

elev9.png.2b4e4c3cda9ee4b9428216ee995ca20a.png

 

elev9.bin

Link to comment
Share on other sites

Nice to see the progress!

 

EDIT: 
There seems to be some odd things happening with controls, need to kind of "double click" to start from start screen. 

 

EDIT2:
Timer gets messed up on the first jump at the end, you might be adding score in the timer area. 
... or perhaps the timer is supposed to be reset but graphics is "out of bounds", haven't checked the code but decimal adjusted or not? 

 

EDIT3:
Yup, debugger shows timer in 'O'76 (register 62) resets to $FF instead of $99 where it originally starts. 

 

EDIT4:
Summing of scores is made hexadecimal at the moment:
88 + 98 = 120

instead of

88 + 98 = 186

Edited by e5frog
Link to comment
Share on other sites

Made some changes:

  • Fixed title screen
  • Fixed bug pertaining to moving right and death
  • Timer turns red when you die and a short pause before it turns green and you can move again. This is to prevent people from constantly running into an elevator if it's close.

I am not sure why e5frog is having trouble with the score being all wrong. If someone else besides him and me could test it, that would be great.

 

elev10.bin

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