Hires Graphics

Basic and Machine Language

Moderator: Moderators

User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Post by orion70 »

Done. As usual, smoother if played in Windows viewer.

Image
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Fine. :D Which latitude did you use?

Michael
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Post by orion70 »

30° N. Slightly north of the Tropic of Capricorn (23° N). Best angle to see Europe, Greenland, the whole Africa, Asia, and the Americas (Tierra del Fuego being few pixels out).
Not so nice view of Australia, and no Antarctica at all though. :P
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Post by ral-clan »

I can see my house from here!
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Post by orion70 »

:D :D :D
Legacy
Vic 20 Enthusiast
Posts: 154
Joined: Wed Dec 31, 2008 4:01 pm

Post by Legacy »

I wish you guys would post programs in lower case, it makes it a pain when I paste into VICE :shock:
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Hi, Legacy,

cut and paste are quite a recent addition to VICE. Short that facility being available in VICE before, there were already other tokenizers around, like Schlowski's BasEdit, which can handle upper-case letters. BasEdit produces *.prg files.

Listings without control chars, or special symbols can be transferred with a small 4-line program.

Michael
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Post by orion70 »

Legacy wrote:I wish you guys would post programs in lower case, it makes it a pain when I paste into VICE :shock:
Copy and paste in M$ Word, select all, and press shift+F3. Voilà. :wink:
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

By the way, at what smaller resolution would this kind of animated globe be feasible? At 128x128 pixels each frame equals 2K if video and colour matrices are unchanged.

How long would it take to generate a frame in ML, and how many frames need to be precalculated if we want the globe to rotate at least one frame per second? Even then, the internal 4K RAM probably is best used for double buffering so we can copy graphics data into one half while displaying the other.
Anders Carlsson

Image Image Image Image Image
Legacy
Vic 20 Enthusiast
Posts: 154
Joined: Wed Dec 31, 2008 4:01 pm

Post by Legacy »

thanks ORION * * *
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

carlsson wrote:By the way, at what smaller resolution would this kind of animated globe be feasible? At 128x128 pixels each frame equals 2K if video and colour matrices are unchanged.

How long would it take to generate a frame in ML, and how many frames need to be precalculated if we want the globe to rotate at least one frame per second? Even then, the internal 4K RAM probably is best used for double buffering so we can copy graphics data into one half while displaying the other.
The following program displays the rotating Earth globe with 24 phases, in full resolution, at ~4 frames per second. It needs a fully expanded VIC-20, with RAM in BLK1, BLK2, BLK3, and BLK5.

Similarily to the first incarnation, in line 11, R1 can be adapted for different aspect ratios: R1=57 is correct for PAL; NTSC, and VICE should use R1=71, and R1=47, respectively. Line 21 contains a {PI} symbol.

Main work is done by a ultra-fast line-routine, which does ~30000 pixels per second.

Cheers,

Michael

P.S.: It is now 00:53 CET, time to go to bed.

Edit: type-in listing removed. It is contained in the MG batch suite.
Last edited by Mike on Sat Jul 28, 2012 10:22 am, edited 1 time in total.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

I should've guessed you were on the task! :lol:

While I haven't tried it yet, I understand the MINI-GRAFIK program needs to be loaded. Then you seem to save (or is it load?) a file to disk. Is it a 24K memory dump of all the pre-calculated coordinates that your first program will generate?
Anders Carlsson

Image Image Image Image Image
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

@1? @CLR?
High Scores, Links, and Jeff's Basic Games page.
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

carlsson wrote:... you seem to save (or is it load?) a file to disk.
Both. It is checked whether the file "LIN" already exists on disk, and whether it is the correct data for the aspect ratio R1 specified in line 11. If neither of these preconditions is true, then the program calculates new data for the file, which takes roughly 40 minutes. Doing that chore once is enough.
Is it a 24K memory dump of all the pre-calculated coordinates that your first program will generate?
Actually, the file "LIN" is 49 blocks in length.

Michael
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Post by orion70 »

Another programming wonder :shock: .
For the lazy ones, here's a disk with the rotating globe program (R1=47, works in fully expanded VICE emu). It's complete with the generated LIN file.

Instructions:

1) load"*",8,1
2) run
3) load"globe",8
4) run
5) Wait approx. two minutes (or press ALT+W)
6) Enjoy

:wink:
Post Reply