VirtualCBM

You need an actual VIC.

Moderator: Moderators

User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

Yes, Graphics and Sound is on my wishlist for VirtualCBM. Unfortunately my spare time is a little bit short at the moment, but rest assured that I will continue development! Graphics should be fairly easy to implement, Sound makes me a little bit nervous as I'm a total noob concerning this area. But one grows with his duties, I'm sure in a year I'm laughing about my sorrows of today.

I learned a lot about how to optimize graphics output via GDI+ while creating BasEdit, I never thought before that it would be possible to do this in pure VisualBasic. Seems like I am very addicted to this programming language :-)
It seems to run about 4 times faster than running VICE in warp mode.
Cool, so did you have to change anything else beside the NEXT-commands?

I'm really not sure how the Interpreter on the real machine handles these NEXT A,B thingy, it's very clever about if a variable was used in a FOR-NEXT loop or not. I cannot imagine how to do that beside using a second stack with finished FOR-Variables as a lookup.

Code: Select all

10 FORA=1TO10
20 FORB=1TO10
30 NEXT B,A
My solution for FOR-NEXT loops at the moment is simply putting the variable, step etc. onto my very own stack and when coming to a NEXT checking if the variable after NEXT matches the top-most entry on my FOR-stack. When the variable+step is grater (or less when step is negative) the endvalue I pop that element from the stack. This is ok for the inner loop, but as soon as the B-loop is finished my interpreter reads "NEXT B,A", looks at the FOR-stack, sees an "A" and is busted...
I studied the Kernal routines for the NEXT command a little bit but am confused, I think the Kernal leaves finished variables on stack so when arriving at the NEXT B,A it sees that B is finished, ignores it and continues with the A-loop. This way it gets not fooled by an NEXT C,A command and can assert an NEXT WITHOUT FOR ERROR for C.
Any other/better idea?
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Schlowski wrote: Cool, so did you have to change anything else beside the NEXT-commands?
Yes, I had to increase all loops by 100 to not get the measured TI to be 0.

And there was a syntax error on this line for some reason:
95 READA$:IFA$="FUTURIA"THEN820

If your TI variable is correct, then VirtualCBM is capable of around 70000 basic commands per second on my computer, compared to the Vic-20's 531 basic commands per second.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

TI should be correkt, it's based on the PC time (DateAndTime.Timer).

For the syntax error: Can't see what causes an error here, will investigate...

EDIT: Just took a look at it and it seems to be an error concerning my READ routine - If after the DATA the next sequence starts with a " then it causes an error - but reports that error for the wrong line, i.e. the line with the READ command, not the line where the "false" DATA statement was found. I changed lines 510, 520, 521, 522 and 790 to include a space between DATA and the " and then it worked. Have to check what's wrong here another time.

Btw., could you mail me your changed version so I can test with a version which does not generate a DIVIDION BY ZERO error?
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Schlowski wrote:TI should be correkt,
Just curious. I've seen this spelling of "correct" (as I spell it) often lately. Is it Germanic? Leet? Or maybe Pidgin?
High Scores, Links, and Jeff's Basic Games page.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Jeff-20 wrote:
Schlowski wrote:TI should be correkt,
Just curious. I've seen this spelling of "correct" (as I spell it) often lately. Is it Germanic? Leet? Or maybe Pidgin?
Maybe it's important to spell korrekt correct?
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

No, that's a fault - I first wrote "korrekt" which is the german spelling and changed only the first "k" into "c" - so it's sort of Germish :-)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Korrekt is the Swedish spelling too...
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Ravin' Ray
Vic 20 Newbie
Posts: 13
Joined: Sat May 22, 2010 11:36 pm

Post by Ravin' Ray »

Schlowski wrote:I always dreamed about a VIC with 2 or 4 or 8MHZ and how cool that would be - but since I'm a software guy I have to write my own system instead of soldering a new machine. I think this project will be a part of my spare time for a long time...
Hi there,

I'm not a programmer but am just curious about retro mods of classic machines (anyone seen Ben Heck's C64 laptop), what CPU were you thinking of? The 65C02, 65CE02, or 65816 (SuperCPU)? And what casing would it use?
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

I like the VIC casing, only thing I would like to be changed would be separate cursor keys for all directions. Or maybe something like the C128D with separate keyboard...
As for the processor I would also like a 6809, it's simple like the 6502 but has some 16 bit registers which make live a lot easier in loops etc. And it has 16 bit relative adressing, good for position independant programs.
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

New version 0.03 uploaded:
- fixed an error concerning DATA lines and string constants in quotes

Now QBench18.prg can at least read in all datas without errors :-)
Post Reply