Vic GUI
Moderator: Moderators
Vic GUI
Since I am slowly making progress on my little project I want to share early results and your input.
The project is a little prototype for a GUI framework for the VIC. Of course it may use lots of the precious RAM, but we should finally make use of the new wonderful carts with 512K RAM!
(My FE3 isn't working yet, but that's another story)
Joystick or a Joystick emulating mouse works for the pointer (tested with M1 mouse) and I think about supporting a light-pen too. (I got one so have to put it to some use)
For now, you can only move the pointer and click Exit in the start-menu.
The framework uses dynamic allocation of char-gen cells for frames containing windows, buttons, etc. So you cannot display a full-screen frame, but smaller frames can coexist and go of-screen if unused and return the char-gen resources to the framework.
Text output uses built-in fonts, but is prepared for custom fonts. I haven't found the time yet to create a smaller font...
Next I want to build a small program like a calculator to continue testing and extending the framework. It should still run on a Vic+8/16K.
Any suggestions?
The project is a little prototype for a GUI framework for the VIC. Of course it may use lots of the precious RAM, but we should finally make use of the new wonderful carts with 512K RAM!
(My FE3 isn't working yet, but that's another story)
Joystick or a Joystick emulating mouse works for the pointer (tested with M1 mouse) and I think about supporting a light-pen too. (I got one so have to put it to some use)
For now, you can only move the pointer and click Exit in the start-menu.
The framework uses dynamic allocation of char-gen cells for frames containing windows, buttons, etc. So you cannot display a full-screen frame, but smaller frames can coexist and go of-screen if unused and return the char-gen resources to the framework.
Text output uses built-in fonts, but is prepared for custom fonts. I haven't found the time yet to create a smaller font...
Next I want to build a small program like a calculator to continue testing and extending the framework. It should still run on a Vic+8/16K.
Any suggestions?
Very nice! This looks really cool.
Have you considered making the whole screen a bitmap a la MINIGRAFIK? That would solve all of the problems related to character memory limitations.
How are applications going to run on top of GUI? If you want to take the FE3 route, it almost makes sense to just give each program its own memory bank and leave a bank for the GUI. That'd allow 15 programs to run at a time and solve any disputes that might otherwise occur over the sharing of RAM between programs. But there are a many people a lot more intelligent than me here that may have a better idea.
I assume you've put a fair amount of thought into how programs will interface with the GUI since you're planning to make a calculator. Care to share any details in that regard?
Keep up the good work! I look forward to future updates.
Have you considered making the whole screen a bitmap a la MINIGRAFIK? That would solve all of the problems related to character memory limitations.
How are applications going to run on top of GUI? If you want to take the FE3 route, it almost makes sense to just give each program its own memory bank and leave a bank for the GUI. That'd allow 15 programs to run at a time and solve any disputes that might otherwise occur over the sharing of RAM between programs. But there are a many people a lot more intelligent than me here that may have a better idea.
I assume you've put a fair amount of thought into how programs will interface with the GUI since you're planning to make a calculator. Care to share any details in that regard?
Keep up the good work! I look forward to future updates.
-
- Vic 20 Scientist
- Posts: 1193
- Joined: Tue Apr 28, 2009 3:51 pm
If you do it a la MINIGRAFIK the limits are still imposed by the character memory, so programs like MINGRAFIK or the super expander use a lower resolution. I like the idea of having a higher virtual resulation that is filled with characters on demand or in this case blocks of characters for frames.Wilson wrote:Very nice! This looks really cool.
Have you considered making the whole screen a bitmap a la MINIGRAFIK? That would solve all of the problems related to character memory limitations.
Actually I haven't put enough thought into the programming interface yet, since it is still evolving and at present not the easiest to use. A Basic extension/wedge would be cool. And a BASIC console of course, perhaps using a 4px wide font, so it fits into a frameWilson wrote: How are applications going to run on top of GUI? If you want to take the FE3 route, it almost makes sense to just give each program its own memory bank and leave a bank for the GUI. That'd allow 15 programs to run at a time and solve any disputes that might otherwise occur over the sharing of RAM between programs. But there are a many people a lot more intelligent than me here that may have a better idea.
I assume you've put a fair amount of thought into how programs will interface with the GUI since you're planning to make a calculator. Care to share any details in that regard?
In ASM the interface requires a lot of code atm, e.g.
Code: Select all
; create menu bar
menu_init: ; create main frame
ldx #MAX_WIDTH
ldy #16
jsr frm_create
ldx #BAR_POS_X
ldy #BAR_POS_Y
jsr frm_setpos
ldy #FFLG_PERM
jsr frm_setflags
jsr frm_getwin
sta h_bar
jsr win_realize
lda #WSTYLE_BCKGND
jsr win_setstyle
lda #1 ; lower case system font
jsr win_setfont
... create buttons, etc.
; draw window
lda h_bar
jsr win_draw
lda h_bar
jsr win_show ; to screen
rts
Thanks!Wilson wrote: Keep up the good work! I look forward to future updates.
25 years ago I dreamed about putting 512K RAM into my VIC and allowing the VIC-I to see the lower 3K and other stuff. Now we get all the cool stuff and I like it. I have to admit, I do not want to open the case of my VIC and modify anything on the inside any more. And what I got so far runs on any off-the-shelf (PAL)VIC with 8K expansion.English Invader wrote:I don't think I'd want the VIC to have a GUI. It would destroy everything the VIC is about.
Don't get me wrong, I don't think my point of view is right for everybody and I respect your opinion. Still I am curious, what is the VIC about?
you need about 5 minutes to click start then exit, wow
Just a suggestion, substitute the [START] button with a [VIC] button or better with a nice CBM chicken logo.
Just a suggestion, substitute the [START] button with a [VIC] button or better with a nice CBM chicken logo.
Mega-Cart: the cartridge you plug in once and for all.
Yes please!Kananga wrote: Actually I haven't put enough thought into the programming interface yet, since it is still evolving and at present not the easiest to use. A Basic extension/wedge would be cool. And a BASIC console of course, perhaps using a 4px wide font, so it fits into a frame
$0000-$0400 should be safe right? In that case, the only reasonable way I can think of would be to pass the function parameters on the stack and have all the universal GUI code in a single bank. You would also need a small routine in the cassette buffer or at the end of the stack to switch to this bank. Similarly, you would need a routine to switch back to the bank that the GUI routine was called from. If there are 256 or less GUI routines, the "ID" of the routine could be sent in A. Of course the GUI code would need to know which bank to return control to after the routine has been completed.Kananga wrote: I am also not sure yet about how to use the banks in FE3. According to the documentation all blocks switch bank simultaneously, so I don't know where to put the code needed from all banks. ($1000-$1FFF is video and char ram)
I envision something like this:
Code: Select all
lda currBank ; the current bank # (so that control can return here after GUI subroutine)
pha
lda param1 ; first parameter for GUI routine
pha
lda param2 ; second parameter for GUI routine
pha
...
lda #$01 ; GUI routine ID number
jsr callGUI ; switch to GUI bank and do GUI routine #01
You have to spend that much time, because there is nothing else to do yetnbla000 wrote:you need about 5 minutes to click start then exit, wow
Actually it is not that bad. It took me so long to make the screenshots, crop and save them. I could put the .prg somewhere, if I knew where, but as I said, besides clicking exit there is not much in it yet.
I thought about that too. And make C= the hotkey for the menunbla000 wrote: Just a suggestion, substitute the [START] button with a [VIC] button or better with a nice CBM chicken logo.
Very nice choice, the [Start] button remembers me another OSKananga wrote:I thought about that too. And make C= the hotkey for the menu
Just another thing, why you don't put the bar on top like Amiga Workbench, Atari ST OS, C64 GEOS ?
Mega-Cart: the cartridge you plug in once and for all.
Sure, no problem. The bar is just a frame/window. It would be easy to pop-up a menu whenever the user clicks on the background like in X, because unhandled mouse events go to the root window.gklinger wrote:Given the lack of real estate, why have a bar at all? I would think an X-windows-like clean slate approach would be more efficient.nbla000 wrote:Just another thing, why you don't put the bar on top like Amiga Workbench, Atari ST OS, C64 GEOS ?
- robinsonmason
- Vic 20 Enthusiast
- Posts: 195
- Joined: Sun Mar 14, 2010 9:17 pm
Re: Vic GUI
Can I help you? Whats the problem with your FE3?Kananga wrote:(My FE3 isn't working yet, but that's another story)