I am using this bit of code to decide if the velocity is going to be positive or negative when a new game is started.
GetRandomByte
lda Random
asl
eor Random
asl
eor Random
asl
asl
eor Random
asl
rol Random ; performs a series of shifts and bit operations
rts
jsr GetRandomByte ; generate a random number
lda #%10000000 ; 1 in most significant bit mean greater then 127
bit Random ; was it less then 127?
bne RandomVX ; if it was then branch
lda #$ff ; set the starting duck's x velocity to -1
jmp RandomVXDone ; and jump cause we're done
RandomVX
lda #$01 ; set the starting duck's x velocity to 1
RandomVXDone
sta DuckVX ; store duck's initial x velocity
jsr GetRandomByte ; generate a random number
lda #%10000000 ; 1 in most significant bit mean greater then 127
bit Random ; was it less then 127?
bne RandomVY ; if it was then branch
lda #$ff ; set the starting duck's x velocity to -1
jmp RandomVYDone ; and jump cause we're done
RandomVY
lda #$01 ; set the starting duck's x velocity to 1
RandomVYDone
sta DuckVY ; store duck's initial y velocity
However no matter what the velocity always stays the same.
Bin: https://www.dropbox.com/s/ikjnebg1moyn0k4/duckgame.bin?dl=1
In the Atariage database and the internet as a whole, I see people mentioning a severe bug that requires a password to patch.
Quote:
Sources
https://gamefaqs.gamespot.com/cd32/955787-brutal-football/faqs/57269
https://atariage.com/software_hints.php?SoftwareHintID=181
Yet I cannot find any mention of what exactly the bug is anywhere.
Looking for a few manuals from different companies. I will compare the different styles each company used in their manual. Manual doesn't have to be in pristine condition, but does have at least be in 1 piece and readable. I plan to use the knowledge when I start writing up the manual For my homebrew.
Portablize this modified bit of code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Subroutine to generate a Linear-Feedback Shift Register random number
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Generate a LFSR random number
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
GetRandomByte
lda Random
asl
eor Random
asl
eor Random
asl
asl
eor Random
asl
rol Random ; performs a series of shifts and bit operations
rts
So it works with any game out of the box, without requiring an extra RAM variable.
Hi,
I'm getting the following error:
here is the code i'm using:
GetRandomByte
asl
eor
asl
eor
asl
asl
eor
asl
rol ; performs a series of shifts and bit operations
rts
the error is specifically with eor which I am trying to eor the value of the accumulator with the value itself. Is there any way to do it or must i use a RAM location?
I know that the 2600's RAM and stack are in an unknown state when first turned on and that's why we clear the RAM and setup the start immediately. I was wondering if there are any registers that still are in an unknown state after clearing the RAM and setup the stack. I ask cause I would like to use that to seed my random number generator function.
I am having a small issue with my code. I am trying to get the duck to stop when it reaches the top after hitting the flyaway state. However no matter what I try the code gets ignored.
Source Code
Relevant section
Any of you experts have any ideas on what's going on?
That sounds awesome, question though how do i set a single bit? For example lets say I want to set bit 2 of Option1, how would i do that in assembly language?
Not sure what your referring to when you say "Tracing" and "Time Machine", i was referring to this. I'm interested in knowing if it's a waste of space, ram & time or not and how many homebrewers actually actively use it in their games.
Hi,
New to the forum, but not 6502 assembly. I was wondering if any of the homebrew gurus when developing the bigger games(16k+) used game states for tracking what point the game is in and if it was helpful or just a waste of space.