WIP: Vic GUI

Basic and Machine Language

Moderator: Moderators

User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Kananga wrote:Anyway, the GUI-based file browser is able to browse through SD2IEC drives and launch programs for different memory configurations that can be started with "RUN". It would be great, if you could post feedback about programs that don't load (or work surprisingly good ;-) )
Great! :D

VIN loads the file to the base address of BASIC memory via ',<dev>' and not with ',<dev>,1' before it attempts to run it, which is actually the right thing to do. For example, MINIPAINT images (with their 'strange' start address of $10F1) display seamlessly - just the suggestion of 'unexpanded' is wrong in that case and should be +8K instead.

I presume you use a small loader stub in the stack, $02A1, or tape buffer area to load the selected file. Do you think it's possible to extend it with a wedge in $0302, so during a BASIC warm start (either a normal end of program or STOP/RESTORE) that wedge could attempt to reload VIN?

And, of course, some directory edit functions (rename, scratch, ...) would be *very* nice. ;)
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Mike wrote: VIN loads the file to the base address of BASIC memory via ',<dev>' and not with ',<dev>,1' before it attempts to run it, which is actually the right thing to do.
True for BASIC programs. At some point I wanted to add a checkbox, to give the user the choice, but the idea somehow got lower priority. ;-)
Mike wrote: For example, MINIPAINT images (with their 'strange' start address of $10F1) display seamlessly - just the suggestion of 'unexpanded' is wrong in that case and should be +8K instead.
I haven't had a closer look at MINIPAINT images yet, but is there an easy way to detect images? Is the start address always $10F1?
Mike wrote: I presume you use a small loader stub in the stack, $02A1, or tape buffer area to load the selected file. Do you think it's possible to extend it with a wedge in $0302, so during a BASIC warm start (either a normal end of program or STOP/RESTORE) that wedge could attempt to reload VIN?
The loader is copied to the tape buffer ($33C..) and run from there. The problem with reloading VIN is that I don't know yet how to find it after changing directories. I'll have to look into the SD2IEC documentation to see, if there is a way to read the current path on startup.
Mike wrote: And, of course, some directory edit functions (rename, scratch, ...) would be *very* nice. ;)
Sure, but RAM is almost full. VIN checks for I/O wedges on startup and doesn't use ocupied RAM. For example, if you start the FE3 BASIC wedge before running VIN, $A000-$BFFF is not allocated.

Adding a simple command input window that sends to channel 15 is easy and would allow to test commands. Will come soon. :-)

BTW, did you find the RTC clock display in VIN?
Buy the new Bug-Wizard, the first 100 bugs are free!
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Kananga wrote:I haven't had a closer look at MINIPAINT images yet, but is there an easy way to detect images? Is the start address always $10F1?
Yes, the files are always stored from a memory range starting at $10F1. Nevertheless, the first few bytes contain a BASIC stub, which - when loaded to the default BASIC start of $1201 (8K, or more) calls the display routine contained at the end of the file.
The loader is copied to the tape buffer ($33C..) and run from there. The problem with reloading VIN is that I don't know yet how to find it after changing directories. I'll have to look into the SD2IEC documentation to see, if there is a way to read the current path on startup.
That had been discussed in another thread (TNT's Z-code interpreter), and IIRC sd2iec doesn't store the path somewhere (and so it can't be read out either).

However, you could just assume that the opened file resides on the same disc VIM was loaded from, and make at least the attempt to reload VIM. If that doesn't succeed, you'd then restore the default $0302 warm start vector, and continue the warm start instead. That is similar to how GEOS handles non-GEOS applications.
Adding a simple command input window that sends to channel 15 is easy and would allow to test commands. Will come soon. :-)
... if it also reports the error channel, that'd be in order. :)
BTW, did you find the RTC clock display in VIN?
I could only test in VICE for the moment, but the time display would be set from it, wouldn't it?
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

Very nice program, it puts the Vic-20 to another dimension :wink:
Mega-Cart: the cartridge you plug in once and for all.
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Mike wrote:Yes, the files are always stored from a memory range starting at $10F1. Nevertheless, the first few bytes contain a BASIC stub, which - when loaded to the default BASIC start of $1201 (8K, or more) calls the display routine contained at the end of the file.
Support added, will be in next release. :)
Mike wrote:
I'll have to look into the SD2IEC documentation to see, if there is a way to read the current path on startup.
That had been discussed in another thread (TNT's Z-code interpreter), and IIRC sd2iec doesn't store the path somewhere (and so it can't be read out either).
Forgot about that thread. Thanks!
Mike wrote:However, you could just assume that the opened file resides on the same disc VIM was loaded from, and make at least the attempt to reload VIM. If that doesn't succeed, you'd then restore the default $0302 warm start vector, and continue the warm start instead. That is similar to how GEOS handles non-GEOS applications.
That is not a very usable solution. Today's VIC-20 has an SD2IEC or uIEC attached and I (as my only beta tester yet) organise files in directories. So a directory change is very likely.
Mike wrote:
Adding a simple command input window that sends to channel 15 is easy and would allow to test commands. Will come soon. :-)
... if it also reports the error channel, that'd be in order. :)
Noted. (Presently, I have too much work, not enough time...)
Mike wrote:
BTW, did you find the RTC clock display in VIN?
I could only test in VICE for the moment, but the time display would be set from it, wouldn't it?
Does VICE simulate an uIEC-RTC clock?
Actually, I built something like this.

@nbla: Thanks! :)
Buy the new Bug-Wizard, the first 100 bugs are free!
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Kananga wrote:Support added, will be in next release. :)
:D

... and I would really want to know why I spelt VIN wrong at least twice in the last post (vim is vi 'improved', indeed ;)) ...

Here's my suggestion for the splash screen:

Image
(download)

:mrgreen:
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Mike wrote: Here's my suggestion for the splash screen:
Nice picture, thanks!

BTW, I just found the NV file browser in Forum64. Was it announced on Denial? Must have missed that...
Looks like there is a variety of file browser to chose from now. :D

Anyway, it also has a resident part and changes to the root directory before trying to load itself. Sounds like a good solution.
Buy the new Bug-Wizard, the first 100 bugs are free!
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Kananga wrote:Was it announced on Denial?
Jaap posts as zutman here in Denial:

http://www.sleepingelephant.com/ipw-web ... php?t=4486
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Funny that I don't remember that thread, but I posted there. Must have been one of my alter egos. ;-)
Anyway, I also forgot about his screensaver clock, so the one I put into VIN is not copied from "FE3 screensaver clock", but altogether written from scratch. That's perhaps the reason, why it's not too exciting.

Hey, no I see: your splash is MAXIGRAFIK!

Image

Have you tried loading anything while showing an image with MAXIGRAFIK?
Buy the new Bug-Wizard, the first 100 bugs are free!
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

PM sent
User avatar
Ghislain
Realms of Quest
Posts: 1279
Joined: Sun Aug 08, 2004 12:54 am

Post by Ghislain »

I spent a large part of last week uploading newly-made VIC-20 programs. I just tried this program out, I'm really impressed by the possibilities.

What I think the next logical step (and I hope the next steps lead to this) is the ability for the user to create shortcuts to programs.

Something like this:
-in the file browser, there is a "create shortcut" button
-in the shortcut properties window, the user defines the settings (using RUN or SYS call to boot program, etc. Along with mem configurations)
-as well, the user can edit the shortcut icon with an icon graphical editor. It could be 8x8, 8x16 or 16x16 (whatever Kananga thinks is best).
-modify the position of the shortcut icon on the desktop

There is a huge wealth of VIC software and utilities, so every VIC-20 enthusiast could create their own customized disks. A user could have shortcuts to programs like Mighty Term (80 column modem terminal program), MiniGrafik, etc.

Another wish: the ability to go back to the GUI "OS" once you've exited it to run another program. This could be done by special SYS call, or perhaps SJLOAD$04 can be patched with a shortcut key.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Ghislain wrote:I spent a large part of last week uploading newly-made VIC-20 programs. I just tried this program out, I'm really impressed by the possibilities.
Thanks for giving it a try and your feedback!

I haven't thought of "shortcuts" as you describe it yet, but it sounds like a good thing to add.

An icon editor is definitely on my wish list. I did the cursor shapes and the disk icon with pen&paper and added the derived numbers to the program. Not the most convenient way.

Mike also suggested having a small routine somewhere in memory that enables you to return to the GUI after running a program. The problem here is, that the routine must be able to load the GUI and with an SD2IEC or 64HDD, the directory may be different from where the GUI was loaded initially.

During the discussion, I had the idea to explore the possibilities of the FE3 a bit more, because it should be possible to keep everything in memory and thus save the need to load anything from disk in order to switch back to the GUI. In addition, it would make it easier to return to the state where the GUI was left.

It is indeed possible to have more than one "virtual environment" on the VIC-20 & FE3. I wrote a small program that can switch between up to 8 programs on the VIC-20 using SYS or the RESTORE key. The NMI routine works flawlessly in emulators, but not on the real VIC.
Once that's sorted out, I may add that to VIN.

Still the problem remains that the "switching" routine may be overwritten, because it is not possible to write-protect RAM.
Buy the new Bug-Wizard, the first 100 bugs are free!
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

The "virtual environment on FE3" thingy seems to work. For testing I wrote a simple BASIC program, that demonstrates how to use the "task switching" program and works as a supervisor. Link

Finally, I can start a game of TGA close to midnight, without worrying about the next day, because I can save the state to disk (or SD2IEC) at any time and continue from there on the following evening, without using an emulator. :)

And if there is a bug on real hardware that doesn't render the task switcher useless, you can save the state and debug it in your favourite emulator.

Future steps:
- Add SJLOAD support
- Integrate FE3TS into VIN (Of course, without breaking compatibility to non-FE3 systems)
Buy the new Bug-Wizard, the first 100 bugs are free!
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

I decided to put a new release for the GUI file browser together. I did not find the time to create a better loader, splash, or integrate the FE3 task switcher but there are still some new useful features:

- Correct (default) memory configuration for launching minipaint images.
- Use minimal configuration file (+simple setup program).
- DOS command input window. (Use at own risk!)
- Support for Protovision 4-player adapter, so you can plug your mouse into the protovision adapter and a joystick into the user port for games.
- Bug fixes & minor improvements.

Download here.

I also updated the entry in thread "Software releases 2010".

An update for the document discussing the prototype will follow soon.
Buy the new Bug-Wizard, the first 100 bugs are free!
norm8332
Vic 20 Nerd
Posts: 626
Joined: Sun Nov 13, 2016 11:04 am
Location: USA

Re: WIP: Vic GUI

Post by norm8332 »

Does anyone have a copy of this? I noticed that unfortunately many of the files in the Releases threads are missing. Is it not possible to host them as attachments on the forum to prevent this in the future? Or is it just the poster's preference?

Thanks.
“In religion and politics people’s beliefs and convictions are in almost every case gotten at second-hand, and without examination... whose opinions about them were not worth a brass farthing.”

-Autobiography of Mark Twain
Post Reply