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 > 160x100 pixels screenmode
2006-08-06 19:30
AmiDog

Registered: Mar 2003
Posts: 97
160x100 pixels screenmode

Is it possible to trick the VIC into displaying every line of the bitmap twice, creating a 160x100 pixels screenmode? If this is possible, can it be combined with FLI?
2006-08-06 19:54
Melkor

Registered: Apr 2006
Posts: 11
I'm no expert but alternating FLI and FLD every other line should do it.
2006-08-06 20:38
Jetboy

Registered: Jul 2006
Posts: 221
cant you do simple fli and just double the data?

edit: I mean put the same data for 2 lines?
2006-08-06 21:09
Oswald

Registered: Apr 2002
Posts: 5023
you can do it, perhaps not in the way you think about it. You simply draw up the picture in a way that each pixel is doubled vertically. if u're thinking of effects dont expect less writes/pixel than in 160x200... So strictly speaking a software screen mode for this is not possible. (now someone come and proove me wrong I'll be glad:)
2006-08-06 21:22
Jetboy

Registered: Jul 2006
Posts: 221
You still need as many STA as you would normaly need, but you you would need jsut half the calculations

... calculations
sta adr
sta adr+1

Plus you can use every second fli routine based on NMI and timers (courtesy of Ninja). That way displaying fli wouldnt cost you 200 lines of rastertime, but just 60% of that. So it is improvement.

Hoever 4 field type, every 4th line Fli is stil more efects friendly.
2006-08-06 21:48
Melkor

Registered: Apr 2006
Posts: 11
I'm pretty sure you can stretch with a variation of FLD but I don't know how it's done exactly.
2006-08-06 23:30
Melkor

Registered: Apr 2006
Posts: 11
Checked the VIC article and found this:
"If you create a new Bad Line before the current text line has been finished, VCBASE is not incremented (see 3.7.2.). So the VIC reads from the same addresses in the video matrix as in the previous line."

So doing doing FLI two times every other line should give you what you want, without having to plot the whole screen.
2006-08-07 06:56
JackAsser

Registered: Jun 2002
Posts: 1989
@Melkor: Sorry but no. What they mean is that when VCBASE isn't incremented the next char row (8 lines) is a copy of the first. If VCBASE IS increased then you get a new char row. The only possible bitmap stretching/line repeating is to repeat line 7 of each char row.

What FLI does is to force a re-fetch of the screen data and the d800 data, not the bitmap data. The bitmap data is incremented anyways and depending on where you put your d011 for FLI you may get the first bitmap row repeated all the time, or you get new ones.
2006-08-07 07:35
WVL

Registered: Mar 2002
Posts: 886
you can simply do FLI every 2 lines, instead of every line, and draw the bitmap so the pixels are doubled. i wouldnt do any stretching or whatever unless you really need the memory (also, i don't think it's possible to stretch in such a way..)
2006-08-07 08:21
Radiant

Registered: Sep 2004
Posts: 639
...and for a monochrome 160x100 pixels mode you can of course just multiplex hires sprites over the screen.
2006-08-07 09:00
MRT
Account closed

Registered: Sep 2005
Posts: 149
Quote: ...and for a monochrome 160x100 pixels mode you can of course just multiplex hires sprites over the screen.

Ehr yeah, but why would you?
Then it would be easier to make just a simple monochrome bitmap, don't you think?
2006-08-07 09:08
JackAsser

Registered: Jun 2002
Posts: 1989
@MRT: Monocrome bitmap are 320x200. Multiplexed monochrome spritelayer can be 160x100 using sprite HW double pixels...
2006-08-07 09:12
MRT
Account closed

Registered: Sep 2005
Posts: 149
Quote: @MRT: Monocrome bitmap are 320x200. Multiplexed monochrome spritelayer can be 160x100 using sprite HW double pixels...

:-)
I know dude, but that all depends on how you fill the pixels. Just fill 'm up with 2x2 pixels and you're done.

Depending on what you want to do, you could also make it fli every 2nd line, and swap front/back colors to switch 2x2 pixels on and off...
2006-08-07 09:49
JackAsser

Registered: Jun 2002
Posts: 1989
@mrt: of course an expanded sprite layer is easier and cheaper to pixel in than an every 2nd line fli bitmap layer, don't you think? (assuming monochrome pixels) :D
2006-08-07 11:15
Jetboy

Registered: Jul 2006
Posts: 221
And with multicolor y expanded sprites you can get 92x100(or more verticaly) in 4 colours.

All depends what you need it for...
2006-08-07 11:43
Melkor

Registered: Apr 2006
Posts: 11
Quoting JackAsser
@Melkor: Sorry but no. What they mean is that when VCBASE isn't incremented the next char row (8 lines) is a copy of the first. If VCBASE IS increased then you get a new char row. The only possible bitmap stretching/line repeating is to repeat line 7 of each char row.


Aha. I see. That makes sence. I tought thats what FLD did but i guess FLD only creates a empty line then?
If i have graphics on the screen and i remove the 2nd badline i get a 1 pixel gap between the first and second char rows, is that how it works?
2006-08-07 11:52
enthusi

Registered: May 2004
Posts: 675
heh, I remember that I was a bit shocked when I realized 'how much more complex' a strecher is compared to FLD...
2006-08-07 12:58
Radiant

Registered: Sep 2004
Posts: 639
MRT: Sprites are way easier than doing FLI, and leave more free raster time. Only problem there is timing the Y multiplexing and sprite data switch, but that's not too hard either. Using FLI for monochrome 2x2 gfx is just a waste of cycles and coding time.

EDIT: And a normal bitmap consumes way more memory than a layer of sprites. :-)
2006-08-07 14:23
Jetboy

Registered: Jul 2006
Posts: 221
But for bitmap its easier to calculate actual byte you need to change for given coordinates.

And for sprites, if you start each sprite one (two in that case)line later than you need only change one sprite per raster line. Of course you waste some sprite gfx, and you make calcualting actual byte to set pixel even harder in this way.

Sprite alignment:
111
111222
111222333

2006-08-07 20:10
Oswald

Registered: Apr 2002
Posts: 5023
lol, well I think amidog was looking for a 'real' 160x100 mode. However we dont have such. IMHO the most simple way of this is only update every 2nd line of the gfx, and voila you have it for nothing. :D

But besides what I have used in a zillion of effects: update alternatively the odd and even pixel rows of your effects, and voila it looks like a full 200 lines high fx, and you even have a neat motion blur like extra effect :) Cheap, effective, you get twice the gfx updated for almost free.
2006-08-08 12:43
MRT
Account closed

Registered: Sep 2005
Posts: 149
Oswald... You cheat you... ;-)
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
mutetus/Ald ^ Ons
Sokratekk
The Phantom
QuasaR/CENTRiC
Guests online: 76
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 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (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 Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

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