Subject: Re: [stella] Random number generation on 2600? From: Greg Troutman <mor@xxxxxxx> Date: Mon, 24 Mar 1997 12:15:49 -0800 |
Erik Mooney wrote: > > >(...) > >>LF0B2: LDA $B2,X ;4 > >> STA NUSIZ0 ;3 > >> STA REFP0 ;3 NUSIZ uses bits 5, 4, 2, 1, and 0, but not bit 3. REFP0 uses bit 3 only, so you can store both values in one byte with a simple ORA. That was probably done earlier, and the values are being fetched and used above. > >> LDA VSYNC ;3 > >> LSR A ;2 > >> LSR A ;2 > >> ORA VBLANK ;3 > >> STA $D9,X ;4 Get collision status for Missile 0 vs. Player 0 and 1 into bits 7 and 6, shift them to over to bits 5 and 4, then get collision status for Missile 1 vs. Player 0 and 1. One byte now contains all 4 different collision values of Missiles vs. Players. > >(...) > > > >I bet this has something to do with random numbers... No, I don't think so. > That is strange.. VSYNC is a write-only register; its register 0, so LDA > VSYNC reads from register 0, which is CXM0P (a collision register). VBLANK > is also a write-only register (register 3) which corresponds to read > register CXP1FB, which is another collision register.. the ORA would have > to read from register 3, which would be CXP1FB. I don't know what's > supposed to be going on here. VBLANK equ 1, which is CXM1P when read. -- mor@xxxxxxx http://www.crl.com/~mor/ -- Archives available at http://www.biglist.com/lists/stella/archives/ E-mail UNSUBSCRIBE in the body to stella-request@xxxxxxxxxxx to be removed.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] Random number generati, Erik Mooney | Thread | RE: [stella] Random number generati, A. |
Re: [stella] Random number generati, Erik Mooney | Date | RE: [stella] Programming for Credit, Matt Pritchard |
Month |