The mystery with Basic V4

Discuss anything related to the VIC
Post Reply
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

The mystery with Basic V4

Post by eslapion »

Awrite, I really don't know what category to put this one in so I put it here.

Back in the early 80's, in the sorel VIC20 club we had access to BASIC V4 for disk utilities.

Recently, somebody asked me to include this as a ROM option for a custom made expander but when trying it out, many of the most important commands such as "SCRATCH" simply crashed into the machine language monitor.

I suggested the possibility that it might be because these only work with the VIC-1112 IEEE-488 interface but I have no way to verify that.

Last year I purchased the B.I.-80 80 column adapter for the 64 and I noticed that BASIC V4 is included in its ROM and activated by an SYS command.

Basic V4 for the VIC is still publicly available on Zimmers and, at least, the DIRECTORY command and the CATALOG command (both do the same thing) are working fine.

Is there anyone here who can tell me if these faulty commands DO work fine with the VIC's IEEE interface and if not, would it be possible to take the BASIC V4 from the B.I.-80 and adapt it to the VIC?

Considering that most important commands go through vectors that should be located at the same place for both the VIC and the 64.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Hm, I connected an IEEE interface to the first slot of a VIC-1005 expander (without on/off buttons), then a switchable memory expansion to the second slot. When I enable BLK5 on the memory expansion, the IEEE interface is shadowed and not reachable. I can not enable only half the memory block (to load any Basic extention that maps to $A000).

Furthermore, I tried to load a 8K image into BLK5 in this weird configuration, and the program crashed and not even the reset button helped.

I will conduct further testing, different combinations of memory expansions and interfaces.
Anders Carlsson

Image Image Image Image Image
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

No, for some unknown reason it appears a memory expansion always has precence over any other cartridge in this type of expansion unit. No matter which order I place the cards, if I have BLK5 enabled on the memory expansion (I tried two different ones), it will out shadow any other cartridges plugged in.

Since the Dams IEEE cartridge itself maps to $A000, it would not be possible to get it to work with Basic V4, but the other one which maps to $B000 should in theory work. Perhaps if someone reverse engineers this type of interface, it could come with two EPROM sockets; one for the IEEE controller software and one for optional application software (i.e. a Basic extention if preferred).
Anders Carlsson

Image Image Image Image Image
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Ha! I noticed that when two cartridges share the same memory block, some kind of masking occurs. It is possible to write to RAM, but only certain values based on what the ROM is masking. Therefore, I dumped the IEEE ROM to disk and loaded it back to the "mixed zone". RAM on top of ROM, same contents, no problems.

So, this is my procedure:

1. Connect IEEE interface prior to BLK5 RAM expansion
2. Load Basic V4 from disk, NEW and load IEEE ROM dump from disk
3. SYS 64802 to reboot with Basic V4
4. SYS 45056 to start IEEE interface

The 1541 is connected as device 8, but any drive on the IEEE chain that wants device 8 will assign it as its own. However, the CATALOG command in Basic V4 is hard coded to work with the IEC bus It does NOT function with the IEEE interface. LOAD"$",8 however goes to the IEEE drive.

This is not entirely a failure. Normally you would not have any way to access the 1541 while the IEEE is active (RUN/STOP + RESTORE solves that problem). I've tested it with 1541 drive both as device 8 and 9. Somehow Basic V4 makes direct calls to the IEC bus, bypassing the Kernel and thus makes it possible to use both.

On the third hand (yes, I'm related to octopus), some of the new commands like DLOAD don't seem to work at all, even with the IEEE interface unplugged. COLLECT however works, again directed directly to 1541.

And yes, SCRATCH ends up in the monitor no matter which drive configuration you're using... :D

There is a Basic V5 on Zimmers too, but it is an 8K image.
Anders Carlsson

Image Image Image Image Image
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Post by eslapion »

The Basic V5 located on Zimmer's only works with PAL, it causes the screen to be out of range on an NTSC VIC and when I tried it on VICE, it caused weird problems.

The VIC would crash when I typed the MEM command.

Also, the cursor doesn't flash...?!?!?

This was definitely not made by commodore.

But the Basic V4 in the C64 B.I.-80 works just fine and it does contain EXACTLY the same addtional commands found on a PET that has V4. And they have EXACTLY the same syntax as on a PET.

Nobody knows if this could be adapted to the VIC ?
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

I believe the "professional" cursor is on purpose.

I don't know about the B.I.-80, or if the code is different than the Basic V4 image that doesn't work properly. Are both modules 4K? Where can one get the other ROM image?
Anders Carlsson

Image Image Image Image Image
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Post by eslapion »

The code in BI-80's basic V4 is definitely different from the one for the VIC. For one thing there is no longer an ML monitor.

The other thing is it also contains the commands for initializing the 80 columns display.

And finally, yes, it is 4k in size but it appears at $8000 instead of $A000.

As for the ROM image, well I guess I can easily use a modified version of the code given to me by Mike (http://sleepingelephant.com/v-web/bulle ... php?t=1262) to save it for you if you want it.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

I'm not overly interested in re-surrecting a Basic extention.
Anders Carlsson

Image Image Image Image Image
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Post by eslapion »

Hey Leif? Would you rescue me?
Post Reply