Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > why not 39 column mode ?
2006-10-30 11:24
Oswald

Registered: Apr 2002
Posts: 5021
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....
 
2006-10-31 13:37
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?
2006-10-31 13:59
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
2006-11-01 11:14
Ninja

Registered: Jan 2002
Posts: 406
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.
2006-11-01 12:52
Oswald

Registered: Apr 2002
Posts: 5021
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.
2006-11-02 08:17
ChristopherJam

Registered: Aug 2004
Posts: 1378
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.
2006-11-02 08:31
Oswald

Registered: Apr 2002
Posts: 5021
I had to change the 'seed' to other than 0, but now it works like a charm! thanx! :)
2006-11-04 09:19
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.
2006-11-04 13:43
Oswald

Registered: Apr 2002
Posts: 5021
I still dont see it.
2006-11-05 07:15
Stryyker

Registered: Dec 2001
Posts: 465
Because of the implementation the last poke gives an empty text character to the left. Perhaps it made it easier chip to design.
2006-11-05 10:58
Oswald

Registered: Apr 2002
Posts: 5021
I can make an empty row using d011 we still doesnt have 23 row mode.
Previous - 1 | 2 | 3 | 4 | 5 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Didi/Laxity
Sentinel/Excess/TREX
Jetboy/Elysium
CopAss/Leader
Andy/AEG
Guests online: 163
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.061 sec.