Bitshifter's Z-code interpreter

Discussion, Reviews & High-scores

Moderator: Moderators

User avatar
Bit Shifter
Vic 20 Newbie
Posts: 17
Joined: Wed Feb 21, 2018 3:37 pm
Location: Ahrensburg, Germany
Occupation: Scientist

Bitshifter's Z-code interpreter

Post by Bit Shifter »

Kweepa wrote:Very cool!
I tried Leather Goddesses of Phobos, and spotted a couple of problems:

(a) the loading numbers at the bottom steal a line of screen real estate, and that means that more than two pages of text miss a line between pages (the top of the second page)
(b) the interpreter doesn't understand any directions except east - I don't think that was a feature of the game... it also doesn't understand "smell" which is pretty important for LGOP :)

I realize this isn't the right forum, but perhaps you could send it along since that forum is German.
This thread is pretty old, but I have a reason to revive it, because I'm the author of the interpreter and I decided to finish it now.
I'm speaking of the "Black Smurf" Interpreter, now "Bit Shifter" interpreter, to be precise.

First, the problems of "Leather Goddesses of Phobos" have a single cause: The story is too big to fit.
Unfortunately the interpreter used, didn't check the size at that time and just loaded the story file, and if it didn't fit into the RAM, some parts were not present. In general the dictionary is at the end of the resident part and you couldn't get commands recognized, simply because the vocabluray wasn't fully loaded. The new version of the interpreter will check and say "THIS STORY IS TOO BIG" if it doesn't fit.

Meanwhile I programmed some improvements: The most important: The program uses a highres screen with its own proportional font and can use more than 30 characters per line. See the attachment. It's really a screenshot from VICE emulating the VIC-20, not a fake or C64 shot.
If you like to test it, I can provide a disk image with ZORK-I and the interpreter for VIC-20.
vic-zork.png
(mod: thread split from the discussion about someone else's Z-code interpreter)
User avatar
Kweepa
Vic 20 Scientist
Posts: 1314
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Re: Bitshifter's Z-code interpreter

Post by Kweepa »

Welcome!
Good to see you are carrying on this project!
The proportional font looks nice. Maybe you could drop the letters with descenders down a couple of pixels like this:
https://www.youtube.com/watch?v=w_bgobRphlw
:)

(Cometfall is here: http://www.kweepa.org/step/vic20/cometfall.prg http://www.kweepa.org/step/vic20/cometfall.zip)
Last edited by Kweepa on Wed Feb 21, 2018 6:35 pm, edited 1 time in total.
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Bitshifter's Z-code interpreter

Post by Mike »

Hi, Bit Shifter!

It's nice to see your Z-code interpreter is going to have an 'official' release at last. :D
Bit Shifter wrote:It's really a screenshot from VICE emulating the VIC-20, not a fake or C64 shot.
Bitmap-hosted font engines (monospaced or proportional) have been used in several releases here on Denial, so people wouldn't have any reason to disbelieve you.
Kweepa wrote:Maybe you could drop the letters with descenders down a couple of pixels like this: [...]
I was about to point Bit Shifter to Cometfall as one example, unfortunately the download link (and perhaps your whole site?) is defunct at the time I write this. :(

...

@Bit Shifter: Welcome to Denial! :mrgreen:

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

Re: Bitshifter's Z-code interpreter

Post by orion70 »

Hi there, and a big thank you for your effort in finishing this project. I can't be more grateful or happy, as I've been waiting for it for ages :D .
This can really be a turning point in the history of recent VIC 20's products. If you need a working copy of Cometfall, I can attach it here, but I guess most people here have one.
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Re: Bitshifter's Z-code interpreter

Post by ral-clan »

HI Bit Shifter,

I believe I was helping you with beta-testing this way back in 2009. However, I had trouble being consistent in my help to you, due to a job (at that time) that took me away from my home, VIC-20 and internet connection for weeks at a time. I'm not doing that job any-more, but am still very enthusiastic about a Z-machine interpreter for the VIC-20. So would like to offer to help again if you need it.

I have all the gear needed to test on a real NTSC VIC-20: flash and real drives, 32K, etc.
Image Music I've made with 1980s electronics, synths and other retro-instruments: http://theovoids.bandcamp.com
User avatar
Bit Shifter
Vic 20 Newbie
Posts: 17
Joined: Wed Feb 21, 2018 3:37 pm
Location: Ahrensburg, Germany
Occupation: Scientist

Re: Bitshifter's Z-code interpreter

Post by Bit Shifter »

Thanks for your response. See the current version ready to run as disk image attached.
This software is not finished now, please don't upload it to other sites.
The source code is available at personal request.

You need a VIC (or an emulator setting) with 40K !
32K is not enough, there must also be RAM in the block 5 ($A000-$BFFF).

LOAD "VC20",8
RUN

The file CONFIG contains configuration data (foreground color, background color, border color)
The file FONT is loaded and used for the display.
You can try other fonts by copying them to the name FONT, e.g.:
OPEN1,8,15,"C0:FONT=FONTL":CLOSE1
will copy FONTL to FONT
You can also create your own font for usage in the interpreter, the format is simple:
96 Bytes containing the widths of the ASCII characters $20 (blank) to $7F, the font may be fixed (all characters have the same width) or proportional.
after that 8 bytes per character defining the matrix. I attach the source codes (text) for some fonts. They have to be assembled to binary format before usage in the interpreter.
IMPORTANT: The sequence of characters is ASCII not PET/CBM. 'A' is $41 and 'a' is $61
The character with code $7f is special, because it is used as cursor.

I'm currently working on a user switch, which can enable/disable the Cache/Track/Sector display in the last line.
The display was for debug purpose, but I left it active in order to see something while waiting for some disc sectotrs to load.
But I'll probably deactivate it by default.
Have fun.
Attachments
fonts.zip
(6.94 KiB) Downloaded 287 times
zork1.zip
(71.58 KiB) Downloaded 300 times
Last edited by Bit Shifter on Thu Feb 22, 2018 2:49 pm, edited 2 times in total.
User avatar
Bit Shifter
Vic 20 Newbie
Posts: 17
Joined: Wed Feb 21, 2018 3:37 pm
Location: Ahrensburg, Germany
Occupation: Scientist

Re: Bitshifter's Z-code interpreter

Post by Bit Shifter »

:D
Last edited by Bit Shifter on Thu Feb 22, 2018 2:50 pm, edited 1 time in total.
User avatar
Bit Shifter
Vic 20 Newbie
Posts: 17
Joined: Wed Feb 21, 2018 3:37 pm
Location: Ahrensburg, Germany
Occupation: Scientist

Re: Bitshifter's Z-code interpreter

Post by Bit Shifter »

Kweepa wrote:Welcome!
Good to see you are carrying on this project!
The proportional font looks nice. Maybe you could drop the letters with descenders down a couple of pixels like this:
https://www.youtube.com/watch?v=w_bgobRphlw
:)
We already had a long font discussion at "forum64.de".
There was no agreement on the optimal font, so I built in a loadable font with a simple structure.
Now everyone can either choose from some fonts on the disk or create her or his own font, it's very easy.
User avatar
Bit Shifter
Vic 20 Newbie
Posts: 17
Joined: Wed Feb 21, 2018 3:37 pm
Location: Ahrensburg, Germany
Occupation: Scientist

Re: Bitshifter's Z-code interpreter

Post by Bit Shifter »

Mike wrote:Hi, Bit Shifter!

It's nice to see your Z-code interpreter is going to have an 'official' release at last. :D

@Bit Shifter: Welcome to Denial! :mrgreen:

Michael
Thanks Michael.

I didn't know this cometfall version, it seems, that someone had similar ideas.
It will also prepare a cometfall image, it will be nice, to compare the interpreters.
User avatar
Kweepa
Vic 20 Scientist
Posts: 1314
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Re: Bitshifter's Z-code interpreter

Post by Kweepa »

Cometfall isn't a z-code interpreter, or an adventure interpreter - it's just an adventure I wrote in C.
It just looks like ZIL output because I modelled the intro text on Infocom games :)
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Re: Bitshifter's Z-code interpreter

Post by ral-clan »

Bit Shifter wrote:Thanks for your response. See the current version ready to run as disk image attached.
This software is not finished now, please don't upload it to other sites.
The source code is available at personal request.
Thanks, I'll give this a go this weekend for about an hour to see how it goes, and report on my experience.
Image Music I've made with 1980s electronics, synths and other retro-instruments: http://theovoids.bandcamp.com
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Bitshifter's Z-code interpreter

Post by Mike »

Bit Shifter wrote:You need a VIC (or an emulator setting) with 40K !
32K is not enough, there must also be RAM in the block 5 ($A000-$BFFF).
"+32K" is commonly referred to as the RAM configuration with RAM in BLK1..3 and BLK5.

If you also use the 3K in the address range $0400..$0FFF (like Kweepa did with VIC Doom or I did here), you'll often have to stress this out though: many people otherwise just ignore this or don't take this serious (like in: "but doesn't just +32K suffice?") and then wonder the program/tool/game doesn't run with "just +32K".

Those "+35K" (or "+32K +3K") are also the biggest common denominator, as this is the maximum RAM you can get on the VIC-20, if you:

- remain at an unbanked RAM setup (there is no agreed upon or at least wide-spread enough standard for banked RAM!), and
- leave the I/O area for its intended purpose, i.e. as I/O registers or other resource, strictly for the use by the cartridge firmware only!

+32K +3K is supported by Mega-Cart, FE3 and Ultimem. In case of FE3 though, due to issues with the CPLD firmware (*not* the FE3 menu firmware!), crosstalk between RAMx and BLKx can happen - mainly on NTSC VIC-20s, but this has also been reported on some PAL VIC-20s - rendering the +32K +3K configuration problematic for FE3 users. :(
User avatar
mrr19121970
Vic 20 Nerd
Posts: 873
Joined: Tue Jan 19, 2016 9:22 am
Location: Germany
Occupation: IT service manager

Re: Bitshifter's Z-code interpreter

Post by mrr19121970 »

I have 2 penultimate cartridges too. the older one with dip switches can support 35kb expansion. the newer one that is menu driven I am not too sure. it says "enable all memory 32kb"
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Bitshifter's Z-code interpreter

Post by Mike »

mrr19121970 wrote:I have 2 penultimate cartridges too. [...] the newer one that is menu driven I am not too sure. it says "enable all memory 32kb"
I checked against their website at:

https://www.thefuturewas8bit.com/index. ... timatecart

The v5.0a revision presents a menu for Memory options, which clearly states which of the BLKs 1..3 and 5 are enabled, and whether RAM in $0400..$0FFF (dubbed "BLK0") is there. It also allows for +35K:

Image

You can simply check with my CGA panning viewer. When it works, you have the +35K RAM. When it crashes or shows a wrong display (provided you didn't input a wrong file name), you either don't have +35K but just +32K, or you have crosstalk between RAMx or BLKx - unintended or intended by double use of a RAM chip a.k.a. "no-one needs +32K and +3K simultaneously".
User avatar
mrr19121970
Vic 20 Nerd
Posts: 873
Joined: Tue Jan 19, 2016 9:22 am
Location: Germany
Occupation: IT service manager

Re: Bitshifter's Z-code interpreter

Post by mrr19121970 »

Yes, trying it now. From the main menu:

F5 - 35K
F7 - SD2IEC menu + 35k
F8 - Load "*" + 35k
Post Reply