Winter Simulator
Moderator: Moderators
Winter Simulator
Here is a little program I made a couple of days ago:
http://home.worldonline.se/boray/datormuseum/winter.zip
/Anders
http://home.worldonline.se/boray/datormuseum/winter.zip
/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
I just updated the program (same link) with user defined graphics in the tape buffer! (Just like Mobsie's tip in the programming forum). How cool! My first program with graphics that works on both expanded and unexpanded vic20!!!
/Anders
/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Here is a version that is even a little bit faster
(to give you a little better competition ) :
http://home.worldonline.se/boray/datorm ... inter3.zip
I tested out that when compiling with Austro compiler,
integers will be faster than floating point numbers
(quite excpected) and constants will be faster
than variables. Quite the opposite to the normal
interpretive CBM Basic where variables are faster
than constants and floating point numbers are faster than
integers....
So I changed all variables (that could be changed) into
integers and all variables that I just had used for speeding
up the basic was replaced with constants. It got a little
faster. Not overwhelmingly much, but a little.
I also noticed that you can't use integers in
FOR loops...? FOR A%=1 TO 1000 is not allowed...
(in the normal CBM basic - probably not in Austro either
because it seems to be 100% compatible).
I also tested the speed agains the normal basic, and
when running a compiled program on a PAL Vic-20, it
gets about as fast as running a normal basic program on
a 4MHz Vic-20!!!
Explanations:
Integers: For example A%=5, can only handle whole numbers.
Floating point numbers: For example A=5, can handle decimal numbers,
like A=5.23
Constants: For example 34, 123 etc...
(I know you know this Anders, but in case someone who didn't
know is reading this...)
/Anders
(to give you a little better competition ) :
http://home.worldonline.se/boray/datorm ... inter3.zip
I tested out that when compiling with Austro compiler,
integers will be faster than floating point numbers
(quite excpected) and constants will be faster
than variables. Quite the opposite to the normal
interpretive CBM Basic where variables are faster
than constants and floating point numbers are faster than
integers....
So I changed all variables (that could be changed) into
integers and all variables that I just had used for speeding
up the basic was replaced with constants. It got a little
faster. Not overwhelmingly much, but a little.
I also noticed that you can't use integers in
FOR loops...? FOR A%=1 TO 1000 is not allowed...
(in the normal CBM basic - probably not in Austro either
because it seems to be 100% compatible).
I also tested the speed agains the normal basic, and
when running a compiled program on a PAL Vic-20, it
gets about as fast as running a normal basic program on
a 4MHz Vic-20!!!
Explanations:
Integers: For example A%=5, can only handle whole numbers.
Floating point numbers: For example A=5, can handle decimal numbers,
like A=5.23
Constants: For example 34, 123 etc...
(I know you know this Anders, but in case someone who didn't
know is reading this...)
/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Yes, it is true that you can not use integer variables in FOR loops, and the alternative (10 A%=A%+1:IF A%<xx THEN 10) is even slower. I think some other (non-Commodore) Basic dialects may allow those loops, but it doesn't matter here.
I'll return to this thread when I'm finished - got a little bored yesterday and were coughing too much to be productive.
I'll return to this thread when I'm finished - got a little bored yesterday and were coughing too much to be productive.
Anders Carlsson
Here is a new version, and again, it's faster!
http://home.worldonline.se/boray/datorm ... inter4.zip
It turns out Austro compiler supports integers in
FOR loops as an extra feature! And this version is
now 1.4 times faster compared to the first compiled
version.
The only problem is that you can't test run a program
using integers in FOR loops before compiling it... But as
always there is a solution... When writing your program,
use a special variable that you use in all
FOR loops, for example called FFF. (FOR FFF=1TO200 etc...)
Then when your program is ready for the final compilation,
load it on your C64+Final Cartridge that is standing next
to your Vic20. On it, use the REPLACE command:
REPLACE FFF,F%
Save, and then compile it on the vic20...
/Anders
http://home.worldonline.se/boray/datorm ... inter4.zip
It turns out Austro compiler supports integers in
FOR loops as an extra feature! And this version is
now 1.4 times faster compared to the first compiled
version.
The only problem is that you can't test run a program
using integers in FOR loops before compiling it... But as
always there is a solution... When writing your program,
use a special variable that you use in all
FOR loops, for example called FFF. (FOR FFF=1TO200 etc...)
Then when your program is ready for the final compilation,
load it on your C64+Final Cartridge that is standing next
to your Vic20. On it, use the REPLACE command:
REPLACE FFF,F%
Save, and then compile it on the vic20...
Well, 3.4MHz is more like it....Boray wrote:it
gets about as fast as running a normal basic program on
a 4MHz Vic-20!!!
/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Yes,
it goes faster and faster. But now what can you do with the saved time ???
Maybe sometimes a Santaclaus who jump trugh the screen ?
It is wery interesting what people can do with good/clever programming. We can see this great in this Programm.
I often talk with modern/aktuel programmers, and when i see their programms wow. Wow i mean wow Bad.
If the programm is to slow, the customers must buy new computers, thats all.
Cheers
Mike
it goes faster and faster. But now what can you do with the saved time ???
Maybe sometimes a Santaclaus who jump trugh the screen ?
It is wery interesting what people can do with good/clever programming. We can see this great in this Programm.
I often talk with modern/aktuel programmers, and when i see their programms wow. Wow i mean wow Bad.
If the programm is to slow, the customers must buy new computers, thats all.
Cheers
Mike
That last file seems to be a bit corrupt.... Sorry....
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
The latest version as well as a c64 version can be downloaded here:
http://home.worldonline.se/boray/datormuseum/snow.html
/Anders
http://home.worldonline.se/boray/datormuseum/snow.html
/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)