VTUI Library
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
VTUI Library
VTUI (Vera Text User Interface) library
Version 1.2
Can be used to create text user interfaces using VERA instead of relying on the KERNAL functions for writing to screen.
The library is less than 1KB which means it can be loaded into Golden RAM at $400. As an alternative, include files are provided for Acme and CA65 assemblers as well as CC65 compiler.
See https://github.com/JimmyDansbo/VTUIlib for documentation, examples and include files.
The latest binary of the library can be downloaded here: Below is a program that demo's some of the functionality of the VTUI library, VTUI1.1.BIN must be placed in the same directory as DEMO.PRG
Try It Now!
#r45
Version 1.2
Can be used to create text user interfaces using VERA instead of relying on the KERNAL functions for writing to screen.
The library is less than 1KB which means it can be loaded into Golden RAM at $400. As an alternative, include files are provided for Acme and CA65 assemblers as well as CC65 compiler.
See https://github.com/JimmyDansbo/VTUIlib for documentation, examples and include files.
The latest binary of the library can be downloaded here: Below is a program that demo's some of the functionality of the VTUI library, VTUI1.1.BIN must be placed in the same directory as DEMO.PRG
Try It Now!
#r45
- Attachments
-
- vtui.zip
- (4.71 KiB) Downloaded 150 times
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
Re: VTUI Library
This looks great, Jimmy! It reminds me of Borland's text based GUI that they used for Turbo C++ and Turbo Pascal.
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
Re: VTUI Library
I am happy to announce that I have released version 1.0 of the VTUI library.
Now with even more functions as well as support for inclusion in CC65 C projects.
All images, downloads and links in top post are edited to correspond to version 1.0
As always, please let me know if you find any bugs or errors, or if you have questions or comments.
Now with even more functions as well as support for inclusion in CC65 C projects.
All images, downloads and links in top post are edited to correspond to version 1.0
As always, please let me know if you find any bugs or errors, or if you have questions or comments.
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
Re: VTUI Library
ncurses and the old Pascal Crt library were both inspirations.
The VTUI library is not at all as capable as one of the main goals I set was that it should fit in a single KB of memory.
Feel free to play around with the library and don't hesitate to let me know if you have questions, comments or have found a bug.
The VTUI library is not at all as capable as one of the main goals I set was that it should fit in a single KB of memory.
Feel free to play around with the library and don't hesitate to let me know if you have questions, comments or have found a bug.
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
-
- Posts: 138
- Joined: Tue Jul 21, 2020 10:08 pm
Re: VTUI Library
Quick question on using fill_box, border, save_rect, load_rect
If I first use gotoxy and then any of the above will that effectively mean I will get a filled box, a border box, save & restore of a rectangle of specified height and width with the top left corner providing the effective zero datum for these functions?
I don't want to be working with rectangles etc that are only referenced to the 0,0 location in the text screen!
Many thanks in advance.
If I first use gotoxy and then any of the above will that effectively mean I will get a filled box, a border box, save & restore of a rectangle of specified height and width with the top left corner providing the effective zero datum for these functions?
I don't want to be working with rectangles etc that are only referenced to the 0,0 location in the text screen!
Many thanks in advance.
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
Re: VTUI Library
Correct, the fill_box, border, save_rect and load_rect functions have their top left corner at the current VERA address which can be set with the gotoxy function.
I will try to update the documentation to make this more clear.
I will try to update the documentation to make this more clear.
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
Re: VTUI Library
I have started playing with this to do a vi-inspired modal editor in prog8 - don't get excited, still learning. But I had a question that is not related and I figured I'd just keep things in this thread.
This example in the prog8 repo has a "bug", it is an adaptation of the DEMO.PRG:
Should be more like,
In learning vtui and prog8 (and everything else basically), and I trying to figure out how to "fix" it. I've located the initial copy of the logo before the screen is cleared and redrawn, and basically just copied to a new subroutine that will take the same area and save it into memory without clobbering the saved logo in memory. I have not quite worked out how to do this but can break it in informative ways. I am missing some pieces of insight:
The new subroutine results in partially overwriting the original save rectangular area.
I need a patient person to explain to me how the memory addresses can be adjusted, and maybe point to some resource that can give me something to read more about it. I have tracked down the prog8 binding to VTUI1.0.BIN and its source, https://github.com/JimmyDansbo/VTUIlib/ ... eneric.asm.
TIA!
This example in the prog8 repo has a "bug", it is an adaptation of the DEMO.PRG:
Should be more like,
In learning vtui and prog8 (and everything else basically), and I trying to figure out how to "fix" it. I've located the initial copy of the logo before the screen is cleared and redrawn, and basically just copied to a new subroutine that will take the same area and save it into memory without clobbering the saved logo in memory. I have not quite worked out how to do this but can break it in informative ways. I am missing some pieces of insight:
The new subroutine results in partially overwriting the original save rectangular area.
I need a patient person to explain to me how the memory addresses can be adjusted, and maybe point to some resource that can give me something to read more about it. I have tracked down the prog8 binding to VTUI1.0.BIN and its source, https://github.com/JimmyDansbo/VTUIlib/ ... eneric.asm.
TIA!
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
Re: VTUI Library
I am not exactly sure what it is you are asking.
What I can tell you is that the original DEMO.PRG starts out by creating a 7x7 character area filled with spaces, it then saves the logo to another point in memory.
When arrowkeys are pressed, the logo is first overwritten with the area created with spaces and the logo is then drawn at the new coordinates from the saved version.
I am not sure why the store_logo and store_where_logo_was functions are using vtui.save_rect twice ?
What I can tell you is that the original DEMO.PRG starts out by creating a 7x7 character area filled with spaces, it then saves the logo to another point in memory.
When arrowkeys are pressed, the logo is first overwritten with the area created with spaces and the logo is then drawn at the new coordinates from the saved version.
I am not sure why the store_logo and store_where_logo_was functions are using vtui.save_rect twice ?
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
Re: VTUI Library
Sorry that was kind of incoherent. This helps a lot. It's a prog8 example, so I think I'll play around more with it to see what I learn. With your implication that it should be only called once, can you tell me what $80 is for and what $0000 is pointing to? (still super n00b here). Thanks!JimmyDansbo wrote: ↑Tue Dec 19, 2023 6:10 pm ...
I am not sure why the store_logo and store_where_logo_was functions are using vtui.save_rect twice ?