+atari2600land Posted December 3, 2019 Share Posted December 3, 2019 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.zip 5 Quote Link to comment Share on other sites More sharing options...
e5frog Posted December 4, 2019 Share Posted December 4, 2019 What if you have hollow blocks? The "clear" option when drawing graphics saves some time. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 4, 2019 Author Share Posted December 4, 2019 Why can't I draw sprites that are 4 pixels wide? Anyway, I made 6 elevators. I think the problem was that I forgot I couldn't use lisu 5. But I want the elevators to be just 4 pixels wide instead of 8! elev5.zip Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 4, 2019 Author Share Posted December 4, 2019 Attempt #2: elev5a.zip 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 4, 2019 Author Share Posted December 4, 2019 Added a title screen and made the guy less flickery when moving. elev6.zip Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 4, 2019 Author Share Posted December 4, 2019 Help! I can't figure out how to make a random number generator. Quote Link to comment Share on other sites More sharing options...
e5frog Posted December 5, 2019 Share Posted December 5, 2019 You can make sprites any width you want... Did you make it work? If you need to use the subroutine stack function you do loose some registers for that. This may be helpful, I was looking at it the other day: https://codebase64.org/doku.php?id=base:small_fast_8-bit_prng 1 Quote Link to comment Share on other sites More sharing options...
e5frog Posted December 5, 2019 Share Posted December 5, 2019 (edited) 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 December 5, 2019 by e5frog 1 Quote Link to comment Share on other sites More sharing options...
Mikebloke Posted December 5, 2019 Share Posted December 5, 2019 28 minutes ago, e5frog said: readController: ; see one of the hand controllers is moved, keep data in A clr outs 0 outs 1 ins 1 pop I shouldn't butt in too much, have other programming to finish up. Any code is greatly appreciated by those of us struggling, it's always very helpful! Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 5, 2019 Author Share Posted December 5, 2019 3 hours ago, e5frog said: This may be helpful, I was looking at it the other day: https://codebase64.org/doku.php?id=base:small_fast_8-bit_prng How do I "channel f-ify" that code? I tried and failed miserably. Quote Link to comment Share on other sites More sharing options...
e5frog Posted December 6, 2019 Share Posted December 6, 2019 (edited) 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 December 6, 2019 by e5frog Quote Link to comment Share on other sites More sharing options...
e5frog Posted December 6, 2019 Share Posted December 6, 2019 Hmm... nope, "SL 1" resets carry - so it's always 0. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 6, 2019 Author Share Posted December 6, 2019 So that's why it wasn't working. Quote Link to comment Share on other sites More sharing options...
e5frog Posted December 6, 2019 Share Posted December 6, 2019 (edited) 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 December 6, 2019 by e5frog Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 6, 2019 Author Share Posted December 6, 2019 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 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 6, 2019 Author Share Posted December 6, 2019 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.) Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 6, 2019 Author Share Posted December 6, 2019 I just checked it to make sure. I compared screenshots of the start of the game and they're all the same. EDIT:never mind, it was something I did. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 6, 2019 Author Share Posted December 6, 2019 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 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 6, 2019 Author Share Posted December 6, 2019 Made a little YouTube video of the game so far. 3 Quote Link to comment Share on other sites More sharing options...
+cjherr Posted December 6, 2019 Share Posted December 6, 2019 Nice! Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 6, 2019 Author Share Posted December 6, 2019 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.bin Quote Link to comment Share on other sites More sharing options...
e5frog Posted December 7, 2019 Share Posted December 7, 2019 (edited) 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 December 7, 2019 by e5frog Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 7, 2019 Author Share Posted December 7, 2019 What are you playing the game with? In MESS, it works fine. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 7, 2019 Author Share Posted December 7, 2019 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 Quote Link to comment Share on other sites More sharing options...
Mikebloke Posted December 7, 2019 Share Posted December 7, 2019 I've been meaning to get round and testing it, I'll try it when I get home and let you know with mess version etc too. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.