Page 3 of 8

Posted: Wed Apr 29, 2009 6:02 am
by Bacon
ral-clan wrote:I thought there would have been more excitement about this other than myself and Orion70. Infocom adventures on the VIC-20!
OK; I'll chime in: :D :shock: :shock: :D :!:

Simply amazing!

Posted: Wed Apr 29, 2009 6:07 am
by TNT
Hi all!

Parser memory map:

Code: Select all

0000..03ff    system (lots of unused space here)
0400..0fff    virtual memory, addresses 6c00..77ff
1000..11ff    screen memory
1200..33ff    parser code & tables
3400..7fff    virtual memory, adresses 0000..4bff
a000..bfff    virtual memory, adresses 4c00..6bff
Beginning of $12xx page is used to expand the screen by a couple of lines.

As the same parser works on VIC-20, C64, C128 and PET/CBM series with BASIC2 I need to be careful when using memory below $0400. As I use kernal only for disk I/O and keyboard I have much more freedom than otherwise, but there are still several areas to avoid.
ral-clan wrote:Jorma said something about there being 77 bytes free
That was "free before parser need another 256-byte page", so expanding screen by three lines didn't take memory away from Z-machine. Yesterday night I started working on screen configuration program, if I get it working you can use whatever screen size as long as it uses 640 bytes at max.
orion70 wrote:Z-Machine Interpreter is being ported to the VIC-20!
So far this only V3 support is (presumably) complete. I plan to add V4/5/8 support later. V4 is almost there already. V8 is just an expansion of V5 address range so it will require no additional work once V5 works.

Posted: Wed Apr 29, 2009 8:02 am
by orion70
It's going to be one of the big steps forward in VIC's history, no exaggeration here :D .
Thanks in advance for what you're doing and.. post a download link as soon as it's a final release!

Posted: Wed Apr 29, 2009 10:33 am
by jsundh
Yes! Of course this is fantastic! I am currently playing through the Infocom games, like the old time, but do it on my PC. Would be fun to play them on my Vic 20 instead. Great works!!!

Posted: Wed Apr 29, 2009 12:56 pm
by Kweepa
Pretty darn cool!
Do they run off the disk? So it doesn't matter what size the game data itself is?

Posted: Wed Apr 29, 2009 12:58 pm
by ral-clan
Yes the adventure runs off the disk. Well, from the way it behaves, it seems to load as many locations into RAM as it can (maybe a couple) and then accesses the disk when it needs to.

Posted: Wed Apr 29, 2009 3:48 pm
by carlsson
ral-clan wrote:How do you come to the total of 38.25K Carlsson?
4K internal RAM, 24K continuous expansion RAM, another 8K RAM in BLK 5, another 3K in BLK0 that is separated from the other due to the screen matrix is stored somewhere. 4+24+8+3 = 39K.

As TNT indicated, the screen was extended from 22x23 to 22x26 so it uses 572 bytes = 0.56K actually. That would be 38.44K not counting the low 1K.

The display file of max 640 bytes would suggest 26x24, 25x25, 24x26, 23x27, 22x29, 21x30 or 20x32, depending how large display you can fit and what is practical for the text adventures.

Posted: Wed Apr 29, 2009 11:28 pm
by TNT
Kweepa wrote:Pretty darn cool!
Do they run off the disk? So it doesn't matter what size the game data itself is?
Infocom (and other Z-machine) adventures need to keep part of the game (called dynamic memory) in RAM all the time, and if that is too big to fit then game can't be played. Well, I managed to fit Nord & Bert into 32 KB PET by leaving vocabulary to disk, but that means every word parsed requires a lot of disc access.

Fully expanded VIC-20 leaves 31 KB for the virtual memory. I managed to free one more page (256 bytes) yesterday, and I hope to get rid of one more page today. After recent changes that page is used only for $verify command, ie. completely useless in normal use. I'm quite happy with yesterday's work: now aging virtual memory pages (simple LRU) works correctly, code is smaller and in practice just as fast as before.

I will try the game on my VIC-20 this weekend and maybe expand the screen memory to 768 bytes if I can fit that on my monitor. You can always use smaller screen if you want, and the game will remember your last settings.

Posted: Thu Apr 30, 2009 12:32 am
by orion70
I really can't wait... :oops:
Any pre-release screenshots available (e.g., shots from VICE emulator)?

Posted: Thu Apr 30, 2009 1:24 am
by carlsson
TNT published some early screenshots on the Lemon64 forum.

http://www.lemon64.com/forum/viewtopic.php?t=29909

I suppose out of the three main Commodore subdivisions, the VIC crowd might be most enthusiastic about this. The C64 owners have like gazillions of text adventures to choose from and the die-hard PET users are few and far between, probably more interested in the hardware than playing games. The VIC-20 with its limited memory has always been a challenge what you could do if you add enough memory, and by now 32K or more is getting common enough to make games using that if they have to.

Posted: Thu Apr 30, 2009 4:23 pm
by TNT
TNT wrote:Yesterday night I started working on screen configuration program, if I get it working you can use whatever screen size as long as it uses 640 bytes at max.
I expanded screen memory to three full pages, front end is complete except for fastloader and loading/saving of settings.
Image
Screen gets redrawn when size is changed to keep it readable whatever size you set it to. The next thing to do is to patch the parser where screen width/height are used, after that it's time for some more testing.

@carlsson: you forgot Amiga users when you counted Commodore subdivisions :)

Posted: Thu Apr 30, 2009 6:33 pm
by 6502dude
TNT wrote:
Kweepa wrote:Pretty darn cool!
Do they run off the disk? So it doesn't matter what size the game data itself is?
Infocom (and other Z-machine) adventures need to keep part of the game (called dynamic memory) in RAM all the time, and if that is too big to fit then game can't be played. Well, I managed to fit Nord & Bert into 32 KB PET by leaving vocabulary to disk, but that means every word parsed requires a lot of disc access.

Fully expanded VIC-20 leaves 31 KB for the virtual memory. I managed to free one more page (256 bytes) yesterday, and I hope to get rid of one more page today. After recent changes that page is used only for $verify command, ie. completely useless in normal use. I'm quite happy with yesterday's work: now aging virtual memory pages (simple LRU) works correctly, code is smaller and in practice just as fast as before.

I will try the game on my VIC-20 this weekend and maybe expand the screen memory to 768 bytes if I can fit that on my monitor. You can always use smaller screen if you want, and the game will remember your last settings.
Vic-20 has very close to 40K of memory with Mega-Cart. :wink:

Posted: Fri May 01, 2009 1:43 am
by orion70
:D
Mega-cart and classic text adventures... what else should I ask for in my life?

Posted: Fri May 01, 2009 4:19 am
by TNT
6502dude wrote:Vic-20 has very close to 40K of memory with Mega-Cart. :wink:
Yes, but having as much physical memory as possible for the virtual memory makes playing faster. Also worth remembering is that while all V3 games - at least those from Infocom - have resident part smaller that what fits into VIC-20, there just may be V4/V5/V8 games which would have worked if I had used one page less.

Also, 32 KB PET may have trouble with the largest V3 games, and as the same source is used for all the target machines every byte I save helps it too. Naturally expanding VIC-20 screen doesn't affect other targets, but getting rid of $verify buffer does.

edit: adjustable screen size and colors seems to work
Image
ral-clan will probably report how it works on real hardware as soon as he has tested it.

I hope that my patch which limits start-of-line-spaces to two doesn't break any games.

Posted: Sun May 03, 2009 6:12 am
by orion70
No computer should be without one!
:D