VTUI library
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
VTUI library
I have come a bit further. The generic library is functional although it does not have too many functions yet.
I spent all of the evening yesterday trying to write some documentation and hopefully it is understandable.
Have a look at https://github.com/JimmyDansbo/vtuilib/blob/main/VTUIlib-generic.md
You can also look at the examples and download the binary here: https://github.com/JimmyDansbo/vtuilib/tree/main/VTUIlib-generic
The example shows off most of the functions currently implemented and should look like this:
Let me know if anything is unclear ( there are probably things that needs to be rewritten or clarified)
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: 47
- Joined: Thu Jan 07, 2021 11:37 am
VTUI library
3 hours ago, JimmyDansbo said:
I have come a bit further. The generic library is functional although it does not have too many functions yet.
I spent all of the evening yesterday trying to write some documentation and hopefully it is understandable.
Have a look at https://github.com/JimmyDansbo/vtuilib/blob/main/VTUIlib-generic.md
You can also look at the examples and download the binary here: https://github.com/JimmyDansbo/vtuilib/tree/main/VTUIlib-generic
The example shows off most of the functions currently implemented and should look like this:
Let me know if anything is unclear ( there are probably things that needs to be rewritten or clarified)
This is looking nice ?
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
VTUI library
I think I have reached a point where I have the Generic VTUI light-library finished. I have managed to fit the functions I initially wanted into 1KB so it can be loaded into golden RAM.
The functions included are:
initialize - Initialize the jumptable at the beginning of the library to make it easy to call the rest of the functions
screen_set - Set the screen to 40x30 or 80x60 or toggle between the two
clear - Clear the screen with a specified color
set_stride - Set the VERA stride value
set_decr - Set or reset the VERA decrement bit
gotoxy - Point VERA memory to specific coordinates on screen
plot_char - Put a screencode character and color code on screen at the current VERA address
scan_char - Read a screencode character and color code from screen at current VERA address
hline - Draw a horizontal line
vline - Draw a vertical line
print_str - Convert and print a 0-terminated PETSCII string to screen at current VERA address
fill_box - Create a filled box
pet2scr - Convert a PETSCII code to screencode
scr2pet - Convert a screencode to PETSCII
border - Draw a non-filled box with a border
save_rect - Save an area from screen to memory
rest_rect - Restore screen from memory
I know that this is very basic, but hopefully it could, at least, help people get an understanding on how these things could work. I still have lots of work to do as I have not done anything on the ACME and CA65 include files. I also need to create another example and possibly a demo of how to use the library.
I think I will leave the light version with the above functions, and focus on getting the include files finished as well as create a demo on how to use the library.
I do plan on extending the library with scrolling, string input, hex/number to string conversion and more, but for now I will get this light version finished.
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
VTUI library
This is great yep! I have a lot my own routines that do the same thing in my program at moment, however, I would like to test your library against my current solution at some point soon since I think having a standard TUI library between apps would be great! (Maybe a suitable use of ROM in the future!?).
I noticed from your screenshots that your lines connected with the outer box border. Is that "automatic" or how did you end up doing that? My current routines draw all the boxes and lines and then I go back and add the connectors after, which has resulted in a few visual bugs when I switch to different panes on my app (as I intentionally don't want to redraw the whole screen when I switch). Hopefully that makes sense!
Author of Dreamtracker (https://www.dreamtracker.org/)
Check Out My Band: https://music.victimcache.com/
Check Out My Band: https://music.victimcache.com/
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
VTUI library
1 hour ago, m00dawg said:
I noticed from your screenshots that your lines connected with the outer box border. Is that "automatic" or how did you end up doing that?
It is not automatic, neither is the header of a box.
I just draw a border and a fill_box, then I use plot_char to replace the border with T-pieces where necessary, use print_str to write the header and and hline to draw a horizontal line across my box.
In a more feature-rich library there would be the option to add headers to boxes and to divide a box with horizontal or vertical lines. As it is now, the user has to use the basic functions provided to create those advanced features.
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
- kliepatsch
- Posts: 247
- Joined: Thu Oct 08, 2020 9:54 pm
VTUI library
Great effort, Jimmy! Thanks for the library. I wonder if it would be more visible to the community if you upload it with a nice screenshot in the "devtools" category?
I think the fact that you managed to squeeze it into golden RAM doubles the value of this library, because I guess many programs don't use it anyway. So you effectively get some nice functionality at almost zero cost ?
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
VTUI library
4 minutes ago, kliepatsch said:
Great effort, Jimmy! Thanks for the library. I wonder if it would be more visible to the community if you upload it with a nice screenshot in the "devtools" category?
Thanks for your kind words. I will definitely upload it in the devtools category when I have completed all 3 flavors and documentation.
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
- kliepatsch
- Posts: 247
- Joined: Thu Oct 08, 2020 9:54 pm
VTUI library
I've ran my first test with it. Loaded the generic flavor with the kernal routines SETNAM, SETLFS and LOAD into golden RAM ($400). Really clever solution with the initialization, and only using relative jumps apart from the jump table at the start. I like it.
BTW the binary of the program itself (without VTUI) is 112 bytes. That includes setup of the library and the commands using the VTUI, and a "press any key" loop.
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
VTUI library
The library has been updated a bit and I have added it to the Dev Tools section
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
- desertfish
- Posts: 1092
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands