| |
Oswald
Registered: Apr 2002 Posts: 5074 |
why not 39 column mode ?
if hiding 1 row is enough for doing vertical scrolling why do we have 38 column mode for horizontal scrollin, why not 39 ?
(and besides anyone can give me a simple random generator ? register readouts doesnt count) |
|
... 40 posts hidden. Click here to view all posts.... |
| |
Devia
Registered: Oct 2004 Posts: 401 |
I'm a bit confused now... how many ways of displaying 26 text lines are there?
In Broken Ass, Wizz did it by setting YSCROLL to 0 before the first line, then somewhere on the middle he set YSCROLL to 7 and switched screen mem. (If he recalls correctly)
What other other methods would accomplish the same thing?
|
| |
Style
Registered: Jun 2004 Posts: 498 |
Quote: actually...
It is a new badline condition, just no fetch of new memory ;-)
Im not so sure - because the VSP distorts the counters, 1000 is never reached and it reads the sprite def pointers and loops back to $0400.
I had it doing that before, but now Ive changed it and cant remember how I was doing it :D
|
| |
Ninja
Registered: Jan 2002 Posts: 411 |
Funny, lots of topics coming up here for which I planned to write articles about somewhen (somewhen being the problem here ;)).
The shortest pseudo-number generator I know of is like this:
seed = *+1
lda #$64 ; must be non-zero
asl
bcc *+4
eor #$cf
sta seed
Works pretty much as the method of JackAsser. Will give you every 8-bit-value once in some order, except 0. Works good enough for demos in most cases. |
| |
Oswald
Registered: Apr 2002 Posts: 5074 |
well, afterall I had fallen back to reading rom and eoring it with d012, what jack has posted was too predictable in a way for me. thx for the nice routines nevertheless. |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1403 |
This one's a little slower, but it's got a muuch longer cycle:
getRandom
sty saveY+1
ldy randomIndex
dey
bne stillPositive
ldy#16
stillPositive
sty randomIndex
lda randomTab,y ; r(t-17)
adc randomTab+5,y ; r(t-5)
sta randomTab,y
sta randomTab+17,y
saveY
ldy#0
rts
randomIndex
brk
randomTab
.byt "qwerasdf67896yhn1"
.byt "qwerasdf67896yhn1"
The algorithm is basically random(t)=random(t-5)+random(t-17). I've doubled over the seed table to avoid doing modulo array indexing or maintaining two indices. I've left the clc out to save cycles :)
If you use it to get coordinates to pass to a plotter you get nice snow; there's very little correlation between pairs of numbers. |
| |
Oswald
Registered: Apr 2002 Posts: 5074 |
I had to change the 'seed' to other than 0, but now it works like a charm! thanx! :) |
| |
yago
Registered: May 2002 Posts: 332 |
Quote: if hiding 1 row is enough for doing vertical scrolling why do we have 38 column mode for horizontal scrollin, why not 39 ?
(and besides anyone can give me a simple random generator ? register readouts doesnt count)
POKE53270,0
POKE53270,7
POKE53270,8
POKE53270,15
Then you shall see, why you need 38 columns, not 39.
|
| |
Oswald
Registered: Apr 2002 Posts: 5074 |
I still dont see it. |
| |
Stryyker
Registered: Dec 2001 Posts: 466 |
Because of the implementation the last poke gives an empty text character to the left. Perhaps it made it easier chip to design. |
| |
Oswald
Registered: Apr 2002 Posts: 5074 |
I can make an empty row using d011 we still doesnt have 23 row mode. |
Previous - 1 | 2 | 3 | 4 | 5 - Next |